preCICE v3.1.1
Loading...
Searching...
No Matches
ResidualSumPreconditioner.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Core>
4#include <stddef.h>
5#include <string>
6#include <vector>
8#include "logging/Logger.hpp"
9
10namespace precice {
11namespace acceleration {
12namespace impl {
13
19public:
20 ResidualSumPreconditioner(int maxNonConstTimeWindows);
25
26 virtual void initialize(std::vector<size_t> &svs);
27
28private:
34 virtual void _update_(bool timeWindowComplete, const Eigen::VectorXd &oldValues, const Eigen::VectorXd &res);
35
36 logging::Logger _log{"acceleration::ResidualSumPreconditioner"};
37
39};
40
41} // namespace impl
42} // namespace acceleration
43} // namespace precice
Interface for preconditioner variants that can be applied to quasi-Newton acceleration schemes.
Preconditioner that uses the residuals of all iterations of the current time window summed up to scal...
virtual void initialize(std::vector< size_t > &svs)
initialize the preconditioner
virtual void _update_(bool timeWindowComplete, const Eigen::VectorXd &oldValues, const Eigen::VectorXd &res)
Update the scaling after every FSI iteration.
This class provides a lightweight logger.
Definition Logger.hpp:16
Main namespace of the precice library.
static std::unique_ptr< precice::Participant > impl
Definition preciceC.cpp:21