PSCF v1.2
|
A list of c fields stored in both basis and r-grid format. More...
#include <CFieldContainer.h>
Public Member Functions | |
CFieldContainer () | |
Constructor. | |
~CFieldContainer () | |
Destructor. | |
void | setNMonomer (int nMonomer) |
Set stored value of nMonomer. | |
void | allocateRGrid (IntVec< D > const &dimensions) |
Allocate or re-allocate memory for fields in rgrid format. | |
void | deallocateRGrid () |
De-allocate fields in rgrid format. | |
void | allocateBasis (int nBasis) |
Allocate or re-allocate memory for fields in basis format. | |
void | deallocateBasis () |
De-allocate fields in basis format. | |
void | allocate (int nMonomer, int nBasis, IntVec< D > const &dimensions) |
Allocate memory for both r-grid and basis field formats. | |
DArray< DArray< double > > & | basis () |
Get array of all fields in basis format (non-const). | |
DArray< DArray< double > > const & | basis () const |
Get array of all fields in basis format (const) | |
DArray< double > & | basis (int monomerId) |
Get the field for one monomer type in basis format (non-const). | |
DArray< double > const & | basis (int monomerId) const |
Get the field for one monomer type in basis format (const) | |
DArray< RField< D > > & | rgrid () |
Get array of all fields in r-grid format (non-const). | |
DArray< RField< D > > const & | rgrid () const |
Get array of all fields in r-grid format (const). | |
RField< D > & | rgrid (int monomerId) |
Get field for one monomer type in r-grid format (non-const) | |
RField< D > const & | rgrid (int monomerId) const |
Get field for one monomer type in r-grid format (const). | |
bool | isAllocatedRGrid () const |
Has memory been allocated for fields in r-grid format? | |
bool | isAllocatedBasis () const |
Has memory been allocated for fields in basis format? | |
A list of c fields stored in both basis and r-grid format.
A CFieldContainer<D> contains representations of a list of nMonomer fields that are associated with different monomer types in two different related formats:
Definition at line 40 of file rpg/field/CFieldContainer.h.
Pscf::Rpg::CFieldContainer< D >::CFieldContainer | ( | ) |
Constructor.
Definition at line 23 of file rpg/field/CFieldContainer.tpp.
Pscf::Rpg::CFieldContainer< D >::~CFieldContainer | ( | ) |
Destructor.
Definition at line 35 of file rpg/field/CFieldContainer.tpp.
void Pscf::Rpg::CFieldContainer< D >::setNMonomer | ( | int | nMonomer | ) |
Set stored value of nMonomer.
May only be called once.
nMonomer | number of monomer types. |
Definition at line 42 of file rpg/field/CFieldContainer.tpp.
References UTIL_CHECK.
void Pscf::Rpg::CFieldContainer< D >::allocateRGrid | ( | IntVec< D > const & | dimensions | ) |
Allocate or re-allocate memory for fields in rgrid format.
dimensions | dimensions of spatial mesh |
Definition at line 54 of file rpg/field/CFieldContainer.tpp.
References UTIL_CHECK.
void Pscf::Rpg::CFieldContainer< D >::deallocateRGrid | ( | ) |
De-allocate fields in rgrid format.
Definition at line 75 of file rpg/field/CFieldContainer.tpp.
References UTIL_CHECK.
void Pscf::Rpg::CFieldContainer< D >::allocateBasis | ( | int | nBasis | ) |
Allocate or re-allocate memory for fields in basis format.
nBasis | number of basis functions |
Definition at line 90 of file rpg/field/CFieldContainer.tpp.
References UTIL_CHECK.
void Pscf::Rpg::CFieldContainer< D >::deallocateBasis | ( | ) |
De-allocate fields in basis format.
Definition at line 111 of file rpg/field/CFieldContainer.tpp.
References UTIL_CHECK.
void Pscf::Rpg::CFieldContainer< D >::allocate | ( | int | nMonomer, |
int | nBasis, | ||
IntVec< D > const & | dimensions ) |
Allocate memory for both r-grid and basis field formats.
This function may only be called once.
nMonomer | number of monomer types |
nBasis | number of basis functions |
dimensions | dimensions of spatial mesh |
Definition at line 126 of file rpg/field/CFieldContainer.tpp.
|
inline |
Get array of all fields in basis format (non-const).
Definition at line 102 of file rpg/field/CFieldContainer.h.
|
inline |
Get array of all fields in basis format (const)
The array capacity is equal to the number of monomer types.
Definition at line 110 of file rpg/field/CFieldContainer.h.
|
inline |
Get the field for one monomer type in basis format (non-const).
monomerId | integer monomer type index (0, ... ,nMonomer-1) |
Definition at line 118 of file rpg/field/CFieldContainer.h.
|
inline |
Get the field for one monomer type in basis format (const)
monomerId | integer monomer type index (0, ... ,nMonomer-1) |
Definition at line 126 of file rpg/field/CFieldContainer.h.
|
inline |
Get array of all fields in r-grid format (non-const).
Definition at line 132 of file rpg/field/CFieldContainer.h.
|
inline |
Get array of all fields in r-grid format (const).
Definition at line 138 of file rpg/field/CFieldContainer.h.
|
inline |
Get field for one monomer type in r-grid format (non-const)
monomerId | integer monomer type index (0,..,nMonomer-1) |
Definition at line 146 of file rpg/field/CFieldContainer.h.
|
inline |
Get field for one monomer type in r-grid format (const).
monomerId | integer monomer type index (0,..,nMonomer-1) |
Definition at line 154 of file rpg/field/CFieldContainer.h.
|
inline |
Has memory been allocated for fields in r-grid format?
Definition at line 160 of file rpg/field/CFieldContainer.h.
|
inline |
Has memory been allocated for fields in basis format?
Definition at line 166 of file rpg/field/CFieldContainer.h.