preCICE v3.1.1
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure Class Reference

Measures the convergence from an old data set to a new one. More...

#include <AbsoluteOrRelativeConvergenceMeasure.hpp>

Inheritance diagram for precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure:
[legend]
Collaboration diagram for precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure:
[legend]

Public Member Functions

 AbsoluteOrRelativeConvergenceMeasure (double absLimit, double relLimit)
 Constructor.
 
virtual ~AbsoluteOrRelativeConvergenceMeasure ()
 
virtual void newMeasurementSeries ()
 To be called when a new meas. series (iteration process) starts.
 
virtual void measure (const Eigen::VectorXd &oldValues, const Eigen::VectorXd &newValues)
 Performs convergence measurement.
 
virtual bool isConvergence () const
 Returns true, if the last measurement indicates convergence.
 
virtual std::string printState (const std::string &dataName)
 Adds current convergence information to output stream.
 
virtual double getNormAbsResidual ()
 
virtual double getNormRelResidual ()
 
virtual std::string getAbbreviation () const
 Returns an abbreviation of the name of the measure for the log file headers.
 
- Public Member Functions inherited from precice::cplscheme::impl::ConvergenceMeasure
virtual ~ConvergenceMeasure ()
 Destructor, empty.
 
virtual double getNormResidual ()
 Returns the l2-norm of the coupling residuum.
 

Private Attributes

logging::Logger _log {"cplscheme::AbsoluteOrRelativeConvergenceMeasure"}
 
double _convergenceLimit
 
double _convergenceLimitPercent
 
double _normDiff = 0
 
double _norm = 0
 
bool _isConvergence = false
 

Detailed Description

Measures the convergence from an old data set to a new one.

The convergence is evaluated by looking at the two norm of the differences between each data value from the new and old data set. If the two norm is equal or below a given absolute value or a given percentage of the norm of the new data set, convergence is achieved.

For a description of how to perform the measurement, see class ConvergenceMeasure.

Definition at line 42 of file AbsoluteOrRelativeConvergenceMeasure.hpp.

Constructor & Destructor Documentation

◆ AbsoluteOrRelativeConvergenceMeasure()

precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::AbsoluteOrRelativeConvergenceMeasure ( double absLimit,
double relLimit )

Constructor.

Parameters
[in]absLimitLimit to define absolute convergence to the norm of the current new dataset. Has to be larger than zero.
[in]relLimitLimit to define convergence relative to the norm of the current new dataset. Has to be in $] 0 ; 1 ]$.

Definition at line 6 of file AbsoluteOrRelativeConvergenceMeasure.cpp.

Here is the call graph for this function:

◆ ~AbsoluteOrRelativeConvergenceMeasure()

virtual precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::~AbsoluteOrRelativeConvergenceMeasure ( )
inlinevirtual

Definition at line 56 of file AbsoluteOrRelativeConvergenceMeasure.hpp.

Member Function Documentation

◆ getAbbreviation()

virtual std::string precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::getAbbreviation ( ) const
inlinevirtual

Returns an abbreviation of the name of the measure for the log file headers.

Reimplemented from precice::cplscheme::impl::ConvergenceMeasure.

Definition at line 114 of file AbsoluteOrRelativeConvergenceMeasure.hpp.

◆ getNormAbsResidual()

virtual double precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::getNormAbsResidual ( )
inlinevirtual

Definition at line 101 of file AbsoluteOrRelativeConvergenceMeasure.hpp.

◆ getNormRelResidual()

virtual double precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::getNormRelResidual ( )
inlinevirtual

Definition at line 106 of file AbsoluteOrRelativeConvergenceMeasure.hpp.

Here is the call graph for this function:

◆ isConvergence()

virtual bool precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::isConvergence ( ) const
inlinevirtual

Returns true, if the last measurement indicates convergence.

Implements precice::cplscheme::impl::ConvergenceMeasure.

Definition at line 72 of file AbsoluteOrRelativeConvergenceMeasure.hpp.

◆ measure()

virtual void precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::measure ( const Eigen::VectorXd & oldValues,
const Eigen::VectorXd & newValues )
inlinevirtual

Performs convergence measurement.

Parameters
[in]oldValuesOld iterate values.
[in]newValuesNew iterate values.

Implements precice::cplscheme::impl::ConvergenceMeasure.

Definition at line 63 of file AbsoluteOrRelativeConvergenceMeasure.hpp.

Here is the call graph for this function:

◆ newMeasurementSeries()

virtual void precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::newMeasurementSeries ( )
inlinevirtual

To be called when a new meas. series (iteration process) starts.

Implements precice::cplscheme::impl::ConvergenceMeasure.

Definition at line 58 of file AbsoluteOrRelativeConvergenceMeasure.hpp.

◆ printState()

virtual std::string precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::printState ( const std::string & dataName)
inlinevirtual

Adds current convergence information to output stream.

Implements precice::cplscheme::impl::ConvergenceMeasure.

Definition at line 80 of file AbsoluteOrRelativeConvergenceMeasure.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ _convergenceLimit

double precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::_convergenceLimit
private

Definition at line 122 of file AbsoluteOrRelativeConvergenceMeasure.hpp.

◆ _convergenceLimitPercent

double precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::_convergenceLimitPercent
private

Definition at line 124 of file AbsoluteOrRelativeConvergenceMeasure.hpp.

◆ _isConvergence

bool precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::_isConvergence = false
private

Definition at line 130 of file AbsoluteOrRelativeConvergenceMeasure.hpp.

◆ _log

logging::Logger precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::_log {"cplscheme::AbsoluteOrRelativeConvergenceMeasure"}
private

Definition at line 120 of file AbsoluteOrRelativeConvergenceMeasure.hpp.

◆ _norm

double precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::_norm = 0
private

Definition at line 128 of file AbsoluteOrRelativeConvergenceMeasure.hpp.

◆ _normDiff

double precice::cplscheme::impl::AbsoluteOrRelativeConvergenceMeasure::_normDiff = 0
private

Definition at line 126 of file AbsoluteOrRelativeConvergenceMeasure.hpp.


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