1#ifndef RPG_LR_AM_COMPRESSOR_H
2#define RPG_LR_AM_COMPRESSOR_H
11#include "Compressor.h"
12#include <pscf/cuda/DeviceArray.h>
13#include <pscf/iterator/AmIteratorTmpl.h>
15#include <rpg/fts/compressor/IntraCorrelation.h>
16#include <prdc/cpu/RField.h>
17#include <prdc/cpu/RFieldDft.h>
18#include <util/containers/DArray.h>
26 template <
int D>
class System;
81 void setup(
bool isContinuation);
145 bool isIntraCalculated_;
165 void addCorrection(
VectorT& fieldTrial,
166 VectorT const & resTrial)
override;
176 int nElements()
override;
181 bool hasInitialGuess()
override;
188 void getCurrent(
VectorT& curr)
override;
196 void evaluate()
override;
203 void getResidual(
VectorT& resid)
override;
210 void update(
VectorT& newGuess)
override;
215 void outputToLog()
override;
234 double dotProduct(
VectorT const & a,
240 double maxAbs(
VectorT const & hist)
override;
Dynamic array on the GPU device with aligned data.
An IntVec<D, T> is a D-component vector of elements of integer type T.
Fourier transform of a real field on an FFT mesh.
Field of real double precision values on an FFT mesh.
Base class for iterators that impose incompressibility.
Linear response function for response to pressure.
Anderson Mixing compressor with linear-response mixing step.
~LrAmCompressor()
Destructor.
void outputTimers(std::ostream &out) const
Return compressor times contributions.
void readParameters(std::istream &in)
Read all parameters and initialize.
int compress()
Compress to obtain partial saddle point w+.
void clearTimers()
Clear all timers (reset accumulated time to zero).
void setup(bool isContinuation)
Initialize just before entry to iterative loop.
LrAmCompressor(System< D > &system)
Constructor.
DeviceArray< cudaReal > VectorT
Typename for field and residual vectors.
Main class, representing a complete physical system.
Dynamically allocatable contiguous array template.
Fields, FFTs, and utilities for periodic boundary conditions (CUDA)
Periodic fields and crystallography.
SCFT and PS-FTS with real periodic fields (GPU)
PSCF package top-level namespace.