PSCF v1.4.0
Pscf::Rp::LrCompressor< D, T > Class Template Reference

Linear response compressor. More...

#include <LrCompressor.h>

Inheritance diagram for Pscf::Rp::LrCompressor< D, T >:

Public Member Functions

void readParameters (std::istream &in)
 Read all parameters and initialize.
void setup ()
 Initialize just before entry to iterative loop.
int compress ()
 Iterate pressure field to obtain partial saddle point.
void outputTimers (std::ostream &out) const
 Return compressor times contributions.
void clearTimers ()
 Clear all timers.

Protected Member Functions

 LrCompressor (typename T::System &system)
 Constructor.
 ~LrCompressor ()=default
 Destructor.

Detailed Description

template<int D, class T>
class Pscf::Rp::LrCompressor< D, T >

Linear response compressor.

This class implements a compressor that is an approximate Newton's method in which the Jacobian is approximated by the analytically calculated linear response of a homogeneous liquid with the same composition as the system of interest.

Specializations of this class template are used as base classes for two closely analogous class templates, also both named LrCompressor, that are defined in Rpc and Rpg namespaces for use in the pscf_rpc and pscf_rpg programs, respectively.

Template parameters:

See also
LrCompressor

Definition at line 42 of file fts/compressor/LrCompressor.h.

Constructor & Destructor Documentation

◆ LrCompressor()

template<int D, class T>
Pscf::Rp::LrCompressor< D, T >::LrCompressor ( typename T::System & system)
protected

Constructor.

Parameters
systemparent System object

Definition at line 27 of file LrCompressor.tpp.

References Util::ParamComposite::setClassName().

◆ ~LrCompressor()

template<int D, class T>
Pscf::Rp::LrCompressor< D, T >::~LrCompressor ( )
protecteddefault

Destructor.

Member Function Documentation

◆ readParameters()

template<int D, class T>
void Pscf::Rp::LrCompressor< D, T >::readParameters ( std::istream & in)

Read all parameters and initialize.

Parameters
ininput parameter file stream

Definition at line 44 of file LrCompressor.tpp.

◆ setup()

template<int D, class T>
void Pscf::Rp::LrCompressor< D, T >::setup ( )

Initialize just before entry to iterative loop.

This function is called by the solve function before entering the loop over iterations. Store the current values of the fields at the beginning of iteration

Definition at line 62 of file LrCompressor.tpp.

Referenced by compress().

◆ compress()

template<int D, class T>
int Pscf::Rp::LrCompressor< D, T >::compress ( )

Iterate pressure field to obtain partial saddle point.

Returns
0 for convergence, 1 for failure

Definition at line 92 of file LrCompressor.tpp.

References Util::Log::file(), setup(), and UTIL_CHECK.

◆ outputTimers()

template<int D, class T>
void Pscf::Rp::LrCompressor< D, T >::outputTimers ( std::ostream & out) const

Return compressor times contributions.

Parameters
outoutput stream

Definition at line 226 of file LrCompressor.tpp.

◆ clearTimers()

template<int D, class T>
void Pscf::Rp::LrCompressor< D, T >::clearTimers ( )

Clear all timers.

Definition at line 246 of file LrCompressor.tpp.


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