1#ifndef RPC_W_FIELD_CONTAINER_H
2#define RPC_W_FIELD_CONTAINER_H
12#include <util/param/ParamComposite.h>
14#include <prdc/cpu/RField.h>
15#include <prdc/crystal/UnitCell.h>
16#include <pscf/math/IntVec.h>
17#include <util/containers/DArray.h>
352 bool isAllocatedRGrid_;
357 bool isAllocatedBasis_;
386 {
return basis_[id]; }
399 {
return rgrid_[id]; }
404 {
return isAllocatedRGrid_; }
409 {
return isAllocatedBasis_; }
419 {
return isSymmetric_; }
421 #ifndef RPC_W_FIELD_CONTAINER_TPP
An IntVec<D, T> is a D-component vector of elements of integer type T.
Field of real double precision values on an FFT mesh.
Base template for UnitCell<D> classes, D=1, 2 or 3.
File input/output operations and format conversions for fields.
A container of fields stored in both basis and r-grid format.
void allocate(int nMonomer, int nBasis, IntVec< D > const &dimensions)
Allocate memory for all fields.
void allocateRGrid(IntVec< D > const &dimensions)
Allocate or re-allocate memory for fields in rgrid format.
DArray< RField< D > > const & rgrid() const
Get array of all fields in r-space grid format.
bool isAllocatedBasis() const
Has memory been allocated for fields in basis format?
void readBasis(std::istream &in, UnitCell< D > &unitCell)
Read field component values from input stream, in symmetrized Fourier format.
bool isAllocatedRGrid() const
Has memory been allocated for fields in r-grid format?
void deallocateBasis()
De-allocate fields in basis format.
void allocateBasis(int nBasis)
Allocate or re-allocate memory for fields in basis format.
bool hasData() const
Has field data been set in either format?
void deallocateRGrid()
De-allocate fields in rgrid format.
WFieldContainer()
Constructor.
void setFieldIo(FieldIo< D > const &fieldIo)
Create association with FieldIo (store pointer).
void setRGrid(DArray< RField< D > > const &fields, bool isSymmetric=false)
Set fields values in real-space (r-grid) format.
void readRGrid(std::istream &in, UnitCell< D > &unitCell, bool isSymmetric=false)
Reads fields from an input stream in real-space (r-grid) format.
void setBasis(DArray< DArray< double > > const &fields)
Set field component values, in symmetrized Fourier format.
~WFieldContainer()
Destructor.
bool isSymmetric() const
Are fields symmetric under all elements of the space group?
DArray< DArray< double > > const & basis() const
Get array of all fields in basis format.
void setNMonomer(int nMonomer)
Set stored value of nMonomer.
Dynamically allocatable contiguous array template.
An object that can read multiple parameters from file.
Fields and FFTs for periodic boundary conditions (CPU)
Periodic fields and crystallography.
PSCF package top-level namespace.
Utility classes for scientific computation.