Peano
Loading...
Searching...
No Matches
mghype::matrixfree::solvers::SolverStatistics Class Reference

#include <SolverStatistics.h>

Inheritance diagram for mghype::matrixfree::solvers::SolverStatistics:
Collaboration diagram for mghype::matrixfree::solvers::SolverStatistics:

Public Member Functions

 SolverStatistics (double tolerance=0.0)
 
bool terminationCriterionHolds ()
 
void updateGlobalResidual (double residual, const tarch::la::Vector< Dimensions, double > &h)
 Update the global residual.
 
void updateGlobalPrecondResidual (double residual)
 
void updateGlobalSolutionUpdates (double deltaU, const tarch::la::Vector< Dimensions, double > &h)
 
void updateMinMaxMeshSize (const tarch::la::Vector< Dimensions, double > &h)
 
void clearGlobalPrecondResidualUpdate ()
 
double getGlobalResidualMaxNorm () const
 
std::array< double, 2 > getGlobalPrecondResidualNorms () const
 
std::string toString () const
 
void merge (const SolverStatistics &statistics)
 
std::string reportPrecondNorms () const
 
void clearGlobalResidualAndSolutionUpdate ()
 Clear the global mesh stats.
 
void synchroniseGlobalResidualAndSolutionUpdate ()
 Synchronise the global stats between MPI ranks.
 

Protected Attributes

const double _tolerance
 
double _minH
 Observed mesh width.
 
double _maxH
 Observed mesh width.
 
double _globalResidualMaxNorm
 
double _globalResidualEukledianNormSquared
 
double _globalResidualHNormSquared
 
double _initialGlobalResidualMaxNorm
 
double _initialGlobalResidualEukledianNormSquared
 
double _initialGlobalResidualHNormSquared
 
double _previousGlobalResidualMaxNorm
 
double _previousGlobalResidualEukledianNormSquared
 
double _previousGlobalResidualHNormSquared
 
double _globalDeltaUMaxNorm
 
double _globalDeltaUEukledianNormSquared
 
double _globalDeltaUHNormSquared
 
double _globalPrecondResidualMaxNorm
 
double _globalPrecondResidualEukledianNormSquared
 

Static Protected Attributes

static tarch::logging::Log _log
 

Detailed Description

Definition at line 25 of file SolverStatistics.h.

Constructor & Destructor Documentation

◆ SolverStatistics()

mghype::matrixfree::solvers::SolverStatistics::SolverStatistics ( double  tolerance = 0.0)
Parameters
toleranceYou can use the default parameter if you later on merge it into a proper class.

Member Function Documentation

◆ clearGlobalPrecondResidualUpdate()

void mghype::matrixfree::solvers::SolverStatistics::clearGlobalPrecondResidualUpdate ( )

◆ clearGlobalResidualAndSolutionUpdate()

void mghype::matrixfree::solvers::SolverStatistics::clearGlobalResidualAndSolutionUpdate ( )

Clear the global mesh stats.

Most solvers call this one in beginMeshSweep().

◆ getGlobalPrecondResidualNorms()

std::array< double, 2 > mghype::matrixfree::solvers::SolverStatistics::getGlobalPrecondResidualNorms ( ) const

◆ getGlobalResidualMaxNorm()

double mghype::matrixfree::solvers::SolverStatistics::getGlobalResidualMaxNorm ( ) const

◆ merge()

void mghype::matrixfree::solvers::SolverStatistics::merge ( const SolverStatistics &  statistics)

◆ reportPrecondNorms()

std::string mghype::matrixfree::solvers::SolverStatistics::reportPrecondNorms ( ) const

◆ synchroniseGlobalResidualAndSolutionUpdate()

void mghype::matrixfree::solvers::SolverStatistics::synchroniseGlobalResidualAndSolutionUpdate ( )

Synchronise the global stats between MPI ranks.

Becomes nop if there is no MPI. The routine also takes care of the minimum and maximum mesh size tracked.

◆ terminationCriterionHolds()

bool mghype::matrixfree::solvers::SolverStatistics::terminationCriterionHolds ( )

◆ toString()

std::string mghype::matrixfree::solvers::SolverStatistics::toString ( ) const

◆ updateGlobalPrecondResidual()

void mghype::matrixfree::solvers::SolverStatistics::updateGlobalPrecondResidual ( double  residual)

◆ updateGlobalResidual()

void mghype::matrixfree::solvers::SolverStatistics::updateGlobalResidual ( double  residual,
const tarch::la::Vector< Dimensions, double > &  h 
)

Update the global residual.

Is typically to be called after we have assembled the complete residual. For DG, this means the cell and face contributions from the residual.

Parameters
residualDouble Residual contribution from one cell. Has to be proper number, i.e. not nan or inf. We have a check in here that says that the residual should not be higher than 1e10. This is a totally arbitrary number, but sometimes helps for debugging - we have never seen such big residuals in proper runs.

◆ updateGlobalSolutionUpdates()

void mghype::matrixfree::solvers::SolverStatistics::updateGlobalSolutionUpdates ( double  deltaU,
const tarch::la::Vector< Dimensions, double > &  h 
)

◆ updateMinMaxMeshSize()

void mghype::matrixfree::solvers::SolverStatistics::updateMinMaxMeshSize ( const tarch::la::Vector< Dimensions, double > &  h)

Field Documentation

◆ _globalDeltaUEukledianNormSquared

double mghype::matrixfree::solvers::SolverStatistics::_globalDeltaUEukledianNormSquared
protected

Definition at line 129 of file SolverStatistics.h.

◆ _globalDeltaUHNormSquared

double mghype::matrixfree::solvers::SolverStatistics::_globalDeltaUHNormSquared
protected

Definition at line 130 of file SolverStatistics.h.

◆ _globalDeltaUMaxNorm

double mghype::matrixfree::solvers::SolverStatistics::_globalDeltaUMaxNorm
protected

Definition at line 128 of file SolverStatistics.h.

◆ _globalPrecondResidualEukledianNormSquared

double mghype::matrixfree::solvers::SolverStatistics::_globalPrecondResidualEukledianNormSquared
protected

Definition at line 133 of file SolverStatistics.h.

◆ _globalPrecondResidualMaxNorm

double mghype::matrixfree::solvers::SolverStatistics::_globalPrecondResidualMaxNorm
protected

Definition at line 132 of file SolverStatistics.h.

◆ _globalResidualEukledianNormSquared

double mghype::matrixfree::solvers::SolverStatistics::_globalResidualEukledianNormSquared
protected

Definition at line 117 of file SolverStatistics.h.

◆ _globalResidualHNormSquared

double mghype::matrixfree::solvers::SolverStatistics::_globalResidualHNormSquared
protected

Definition at line 118 of file SolverStatistics.h.

◆ _globalResidualMaxNorm

double mghype::matrixfree::solvers::SolverStatistics::_globalResidualMaxNorm
protected

Definition at line 116 of file SolverStatistics.h.

◆ _initialGlobalResidualEukledianNormSquared

double mghype::matrixfree::solvers::SolverStatistics::_initialGlobalResidualEukledianNormSquared
protected

Definition at line 121 of file SolverStatistics.h.

◆ _initialGlobalResidualHNormSquared

double mghype::matrixfree::solvers::SolverStatistics::_initialGlobalResidualHNormSquared
protected

Definition at line 122 of file SolverStatistics.h.

◆ _initialGlobalResidualMaxNorm

double mghype::matrixfree::solvers::SolverStatistics::_initialGlobalResidualMaxNorm
protected

Definition at line 120 of file SolverStatistics.h.

◆ _log

tarch::logging::Log mghype::matrixfree::solvers::SolverStatistics::_log
staticprotected

Definition at line 99 of file SolverStatistics.h.

◆ _maxH

double mghype::matrixfree::solvers::SolverStatistics::_maxH
protected

Observed mesh width.

Definition at line 114 of file SolverStatistics.h.

◆ _minH

double mghype::matrixfree::solvers::SolverStatistics::_minH
protected

Observed mesh width.

Definition at line 109 of file SolverStatistics.h.

◆ _previousGlobalResidualEukledianNormSquared

double mghype::matrixfree::solvers::SolverStatistics::_previousGlobalResidualEukledianNormSquared
protected

Definition at line 125 of file SolverStatistics.h.

◆ _previousGlobalResidualHNormSquared

double mghype::matrixfree::solvers::SolverStatistics::_previousGlobalResidualHNormSquared
protected

Definition at line 126 of file SolverStatistics.h.

◆ _previousGlobalResidualMaxNorm

double mghype::matrixfree::solvers::SolverStatistics::_previousGlobalResidualMaxNorm
protected

Definition at line 124 of file SolverStatistics.h.

◆ _tolerance

const double mghype::matrixfree::solvers::SolverStatistics::_tolerance
protected
See also
terminationCriterionHolds()

Definition at line 104 of file SolverStatistics.h.


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