CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <ClexParamPack.hh>
Abstract base class for reading/writing clexulator parameters Parameters are assumed to be stored as, or at least sliceable into, 2D or 1D arrays in order to standardize read/write interface via Eigen types Arrays are layed out along two dimensions to form (m x N) or (m x 1) matrices where 'N' is the number of sites in the neighborhood of a unit cell, and 'm' is the intrinsic dimension of a particular parameter. Macroscopic or homogeneous properties of the crystal, such as evaluated crystal basis functions or homogeneous strain, which are not associated with individual sites, are represented as a (m x 1) array. The length of the 'm' dimension of a parameter array is referred do as 'dim' and the length of the N' dimension is referred to as 'size'.
Definition at line 230 of file ClexParamPack.hh.
Public Types | |
typedef unsigned int | size_type |
Public Member Functions | |
virtual | ~ClexParamPack () |
Abstract class must define virtual destructor. More... | |
std::map< std::string, ClexParamKey > const & | keys () const |
Obtain registry of all keys for data blocks managed by this ClexParamPack. More... | |
ClexParamKey const & | key (std::string const &_name) const |
Obtain key for managed data block by name. More... | |
virtual size_type | size (ClexParamKey const &_key) const =0 |
'N' dimension of parameter array (either '1', or size of unit cell neighborhood) returns number of columns in parameter array More... | |
virtual size_type | dim (ClexParamKey const &_key) const =0 |
'm' dimension of parameter array returns number of rows in parameter array More... | |
virtual std::string | eval_mode (ClexParamKey const &_key) const =0 |
Check evaluation mode for ClexParamPack parameter Choices are at least. More... | |
virtual Eigen::MatrixXd const & | read (ClexParamKey const &_key) const =0 |
Returns const reference to parameter array for parameter specified by. More... | |
virtual double const & | read (ClexParamKey const &_key, size_type _i) const =0 |
Returns const reference to element of 1D parameter array for parameter specified by. More... | |
virtual double const & | read (ClexParamKey const &_key, size_type _i, size_type _j) const =0 |
Returns const reference to element of 2D parameter array for parameter specified by. More... | |
virtual void | set_eval_mode (ClexParamKey const &_key, std::string const &_mode)=0 |
Sets evaluation mode for ClexParamPack parameter Choices are at least. More... | |
virtual void | write (ClexParamKey const &_key, Eigen::Ref< const Eigen::MatrixXd > const &_val)=0 |
Write parameter array for parameter specified by. More... | |
virtual void | write (ClexParamKey const &_key, size_type _i, double val)=0 |
Write element to 1D parameter array for parameter specified by. More... | |
virtual void | write (ClexParamKey const &_key, size_type _i, size_type _j, double val)=0 |
Write element to 2D parameter array for parameter specified by. More... | |
void | pre_eval () |
May be specialized to perform preprocessing before function evaluation. More... | |
void | post_eval () |
May be specialized to perform postprocessing after function evaluation. More... | |
Protected Attributes | |
std::map< std::string, ClexParamKey > | m_keys |
typedef unsigned int CASM::ClexParamPack::size_type |
Definition at line 232 of file ClexParamPack.hh.
|
inlinevirtual |
Abstract class must define virtual destructor.
Definition at line 235 of file ClexParamPack.hh.
|
pure virtual |
'm' dimension of parameter array returns number of rows in parameter array
Implemented in CASM::DiffClexParamPack, and CASM::BasicClexParamPack.
|
pure virtual |
Check evaluation mode for ClexParamPack parameter Choices are at least.
Implemented in CASM::DiffClexParamPack, and CASM::BasicClexParamPack.
|
inline |
Obtain key for managed data block by name.
Definition at line 242 of file ClexParamPack.hh.
|
inline |
Obtain registry of all keys for data blocks managed by this ClexParamPack.
Definition at line 239 of file ClexParamPack.hh.
|
inline |
May be specialized to perform postprocessing after function evaluation.
Definition at line 322 of file ClexParamPack.hh.
|
inline |
May be specialized to perform preprocessing before function evaluation.
Definition at line 318 of file ClexParamPack.hh.
|
pure virtual |
Returns const reference to parameter array for parameter specified by.
_key | NOTE: Take care in constructing pointers or references from the return value. If _key accepts additional index identifiers, (because the parameter has more than 2 dimensions) ClexParamPack::read() may be implemented using an internally cached matrix holding the current data slice. As such, subsequent requests to ClexParamPack::read() for a different slice may alter the internally cached values while returning a reference for the same block of memory |
Implemented in CASM::DiffClexParamPack, and CASM::BasicClexParamPack.
|
pure virtual |
Returns const reference to element of 1D parameter array for parameter specified by.
_key |
Implemented in CASM::DiffClexParamPack, and CASM::BasicClexParamPack.
|
pure virtual |
Returns const reference to element of 2D parameter array for parameter specified by.
_key |
Implemented in CASM::DiffClexParamPack, and CASM::BasicClexParamPack.
|
pure virtual |
Sets evaluation mode for ClexParamPack parameter Choices are at least.
Implemented in CASM::DiffClexParamPack, and CASM::BasicClexParamPack.
|
pure virtual |
'N' dimension of parameter array (either '1', or size of unit cell neighborhood) returns number of columns in parameter array
Implemented in CASM::DiffClexParamPack, and CASM::BasicClexParamPack.
|
pure virtual |
Write parameter array for parameter specified by.
_key |
Implemented in CASM::DiffClexParamPack, and CASM::BasicClexParamPack.
|
pure virtual |
Write element to 1D parameter array for parameter specified by.
_key |
Implemented in CASM::DiffClexParamPack, and CASM::BasicClexParamPack.
|
pure virtual |
Write element to 2D parameter array for parameter specified by.
_key |
Implemented in CASM::DiffClexParamPack, and CASM::BasicClexParamPack.
|
protected |
Definition at line 325 of file ClexParamPack.hh.