1#ifndef RP_LR_AM_COMPRESSOR_H
2#define RP_LR_AM_COMPRESSOR_H
11#include <pscf/iterator/AmIteratorTmpl.h>
12#include <pscf/math/IntVec.h>
13#include <util/containers/DArray.h>
43 template <
int D,
class T,
class V>
69 void setup(
bool isContinuation)
override;
105 using CompressorT =
typename T::Compressor;
108 using CompressorT::system;
125 typename T::RField resid_;
130 typename T::RFieldDft residK_;
135 typename T::RField intraCorrelationK_;
140 typename T::IntraCorrelation intra_;
155 bool isIntraCalculated_;
169 int nElements()
override;
174 bool hasInitialGuess()
override;
181 void getCurrent(
VectorT& curr)
override;
189 void evaluate()
override;
196 void getResidual(
VectorT& resid)
override;
204 void addCorrection(
VectorT& fieldTrial,
205 VectorT const & resTrial)
override;
212 void update(
VectorT& newGuess)
override;
217 void outputToLog()
override;
220 using FFTT =
typename T::FFT;
An IntVec<D, T> is a D-component vector of elements of integer type T.
void setup(bool isContinuation) override
Initialize just before entry to iterative loop.
int compress() override
Compress to obtain partial saddle point field.
void outputTimers(std::ostream &out) const override
Return compressor time contributions.
~LrAmCompressor()=default
Destructor.
V VectorT
Type of field and residual vectors.
LrAmCompressor(typename T::System &system)
Constructor.
void clearTimers() override
Clear all timers and MDE solution counter.
void readParameters(std::istream &in) override
Read body of parameter file block and initialize.
Class templates for real-valued periodic fields.
PSCF package top-level namespace.