Statistics Struct Reference
|
Developer Documentation
|
Public Member Functions | |
| Statistics (std::string label) | |
| void | add_info (const unsigned int value) |
| void | add_info_with_imbalance (const unsigned int value, MPI_Comm mpi_communicator) |
| number | average () const |
| number | average_imbalance () const |
| bool | has_imbalance () const |
| Statistics | get_statistics_across_mpi_ranks (MPI_Comm mpi_communicator) const |
Public Attributes | |
| const std::string | label |
| Name of the quantity. | |
| unsigned int | min = 0 |
| Minimum over all samples. | |
| unsigned int | max = 0 |
| Maximum over all samples. | |
| number | sum = 0. |
| Sum over all samples. | |
| uint64_t | n_samples = 0 |
| Number of recorded samples. | |
| number | imbalance_sum = 0. |
| Sum of the load imbalance over all samples recorded via add_info_with_imbalance(). | |
| uint64_t | n_imbalance_samples = 0 |
| Number of samples recorded via add_info_with_imbalance(). | |
Detailed Description
struct MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics
A helper struct that represents the statistics of a single unsigned integer quantity over all recorded samples.
Constructor & Destructor Documentation
◆ Statistics()
|
explicit |
Constructor.
- Parameters
-
label Name of the quantity, as shown in the printed table.
Member Function Documentation
◆ add_info()
| void MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics::add_info | ( | const unsigned int | value | ) |
Records one sample of the quantity on the current MPI rank.
- Parameters
-
value The value of the sample.
◆ add_info_with_imbalance()
| void MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics::add_info_with_imbalance | ( | const unsigned int | value, |
| MPI_Comm | mpi_communicator | ||
| ) |
Records one sample of the quantity and the load imbalance of this sample across all MPI ranks. The load imbalance is defined as the maximum of value over all MPI ranks divided by its mean, i.e., a value of 1 means perfectly balanced.
- Parameters
-
value The value of the sample on the current MPI rank. mpi_communicator MPI communicator over which the load imbalance is computed.
- Note
- This is a collective operation and must be called on all MPI ranks in the MPI communicator.
◆ average()
| number MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics::average | ( | ) | const |
Returns the average over all recorded samples, or 0 if no sample was recorded.
◆ average_imbalance()
| number MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics::average_imbalance | ( | ) | const |
Returns the load imbalance averaged over all recorded samples.
- Note
- Only meaningful if has_imbalance() returns true.
◆ get_statistics_across_mpi_ranks()
| MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics::get_statistics_across_mpi_ranks | ( | MPI_Comm | mpi_communicator | ) | const |
Returns the statistics reduced over all MPI ranks.
- Parameters
-
mpi_communicator MPI communicator over which the statistics are reduced.
- Note
- This is a collective operation and must be called on all MPI ranks in the given MPI communicator.
◆ has_imbalance()
| bool MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics::has_imbalance | ( | ) | const |
Returns true if samples have been recorded via add_info_with_imbalance().
Member Data Documentation
◆ imbalance_sum
| number MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics::imbalance_sum = 0. |
Sum of the load imbalance over all samples recorded via add_info_with_imbalance().
◆ label
| const std::string MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics::label |
Name of the quantity.
◆ max
| unsigned int MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics::max = 0 |
Maximum over all samples.
◆ min
| unsigned int MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics::min = 0 |
Minimum over all samples.
◆ n_imbalance_samples
| uint64_t MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics::n_imbalance_samples = 0 |
Number of samples recorded via add_info_with_imbalance().
◆ n_samples
| uint64_t MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics::n_samples = 0 |
Number of recorded samples.
◆ sum
| number MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::Statistics::sum = 0. |
Sum over all samples.
The documentation for this struct was generated from the following files:
- include/meltpooldg/particles/particle_monitor.hpp
- source/particles/particle_monitor.cpp
Generated by