1#ifndef PRDC_CPU_FFTW_D_ARRAY_H
2#define PRDC_CPU_FFTW_D_ARRAY_H
11#include <util/containers/Array.h>
31 template <
typename Data>
76 template <
class Archive>
77 void serialize(Archive& ar,
const unsigned int version);
101 template <
typename Data>
103 {
return (
bool)
data_; }
108 template <
typename Data>
109 template <
class Archive>
113 if (Archive::is_saving()) {
117 if (Archive::is_loading()) {
124 UTIL_THROW(
"Inconsistent FftwDArray capacities");
138#include "FftwDArray.tpp"
void serialize(Archive &ar, const unsigned int version)
Serialize a FftwDArray to/from an Archive.
void allocate(int capacity)
Allocate the underlying C array.
virtual ~FftwDArray()
Destructor.
FftwDArray()
Default constructor.
virtual void deallocate()
Dellocate the underlying C array.
bool isAllocated() const
Return true if the FftwDArray has been allocated, false otherwise.
Data * data_
Pointer to an array of Data elements.
int capacity() const
Return allocated size.
int capacity_
Allocated size of the data_ array.
Array()
Default constructor.
File containing preprocessor macros for error handling.
#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.