PSCF v1.4.0
Pscf::Rpc::AmIteratorGrid< D > Class Template Reference

Anderson Mixing iterator on grid (no space-group symmetry). More...

#include <AmIteratorGrid.h>

Inheritance diagram for Pscf::Rpc::AmIteratorGrid< D >:
Pscf::Rp::AmIteratorGrid< D, Types< D > > Pscf::AmIteratorTmpl< Iterator, T >

Public Member Functions

 AmIteratorGrid (System< D > &system)
 Constructor.
Public Member Functions inherited from Pscf::Rp::AmIteratorGrid< D, Types< D > >
void readParameters (std::istream &in) override
 Read all parameters and initialize.
void outputTimers (std::ostream &out) const override
 Output timing results to log file.
Public Member Functions inherited from Pscf::AmIteratorTmpl< Iterator, T >
 AmIteratorTmpl ()
 Constructor.
 ~AmIteratorTmpl ()
 Destructor.
int solve (bool isContinuation=false)
 Iterate to a solution.
void outputTimers (std::ostream &out) const
 Log output timing results.
void clearTimers ()
 Clear timers.

Additional Inherited Members

Protected Types inherited from Pscf::Rp::AmIteratorGrid< D, Types< D > >
using IteratorT
 Alias for Iterator type.
using VectorT
 Alias for type of state and residual vectors.
using AmIterTmplT
 Alias for base class.
Protected Member Functions inherited from Pscf::Rp::AmIteratorGrid< D, Types< D > >
 AmIteratorGrid (typename Types< D >::System &system)
 Constructor.
virtual ~AmIteratorGrid ()
 Destructor.
void setup (bool isContinuation) override
 Setup iterator just before entering iteration loop.
Protected Member Functions inherited from Pscf::AmIteratorTmpl< Iterator, T >
void readErrorType (std::istream &in)
 Read and validate the optional errorType string parameter.
virtual bool isValidErrorType ()
 Checks if a string is a valid error type.
void readMixingParameters (std::istream &in, bool useLambdaRamp=true)
 Read optional parameters used in default correction algorithm.
void allocateAM ()
 Allocate memory required by AM algorithm, if necessary.
bool isAllocatedAM () const
 Have data structures required by the AM algorithm been allocated?
virtual void clear ()
 Clear information about history.
virtual double computeError (T &residTrial, T &stateTrial, std::string errorType, int verbose)
 Compute and return error used to test for convergence.
double computeError (int verbose)
 Compute and return error used to test for convergence.
double lambdaRampFactor ()
 Compute ramped prefactor of mixing parameter lambda.
virtual double computeLambda ()
 Compute mixing parameter for correction step of Anderson mixing.
int verbose () const
 Verbosity level, allowed values 0, 1, or 2.
std::string errorType () const
 Get error type string.
T const & residual () const
 Get the current residual vector by const reference.
T const & state () const
 Return the current state vector by const reference.
int totalItr ()
 Return the total number of iterations needed to converge.
double timerTotal ()
 Get total time.
double timerMDE ()
 Get time spent solving the modified diffusion equation (MDE).
double timerAM ()
 Get total time for AM algorithm, excluding MDE solution.
double timerResid ()
 Get time spent computing residual.
double timerError ()
 Get time evaluating scalar error.
double timerCoeff ()
 Get time spent evaluating Anderson mixing coefficients.
double timerOmega ()
 Get time spent updating w states.
template<typename Type>
ScalarParam< Type > & read (std::istream &in, const char *label, Type &value)
 Add and read a new required ScalarParam < Type > object.
template<typename Type>
ScalarParam< Type > & readOptional (std::istream &in, const char *label, Type &value)
 Add and read a new optional ScalarParam < Type > object.
Protected Attributes inherited from Pscf::AmIteratorTmpl< Iterator, T >
double epsilon_
 Error tolerance.
int maxItr_
 Maximum number of iterations to attempt.
int maxHist_
 Maximum number of basis vectors in AM algorithm.
int verbose_
 Verbosity level.
std::string errorType_
 Type of error criterion used to test convergence.

Detailed Description

template<int D>
class Pscf::Rpc::AmIteratorGrid< D >

Anderson Mixing iterator on grid (no space-group symmetry).

Specializations of this template with D=1, 2, and 3 are derived from specializations of the base class template Rp::AmIteratorGrid, and inherit their public interface and almost all of their source code from this base class.

See also
Rp::AmIteratorGrid
Manual Page
AM Iteration Algorithm

Definition at line 36 of file /scft/iterator/AmIteratorGrid.h.

Constructor & Destructor Documentation

◆ AmIteratorGrid()

template<int D>
Pscf::Rpc::AmIteratorGrid< D >::AmIteratorGrid ( System< D > & system)

Constructor.

Parameters
systemparent system

Definition at line 26 of file AmIteratorGrid.cpp.

References AmIteratorGrid().

Referenced by AmIteratorGrid().


The documentation for this class was generated from the following files: