57namespace acceleration {
66 double initialRelaxation,
67 bool forceInitialRelaxation,
68 int maxIterationsUsed,
69 int timeWindowsReused,
71 double singularityLimit,
Base Class for quasi-Newton acceleration schemes.
virtual void updateDifferenceMatrices(const DataMap &cplData)
Updates the V, W matrices (as well as the matrices for the secondary data)
Eigen::VectorXd _oldResiduals
Difference between solver input and output from last time window.
std::deque< int > _matrixColsBackup
int _filter
filter method that is used to maintain good conditioning of the least-squares system Either of two ty...
Eigen::MatrixXd _matrixWBackup
double _initialRelaxation
Constant relaxation factor used for first iteration.
int _timeWindowsReused
Maximum number of old time windows (with data values) kept.
virtual int getLSSystemCols() const
: computes number of cols in least squares system, i.e, number of cols in _matrixV,...
int _nbDelCols
Number of filtered out columns in this time window.
virtual ~BaseQNAcceleration()
Destructor, empty.
virtual void specializedIterationsConverged(const DataMap &cplData)=0
Marks a iteration sequence as converged.
virtual void applyFilter()
Applies the filter method for the least-squares system, defined in the configuration.
virtual void iterationsConverged(const DataMap &cplData)
Marks a iteration sequence as converged.
Eigen::VectorXd _oldValues
Concatenation of all (old) coupling data involved in the QN system.
Eigen::MatrixXd _matrixVBackup
backup of the V,W and matrixCols data structures. Needed for the skipping of initial relaxation,...
Eigen::VectorXd _oldXTilde
Solver output from last iteration.
std::ostringstream _infostringstream
write some debug/acceleration info to file
bool _resetLS
If true, the LS system has been modified (reset or recomputed) in such a way, that mere updating of m...
bool _hasNodesOnInterface
BaseQNAcceleration(double initialRelaxation, bool forceInitialRelaxation, int maxIterationsUsed, int timeWindowsReused, int filter, double singularityLimit, std::vector< int > dataIDs, impl::PtrPreconditioner preconditioner)
int _nbDropCols
Number of dropped columns in this time window (old time window out of scope)
virtual int getDroppedColumns() const
how many QN columns were dropped (went out of scope) in this time window
virtual void computeQNUpdate(const DataMap &cplData, Eigen::VectorXd &xUpdate)=0
Computes the quasi-Newton update using the specified pp scheme (IQNIMVJ, IQNILS)
virtual std::vector< int > getDataIDs() const
Returns all IQN involved data IDs.
Eigen::MatrixXd _matrixV
Stores residual deltas.
std::vector< int > _dimOffsets
Stores the local dimensions, i.e., the offsets in _invJacobian for all processors.
virtual void exportState(io::TXTWriter &writer)
Exports the current state of the acceleration to a file.
Eigen::VectorXd _residuals
Current iteration residuals of IQN data. Temporary.
virtual void importState(io::TXTReader &reader)
Imports the last exported state of the acceleration from file.
virtual void removeMatrixColumn(int columnIndex)
Removes one iteration from V,W matrices and adapts _matrixCols.
Eigen::MatrixXd _matrixW
Stores x tilde deltas, where x tilde are values computed by solvers.
Eigen::VectorXd _values
Concatenation of all coupling data involved in the QN system.
virtual void splitCouplingData(const DataMap &cplData)
Splits up QN system vector back into the coupling data.
virtual void performAcceleration(DataMap &cplData)
Performs one acceleration step.
double _singularityLimit
Determines sensitivity when two matrix columns are considered equal.
void writeInfo(const std::string &s, bool allProcs=false)
Wwrites info to the _infostream (also in parallel)
std::deque< int > _matrixCols
Indices (of columns in W, V matrices) of 1st iterations of time windows.
bool _firstIteration
Indicates the first iteration, where constant relaxation is used.
virtual int getDeletedColumns() const
how many QN columns were deleted in this time window
std::map< int, Eigen::VectorXd > _secondaryResiduals
Current iteration residuals of secondary data.
impl::PtrPreconditioner _preconditioner
Preconditioner for least-squares system if vectorial system is used.
impl::QRFactorization _qrV
Stores the current QR decomposition ov _matrixV, can be updated via deletion/insertion of columns.
int _maxIterationsUsed
Maximum number of old data iterations kept.
virtual void computeUnderrelaxationSecondaryData(const DataMap &cplData)=0
Computes underrelaxation for the secondary data.
std::vector< int > _secondaryDataIDs
Data IDs of data not involved in IQN coefficient computation.
std::vector< int > _dataIDs
Data IDs of data to be involved in the IQN algorithm.
bool _forceInitialRelaxation
virtual void initialize(const DataMap &cplData)
Initializes the acceleration.
Class that provides functionality for a dynamic QR-decomposition, that can be updated in O(mn) flops ...
File reader for matrix/vector in Matlab V7 ASCII format.
File writer for matrix in Matlab V7 ASCII format.
This class provides a lightweight logger.
Main namespace of the precice library.