CASM
1.1.0
A Clusters Approach to Statistical Mechanics
|
#include <BasisFunction.hh>
Function is a virtual class from which all basis function types (e.g., Variable, PolynomialFunction, etc.) are derived
Definition at line 41 of file BasisFunction.hh.
Public Member Functions | |
Function (const Function &RHS)=default | |
Function (const ArgumentContainer &_args) | |
Function () | |
virtual | ~Function () |
void | refresh_ID () |
Index | ID () const |
Index | num_args () const |
void | set_identifier (char _key, std::string const &_value) |
std::string | identifier (char _key) const |
std::string | formula () const |
std::string | tex_formula () const |
void | print (std::ostream &stream) const |
void | print_tex (std::ostream &stream) const |
void | set_formula (const std::string &new_formula) |
void | set_tex_formula (const std::string &new_formula) |
void | clear_formula () |
virtual std::string | type_name () const =0 |
virtual Function * | copy () const =0 |
virtual void | make_formula () const =0 |
virtual bool | is_zero () const =0 |
virtual bool | depends_on (const Function *test_func) const |
bool | accept (const FunctionVisitor &visitor, BasisSet const *home_basis_ptr=nullptr) |
bool | accept (const FunctionVisitor &visitor, BasisSet const *home_basis_ptr=nullptr) const |
virtual void | small_to_zero (double tol=TOL)=0 |
virtual Index | num_terms () const =0 |
virtual double | leading_coefficient () const =0 |
virtual double | leading_coefficient (Index &index) const =0 |
virtual double | get_coefficient (Index i) const =0 |
virtual int | class_ID () const =0 |
virtual void | scale (double scale_factor)=0 |
virtual SparseTensor< double > const * | get_coeffs () const |
virtual Eigen::VectorXd const * | get_eigen_coeffs () const |
virtual double | remote_eval () const =0 |
virtual double | remote_deval (const DoF::RemoteHandle &dvar) const =0 |
virtual double | cache_eval () const =0 |
virtual double | cache_deval (const DoF::RemoteHandle &dvar) const =0 |
virtual int | register_remotes (const std::vector< DoF::RemoteHandle > &remote_handles) |
bool | update_dof_IDs (const std::vector< Index > &before_IDs, const std::vector< Index > &after_IDs) |
virtual std::set< Index > | dof_IDs () const =0 |
virtual Function * | apply_sym_coeffs (const SymOp &op, int dependency_layer=1) |
Function * | sym_copy_coeffs (const SymOp &op, int dependency_layer=1) const |
void | normalize () |
double | dot (Function const *RHS) const |
bool | shallow_compare (Function const *RHS) const |
bool | compare (Function const *RHS) const |
Function * | minus (Function const *RHS) const |
Function * | plus (Function const *RHS) const |
Function * | multiply (Function const *RHS) const |
Function * | poly_quotient (Function const *RHS) const |
Function * | poly_remainder (Function const *RHS) const |
Function * | minus_in_place (Function const *RHS) |
Function * | plus_in_place (Function const *RHS) |
void | set_arguments (const ArgumentContainer &new_arg) |
change arguments of this function More... | |
void | set_arguments (const ArgumentContainer &new_arg, std::vector< Index > const &compatibility_map) |
change arguments, allowing for new_arg to be larger than current argument list [or permuted (not yet implemented)] More... | |
const ArgumentContainer & | argument_bases () const |
virtual jsonParser & | to_json (jsonParser &json) const |
Protected Types | |
typedef std::vector< std::shared_ptr< BasisSet > > | ArgumentContainer |
Protected Member Functions | |
ReturnArray< SymGroupRepID > | _sub_sym_reps () const |
virtual void | _set_arguments (const ArgumentContainer &new_arg, std::vector< Index > const &compatibility_map) |
Function const * | _argument (Index i) const |
double | _arg_eval_cache (Index i) const |
double | _arg_deval_cache (Index i) const |
int | _dependency_layer () const |
virtual Function * | _apply_sym (const SymOp &op)=0 |
virtual bool | _accept (const FunctionVisitor &visitor, BasisSet const *home_basis_ptr=nullptr)=0 |
virtual bool | _accept (const FunctionVisitor &visitor, BasisSet const *home_basis_ptr=nullptr) const =0 |
virtual bool | _update_dof_IDs (const std::vector< Index > &before_IDs, const std::vector< Index > &after_IDs) |
Static Protected Member Functions | |
static void | extend_hierarchy () |
static int | new_class_ID () |
Protected Attributes | |
Index | func_ID |
ArgumentContainer | m_argument |
Array< Index > | m_arg2sub |
Array< Index > | m_arg2fun |
std::string | m_formula |
std::string | m_tex_formula |
Static Protected Attributes | |
static Array< Array< InnerProduct * > > | inner_prod_table |
static Array< Array< FunctionOperation * > > | operation_table |
Private Attributes | |
std::map< char, std::string > | m_identifiers |
Static Private Attributes | |
static Index | ID_count |
Friends | |
class | HierarchyID< Function > |
|
protected |
Definition at line 43 of file BasisFunction.hh.
|
default |
CASM::Function::Function | ( | const ArgumentContainer & | _args | ) |
|
inline |
Definition at line 49 of file BasisFunction.hh.
|
inlinevirtual |
Definition at line 53 of file BasisFunction.hh.
|
protectedpure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
|
protectedpure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
|
protected |
Definition at line 150 of file BasisFunction.cc.
|
protected |
Definition at line 144 of file BasisFunction.cc.
Definition at line 138 of file BasisFunction.cc.
|
protected |
Definition at line 156 of file BasisFunction.cc.
|
inlineprotectedvirtual |
Reimplemented in CASM::PolynomialFunction.
Definition at line 225 of file BasisFunction.hh.
|
protected |
Definition at line 128 of file BasisFunction.cc.
|
inlineprotectedvirtual |
Reimplemented in CASM::Variable, and CASM::OccupantFunction.
Definition at line 257 of file BasisFunction.hh.
bool CASM::Function::accept | ( | const FunctionVisitor & | visitor, |
BasisSet const * | home_basis_ptr = nullptr |
||
) |
Definition at line 171 of file BasisFunction.cc.
bool CASM::Function::accept | ( | const FunctionVisitor & | visitor, |
BasisSet const * | home_basis_ptr = nullptr |
||
) | const |
Definition at line 189 of file BasisFunction.cc.
|
inlinevirtual |
Reimplemented in CASM::PolynomialFunction.
Definition at line 129 of file BasisFunction.hh.
|
inline |
Definition at line 170 of file BasisFunction.hh.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
|
inline |
Definition at line 76 of file BasisFunction.hh.
bool CASM::Function::compare | ( | Function const * | RHS | ) | const |
Definition at line 52 of file BasisFunction.cc.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
|
inlinevirtual |
Reimplemented in CASM::PolynomialFunction.
Definition at line 92 of file BasisFunction.hh.
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
double CASM::Function::dot | ( | Function const * | RHS | ) | const |
Definition at line 28 of file BasisFunction.cc.
|
inlinestaticprotected |
Definition at line 182 of file BasisFunction.hh.
std::string CASM::Function::formula | ( | ) | const |
Definition at line 281 of file BasisFunction.cc.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
|
inlinevirtual |
Reimplemented in CASM::PolynomialFunction.
Definition at line 111 of file BasisFunction.hh.
|
inlinevirtual |
Reimplemented in CASM::OccupantFunction.
Definition at line 113 of file BasisFunction.hh.
|
inline |
Definition at line 55 of file BasisFunction.hh.
std::string CASM::Function::identifier | ( | char | _key | ) | const |
Definition at line 273 of file BasisFunction.cc.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
Definition at line 72 of file BasisFunction.cc.
Definition at line 104 of file BasisFunction.cc.
Definition at line 90 of file BasisFunction.cc.
|
inlinestaticprotectedinherited |
Definition at line 16 of file HierarchyID.hh.
void CASM::Function::normalize | ( | ) |
Definition at line 33 of file BasisFunction.cc.
|
inline |
Definition at line 57 of file BasisFunction.hh.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
Definition at line 67 of file BasisFunction.cc.
Definition at line 96 of file BasisFunction.cc.
Definition at line 78 of file BasisFunction.cc.
Definition at line 84 of file BasisFunction.cc.
void CASM::Function::print | ( | std::ostream & | stream | ) | const |
Definition at line 211 of file BasisFunction.cc.
void CASM::Function::print_tex | ( | std::ostream & | stream | ) | const |
Definition at line 220 of file BasisFunction.cc.
void CASM::Function::refresh_ID | ( | ) |
Definition at line 207 of file BasisFunction.cc.
|
virtual |
Reimplemented in CASM::Variable, and CASM::OccupantFunction.
Definition at line 238 of file BasisFunction.cc.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
|
inline |
change arguments of this function
Definition at line 161 of file BasisFunction.hh.
void CASM::Function::set_arguments | ( | const ArgumentContainer & | new_arg, |
std::vector< Index > const & | compatibility_map | ||
) |
change arguments, allowing for new_arg to be larger than current argument list [or permuted (not yet implemented)]
compatibility_map | specifies which elements of |
new_arg | are compatible with urrent argument list (e.g., [2, 3]) |
Definition at line 113 of file BasisFunction.cc.
|
inline |
Definition at line 69 of file BasisFunction.hh.
void CASM::Function::set_identifier | ( | char | _key, |
std::string const & | _value | ||
) |
Definition at line 268 of file BasisFunction.cc.
|
inline |
Definition at line 73 of file BasisFunction.hh.
bool CASM::Function::shallow_compare | ( | Function const * | RHS | ) | const |
Definition at line 45 of file BasisFunction.cc.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
Definition at line 230 of file BasisFunction.cc.
std::string CASM::Function::tex_formula | ( | ) | const |
Definition at line 291 of file BasisFunction.cc.
|
virtual |
Reimplemented in CASM::Variable, and CASM::OccupantFunction.
Definition at line 387 of file BasisFunction.cc.
|
pure virtual |
Implemented in CASM::Variable, CASM::PolynomialFunction, and CASM::OccupantFunction.
bool CASM::Function::update_dof_IDs | ( | const std::vector< Index > & | before_IDs, |
const std::vector< Index > & | after_IDs | ||
) |
Definition at line 250 of file BasisFunction.cc.
|
friend |
Definition at line 257 of file BasisFunction.hh.
|
protected |
Definition at line 194 of file BasisFunction.hh.
|
staticprivate |
Definition at line 266 of file BasisFunction.hh.
|
staticprotected |
Definition at line 177 of file BasisFunction.hh.
Definition at line 219 of file BasisFunction.hh.
m_label_format sets the label format used to generate a label string for a Function object. It is specified as a string of the form (substr1 + "%a" + substr2 + "%b" + substr3 + ... ), where "%a" and "%b" are flags that specify object-specific values. The following flags are allowed:
Definition at line 218 of file BasisFunction.hh.
|
protected |
Definition at line 196 of file BasisFunction.hh.
|
mutableprotected |
Definition at line 221 of file BasisFunction.hh.
|
private |
Definition at line 268 of file BasisFunction.hh.
|
protected |
Definition at line 221 of file BasisFunction.hh.
|
staticprotected |
Definition at line 178 of file BasisFunction.hh.