PSCF v1.1
Public Member Functions | List of all members
Pscf::AmbdInteraction Class Reference

Modified interaction to compute residual defn. More...

#include <AmbdInteraction.h>

Public Member Functions

 AmbdInteraction ()
 Constructor. More...
 
virtual ~AmbdInteraction ()
 Destructor. More...
 
void setNMonomer (int nMonomer)
 Set number of monomers and allocate required memory. More...
 
void update (Interaction const &interaction)
 Update all computed quantities. More...
 
double chi (int i, int j) const
 Return one element of the chi matrix. More...
 
double chiInverse (int i, int j) const
 Return one element of the inverse chi matrix. More...
 
double p (int i, int j) const
 Return one element of the potent matrix P. More...
 
double sumChiInverse () const
 Return sum of elements of the inverse chi matrix. More...
 
int nMonomer () const
 Get number of monomer types. More...
 

Detailed Description

Modified interaction to compute residual defn.

of Arora et al.

This class computes and provides access to copies of chi and as well as several other auxiliary quantities that are needed to compute the SCFT residual for multi-component systems as defined by Arora, Morse, Bates and Dorfman (AMBD) (JCP 2017) for use in Anderson-mixing iteration (see reference below). The class is designed to be used as a augmented local copy of the interaction class within iterator classes that use this residual definition. When used in this way, it should be updated just before entering the iteration loop.

Reference: A. Arora, D.C. Morse, F.S. Bates and K.D Dorfman, J. Chem. Phys vol. 146, 244902 (2017).

Definition at line 39 of file AmbdInteraction.h.

Constructor & Destructor Documentation

◆ AmbdInteraction()

Pscf::AmbdInteraction::AmbdInteraction ( )

Constructor.

Definition at line 19 of file AmbdInteraction.cpp.

◆ ~AmbdInteraction()

Pscf::AmbdInteraction::~AmbdInteraction ( )
virtual

Destructor.

Definition at line 27 of file AmbdInteraction.cpp.

Member Function Documentation

◆ setNMonomer()

void Pscf::AmbdInteraction::setNMonomer ( int  nMonomer)

Set number of monomers and allocate required memory.

Parameters
nMonomernumber of different monomer types

Definition at line 33 of file AmbdInteraction.cpp.

References Util::DMatrix< Data >::allocate(), nMonomer(), and UTIL_CHECK.

Referenced by Pscf::Fd1d::AmIterator::readParameters(), and update().

◆ update()

void Pscf::AmbdInteraction::update ( Interaction const &  interaction)

Update all computed quantities.

Parameters
interactionInteraction object with current chi matrix

Definition at line 45 of file AmbdInteraction.cpp.

References Pscf::Interaction::chi(), Pscf::Interaction::chiInverse(), Pscf::Interaction::nMonomer(), setNMonomer(), and UTIL_CHECK.

Referenced by Pscf::Fd1d::AmIterator::setup().

◆ chi()

double Pscf::AmbdInteraction::chi ( int  i,
int  j 
) const
inline

Return one element of the chi matrix.

Parameters
irow index
jcolumn index

Definition at line 138 of file AmbdInteraction.h.

◆ chiInverse()

double Pscf::AmbdInteraction::chiInverse ( int  i,
int  j 
) const
inline

Return one element of the inverse chi matrix.

Parameters
irow index
jcolumn index

Definition at line 141 of file AmbdInteraction.h.

◆ p()

double Pscf::AmbdInteraction::p ( int  i,
int  j 
) const
inline

Return one element of the potent matrix P.

This matrix is defined by AMBD as:

P = I - e e^{T} chi^{-1} /S

where I is the Nmonomer x Nmonomer identity matrix, the column vector e is a vector for which e_i = 1 for all i, and S is the sum of the N^{2} elements of the matrix chi^{-1}, also given by S = e^{T} chi^{-1} e.

Parameters
irow index
jcolumn index

Definition at line 144 of file AmbdInteraction.h.

◆ sumChiInverse()

double Pscf::AmbdInteraction::sumChiInverse ( ) const
inline

Return sum of elements of the inverse chi matrix.

Definition at line 147 of file AmbdInteraction.h.

◆ nMonomer()

int Pscf::AmbdInteraction::nMonomer ( ) const
inline

Get number of monomer types.

Definition at line 135 of file AmbdInteraction.h.

Referenced by setNMonomer().


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