preCICE v3.2.0
Loading...
Searching...
No Matches
ConvergenceMeasure.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Core>
4
6
21public:
23 virtual ~ConvergenceMeasure() = default;
24
26 virtual void newMeasurementSeries() = 0;
27
34 virtual void measure(
35 const Eigen::VectorXd &oldValues,
36 const Eigen::VectorXd &newValues) = 0;
37
39 virtual bool isConvergence() const = 0;
40
42 virtual std::string printState(const std::string &dataName) = 0;
43
45 virtual double getNormResidual()
46 {
47 return 0;
48 }
49
52 {
53 return "";
54 }
55};
56} // namespace precice::cplscheme::impl
Interface for measures checking the convergence of a series of datasets.
virtual std::string getAbbreviation() const
Returns an abbreviation of the name of the measure for the log file headers.
virtual bool isConvergence() const =0
Returns true, if the last measurement indicates convergence.
virtual void newMeasurementSeries()=0
To be called when a new meas. series (iteration process) starts.
virtual void measure(const Eigen::VectorXd &oldValues, const Eigen::VectorXd &newValues)=0
Performs convergence measurement.
virtual std::string printState(const std::string &dataName)=0
Adds current convergence information to output stream.
virtual ~ConvergenceMeasure()=default
Destructor, empty.
virtual double getNormResidual()
Returns the l2-norm of the coupling residuum.