11 int maxNonConstTimeWindows)
17 const Eigen::VectorXd &oldValues,
18 const Eigen::VectorXd &res)
28 part(i) = oldValues(i + offset);
37 PRECICE_WARN(
"A sub-vector in the residual preconditioner became numerically zero. "
38 "If this occurred in the second iteration and the initial-relaxation factor is equal to 1.0, "
39 "check if the coupling data values of one solver is zero in the first iteration. "
40 "The preconditioner scaling factors were not applied for this iteration.");
44 _weights[i + offset] = 1.0 / norms[k];
#define PRECICE_WARN(...)
#define PRECICE_ASSERT(...)
Interface for preconditioner variants that can be applied to quasi-Newton acceleration schemes.
std::vector< size_t > _subVectorSizes
Sizes of each sub-vector, i.e. each coupling data.
std::vector< double > _invWeights
Inverse weights (for efficiency reasons)
std::vector< double > _weights
Weights used to scale the matrix V and the residual.
bool _requireNewQR
True if a QR decomposition from scratch is necessary.
ValuePreconditioner(int maxNonConstTimeWindows)
virtual void _update_(bool timeWindowComplete, const Eigen::VectorXd &oldValues, const Eigen::VectorXd &res)
Update the scaling after every FSI iteration.
static double l2norm(const Eigen::VectorXd &vec)
The l2 norm of a vector is calculated on distributed data.
constexpr double NUMERICAL_ZERO_DIFFERENCE