PSCF v1.1
|
A list of c fields stored in both basis and r-grid format. More...
#include <CFieldContainer.h>
Public Member Functions | |
CFieldContainer () | |
Constructor. More... | |
~CFieldContainer () | |
Destructor. More... | |
void | setNMonomer (int nMonomer) |
Set stored value of nMonomer. More... | |
void | allocateRGrid (IntVec< D > const &dimensions) |
Allocate or re-allocate memory for fields in rgrid format. More... | |
void | deallocateRGrid () |
De-allocate fields in rgrid format. More... | |
void | allocateBasis (int nBasis) |
Allocate or re-allocate memory for fields in basis format. More... | |
void | deallocateBasis () |
De-allocate fields in basis format. More... | |
void | allocate (int nMonomer, int nBasis, IntVec< D > const &dimensions) |
Allocate memory for both r-grid and basis field formats. More... | |
DArray< DArray< double > > & | basis () |
Get array of all fields in basis format (non-const). More... | |
DArray< DArray< double > > const & | basis () const |
Get array of all fields in basis format (const) More... | |
DArray< double > & | basis (int monomerId) |
Get the field for one monomer type in basis format (non-const). More... | |
DArray< double > const & | basis (int monomerId) const |
Get the field for one monomer type in basis format (const) More... | |
DArray< RDField< D > > & | rgrid () |
Get array of all fields in r-grid format (non-const). More... | |
DArray< RDField< D > > const & | rgrid () const |
Get array of all fields in r-grid format (const). More... | |
RDField< D > & | rgrid (int monomerId) |
Get field for one monomer type in r-grid format (non-const) More... | |
RDField< D > const & | rgrid (int monomerId) const |
Get field for one monomer type in r-grid format (const). More... | |
bool | isAllocatedRGrid () const |
Has memory been allocated for fields in r-grid format? More... | |
bool | isAllocatedBasis () const |
Has memory been allocated for fields in basis format? More... | |
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 38 of file pspg/field/CFieldContainer.h.
Pscf::Pspg::CFieldContainer< D >::CFieldContainer |
Constructor.
Definition at line 23 of file pspg/field/CFieldContainer.tpp.
Pscf::Pspg::CFieldContainer< D >::~CFieldContainer |
Destructor.
Definition at line 35 of file pspg/field/CFieldContainer.tpp.
void Pscf::Pspg::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 pspg/field/CFieldContainer.tpp.
References UTIL_CHECK.
void Pscf::Pspg::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 pspg/field/CFieldContainer.tpp.
References UTIL_CHECK.
void Pscf::Pspg::CFieldContainer< D >::deallocateRGrid |
De-allocate fields in rgrid format.
Definition at line 75 of file pspg/field/CFieldContainer.tpp.
References UTIL_CHECK.
void Pscf::Pspg::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 pspg/field/CFieldContainer.tpp.
References UTIL_CHECK.
void Pscf::Pspg::CFieldContainer< D >::deallocateBasis |
De-allocate fields in basis format.
Definition at line 111 of file pspg/field/CFieldContainer.tpp.
References UTIL_CHECK.
void Pscf::Pspg::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 pspg/field/CFieldContainer.tpp.
|
inline |
Get array of all fields in basis format (non-const).
Definition at line 100 of file pspg/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 108 of file pspg/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 116 of file pspg/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 124 of file pspg/field/CFieldContainer.h.
|
inline |
Get array of all fields in r-grid format (non-const).
Definition at line 130 of file pspg/field/CFieldContainer.h.
|
inline |
Get array of all fields in r-grid format (const).
Definition at line 136 of file pspg/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 144 of file pspg/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 152 of file pspg/field/CFieldContainer.h.
|
inline |
Has memory been allocated for fields in r-grid format?
Definition at line 158 of file pspg/field/CFieldContainer.h.
|
inline |
Has memory been allocated for fields in basis format?
Definition at line 164 of file pspg/field/CFieldContainer.h.