1#ifndef PRDC_CPU_R_FIELD_TPP
2#define PRDC_CPU_R_FIELD_TPP
48 allocate(other.meshDimensions_);
49 for (int i = 0; i < capacity_; ++i) {
50 data_[i] = other.data_[i];
69 if (
this == &other)
return *
this;
80 UTIL_CHECK(meshDimensions_ == other.meshDimensions_);
97 for (
int i = 0; i < D; ++i) {
112 for (
int i = 0; i < D; ++i) {
113 meshDimensions_[i] = 0;
An IntVec<D, T> is a D-component vector of elements of integer type T.
void allocate(int capacity)
Allocate the underlying C array.
virtual void deallocate()
Dellocate the underlying C array.
bool isAllocated() const
Return true if the FftwDArray has been allocated, false otherwise.
RField()
Default constructor.
void allocate(IntVec< D > const &meshDimensions)
Allocate the underlying C array for an FFT grid.
RField & operator=(const RField &other)
Assignment operator.
virtual void deallocate()
Deallocate memory and return to empty state.
const IntVec< D > & meshDimensions() const
Return mesh dimensions by constant reference.
virtual ~RField()
Destructor.
#define UTIL_CHECK(condition)
Assertion macro suitable for serial or parallel production code.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
Fields and FFTs for periodic boundary conditions (CPU)
Periodic fields and crystallography.
PSCF package top-level namespace.