preCICE v3.1.2
Loading...
Searching...
No Matches
AitkenAcceleration.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Core>
4#include <algorithm>
5#include <map>
6#include <string>
7#include <vector>
11#include "logging/Logger.hpp"
12
13namespace precice {
14namespace acceleration {
15
17public:
19 double initialRelaxationFactor,
20 std::vector<int> dataIDs,
21 impl::PtrPreconditioner preconditioner);
22
24
26 {
27 return _dataIDs;
28 }
29
30 virtual void initialize(
31 const DataMap &cpldata);
32
33 virtual void performAcceleration(
34 DataMap &cpldata);
35
36 virtual void iterationsConverged(
37 const DataMap &cpldata);
38
39private:
40 logging::Logger _log{"acceleration::AitkenAcceleration"};
41
43
45
47
49
50 Eigen::VectorXd _oldResiduals;
51 Eigen::VectorXd _values;
52 Eigen::VectorXd _oldValues;
53
56};
57} // namespace acceleration
58} // namespace precice
AitkenAcceleration(double initialRelaxationFactor, std::vector< int > dataIDs, impl::PtrPreconditioner preconditioner)
virtual void iterationsConverged(const DataMap &cpldata)
virtual void performAcceleration(DataMap &cpldata)
virtual void initialize(const DataMap &cpldata)
virtual std::vector< int > getDataIDs() const
impl::PtrPreconditioner _preconditioner
Preconditioner for data vector if multiple data sets are used.
This class provides a lightweight logger.
Definition Logger.hpp:16
Main namespace of the precice library.