ParticleMonitor< dim, number, ObstacleType > Class Template Reference

Developer Documentation: MeltPoolDG::ParticleMonitor< dim, number, ObstacleType > Class Template Reference
Developer Documentation
MeltPoolDG::ParticleMonitor< dim, number, ObstacleType > Class Template Reference

#include <particle_monitor.hpp>

Collaboration diagram for MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >:
[legend]

Classes

struct  ParticleStatisticsBasic
 
struct  ParticleStatisticsDetailed
 
struct  Statistics
 

Public Member Functions

 ParticleMonitor (const ObstacleField< dim, number, ObstacleType > &obstacle_field)
 
void add_info (const Profiling::ProfilingVerbosity verbosity=Profiling::ProfilingVerbosity::none)
 
void print (const ConditionalOStream &pcout, const std::string &title) const
 

Private Attributes

ParticleStatisticsBasic particle_statistics_basic
 
ParticleStatisticsDetailed particle_statistics_detailed
 
unsigned int n_calls_basic = 0
 
unsigned int n_calls_detailed = 0
 
const ObstacleField< dim, number, ObstacleType > & obstacle_field
 

Detailed Description

template<int dim, typename number, typename ObstacleType>
class MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >

This class monitors the particle distribution of an ObstacleField over time and allows to print statistics about the particle distribution if requested.

Each call to add_info() records one sample of the particle statistics locally on each MPI rank. When printed using the function print() the collected samples are reduced over all MPI ranks and a table is printed with the number of samples, the average, the minimum and the maximum of each quantity. Where applicable the load imbalance between the MPI ranks is also printed.

Constructor & Destructor Documentation

◆ ParticleMonitor()

template<int dim, typename number , typename ObstacleType >
MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::ParticleMonitor ( const ObstacleField< dim, number, ObstacleType > &  obstacle_field)
explicit

Constructor.

Parameters
obstacle_fieldThe monitored obstacle field.

Member Function Documentation

◆ add_info()

template<int dim, typename number , typename ObstacleType >
void MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::add_info ( const Profiling::ProfilingVerbosity  verbosity = Profiling::ProfilingVerbosity::none)

Records one sample of the particle statistics of the monitored obstacle field.

Parameters
verbosityThe verbosity of the profiling to be recorded. If set to ProfilingVerbosity::basic, only data which is cheap to collect is recorded. If set to ProfilingVerbosity::detailed, also data which is expensive to collect is recorded.
Note
This is a collective operation and must be called on all MPI ranks in the MPI communicator of the monitored obstacle field.

◆ print()

template<int dim, typename number , typename ObstacleType >
void MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::print ( const ConditionalOStream &  pcout,
const std::string &  title 
) const

Prints the statistics of all recorded samples, reduced over all MPI ranks, as a table. Quantities without any recorded sample are omitted.

Parameters
pcoutStream to print the table to.
titleTitle of the table.
Note
This is a collective operation and must be called on all MPI ranks, also on those on which pcout is inactive.

Member Data Documentation

◆ n_calls_basic

template<int dim, typename number , typename ObstacleType >
unsigned int MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::n_calls_basic = 0
private

◆ n_calls_detailed

template<int dim, typename number , typename ObstacleType >
unsigned int MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::n_calls_detailed = 0
private

◆ obstacle_field

template<int dim, typename number , typename ObstacleType >
const ObstacleField<dim, number, ObstacleType>& MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::obstacle_field
private

◆ particle_statistics_basic

template<int dim, typename number , typename ObstacleType >
ParticleStatisticsBasic MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::particle_statistics_basic
private

◆ particle_statistics_detailed

template<int dim, typename number , typename ObstacleType >
ParticleStatisticsDetailed MeltPoolDG::ParticleMonitor< dim, number, ObstacleType >::particle_statistics_detailed
private

The documentation for this class was generated from the following files: