1#ifndef RPG_AM_COMPRESSOR_H
2#define RPG_AM_COMPRESSOR_H
11#include "Compressor.h"
12#include <prdc/cuda/types.h>
13#include <pscf/cuda/DeviceArray.h>
14#include <pscf/iterator/AmIteratorTmpl.h>
16#include <prdc/cuda/RField.h>
17#include <util/containers/DArray.h>
25 template <
int D>
class System;
74 void setup(
bool isContinuation);
134 int nElements()
override;
139 bool hasInitialGuess()
override;
146 void getCurrent(
VectorT& curr)
override;
154 void evaluate()
override;
161 void getResidual(
VectorT& resid)
override;
168 void update(
VectorT& newGuess)
override;
173 void outputToLog()
override;
189 double dotProduct(
VectorT const & a,
195 double maxAbs(
VectorT const & hist)
override;
virtual double computeLambda()
Dynamic array on the GPU device with aligned data.
Anderson Mixing compressor.
DeviceArray< cudaReal > VectorT
Typename for state and residual vectors.
int compress()
Compress to obtain partial saddle point w+.
int mdeCounter()
Return how many times MDE has been solved.
AmCompressor(System< D > &system)
Constructor.
~AmCompressor()
Destructor.
void setup(bool isContinuation)
Initialize just before entry to iterative loop.
void clearTimers()
Clear all timers (reset accumulated time to zero).
void readParameters(std::istream &in)
Read all parameters and initialize.
void outputTimers(std::ostream &out) const
Return compressor times contributions.
Base class for iterators that impose incompressibility.
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.