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

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

#include <ResidualRelativeConvergenceMeasure.hpp>

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

Public Member Functions

 ResidualRelativeConvergenceMeasure (double convergenceLimitPercent)
 Constructor.
 
virtual ~ResidualRelativeConvergenceMeasure ()
 
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 getNormResidual ()
 Returns the l2-norm of the coupling residuum.
 
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.
 

Private Attributes

logging::Logger _log {"cplscheme::ResidualRelativeConvergenceMeasure"}
 
double _convergenceLimitPercent
 
bool _isFirstIteration = true
 
double _normFirstResidual = std::numeric_limits<double>::max()
 
double _normDiff = 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 percentage of the norm of the old data set, convergence is achieved.

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

Definition at line 29 of file ResidualRelativeConvergenceMeasure.hpp.

Constructor & Destructor Documentation

◆ ResidualRelativeConvergenceMeasure()

precice::cplscheme::impl::ResidualRelativeConvergenceMeasure::ResidualRelativeConvergenceMeasure ( double convergenceLimitPercent)
explicit

Constructor.

Parameters
[in]convergenceLimitPercentLimit to define convergence relative to the norm of the current new dataset. Has to be in $] 0 ; 1 ]$.

Definition at line 7 of file ResidualRelativeConvergenceMeasure.cpp.

Here is the call graph for this function:

◆ ~ResidualRelativeConvergenceMeasure()

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

Definition at line 40 of file ResidualRelativeConvergenceMeasure.hpp.

Member Function Documentation

◆ getAbbreviation()

virtual std::string precice::cplscheme::impl::ResidualRelativeConvergenceMeasure::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 91 of file ResidualRelativeConvergenceMeasure.hpp.

◆ getNormResidual()

virtual double precice::cplscheme::impl::ResidualRelativeConvergenceMeasure::getNormResidual ( )
inlinevirtual

Returns the l2-norm of the coupling residuum.

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

Definition at line 83 of file ResidualRelativeConvergenceMeasure.hpp.

Here is the call graph for this function:

◆ isConvergence()

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

Returns true, if the last measurement indicates convergence.

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

Definition at line 61 of file ResidualRelativeConvergenceMeasure.hpp.

◆ measure()

virtual void precice::cplscheme::impl::ResidualRelativeConvergenceMeasure::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 49 of file ResidualRelativeConvergenceMeasure.hpp.

Here is the call graph for this function:

◆ newMeasurementSeries()

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

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

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

Definition at line 42 of file ResidualRelativeConvergenceMeasure.hpp.

Here is the call graph for this function:

◆ printState()

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

Adds current convergence information to output stream.

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

Definition at line 67 of file ResidualRelativeConvergenceMeasure.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ _convergenceLimitPercent

double precice::cplscheme::impl::ResidualRelativeConvergenceMeasure::_convergenceLimitPercent
private

Definition at line 99 of file ResidualRelativeConvergenceMeasure.hpp.

◆ _isConvergence

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

Definition at line 107 of file ResidualRelativeConvergenceMeasure.hpp.

◆ _isFirstIteration

bool precice::cplscheme::impl::ResidualRelativeConvergenceMeasure::_isFirstIteration = true
private

Definition at line 101 of file ResidualRelativeConvergenceMeasure.hpp.

◆ _log

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

Definition at line 97 of file ResidualRelativeConvergenceMeasure.hpp.

◆ _normDiff

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

Definition at line 105 of file ResidualRelativeConvergenceMeasure.hpp.

◆ _normFirstResidual

double precice::cplscheme::impl::ResidualRelativeConvergenceMeasure::_normFirstResidual = std::numeric_limits<double>::max()
private

Definition at line 103 of file ResidualRelativeConvergenceMeasure.hpp.


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