Alsvinn  0.5.3
The fast FVM simulator with UQ support
Public Member Functions | List of all members
alsuq::stats::StatisticsTimer Class Reference

Simple timer class. More...

#include <alsuq/stats/StatisticsTimer.hpp>

Inheritance diagram for alsuq::stats::StatisticsTimer:
alsuq::stats::Statistics alsfvm::io::Writer

Public Member Functions

 StatisticsTimer (const std::string &name, std::shared_ptr< Statistics > statistics)
 
 ~StatisticsTimer ()
 
virtual void combineStatistics () override
 To be called when the statistics should be combined. More...
 
virtual void addWriter (const std::string &name, std::shared_ptr< alsfvm::io::Writer > &writer) override
 
virtual std::vector< std::string > getStatisticsNames () const override
 
virtual void computeStatistics (const alsfvm::volume::Volume &conservedVariables, const alsfvm::grid::Grid &grid, const alsfvm::simulator::TimestepInformation &timestepInformation) override
 
virtual void finalizeStatistics () override
 
virtual void writeStatistics (const alsfvm::grid::Grid &grids) override
 
- Public Member Functions inherited from alsuq::stats::Statistics
virtual ~Statistics ()
 
virtual void write (const alsfvm::volume::Volume &conservedVariables, const alsfvm::grid::Grid &grid, const alsfvm::simulator::TimestepInformation &timestepInformation) override
 
- Public Member Functions inherited from alsfvm::io::Writer
virtual ~Writer ()
 
virtual void finalize (const grid::Grid &grid, const simulator::TimestepInformation &timestepInformation)
 This method should be called at the end of the simulation. More...
 
void addAttributes (const std::string &nameOfAttributes, const boost::property_tree::ptree &attributes)
 

Additional Inherited Members

- Static Public Member Functions inherited from alsfvm::io::Writer
static std::string getClassName ()
 
- Protected Attributes inherited from alsfvm::io::Writer
std::map< std::string, boost::property_tree::ptree > attributesMap
 

Detailed Description

Simple timer class.

Constructor & Destructor Documentation

◆ StatisticsTimer()

alsuq::stats::StatisticsTimer::StatisticsTimer ( const std::string &  name,
std::shared_ptr< Statistics statistics 
)

◆ ~StatisticsTimer()

alsuq::stats::StatisticsTimer::~StatisticsTimer ( )

Member Function Documentation

◆ addWriter()

void alsuq::stats::StatisticsTimer::addWriter ( const std::string &  name,
std::shared_ptr< alsfvm::io::Writer > &  writer 
)
overridevirtual

Adds a write for the given statistics name

Parameters
namethe name of the statitics (one of the names returned in getStatiticsNames()
writerthe writer to use

Implements alsuq::stats::Statistics.

◆ combineStatistics()

void alsuq::stats::StatisticsTimer::combineStatistics ( )
overridevirtual

To be called when the statistics should be combined.

Implements alsuq::stats::Statistics.

◆ computeStatistics()

void alsuq::stats::StatisticsTimer::computeStatistics ( const alsfvm::volume::Volume conservedVariables,
const alsfvm::grid::Grid grid,
const alsfvm::simulator::TimestepInformation timestepInformation 
)
overridevirtual

◆ finalizeStatistics()

void alsuq::stats::StatisticsTimer::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::StatisticsTimer::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::StatisticsTimer::writeStatistics ( const alsfvm::grid::Grid grids)
overridevirtual

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