1#ifndef PSPC_C_FIELD_CONTAINER_H
2#define PSPC_C_FIELD_CONTAINER_H
11#include <util/containers/DArray.h>
12#include <pspc/field/RField.h>
117 {
return basis_[monomerId]; }
125 {
return basis_[monomerId]; }
145 {
return rgrid_[monomerId]; }
153 {
return rgrid_[monomerId]; }
159 {
return isAllocatedRGrid_; }
165 {
return isAllocatedBasis_; }
194 bool isAllocatedRGrid_;
199 bool isAllocatedBasis_;
203 #ifndef PSPC_FIELD_CONTAINER_TPP
205 extern template class CFieldContainer<1>;
206 extern template class CFieldContainer<2>;
207 extern template class CFieldContainer<3>;
An IntVec<D, T> is a D-component vector of elements of integer type T.
A list of c fields stored in both basis and r-grid format.
void deallocateBasis()
De-allocate fields in basis format.
RField< D > & rgrid(int monomerId)
Get field for one monomer type in r-grid format (non-const)
void setNMonomer(int nMonomer)
Set stored value of nMonomer.
DArray< DArray< double > > & basis()
Get array of all fields in basis format (non-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?
~CFieldContainer()
Destructor.
CFieldContainer()
Constructor.
void allocate(int nMonomer, int nBasis, IntVec< D > const &dimensions)
Allocate memory for both r-grid and basis field formats.
void allocateRGrid(IntVec< D > const &dimensions)
Allocate or re-allocate memory for fields in rgrid format.
DArray< double > & basis(int monomerId)
Get the field for one monomer type in basis format (non-const).
DArray< DArray< double > > const & basis() const
Get array of all fields in basis format (const)
DArray< RField< D > > const & rgrid() const
Get array of all fields in r-grid format (const).
DArray< double > const & basis(int monomerId) const
Get the field for one monomer type in basis format (const)
void deallocateRGrid()
De-allocate fields in rgrid format.
RField< D > const & rgrid(int monomerId) const
Get field for one monomer type in r-grid format (const).
void allocateBasis(int nBasis)
Allocate or re-allocate memory for fields in basis format.
DArray< RField< D > > & rgrid()
Get array of all fields in r-grid format (non-const).
Field of real double precision values on an FFT mesh.
Dynamically allocatable contiguous array template.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.