preCICE v3.1.2
|
Measures the convergence from an old data set to a new one. More...
#include <RelativeConvergenceMeasure.hpp>
Public Member Functions | |
RelativeConvergenceMeasure (double convergenceLimitPercent) | |
Constructor. | |
virtual | ~RelativeConvergenceMeasure () |
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::RelativeConvergenceMeasure"} |
double | _convergenceLimitPercent |
double | _normDiff = 0 |
double | _norm = 0 |
bool | _isConvergence = false |
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 41 of file RelativeConvergenceMeasure.hpp.
precice::cplscheme::impl::RelativeConvergenceMeasure::RelativeConvergenceMeasure | ( | double | convergenceLimitPercent | ) |
Constructor.
[in] | convergenceLimitPercent | Limit to define convergence relative to the norm of the current new dataset. Has to be in $] 0 ; 1 ]$. |
Definition at line 6 of file RelativeConvergenceMeasure.cpp.
|
inlinevirtual |
Definition at line 52 of file RelativeConvergenceMeasure.hpp.
|
inlinevirtual |
Returns an abbreviation of the name of the measure for the log file headers.
Reimplemented from precice::cplscheme::impl::ConvergenceMeasure.
Definition at line 107 of file RelativeConvergenceMeasure.hpp.
|
inlinevirtual |
Returns the l2-norm of the coupling residuum.
Reimplemented from precice::cplscheme::impl::ConvergenceMeasure.
Definition at line 99 of file RelativeConvergenceMeasure.hpp.
|
inlinevirtual |
Returns true, if the last measurement indicates convergence.
Implements precice::cplscheme::impl::ConvergenceMeasure.
Definition at line 75 of file RelativeConvergenceMeasure.hpp.
|
inlinevirtual |
Performs convergence measurement.
[in] | oldValues | Old iterate values. |
[in] | newValues | New iterate values. |
Implements precice::cplscheme::impl::ConvergenceMeasure.
Definition at line 59 of file RelativeConvergenceMeasure.hpp.
|
inlinevirtual |
To be called when a new meas. series (iteration process) starts.
Implements precice::cplscheme::impl::ConvergenceMeasure.
Definition at line 54 of file RelativeConvergenceMeasure.hpp.
|
inlinevirtual |
Adds current convergence information to output stream.
Implements precice::cplscheme::impl::ConvergenceMeasure.
Definition at line 83 of file RelativeConvergenceMeasure.hpp.
|
private |
Definition at line 115 of file RelativeConvergenceMeasure.hpp.
|
private |
Definition at line 121 of file RelativeConvergenceMeasure.hpp.
|
private |
Definition at line 113 of file RelativeConvergenceMeasure.hpp.
|
private |
Definition at line 119 of file RelativeConvergenceMeasure.hpp.
|
private |
Definition at line 117 of file RelativeConvergenceMeasure.hpp.