CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <BasisSet.hh>
Definition at line 47 of file BasisSet.hh.
Public Types | |
using | ArgList = BasisSet_impl::ArgList |
using | SubBasis = Array< Index > |
using | PolyConstraint = std::pair< SubBasis, Index > |
Public Member Functions | |
BasisSet (const std::string &name="", ArgList const &_args=ArgList()) | |
BasisSet (const BasisSet &init_basis) | |
const BasisSet & | operator= (const BasisSet &RHS) |
~BasisSet () | |
void | clear () |
const std::string & | name () const |
std::vector< std::shared_ptr< BasisSet > > const & | arguments () const |
SymGroupRepID | basis_symrep_ID () const |
Index | max_poly_order () const |
Index | min_poly_order () const |
const Array< PolyConstraint > & | min_poly_constraints () const |
const Array< PolyConstraint > & | max_poly_constraints () const |
BasisSet | poly_quotient_set (const Function *divisor) const |
std::shared_ptr< BasisSet > | shared_copy () const |
Function const * | operator[] (Index i) const |
Function const * | back () const |
const double & | eval_cache (Index i) const |
const double & | deval_cache (Index i) const |
bool | compare (const BasisSet &RHS) const |
int | dependency_layer () const |
void | clear_formulae () |
void | set_name (const std::string &new_name) |
void | set_basis_symrep_ID (SymGroupRepID new_ID) |
void | add_min_poly_constraint (const Array< Index > &expons, Index expon_sum) |
void | add_max_poly_constraint (const Array< Index > &expons, Index expon_sum) |
bool | satisfies_exponent_constraints (const Array< Index > &expons) const |
bool | accept (const FunctionVisitor &visitor) |
void | set_variable_basis (const DoFSet &_dof_set) |
Define the basis set to contain only variables (e.g., x,y,z) More... | |
void | set_dof_IDs (const std::vector< Index > &new_IDs) |
const std::vector< Index > & | dof_IDs () const |
const SubBasis & | dof_sub_basis (Index i) const |
const Array< SubBasis > & | dof_sub_bases () const |
std::vector< std::set< Index > > | independent_sub_bases () const |
void | append (const BasisSet &RHS, std::function< Function *(Function *)> const &transform=CASM_TMP::UnaryIdentity< Function * >()) |
Append contents of. More... | |
void | reshape_and_append (const BasisSet &RHS, std::vector< Index > const &compatibility_map) |
void | construct_polynomials_by_order (ArgList const &tsubs, Index order) |
void | construct_orthonormal_discrete_functions (const DiscreteDoF &allowed_occs, const Eigen::MatrixXd &gram_mat, Index basis_ind, const SymGroup &symgroup) |
void | construct_orthonormal_discrete_functions (const DiscreteDoF &allowed_occs, const std::vector< double > &occ_probs, Index basis_ind, const SymGroup &symgroup) |
void | construct_invariant_polynomials (ArgList const &tsubs, const SymGroup &head_sym_group, Index order, Index min_dof_order=1) |
void | construct_harmonic_polynomials (const ArgList &tsubs, Index order, Index min_order, bool even_only) |
void | calc_invariant_functions (const SymGroup &head_sym_group) |
BasisSet | calc_normal_basis (const SymGroup &head_sym_group, Eigen::MatrixXd &trans_mat) const |
BasisSet | transform_copy (const Eigen::MatrixXd &trans_mat) const |
BasisSet & | apply_sym (const SymOp &op, int dependency_layer=1) |
bool | Gram_Schmidt () |
bool | Gaussian_Elim () |
void | get_symmetry_representation (const SymGroup &head_sym_group) const |
bool | make_orthogonal_to (Function const *ortho_func) |
bool | make_orthogonal_to (const BasisSet &ortho_basis) |
jsonParser & | to_json (jsonParser &json) const |
void | from_json (const jsonParser &json) |
void | remote_eval_and_add_to (Array< double > &cumulant) const |
void | remote_deval_and_add_to (Array< double > &cumulant, const DoF::RemoteHandle &dvar) const |
template<typename IteratorType > | |
void | remote_eval_to (IteratorType result_begin, IteratorType result_end) const |
template<typename IteratorType > | |
void | remote_deval_to (IteratorType result_begin, IteratorType result_end, const DoF::RemoteHandle &dvar) const |
int | register_remotes (const std::vector< DoF::RemoteHandle > &remote_handles) |
Private Types | |
typedef Array< Function * > | X1 |
typedef Array< X1 > | X2 |
typedef Array< X2 > | X3 |
typedef Array< X3 > | X4 |
typedef Array< X4 > | X5 |
typedef Array< X5 > | X6 |
typedef Array< X6 > | X7 |
typedef Array< X7 > | X8 |
typedef Array< X8 > | X9 |
typedef Function * | value_type |
typedef Index | size_type |
typedef Function * * | iterator |
typedef const Function * * | const_iterator |
Private Member Functions | |
void | push_back (Function *new_func) |
Function * | _back () |
Function *& | _at (Index i) |
void | _refresh_ID () |
void | _eval_to_cache () const |
void | _deval_to_cache (const DoF::RemoteHandle &_dvar) const |
Function * | _linear_combination (const Eigen::VectorXd &coeffs) const |
void | _set_arguments (const ArgList &new_args) |
void | _set_arguments (const std::vector< std::shared_ptr< BasisSet > > &new_args) |
bool | _update_dof_IDs (const std::vector< Index > before_IDs, const std::vector< Index > &after_IDs) |
Array< PolyConstraint > & | _min_poly_constraints () |
Array< PolyConstraint > & | _max_poly_constraints () |
Index | size () const |
void | swap (Array< Function * > &RHS) |
Function * & | at (Index ind) |
const Function * & | at (Index ind) const |
Function * & | operator[] (Index ind) |
Function * & | back () |
Function * const * | begin () const |
Function * * | begin () |
Function * const * | cbegin () const |
Function * const * | end () const |
Function * * | end () |
Function * const * | cend () const |
void | push_back (const Function * &toPush) |
void | pop_back () |
void | remove (Index ind) |
void | resize (Index new_N) |
void | resize (Index new_N, const Function * &fill_val) |
void | reserve (Index new_max) |
void | sort (const CompareType &comp) |
void | sort (Array< Index > &ind_order) |
void | sort () |
Array & | append (const Array &new_tail) |
Array & | append_unique (const Array &new_tail) |
void | swap_elem (Index i, Index j) |
Array & | permute (const Array< Index > &perm_array) |
Array & | ipermute (const Array< Index > &perm_array) |
bool | next_permute () |
ReturnArray< Index > | as_perm_inverse () const |
ReturnArray< Index > | as_perm_transform_by (const Array< Index > &trans_perm) const |
const Function * & | max () const |
const Function * & | min () const |
ReturnArray< Function * > | sub_array (Index ind_begin, Index ind_end) const |
Function * | sum () const |
bool | is_ascending () const |
bool | is_descending () const |
bool | is_constant () const |
bool | is_permute () const |
bool | has_fixed_points () const |
bool | operator== (const Array< Function * > &RHS) const |
bool | operator!= (const Array< Function * > &RHS) const |
bool | operator< (const Array< Function * > &RHS) const |
bool | operator> (const Array< Function * > &RHS) const |
bool | operator<= (const Array< Function * > &RHS) const |
bool | operator>= (const Array< Function * > &RHS) const |
bool | all_in (const Array &superset) const |
Index | coincidence (const Array &superset) const |
Index | incidences (const Function * &test_elem) const |
Index | find (const Function * &test_elem) const |
Index | reverse_find (const Function * &test_elem) const |
Same as find, but starts from the last element of the Array. More... | |
Index | almost_find (const Function * &test_elem, double tol_val=TOL) const |
Index | almost_reverse_find (const Function * &test_elem, double tol_val=TOL) const |
Same as almost_find, but start from the last element of the Array. More... | |
bool | contains (const Function * &test_elem) const |
bool | almost_contains (const Function * &test_elem, double tol_val=TOL) const |
void | print_column (std::ostream &stream, const std::string &indent="") const |
Static Private Member Functions | |
static Index | _new_ID () |
static Index | ARRAY_MIN_EXTRA_SPACE () |
static double | ARRAY_EXTENSION_FACTOR () |
static ReturnArray< Function * > | sequence (const Function * &initial, const Function * &final) |
static ReturnArray< Function * > | sequence (const Function * &initial, const Function * &increment, const Function * &final) |
Private Attributes | |
SymGroupRepID | m_basis_symrep_ID |
std::string | m_name |
Index | m_basis_ID |
std::vector< std::shared_ptr< BasisSet > > | m_argument |
Index | m_min_poly_order |
Index | m_max_poly_order |
std::vector< Index > | m_dof_IDs |
Array< SubBasis > | m_dof_subbases |
Array< PolyConstraint > | m_min_poly_constraints |
Array< PolyConstraint > | m_max_poly_constraints |
std::vector< double > | m_eval_cache |
std::vector< double > | m_deval_cache |
Index | N |
Index | NMax |
Function * * | Vals |
Friends | |
BasisSet | direct_sum (BasisSet::ArgList const &_subs) |
Definition at line 50 of file BasisSet.hh.
|
inherited |
|
inherited |
using CASM::BasisSet::PolyConstraint = std::pair<SubBasis, Index> |
Definition at line 52 of file BasisSet.hh.
|
inherited |
using CASM::BasisSet::SubBasis = Array<Index> |
Definition at line 51 of file BasisSet.hh.
|
inherited |
|
inherited |
|
inline |
Definition at line 58 of file BasisSet.hh.
CASM::BasisSet::BasisSet | ( | const BasisSet & | init_basis | ) |
Definition at line 47 of file BasisSet.cc.
CASM::BasisSet::~BasisSet | ( | ) |
Definition at line 117 of file BasisSet.cc.
Definition at line 281 of file BasisSet.hh.
|
inlineprivate |
Definition at line 278 of file BasisSet.hh.
|
private |
Remotely evaluate each basis function and add it to the respective value in cumulant
Definition at line 315 of file BasisSet.cc.
|
private |
Remotely evaluate each basis function and add it to the respective value in cumulant
Definition at line 309 of file BasisSet.cc.
|
private |
Definition at line 1014 of file BasisSet.cc.
|
inlineprivate |
Definition at line 307 of file BasisSet.hh.
|
inlineprivate |
Definition at line 304 of file BasisSet.hh.
|
inlinestaticprivate |
Definition at line 283 of file BasisSet.hh.
|
inlineprivate |
Definition at line 288 of file BasisSet.hh.
|
private |
Definition at line 1098 of file BasisSet.cc.
|
inlineprivate |
Definition at line 296 of file BasisSet.hh.
|
private |
Definition at line 350 of file BasisSet.cc.
bool CASM::BasisSet::accept | ( | const FunctionVisitor & | visitor | ) |
Definition at line 234 of file BasisSet.cc.
|
inline |
Definition at line 131 of file BasisSet.hh.
|
inline |
Definition at line 127 of file BasisSet.hh.
|
inherited |
|
inlineinherited |
|
inherited |
|
inherited |
void CASM::BasisSet::append | ( | const BasisSet & | RHS, |
std::function< Function *(Function *)> const & | transform = CASM_TMP::UnaryIdentity<Function *>() |
||
) |
Definition at line 1073 of file BasisSet.cc.
|
inline |
Definition at line 76 of file BasisSet.hh.
|
inlinestaticprivateinherited |
|
inlinestaticprivateinherited |
|
inherited |
|
inherited |
Given N distinct objects labeled from 0 to N-1, a permutation 'P_permute' that physically permutes the objects (with labels) in terms of their labels, and a permutation 'L_permute' that permutes their labels only, rewrite 'P_permute' in terms of the relabeling induced by 'L_permute' Rearrange 'this' permutation to form an equivalent permutation for any list that has already been permuted by trans_perm. Does not (nearly certain of this) depend on permutation convention
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inline |
Definition at line 101 of file BasisSet.hh.
|
inline |
Definition at line 80 of file BasisSet.hh.
|
inlineinherited |
|
inlineinherited |
void CASM::BasisSet::calc_invariant_functions | ( | const SymGroup & | head_sym_group | ) |
Definition at line 947 of file BasisSet.cc.
BasisSet CASM::BasisSet::calc_normal_basis | ( | const SymGroup & | head_sym_group, |
Eigen::MatrixXd & | trans_mat | ||
) | const |
Definition at line 971 of file BasisSet.cc.
|
inlineinherited |
|
inlineinherited |
void CASM::BasisSet::clear | ( | ) |
Definition at line 124 of file BasisSet.cc.
|
inline |
Definition at line 117 of file BasisSet.hh.
|
inherited |
bool CASM::BasisSet::compare | ( | const BasisSet & | RHS | ) | const |
Definition at line 284 of file BasisSet.cc.
void CASM::BasisSet::construct_harmonic_polynomials | ( | const ArgList & | tsubs, |
Index | order, | ||
Index | min_order, | ||
bool | even_only | ||
) |
Definition at line 867 of file BasisSet.cc.
void CASM::BasisSet::construct_invariant_polynomials | ( | BasisSet::ArgList const & | tsubs, |
const SymGroup & | head_sym_group, | ||
Index | order, | ||
Index | min_dof_order = 1 |
||
) |
Definition at line 479 of file BasisSet.cc.
void CASM::BasisSet::construct_orthonormal_discrete_functions | ( | const DiscreteDoF & | allowed_occs, |
const Eigen::MatrixXd & | gram_mat, | ||
Index | basis_ind, | ||
const SymGroup & | symgroup | ||
) |
Definition at line 631 of file BasisSet.cc.
void CASM::BasisSet::construct_orthonormal_discrete_functions | ( | const DiscreteDoF & | allowed_occs, |
const std::vector< double > & | occ_probs, | ||
Index | basis_ind, | ||
const SymGroup & | symgroup | ||
) |
Definition at line 807 of file BasisSet.cc.
void CASM::BasisSet::construct_polynomials_by_order | ( | BasisSet::ArgList const & | tsubs, |
Index | order | ||
) |
Construct a polynomial basis set that contains all allowed polynomials of functions specified by tsubs if tsubs specifies, e.g., {{x,y,z}, {x,y,z}, {w,v}}, the resulting basis set will be {x*x*w, x*x*v, x*y*w+y*x*w,..., z*z*v}
Definition at line 454 of file BasisSet.cc.
|
inlineinherited |
int CASM::BasisSet::dependency_layer | ( | ) | const |
Definition at line 300 of file BasisSet.cc.
|
inline |
Definition at line 108 of file BasisSet.hh.
|
inline |
Definition at line 144 of file BasisSet.hh.
Definition at line 148 of file BasisSet.hh.
Definition at line 146 of file BasisSet.hh.
|
inlineinherited |
|
inlineinherited |
|
inline |
Definition at line 103 of file BasisSet.hh.
|
inherited |
void CASM::BasisSet::from_json | ( | const jsonParser & | json | ) |
bool CASM::BasisSet::Gaussian_Elim | ( | ) |
Definition at line 1183 of file BasisSet.cc.
void CASM::BasisSet::get_symmetry_representation | ( | const SymGroup & | head_sym_group | ) | const |
Definition at line 1243 of file BasisSet.cc.
bool CASM::BasisSet::Gram_Schmidt | ( | ) |
Definition at line 1133 of file BasisSet.cc.
|
inherited |
Checks whether any values are equal to their index – only valid for Array<Index>
|
inherited |
Definition at line 408 of file BasisSet.cc.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
bool CASM::BasisSet::make_orthogonal_to | ( | const BasisSet & | ortho_basis | ) |
Definition at line 1269 of file BasisSet.cc.
bool CASM::BasisSet::make_orthogonal_to | ( | Function const * | ortho_func | ) |
Definition at line 1279 of file BasisSet.cc.
|
inherited |
|
inline |
Definition at line 88 of file BasisSet.hh.
|
inline |
Definition at line 82 of file BasisSet.hh.
|
inherited |
|
inline |
Definition at line 85 of file BasisSet.hh.
|
inline |
Definition at line 83 of file BasisSet.hh.
|
inline |
Definition at line 74 of file BasisSet.hh.
|
inherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
Definition at line 79 of file BasisSet.cc.
|
inherited |
|
inherited |
|
inlineinherited |
Definition at line 97 of file BasisSet.hh.
|
inlineinherited |
Definition at line 198 of file BasisSet.cc.
|
inlineinherited |
|
inherited |
|
inherited |
|
private |
Definition at line 998 of file BasisSet.cc.
int CASM::BasisSet::register_remotes | ( | const std::vector< DoF::RemoteHandle > & | remote_handles | ) |
Definition at line 440 of file BasisSet.cc.
void CASM::BasisSet::remote_deval_and_add_to | ( | Array< double > & | cumulant, |
const DoF::RemoteHandle & | dvar | ||
) | const |
Remotely evaluate derivative of each basis function (w.r.t. dvar) and add it to the respective value in cumulant
Definition at line 271 of file BasisSet.cc.
void CASM::BasisSet::remote_deval_to | ( | IteratorType | result_begin, |
IteratorType | result_end, | ||
const DoF::RemoteHandle & | dvar | ||
) | const |
Remotely evaluate derivative of each basis function (w.r.t. dvar) and add it to the respective value in cumulant
Remotely evaluate derivative of each basis function (w.r.t. dvar) and add it to the respective value in result
Definition at line 339 of file BasisSet.hh.
void CASM::BasisSet::remote_eval_and_add_to | ( | Array< double > & | cumulant | ) | const |
Remotely evaluate each basis function and add it to the respective value in cumulant
Definition at line 259 of file BasisSet.cc.
void CASM::BasisSet::remote_eval_to | ( | IteratorType | result_begin, |
IteratorType | result_end | ||
) | const |
Remotely evaluate each basis function and add it to the respective value in cumulant
Definition at line 323 of file BasisSet.hh.
|
inherited |
|
inherited |
void CASM::BasisSet::reshape_and_append | ( | const BasisSet & | RHS, |
std::vector< Index > const & | compatibility_map | ||
) |
|
inherited |
|
inherited |
|
inherited |
Definition at line 211 of file BasisSet.cc.
|
staticinherited |
Returns an array with the sequence (initial, ++initial, ..., final), inclusive requires that operator<() and operator++() are defined on type T
Returns an array with the sequence (initial, ++initial, ..., final), inclusive
|
staticinherited |
Returns an array with the sequence (initial, initial+increment, ..., final?), inclusive if final is in the sequence requires that operator<() and operator+=() are defined on type T
Returns an array with the sequence (initial, initial+increment, ..., final?), inclusive if final is in the sequence
|
inline |
Definition at line 125 of file BasisSet.hh.
void CASM::BasisSet::set_dof_IDs | ( | const std::vector< Index > & | new_IDs | ) |
Definition at line 344 of file BasisSet.cc.
|
inline |
Definition at line 123 of file BasisSet.hh.
void CASM::BasisSet::set_variable_basis | ( | const DoFSet & | _dof_set | ) |
Define the basis set to contain only variables (e.g., x,y,z)
Definition at line 322 of file BasisSet.cc.
|
inline |
Definition at line 93 of file BasisSet.hh.
|
inlineinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inlineinherited |
jsonParser & CASM::BasisSet::to_json | ( | jsonParser & | json | ) | const |
Definition at line 1365 of file BasisSet.cc.
BasisSet CASM::BasisSet::transform_copy | ( | const Eigen::MatrixXd & | trans_mat | ) | const |
Essentially, perform a change of basis on BasisSet as defined by trans_mat. Returns a BasisSet whos elements are linear combinations of the original BasisSet. The linear combinations are specified by the ROWS of trans_matx
Definition at line 1051 of file BasisSet.cc.
|
friend |
Definition at line 1324 of file BasisSet.cc.
|
private |
Definition at line 252 of file BasisSet.hh.
|
private |
Definition at line 250 of file BasisSet.hh.
|
mutableprivate |
Definition at line 247 of file BasisSet.hh.
|
mutableprivate |
Definition at line 269 of file BasisSet.hh.
|
private |
Definition at line 264 of file BasisSet.hh.
Definition at line 265 of file BasisSet.hh.
|
mutableprivate |
Definition at line 268 of file BasisSet.hh.
|
private |
Definition at line 266 of file BasisSet.hh.
|
private |
Definition at line 262 of file BasisSet.hh.
|
private |
Definition at line 266 of file BasisSet.hh.
|
private |
Definition at line 262 of file BasisSet.hh.
|
private |
Definition at line 249 of file BasisSet.hh.
|
privateinherited |
|
privateinherited |
|
privateinherited |