|
PSCF v1.5.0
|
Field of complex double precision values on a mesh (CPP). More...
#include <CField.h>
Public Types | |
| using | RealType = double |
| Type of real and imaginary parts of a complex value. | |
Public Member Functions | |
| CField () | |
| Default constructor. | |
| CField (CField< D, CPT > const &other) | |
| Copy constructor. | |
| virtual | ~CField () |
| Destructor. | |
| CField & | operator= (CField< D, CPT > const &other) |
| Assignment operator. | |
| void | allocate (const IntVec< D > &meshDimensions) |
| Allocate the underlying C array for an FFT grid. | |
| virtual void | deallocate () |
| Deallocate underlying C array and clear mesh dimensions. | |
| const IntVec< D > & | meshDimensions () const |
| Return mesh dimensions by constant reference. | |
| template<class Archive> | |
| void | serialize (Archive &ar, const unsigned int version) |
| Serialize a Field to/from an Archive. | |
Field of complex double precision values on a mesh (CPP).
Definition at line 30 of file cpp/CField.h.
| using Pscf::CField< D, CPT >::RealType = double |
Type of real and imaginary parts of a complex value.
Definition at line 43 of file cpp/CField.h.
| Pscf::CField< D, CPT >::CField | ( | ) |
Default constructor.
Definition at line 22 of file cpp/CField.tpp.
References CField().
Referenced by allocate(), CField(), CField(), deallocate(), meshDimensions(), operator=(), serialize(), and ~CField().
| Pscf::CField< D, CPT >::CField | ( | CField< D, CPT > const & | other | ) |
Copy constructor.
Allocates new memory and copies all elements by value.
| other | the CField to be copied. |
Definition at line 40 of file cpp/CField.tpp.
References CField().
|
virtual |
Destructor.
Deletes underlying C array, if allocated previously.
Definition at line 31 of file cpp/CField.tpp.
References CField().
| CField< D, CPT > & Pscf::CField< D, CPT >::operator= | ( | CField< D, CPT > const & | other | ) |
Assignment operator.
If this field is not allocated, this function allocates the field and copies all elements.
If this and the other field are both allocated, the capacities must be equal. If so, this functions copies all elements.
| other | the RHS CField |
Definition at line 60 of file cpp/CField.tpp.
References allocate(), CField(), UTIL_CHECK, and UTIL_THROW.
| void Pscf::CField< D, CPT >::allocate | ( | const IntVec< D > & | meshDimensions | ) |
Allocate the underlying C array for an FFT grid.
| meshDimensions | vector of numbers of grid points per direction |
Definition at line 89 of file cpp/CField.tpp.
References Pscf::FftwDRArray< Data >::allocate(), CField(), meshDimensions(), and UTIL_CHECK.
Referenced by operator=().
|
virtual |
Deallocate underlying C array and clear mesh dimensions.
Definition at line 104 of file cpp/CField.tpp.
References CField(), and Pscf::FftwDRArray< Data >::deallocate().
|
inline |
Return mesh dimensions by constant reference.
Definition at line 122 of file cpp/CField.h.
References CField().
Referenced by allocate().
| void Pscf::CField< D, CPT >::serialize | ( | Archive & | ar, |
| const unsigned int | version ) |
Serialize a Field to/from an Archive.
| ar | archive |
| version | archive version id |
Definition at line 130 of file cpp/CField.h.
References CField(), and Pscf::FftwDRArray< Data >::serialize().