#include <alsuq/stats/FixedIntervalStatistics.hpp>
Decorator for the statistics class to only write a given interval, this mimics the use of alsfvm::io::FixedIntervalWriter
◆ FixedIntervalStatistics()
alsuq::stats::FixedIntervalStatistics::FixedIntervalStatistics |
( |
alsfvm::shared_ptr< Statistics > & |
writer, |
|
|
real |
timeInterval, |
|
|
real |
endTime, |
|
|
bool |
writeInitialTimestep = true |
|
) |
| |
- Parameters
-
writer | the underlying writer to actually use. |
timeInterval | the time interval (will save for every time n*timeInterval) |
endTime | the final time for the simulation. |
writeInitialTimestep | write the first timestep |
◆ addWriter()
void alsuq::stats::FixedIntervalStatistics::addWriter |
( |
const std::string & |
name, |
|
|
std::shared_ptr< alsfvm::io::Writer > & |
writer |
|
) |
| |
|
overridevirtual |
Adds a write for the given statistics name
- Parameters
-
name | the name of the statitics (one of the names returned in getStatiticsNames() |
writer | the writer to use |
Implements alsuq::stats::Statistics.
◆ adjustTimestep()
adjustTimestep returns the new timestep that the simulator should use
- Parameters
-
dt | the current timestep being used |
timestepInformation | timesteps information |
- Returns
- the new timestep
Implements alsfvm::integrator::TimestepAdjuster.
◆ combineStatistics()
void alsuq::stats::FixedIntervalStatistics::combineStatistics |
( |
| ) |
|
|
overridevirtual |
◆ computeStatistics()
◆ finalizeStatistics()
void alsuq::stats::FixedIntervalStatistics::finalizeStatistics |
( |
| ) |
|
|
overridevirtual |
To be called in the end, this could be to eg compute the variance through M_2-mean^2 or any other postprocessing needed
Implements alsuq::stats::Statistics.
◆ getStatisticsNames()
std::vector< std::string > alsuq::stats::FixedIntervalStatistics::getStatisticsNames |
( |
| ) |
const |
|
overridevirtual |
Returns a list of the names of the statistics being computed, typically this could be ['mean', 'variance']
Implements alsuq::stats::Statistics.
◆ writeStatistics()
void alsuq::stats::FixedIntervalStatistics::writeStatistics |
( |
const alsfvm::grid::Grid & |
grid | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files: