PSCF v1.1
|
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... | |
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.
Pscf::AmbdInteraction::AmbdInteraction | ( | ) |
Constructor.
Definition at line 19 of file AmbdInteraction.cpp.
|
virtual |
Destructor.
Definition at line 27 of file AmbdInteraction.cpp.
void Pscf::AmbdInteraction::setNMonomer | ( | int | nMonomer | ) |
Set number of monomers and allocate required memory.
nMonomer | number 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().
void Pscf::AmbdInteraction::update | ( | Interaction const & | interaction | ) |
Update all computed quantities.
interaction | Interaction 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().
|
inline |
Return one element of the chi matrix.
i | row index |
j | column index |
Definition at line 138 of file AmbdInteraction.h.
|
inline |
Return one element of the inverse chi matrix.
i | row index |
j | column index |
Definition at line 141 of file AmbdInteraction.h.
|
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.
i | row index |
j | column index |
Definition at line 144 of file AmbdInteraction.h.
|
inline |
Return sum of elements of the inverse chi matrix.
Definition at line 147 of file AmbdInteraction.h.
|
inline |
Get number of monomer types.
Definition at line 135 of file AmbdInteraction.h.
Referenced by setNMonomer().