1#ifndef RPG_FIELD_STATE_H
2#define RPG_FIELD_STATE_H
11#include <prdc/crystal/UnitCell.h>
12#include <rpg/field/FieldIo.h>
13#include <util/containers/DArray.h>
23 template <
int D>
class System;
41 template <
int D,
class FT>
99 const FT&
field(
int monomerId)
const;
154 template <
int D,
class FT>
160 template <
int D,
class FT>
166 template <
int D,
class FT>
169 {
return fields_[id]; }
172 template <
int D,
class FT>
174 {
return fields_[id]; }
177 template <
int D,
class FT>
180 {
return unitCell_; }
183 template <
int D,
class FT>
186 {
return unitCell_; }
191 template <
int D,
class FT>
194 {
return (systemPtr_ != 0); }
197 template <
int D,
class FT>
201 assert(systemPtr_ != 0);
205 #ifndef RPG_FIELD_STATE_TPP
Base template for UnitCell<D> classes, D=1, 2 or 3.
Record of a state of a System (fields + unit cell).
bool hasSystem()
Has a system been set?
FieldState()
Default constructor.
UnitCell< D > & unitCell()
Get the UnitCell by non-const reference.
const UnitCell< D > & unitCell() const
Get UnitCell (i.e., lattice type and parameters) by const reference.
System< D > & system()
Get associated System by reference.
const DArray< FT > & fields() const
Get array of all fields by const reference.
void setSystem(System< D > &system)
Set association with System, after default construction.
const FT & field(int monomerId) const
Get a field for a single monomer type by const reference.
FT & field(int monomerId)
Get field for a specific monomer type (non-const reference).
DArray< FT > & fields()
Get array of all chemical potential fields (non-const reference).
Main class for calculations that represent one system.
Dynamically allocatable contiguous array template.
Fields, FFTs, and utilities for periodic boundary conditions (CUDA)
Periodic fields and crystallography.
PSCF package top-level namespace.
Utility classes for scientific computation.