preCICE v3.1.1
Loading...
Searching...
No Matches
ConvergenceMeasure.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Core>
4
5namespace precice {
6namespace cplscheme {
7namespace impl {
8
23public:
26
28 virtual void newMeasurementSeries() = 0;
29
36 virtual void measure(
37 const Eigen::VectorXd &oldValues,
38 const Eigen::VectorXd &newValues) = 0;
39
41 virtual bool isConvergence() const = 0;
42
44 virtual std::string printState(const std::string &dataName) = 0;
45
47 virtual double getNormResidual()
48 {
49 return 0;
50 }
51
54 {
55 return "";
56 }
57};
58} // namespace impl
59} // namespace cplscheme
60} // namespace precice
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 double getNormResidual()
Returns the l2-norm of the coupling residuum.
Main namespace of the precice library.
static std::unique_ptr< precice::Participant > impl
Definition preciceC.cpp:21