CASM
AClustersApproachtoStatisticalMechanics
|
#include <BasisSet.hh>
Definition at line 26 of file BasisSet.hh.
Public Types | |
typedef Array< Index > | SubBasis |
typedef std::pair< SubBasis, Index > | PolyConstraint |
Public Member Functions | |
BasisSet (const std::string &name="") | |
BasisSet (const BasisSet &init_basis) | |
const BasisSet & | operator= (const BasisSet &RHS) |
~BasisSet () | |
void | clear () |
const std::string & | name () 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 | remote_eval_and_add_to (Array< double > &cumulant) const |
Remotely evaluate each basis function and add it to the respective value in cumulant. More... | |
void | 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. More... | |
template<typename IteratorType > | |
void | remote_eval_to (IteratorType result_begin, IteratorType result_end) const |
Remotely evaluate each basis function and add it to the respective value in cumulant. More... | |
template<typename IteratorType > | |
void | 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. More... | |
void | set_variable_basis (const Array< ContinuousDoF > &tvar_compon, SymGroupRepID _sym_rep_ID) |
Define the basis set to contain only variables (e.g., x,y,z) More... | |
void | set_dof_IDs (const Array< Index > &new_IDs) |
const Array< 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 |
int | register_remotes (const std::string &dof_name, const Array< DoF::RemoteHandle > &remote_handles) |
void | append (const BasisSet &RHS) |
void | construct_polynomials_by_order (const Array< BasisSet 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 Array< double > &occ_probs, Index basis_ind, const SymGroup &symgroup) |
void | construct_invariant_polynomials (const Array< BasisSet const * > &tsubs, const SymGroup &head_sym_group, Index order, Index min_dof_order=1) |
void | calc_invariant_functions (const SymGroup &head_sym_group) |
bool | is_normal_basis_for (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) |
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 |
Remotely evaluate each basis function and add it to the respective value in cumulant. More... | |
void | _deval_to_cache (const DoF::RemoteHandle &_dvar) const |
Remotely evaluate each basis function and add it to the respective value in cumulant. More... | |
Function * | _linear_combination (const Eigen::VectorXd &coeffs) const |
void | _set_arguments (const Array< BasisSet const * > &new_args) |
void | _set_arguments (const std::vector< std::shared_ptr< BasisSet > > &new_args) |
void | _update_dof_IDs (const Array< Index > before_IDs, const Array< 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 |
Checks whether any values are equal to their index – only valid for Array<Index> More... | |
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 ReturnArray< Function * > | sequence (const Function *&initial, const Function *&final) |
Returns an array with the sequence (initial, ++initial, ..., final), inclusive. More... | |
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 |
Array< 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 |
|
inherited |
|
inherited |
typedef std::pair<SubBasis, Index> CASM::BasisSet::PolyConstraint |
Definition at line 29 of file BasisSet.hh.
|
inherited |
typedef Array<Index> CASM::BasisSet::SubBasis |
Definition at line 28 of file BasisSet.hh.
|
inherited |
|
inherited |
|
inline |
Definition at line 35 of file BasisSet.hh.
CASM::BasisSet::BasisSet | ( | const BasisSet & | init_basis | ) |
Definition at line 26 of file BasisSet.cc.
CASM::BasisSet::~BasisSet | ( | ) |
Definition at line 95 of file BasisSet.cc.
Definition at line 247 of file BasisSet.hh.
|
inlineprivate |
Definition at line 242 of file BasisSet.hh.
|
private |
Remotely evaluate each basis function and add it to the respective value in cumulant.
Definition at line 282 of file BasisSet.cc.
|
private |
Remotely evaluate each basis function and add it to the respective value in cumulant.
Definition at line 277 of file BasisSet.cc.
|
private |
Definition at line 814 of file BasisSet.cc.
|
inlineprivate |
Definition at line 276 of file BasisSet.hh.
|
inlineprivate |
Definition at line 273 of file BasisSet.hh.
|
inlinestaticprivate |
Definition at line 251 of file BasisSet.hh.
|
inlineprivate |
Definition at line 256 of file BasisSet.hh.
Definition at line 884 of file BasisSet.cc.
|
inlineprivate |
Definition at line 266 of file BasisSet.hh.
|
private |
Definition at line 309 of file BasisSet.cc.
bool CASM::BasisSet::accept | ( | const FunctionVisitor & | visitor | ) |
Definition at line 202 of file BasisSet.cc.
|
inline |
Definition at line 112 of file BasisSet.hh.
|
inline |
Definition at line 108 of file BasisSet.hh.
|
inherited |
|
inlineinherited |
|
inherited |
|
inherited |
Same as almost_find, but start from the last element of the Array.
void CASM::BasisSet::append | ( | const BasisSet & | RHS | ) |
Definition at line 112 of file BasisSet.cc.
|
inherited |
|
inherited |
Definition at line 868 of file BasisSet.cc.
|
inherited |
Construct permutation that undoes the permutation performed by 'this' Inverse operation is calculated the same, regardless of permutation convention
|
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 |
|
inline |
Definition at line 76 of file BasisSet.hh.
|
inlineinherited |
|
inline |
Definition at line 49 of file BasisSet.hh.
|
inlineinherited |
|
inlineinherited |
void CASM::BasisSet::calc_invariant_functions | ( | const SymGroup & | head_sym_group | ) |
Definition at line 734 of file BasisSet.cc.
BasisSet CASM::BasisSet::calc_normal_basis | ( | const SymGroup & | head_sym_group, |
Eigen::MatrixXd & | trans_mat | ||
) | const |
Definition at line 781 of file BasisSet.cc.
|
inlineinherited |
|
inlineinherited |
void CASM::BasisSet::clear | ( | ) |
Definition at line 101 of file BasisSet.cc.
|
inline |
Definition at line 94 of file BasisSet.hh.
|
inherited |
bool CASM::BasisSet::compare | ( | const BasisSet & | RHS | ) | const |
Definition at line 251 of file BasisSet.cc.
void CASM::BasisSet::construct_invariant_polynomials | ( | const Array< BasisSet const * > & | tsubs, |
const SymGroup & | head_sym_group, | ||
Index | order, | ||
Index | min_dof_order = 1 |
||
) |
Definition at line 425 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 541 of file BasisSet.cc.
void CASM::BasisSet::construct_orthonormal_discrete_functions | ( | const DiscreteDoF & | allowed_occs, |
const Array< double > & | occ_probs, | ||
Index | basis_ind, | ||
const SymGroup & | symgroup | ||
) |
Definition at line 687 of file BasisSet.cc.
void CASM::BasisSet::construct_polynomials_by_order | ( | const Array< BasisSet 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 398 of file BasisSet.cc.
|
inlineinherited |
int CASM::BasisSet::dependency_layer | ( | ) | const |
Definition at line 269 of file BasisSet.cc.
|
inline |
Definition at line 85 of file BasisSet.hh.
Definition at line 139 of file BasisSet.hh.
Definition at line 147 of file BasisSet.hh.
Definition at line 143 of file BasisSet.hh.
|
inlineinherited |
|
inlineinherited |
|
inline |
Definition at line 80 of file BasisSet.hh.
|
inherited |
void CASM::BasisSet::from_json | ( | const jsonParser & | json | ) |
bool CASM::BasisSet::Gaussian_Elim | ( | ) |
Definition at line 958 of file BasisSet.cc.
void CASM::BasisSet::get_symmetry_representation | ( | const SymGroup & | head_sym_group | ) | const |
Definition at line 1018 of file BasisSet.cc.
bool CASM::BasisSet::Gram_Schmidt | ( | ) |
Definition at line 905 of file BasisSet.cc.
|
inherited |
Checks whether any values are equal to their index – only valid for Array<Index>
|
inherited |
Definition at line 351 of file BasisSet.cc.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
bool CASM::BasisSet::is_normal_basis_for | ( | const SymGroup & | head_sym_group | ) |
Definition at line 760 of file BasisSet.cc.
|
inherited |
Checks that Array contains values from 0 to perm_array.size()-1 and that no value is repeated does not depend on definition of permutation convention
bool CASM::BasisSet::make_orthogonal_to | ( | Function const * | ortho_func | ) |
Definition at line 1057 of file BasisSet.cc.
bool CASM::BasisSet::make_orthogonal_to | ( | const BasisSet & | ortho_basis | ) |
Definition at line 1046 of file BasisSet.cc.
|
inherited |
|
inline |
Definition at line 63 of file BasisSet.hh.
|
inline |
Definition at line 53 of file BasisSet.hh.
|
inherited |
|
inline |
Definition at line 60 of file BasisSet.hh.
|
inline |
Definition at line 56 of file BasisSet.hh.
|
inline |
Definition at line 45 of file BasisSet.hh.
|
inherited |
|
inlineinherited |
|
inherited |
|
inlineinherited |
Definition at line 58 of file BasisSet.cc.
|
inherited |
|
inherited |
|
inlineinherited |
Definition at line 72 of file BasisSet.hh.
|
inlineinherited |
|
inherited |
Definition at line 163 of file BasisSet.cc.
|
inlineinherited |
|
inherited |
|
inherited |
|
private |
Definition at line 803 of file BasisSet.cc.
int CASM::BasisSet::register_remotes | ( | const std::string & | dof_name, |
const Array< DoF::RemoteHandle > & | remote_handles | ||
) |
Definition at line 385 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 238 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 309 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 225 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 293 of file BasisSet.hh.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Same as find, but starts from the last element of the Array.
Definition at line 176 of file BasisSet.cc.
|
staticinherited |
Returns an array with the sequence (initial, ++initial, ..., final), inclusive.
Returns an array with the sequence (initial, ++initial, ..., final), inclusive requires that operator<() and operator++() are defined on type T
|
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 104 of file BasisSet.hh.
Definition at line 304 of file BasisSet.cc.
|
inline |
Definition at line 100 of file BasisSet.hh.
void CASM::BasisSet::set_variable_basis | ( | const Array< ContinuousDoF > & | tvar_compon, |
SymGroupRepID | _sym_rep_ID | ||
) |
Define the basis set to contain only variables (e.g., x,y,z)
Definition at line 289 of file BasisSet.cc.
|
inline |
Definition at line 68 of file BasisSet.hh.
|
inlineinherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inlineinherited |
jsonParser & CASM::BasisSet::to_json | ( | jsonParser & | json | ) | const |
Definition at line 1109 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 849 of file BasisSet.cc.
|
private |
Definition at line 218 of file BasisSet.hh.
|
private |
Definition at line 216 of file BasisSet.hh.
|
mutableprivate |
Definition at line 213 of file BasisSet.hh.
|
mutableprivate |
Definition at line 235 of file BasisSet.hh.
Definition at line 230 of file BasisSet.hh.
Definition at line 231 of file BasisSet.hh.
|
mutableprivate |
Definition at line 234 of file BasisSet.hh.
|
private |
Definition at line 232 of file BasisSet.hh.
|
private |
Definition at line 228 of file BasisSet.hh.
|
private |
Definition at line 232 of file BasisSet.hh.
|
private |
Definition at line 228 of file BasisSet.hh.
|
private |
Definition at line 215 of file BasisSet.hh.