DUNE PDELab (git)

Dune::PDELab::SolverStatistics< T > Class Template Reference

Class for collecting statistics over several invocations. More...

#include <dune/pdelab/backend/istl/matrixfree/solverstatistics.hh>

Public Member Functions

 SolverStatistics (const Dune::Communication< MPI_Comm > &comm_)
 Create new instance of class. More...
 
void append (const T x)
 Add new data point. More...
 
void clear ()
 clear out data
 
size_t size () const
 Total number of calls. More...
 
double avg () const
 Calculate global average. More...
 
double stddev () const
 Calculate standard deviation. More...
 
const T min () const
 Calculate global minimum. More...
 
const T max () const
 Calculate global maximum. More...
 
const StatisticsResult< T > result () const
 Convert to statistics result.
 

Detailed Description

template<typename T>
class Dune::PDELab::SolverStatistics< T >

Class for collecting statistics over several invocations.

Records data for every invocation and provides methods for calculating min/max/avg/stddev over all invocations. This can then be used to calculate statistics on the block-solves

Constructor & Destructor Documentation

◆ SolverStatistics()

template<typename T >
Dune::PDELab::SolverStatistics< T >::SolverStatistics ( const Dune::Communication< MPI_Comm > &  comm_)
inline

Create new instance of class.

Parameters
[in]comm_Collective communication object

Member Function Documentation

◆ append()

◆ avg()

template<typename T >
double Dune::PDELab::SolverStatistics< T >::avg ( ) const
inline

Calculate global average.

Calculates global average over all processors and invocations

References Dune::Hybrid::accumulate(), and Dune::Communication< MPI_Comm >::sum().

Referenced by Dune::PDELab::SolverStatistics< T >::result().

◆ max()

template<typename T >
const T Dune::PDELab::SolverStatistics< T >::max ( ) const
inline

Calculate global maximum.

Calculates global maximum over all processors and invocations

References Dune::Communication< MPI_Comm >::max().

Referenced by Dune::PDELab::SolverStatistics< T >::result().

◆ min()

template<typename T >
const T Dune::PDELab::SolverStatistics< T >::min ( ) const
inline

Calculate global minimum.

Calculates global minimum over all processors and invocations

References Dune::Communication< MPI_Comm >::min().

Referenced by Dune::PDELab::SolverStatistics< T >::result().

◆ size()

template<typename T >
size_t Dune::PDELab::SolverStatistics< T >::size ( ) const
inline

Total number of calls.

Calculates total number of invocations

References Dune::Communication< MPI_Comm >::sum().

Referenced by Dune::PDELab::SolverStatistics< T >::result().

◆ stddev()

template<typename T >
double Dune::PDELab::SolverStatistics< T >::stddev ( ) const
inline

Calculate standard deviation.

Calculates standard deviation

References Dune::Hybrid::accumulate(), and Dune::Communication< MPI_Comm >::sum().

Referenced by Dune::PDELab::SolverStatistics< T >::result().


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)