1#ifndef PRDC_CPU_R_FIELD_TPP
2#define PRDC_CPU_R_FIELD_TPP
49 allocate(other.meshDimensions_);
50 for (int i = 0; i < capacity_; ++i) {
51 data_[i] = other.data_[i];
70 if (
this == &other)
return *
this;
81 UTIL_CHECK(meshDimensions_ == other.meshDimensions_);
98 for (
int i = 0; i < D; ++i) {
113 for (
int i = 0; i < D; ++i) {
114 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.
void allocate(IntVec< D > const &meshDimensions)
Allocate the underlying C array for an FFT grid.
virtual ~RField()
Destructor.
virtual void deallocate()
Deallocate memory and return to empty state.
RField()
Default constructor.
const IntVec< D > & meshDimensions() const
Return mesh dimensions by constant reference.
File containing preprocessor macros for error handling.
#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.