|
chombo-discharge
|
Class for holding computational loads. More...
#include <CD_Loads.H>
Public Member Functions | |
| Loads () noexcept | |
| Constructor. Assigns zero loads. | |
| virtual | ~Loads () noexcept |
| Destructor (does nothing). | |
| virtual std::map< int, Real > & | getLoads () noexcept |
| Get the computational loads. | |
| virtual const std::map< int, Real > & | getLoads () const noexcept |
| Get the computational loads. | |
| virtual void | resetLoads () noexcept |
| Reset loads. Sets all loads to 0. | |
| virtual void | assignLoads (const std::map< int, Real > &a_assignedLoads) noexcept |
| Assign loads. | |
| virtual void | assignLoads (const std::vector< Real > &a_assignedLoads) noexcept |
| Assign loads. In this version a_assignedLoads[0] is the load assigned to rank 0, and so on. | |
| virtual void | assignLoads (const Vector< Real > &a_assignedLoads) noexcept |
| Assign loads. In this version a_assignedLoads[0] is the load assigned to rank 0, and so on. | |
| virtual void | incrementLoads (const std::map< int, Real > &a_increments) noexcept |
| Increment loads. In this version a_increments[0] is the load increment for rank 0, and so on. | |
| virtual void | incrementLoads (const std::vector< Real > &a_increments) noexcept |
| Increment loads. In this version a_increments[0] is the load increment for rank 0, and so on. | |
| virtual void | incrementLoads (const Vector< Real > &a_increments) noexcept |
| Increment loads. In this version a_increments[0] is the load increment for rank 0, and so on. | |
| virtual void | incrementLoad (const int a_rank, const Real a_increment) noexcept |
| Increment load on rank. | |
| virtual std::vector< std::pair< int, Real > > | getSortedLoads () const noexcept |
| Get sorted loads. | |
Protected Attributes | |
| std::map< int, Real > | m_loads |
| Actual computational loads per MPI rank. | |
Class for holding computational loads.
This is typically used in the context of load-balancing with AMR. The class is, however, standalone.
Assign loads.
| [in] | a_assignedLoads | Loads assigned to ranks. |
|
virtualnoexcept |
Assign loads. In this version a_assignedLoads[0] is the load assigned to rank 0, and so on.
| [in] | a_assignedLoads | Loads assigned to ranks. |
Assign loads. In this version a_assignedLoads[0] is the load assigned to rank 0, and so on.
| [in] | a_assignedLoads | Loads assigned to ranks. |
Get the computational loads.
Get the computational loads.
|
virtualnoexcept |
Get sorted loads.
This routine sorts the computational loads from smallest to largest, and returns the result as a vector of ranks (and loads).
Increment load on rank.
| [in] | a_rank | MPI rank where load is incremented |
| [in] | a_increment | Load increment |
Increment loads. In this version a_increments[0] is the load increment for rank 0, and so on.
| [in] | a_increments | Loads to increment by. |
|
virtualnoexcept |
Increment loads. In this version a_increments[0] is the load increment for rank 0, and so on.
| [in] | a_increments | Loads to increment by. |
Increment loads. In this version a_increments[0] is the load increment for rank 0, and so on.
| [in] | a_increments | Loads to increment by. |
Actual computational loads per MPI rank.
The key is the rank, and the value is the actual load