CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <DiffClexParamPack.hh>
Abstract base class for all keys that interact with DiffClexParamPack DiffClexParamPack values are assumed to be 1D, 2D, or to be naturally accessed via 2D slices Standalone values are assumed to be 1D or 2D (for example, a 3xN displacement field) Derived values typically have more dimensions (for example, the derivative of the Mx1 correlation vector with respect to the displacement field has 3 indices, whild the second derivative wrt the displacement field has 5 indices). Derivatives are always asociated with the first independent standalone value in the key name. The key "diff/corr/disp_var" would be associated with "disp_var", which is a 3xN Matrix, and thus the resulting derived value (which is the first derifative of correlations with respect to displacements) will be sliced into 3xN slices. Each slice corresponds to a particular entry in the Mx1 correlation vector (i.e., slice 'j' is the gradient of correlation value j with respect to the entire set of displacement variables). The 'j' index that specifies the particular slice is called a 'secondary identifier', and it can be specified via ClexParamKey::set_identifiers().
Definition at line 78 of file DiffClexParamPack.hh.
Public Types | |
typedef ClexParamPack::size_type | size_type |
Public Member Functions | |
DiffClexParamKey (std::string const &_name, bool _standalone, size_type _ind, std::vector< Index > const &_offset={}, std::vector< Index > const &_stride={}) | |
DiffClexParamKey Constructor. More... | |
DiffClexParamKey () | |
virtual | ~DiffClexParamKey () |
Destructor of abstract base class must be virtual. More... | |
virtual Eigen::MatrixXd const & | eval (DiffScalarContainer const &_data, DiffClexParamPack_impl::EvalMode mode) const =0 |
Operate on associated DiffScalarContainer to ensure the standalone or derived value associated with this key is present in its cache matrix. More... | |
size_type | index () const |
Access the primary identifier of this value (which determines the associated standalone value and/or the shape of the dataslice. More... | |
std::string const & | name () const |
Name of this Key, should be descriptive of managed data. Ex.: "disp_var" of "magspin_site_basis". More... | |
template<typename... Args> | |
void | set_identifiers (Args const &... args) |
Specify supplemental identifiers, either via linear indices or pair indices. Internally, identifiers are always passed as linear indices. The number and specification of identifiers depends on derived ClexParamKey implementation. Linear identifiers should be passed as an integral value (Index, int, etc) pair index identifiers must be passed as std::pair<Index,Index> More... | |
std::unique_ptr< BaseKey > | clone () const |
Clone the ClexParamKey. More... | |
bool | standalone () const |
Returns true if key refers directly to managed data, false if it refers to values derived from managed data. More... | |
Protected Member Functions | |
Index | _l (Index i) const |
Returns i'th linear index identifier. More... | |
template<typename T , typename... Args> | |
void | _set_identifiers (Index i, T const &_val, Args const &... args) |
Recursive unrolling of variadic template to set all identifiers. More... | |
void | _set_identifiers (Index i, Index _ind) |
Overload for linear indexed identifier. More... | |
void | _set_identifiers (Index i, std::pair< Index, Index > _inds) |
Overload for pair indexed identifier. More... | |
virtual BaseKey * | _clone () const =0 |
Clone the ClexParamKey. More... | |
Protected Attributes | |
std::vector< Index > | m_offset |
std::vector< Index > | m_stride |
std::vector< Index > | m_identifiers |
Private Attributes | |
size_type | m_index |
std::string | m_name |
bool | m_standalone |
Definition at line 80 of file DiffClexParamPack.hh.
|
inline |
DiffClexParamKey Constructor.
_name | The name of the associated value |
_ind | Index of the standalone value that is the primary identifier for the associated value |
_offset | Constant offset for any secondary identifiers for the value of interest |
_stride |
Definition at line 87 of file DiffClexParamPack.hh.
|
inline |
Definition at line 96 of file DiffClexParamPack.hh.
|
inlinevirtual |
Destructor of abstract base class must be virtual.
Definition at line 99 of file DiffClexParamPack.hh.
|
protectedpure virtualinherited |
Clone the ClexParamKey.
Implemented in CASM::DiffClexParamHessKey, CASM::DiffClexParamGradKey, CASM::DiffClexParamValKey, and CASM::BasicClexParamKey.
Returns i'th linear index identifier.
Definition at line 86 of file ClexParamPack.hh.
|
inlineprotectedinherited |
Overload for linear indexed identifier.
Definition at line 96 of file ClexParamPack.hh.
|
inlineprotectedinherited |
Overload for pair indexed identifier.
Definition at line 101 of file ClexParamPack.hh.
|
inlineprotectedinherited |
Recursive unrolling of variadic template to set all identifiers.
Definition at line 90 of file ClexParamPack.hh.
|
inlineinherited |
Clone the ClexParamKey.
Definition at line 76 of file ClexParamPack.hh.
|
pure virtual |
Operate on associated DiffScalarContainer to ensure the standalone or derived value associated with this key is present in its cache matrix.
Implemented in CASM::DiffClexParamHessKey, CASM::DiffClexParamGradKey, and CASM::DiffClexParamValKey.
|
inline |
Access the primary identifier of this value (which determines the associated standalone value and/or the shape of the dataslice.
Definition at line 109 of file DiffClexParamPack.hh.
|
inlineinherited |
Name of this Key, should be descriptive of managed data. Ex.: "disp_var" of "magspin_site_basis".
Definition at line 62 of file ClexParamPack.hh.
|
inlineinherited |
Specify supplemental identifiers, either via linear indices or pair indices. Internally, identifiers are always passed as linear indices. The number and specification of identifiers depends on derived ClexParamKey implementation. Linear identifiers should be passed as an integral value (Index, int, etc) pair index identifiers must be passed as std::pair<Index,Index>
Definition at line 71 of file ClexParamPack.hh.
|
inlineinherited |
Returns true if key refers directly to managed data, false if it refers to values derived from managed data.
Definition at line 82 of file ClexParamPack.hh.
|
protectedinherited |
Definition at line 110 of file ClexParamPack.hh.
|
private |
Definition at line 112 of file DiffClexParamPack.hh.
|
privateinherited |
Definition at line 113 of file ClexParamPack.hh.
|
protectedinherited |
Definition at line 108 of file ClexParamPack.hh.
|
privateinherited |
Definition at line 114 of file ClexParamPack.hh.
|
protectedinherited |
Definition at line 109 of file ClexParamPack.hh.