CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <DiffClexParamPack.hh>
container struct for storing a standalone value as 2D arrays of both autodiff Scalars doubles
Definition at line 120 of file DiffClexParamPack.hh.
Public Types | |
using | DiffScalar = DiffClexParamPack_impl::DiffScalar |
Public Member Functions | |
DiffScalarContainer (std::string const &_name, Index param_dim, Index num_params, Index _lbegin, bool _independent) | |
DiffSclarContainer constructor. More... | |
Eigen::MatrixXd const & | grad (Index f) const |
Gradient of dependent function index f wrt the independent variables contained in here. More... | |
Eigen::MatrixXd const & | hess (Index f, Index a) const |
Hessian components of dependent function index f corresponding to independent variable index 'a' and all independent variables managed by this. More... | |
void | pre_eval (Index N) |
Must be called on each independent parameter before function evaluation if derivatives are desired. More... | |
void | post_eval (Index N) |
Must be called on each dependent parameter after function evaluation if derivatives are desired. More... | |
void | eval_double () |
Copy values of autodiff scalars from m_data to m_data_double (matrix of doubles) in preparation for external access. More... | |
Index | linear_index_end () const |
Returns one past end of max linear index range allowed for this parameter set. More... | |
Public Attributes | |
std::string | m_name |
Name of the standalone value stored in this container. Should match name of associated key. More... | |
Index | lbegin |
linear offset for start of value index in linear array FADBAD forward (backward) autodiff types reference independent (dependent) via a linear index For a particular entry (i,j) into the 2d container for a specific type (e.g., "occ_site_func"), the linear index is defined as l=lbegin+i*m_cache.cols()+j More... | |
bool | m_independent |
Flag, set to true if this container holds independent values (false if dependent) More... | |
std::vector< std::vector< DiffScalar > > | m_data |
Stored data represented as autodif scalar type. More... | |
Eigen::MatrixXd | m_data_double |
Stored data, represented as matrix of doubles. More... | |
Eigen::MatrixXd | m_cache |
Derived data cache, represented as matrix of doubles. More... | |
Definition at line 121 of file DiffClexParamPack.hh.
|
inline |
DiffSclarContainer constructor.
_name | Name of the standalone value stored in this container, should match name of associated key |
param_dim | Dimension of vector parameter (e.g., 3 for "disp_var"), corresponds to columns of m_data, m_data_double, etc |
num_params | Number of vector parameters (e.g., 1 for global DoF, number of sites for local DoF), corresponds to rows of m_data, m_data_double, etc |
Definition at line 155 of file DiffClexParamPack.hh.
|
inline |
Copy values of autodiff scalars from m_data to m_data_double (matrix of doubles) in preparation for external access.
Definition at line 227 of file DiffClexParamPack.hh.
|
inline |
Gradient of dependent function index f wrt the independent variables contained in here.
f | secondary identifier denoting linear index of function F(f) among the set F of all dependent variables |
Definition at line 173 of file DiffClexParamPack.hh.
Hessian components of dependent function index f corresponding to independent variable index 'a' and all independent variables managed by this.
f | secondary identifier denoting linear index of function F(f) among the set F of all dependent variables |
a | secondary identifier denoting linear index of independent variable 'a' amont the set of all independent variables |
Definition at line 192 of file DiffClexParamPack.hh.
|
inline |
Returns one past end of max linear index range allowed for this parameter set.
Definition at line 237 of file DiffClexParamPack.hh.
|
inline |
Must be called on each dependent parameter after function evaluation if derivatives are desired.
Total | number of dependent parameters managed by DiffClexParamPack |
Definition at line 216 of file DiffClexParamPack.hh.
|
inline |
Must be called on each independent parameter before function evaluation if derivatives are desired.
Total | number of independent parameters managed by DiffClexParamPack |
Definition at line 204 of file DiffClexParamPack.hh.
Index CASM::DiffScalarContainer::lbegin |
linear offset for start of value index in linear array FADBAD forward (backward) autodiff types reference independent (dependent) via a linear index For a particular entry (i,j) into the 2d container for a specific type (e.g., "occ_site_func"), the linear index is defined as l=lbegin+i*m_cache.cols()+j
Definition at line 132 of file DiffClexParamPack.hh.
|
mutable |
Derived data cache, represented as matrix of doubles.
Definition at line 146 of file DiffClexParamPack.hh.
std::vector<std::vector<DiffScalar> > CASM::DiffScalarContainer::m_data |
Stored data represented as autodif scalar type.
Definition at line 140 of file DiffClexParamPack.hh.
|
mutable |
Stored data, represented as matrix of doubles.
Definition at line 143 of file DiffClexParamPack.hh.
bool CASM::DiffScalarContainer::m_independent |
Flag, set to true if this container holds independent values (false if dependent)
Definition at line 136 of file DiffClexParamPack.hh.
std::string CASM::DiffScalarContainer::m_name |
Name of the standalone value stored in this container. Should match name of associated key.
Definition at line 125 of file DiffClexParamPack.hh.