19class AbsoluteOrRelativeConvergenceMeasureTest;
64 const Eigen::VectorXd &oldValues,
65 const Eigen::VectorXd &newValues)
83 os <<
"absolute convergence measure: ";
84 os <<
"two-norm diff of data \"" << dataName <<
"\" = ";
88 os <<
", relative convergence measure: ";
89 os <<
"relative two-norm diff of data \"" << dataName <<
"\" = ";
92 os <<
", normalization = " <<
_norm;
Measures the convergence from an old data set to a new one.
double _convergenceLimitPercent
virtual std::string printState(const std::string &dataName)
Adds current convergence information to output stream.
virtual double getNormAbsResidual()
virtual std::string getAbbreviation() const
Returns an abbreviation of the name of the measure for the log file headers.
virtual ~AbsoluteOrRelativeConvergenceMeasure()
AbsoluteOrRelativeConvergenceMeasure(double absLimit, double relLimit)
Constructor.
virtual double getNormRelResidual()
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 void newMeasurementSeries()
To be called when a new meas. series (iteration process) starts.
Interface for measures checking the convergence of a series of datasets.
This class provides a lightweight logger.
static double l2norm(const Eigen::VectorXd &vec)
The l2 norm of a vector is calculated on distributed data.
constexpr bool equals(const Eigen::MatrixBase< DerivedA > &A, const Eigen::MatrixBase< DerivedB > &B, double tolerance=NUMERICAL_ZERO_DIFFERENCE)
Compares two Eigen::MatrixBase for equality up to tolerance.
Main namespace of the precice library.
static std::unique_ptr< precice::Participant > impl
T setprecision(T... args)