1#ifndef RPC_FIELD_STATE_H
2#define RPC_FIELD_STATE_H
11#include <rpc/field/FieldIo.h>
12#include <prdc/crystal/UnitCell.h>
13#include <util/containers/DArray.h>
22 template <
int D>
class System;
40 template <
int D,
class FT>
98 const FT&
field(
int monomerId)
const;
153 template <
int D,
class FT>
159 template <
int D,
class FT>
165 template <
int D,
class FT>
168 {
return fields_[id]; }
171 template <
int D,
class FT>
173 {
return fields_[id]; }
176 template <
int D,
class FT>
179 {
return unitCell_; }
182 template <
int D,
class FT>
184 {
return unitCell_; }
189 template <
int D,
class FT>
191 {
return (systemPtr_ != 0); }
194 template <
int D,
class FT>
197 assert(systemPtr_ != 0);
201 #ifndef RPC_FIELD_STATE_TPP
Base template for UnitCell<D> classes, D=1, 2 or 3.
Record of a state of a System (fields + unit cell).
void setSystem(System< D > &system)
Set association with System, after default construction.
FieldState()
Default constructor.
UnitCell< D > & unitCell()
Get the UnitCell by non-const reference.
System< D > & system()
Get associated System by reference.
const UnitCell< D > & unitCell() const
Get UnitCell (i.e., lattice type and parameters) 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).
const DArray< FT > & fields() const
Get array of all fields by const reference.
const FT & field(int monomerId) const
Get a field for a single monomer type by const reference.
bool hasSystem()
Has a system been set?
Main class for SCFT or PS-FTS simulation of one system.
Dynamically allocatable contiguous array template.
Periodic fields and crystallography.
PSCF package top-level namespace.
Utility classes for scientific computation.