12#include <util/misc/Memory.h>
25 template <
typename Data>
34 template <
typename Data>
50 template <
typename Data>
57 UTIL_THROW(
"Attempt to allocate with capacity <= 0");
59 data_ = (Data*) fftw_malloc(
sizeof(Data)*capacity);
68 template <
typename Data>
Base class template for a field defined on a spatial grid.
Field()
Default constructor.
void allocate(int capacity)
Allocate the underlying C array.
void deallocate()
Dellocate the underlying C array.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.