|
PSCF v1.4.0
|
Field of real double precision values on an FFT mesh. More...
#include <RField.h>
Public Member Functions | |
| RField () | |
| Default constructor. | |
| RField (const RField &other) | |
| Copy constructor. | |
| virtual | ~RField () |
| Destructor. | |
| RField & | operator= (const RField &other) |
| Assignment operator. | |
| void | allocate (IntVec< D > const &meshDimensions) |
| Allocate the underlying C array for an FFT grid. | |
| virtual void | deallocate () |
| Deallocate memory and return to empty state. | |
| 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. | |
| Public Member Functions inherited from Pscf::Prdc::Cpu::FftwDArray< double > | |
| FftwDArray () | |
| Default constructor. | |
| virtual | ~FftwDArray () |
| Destructor. | |
| void | allocate (int capacity) |
| Allocate the underlying C array. | |
| bool | isAllocated () const |
| Return true if the FftwDArray has been allocated, false otherwise. | |
| void | serialize (Archive &ar, const unsigned int version) |
| Serialize a FftwDArray to/from an Archive. | |
| Public Member Functions inherited from Util::Array< double > | |
| int | capacity () const |
| Return allocated size. | |
| void | begin (ArrayIterator< double > &iterator) |
| Set an iterator to begin this Array. | |
| double & | operator[] (int i) |
| Get an element by non-const reference. | |
| double * | cArray () |
| Return a pointer to the underlying C array. | |
Additional Inherited Members | |
| Public Types inherited from Pscf::Prdc::Cpu::FftwDArray< double > | |
| using | ValueType |
| Data type of each array element. | |
| Protected Member Functions inherited from Util::Array< double > | |
| ~Array () | |
| Destructor (protected to prevent direct destruction). | |
| Protected Attributes inherited from Util::Array< double > | |
| double * | data_ |
| Pointer to an array of Data elements. | |
| int | capacity_ |
| Allocated size of the data_ array. | |
Field of real double precision values on an FFT mesh.
Definition at line 26 of file cpu/RField.h.
| Pscf::Prdc::Cpu::RField< D >::RField | ( | ) |
Default constructor.
Definition at line 24 of file cpu/RField.tpp.
References Pscf::Prdc::Cpu::FftwDArray< double >::FftwDArray().
Referenced by operator=(), and RField().
| Pscf::Prdc::Cpu::RField< D >::RField | ( | const RField< D > & | other | ) |
Copy constructor.
Allocates new memory and copies all elements by value.
| other | the RField to be copied. |
Definition at line 44 of file cpu/RField.tpp.
References Pscf::Prdc::Cpu::FftwDArray< double >::FftwDArray(), Pscf::Prdc::Cpu::FftwDArray< Data >::isAllocated(), and RField().
|
virtual |
Destructor.
Deletes underlying C array, if allocated previously.
Definition at line 33 of file cpu/RField.tpp.
| RField< D > & Pscf::Prdc::Cpu::RField< D >::operator= | ( | const RField< D > & | other | ) |
Assignment operator.
If this Field is not allocated, allocates and copies all elements.
If this and the other Field are both allocated, the capacities must be exactly equal. If so, this method copies all elements.
| other | the RHS RField |
Definition at line 67 of file cpu/RField.tpp.
References allocate(), Util::Array< Data >::capacity_, Util::Array< double >::capacity_, Util::Array< double >::data_, Pscf::Prdc::Cpu::FftwDArray< Data >::isAllocated(), Pscf::Prdc::Cpu::FftwDArray< double >::isAllocated(), RField(), UTIL_CHECK, and UTIL_THROW.
| void Pscf::Prdc::Cpu::RField< D >::allocate | ( | IntVec< D > const & | meshDimensions | ) |
Allocate the underlying C array for an FFT grid.
| meshDimensions | vector of numbers of grid points per direction |
Definition at line 95 of file cpu/RField.tpp.
References Pscf::Prdc::Cpu::FftwDArray< Data >::allocate(), allocate(), meshDimensions(), and UTIL_CHECK.
Referenced by allocate(), Pscf::Rpc::FilmFieldGenMask< D >::compute(), operator=(), Pscf::Prdc::Cpu::FFT< D >::setup(), Pscf::Rpc::FilmFieldGenExt< D >::stress(), and Pscf::Rpc::FilmFieldGenMask< D >::stress().
|
virtual |
Deallocate memory and return to empty state.
Reimplemented from Pscf::Prdc::Cpu::FftwDArray< double >.
Definition at line 110 of file cpu/RField.tpp.
References Pscf::Prdc::Cpu::FftwDArray< Data >::deallocate(), and deallocate().
Referenced by deallocate().
|
inline |
Return mesh dimensions by constant reference.
Definition at line 111 of file cpu/RField.h.
Referenced by allocate(), Pscf::Prdc::Cpu::FFT< D >::forwardTransform(), Pscf::Prdc::Cpu::FFT< D >::inverseTransformUnsafe(), Pscf::Prdc::Cpu::FFT< D >::setup(), and Pscf::Rpc::FieldIo< D >::writeFieldRGrid().
| void Pscf::Prdc::Cpu::RField< D >::serialize | ( | Archive & | ar, |
| const unsigned int | version ) |
Serialize a Field to/from an Archive.
| ar | archive |
| version | archive version id |
Definition at line 119 of file cpu/RField.h.
References Pscf::Prdc::Cpu::FftwDArray< Data >::serialize().