Main class for online statistics calculation.
More...
#include <statistics_record.h>
Main class for online statistics calculation.
This class manages the definition, update and output of statistics calculated during a simulation. It is intended to be stored as a ProcessInfo variable and called at specific points during the simulation procedure.
- See also
- IntegrationPointStatisticsProcess for an implementation using this to compute statistics at the mesh integration points.
◆ StatisticsRecord()
Kratos::StatisticsRecord::StatisticsRecord |
( |
| ) |
|
|
inline |
◆ ~StatisticsRecord()
virtual Kratos::StatisticsRecord::~StatisticsRecord |
( |
| ) |
|
|
inlinevirtual |
◆ AddHigherOrderStatistic()
void Kratos::StatisticsRecord::AddHigherOrderStatistic |
( |
StatisticsSampler::Pointer |
pResult | ) |
|
Add one second or higher order statistic to be tracked during the simulation.
- Parameters
-
[in] | pResult | pointer to the statistic quantity. |
◆ AddResult()
void Kratos::StatisticsRecord::AddResult |
( |
StatisticsSampler::Pointer |
pResult | ) |
|
Add one first order statistic to be tracked during the simulation.
- Parameters
-
[in] | pResult | pointer to the statistic quantity. |
◆ Info()
virtual std::string Kratos::StatisticsRecord::Info |
( |
| ) |
const |
|
inlinevirtual |
Turn back information as a string.
◆ InitializeStorage()
Initialize elemental storage for the tracked statistics.
Note that all results should be added before calling this.
- Parameters
-
rElements | List of elements whose integration points will be used to record statistics. |
◆ KRATOS_CLASS_POINTER_DEFINITION()
◆ OutputForTest()
Output current values of all recorded quantities as a vector of doubles.
Provided for debug and testing purposes ONLY.
◆ PrintData()
virtual void Kratos::StatisticsRecord::PrintData |
( |
std::ostream & |
rOStream | ) |
const |
|
inlinevirtual |
◆ PrintInfo()
virtual void Kratos::StatisticsRecord::PrintInfo |
( |
std::ostream & |
rOStream | ) |
const |
|
inlinevirtual |
Print information about this object.
◆ PrintToFile()
void Kratos::StatisticsRecord::PrintToFile |
( |
const ModelPart & |
rModelPart, |
|
|
const std::string & |
rOutputFileName |
|
) |
| const |
Output recorded statistics to a comma-separated value file.
- Parameters
-
[in] | rModelPart | The model part instance where statistics are recorded. |
[in] | rOutputFileName | Base name for the output file. The .csv extension (and in MPI the rank) will be automatically appended to the provided file name. |
◆ SampleIntegrationPointResults()
void Kratos::StatisticsRecord::SampleIntegrationPointResults |
( |
ModelPart & |
rModelPart | ) |
|
Record a new sample point.
This function expects InitializeStorage to have been called in advance. Normal usage will be to call this once for time step (or every time a new measurement is available). It is also assumed that the elements will call the UpdateStatistics method of this class internally.
- See also
- FluidElement for an example of use.
- Parameters
-
rModelPart | ModelPart containing the elements where statistics are recorded. |
◆ UpdateStatistics()
void Kratos::StatisticsRecord::UpdateStatistics |
( |
Element * |
pElement | ) |
|
Update statistics for a single element.
This function should be called by elements supporting statistics calculation on integration points.
- See also
- FluidElement for an example of use.
- Parameters
-
◆ Serializer
The documentation for this class was generated from the following files:
- /home/runner/work/Documentation/Documentation/master/applications/FluidDynamicsApplication/custom_utilities/statistics_record.h
- /home/runner/work/Documentation/Documentation/master/applications/FluidDynamicsApplication/custom_utilities/statistics_record.cpp