1 #ifndef BASISFUNCTION_HH
2 #define BASISFUNCTION_HH
12 #include "casm/external/Eigen/Dense"
26 class FunctionVisitor;
27 class FunctionOperation;
66 void print(std::ostream &stream)
const;
67 void print_tex(std::ostream &stream)
const;
93 return this == test_func;
100 BasisSet const *home_basis_ptr =
nullptr);
102 BasisSet const *home_basis_ptr =
nullptr)
const;
110 virtual void scale(
double scale_factor) = 0;
122 const std::vector<DoF::RemoteHandle> &remote_handles);
125 const std::vector<Index> &after_IDs);
130 int dependency_layer = 1) {
168 std::vector<Index>
const &compatibility_map);
226 std::vector<Index>
const &compatibility_map) {
252 BasisSet const *home_basis_ptr =
nullptr) = 0;
255 BasisSet const *home_basis_ptr =
nullptr)
const = 0;
258 const std::vector<Index> &after_IDs) {
Basic std::vector like container (deprecated)
Function * plus_in_place(Function const *RHS)
virtual double leading_coefficient() const =0
virtual void make_formula() const =0
virtual bool is_zero() const =0
virtual SparseTensor< double > const * get_coeffs() const
std::string identifier(char _key) const
void set_tex_formula(const std::string &new_formula)
std::string formula() const
virtual Eigen::VectorXd const * get_eigen_coeffs() const
Function * poly_remainder(Function const *RHS) const
virtual double cache_eval() const =0
virtual void _set_arguments(const ArgumentContainer &new_arg, std::vector< Index > const &compatibility_map)
virtual void scale(double scale_factor)=0
std::string m_tex_formula
Function * minus_in_place(Function const *RHS)
virtual Function * copy() const =0
std::map< char, std::string > m_identifiers
ReturnArray< SymGroupRepID > _sub_sym_reps() const
virtual double leading_coefficient(Index &index) const =0
virtual double remote_eval() const =0
virtual int register_remotes(const std::vector< DoF::RemoteHandle > &remote_handles)
virtual Index num_terms() const =0
virtual Function * _apply_sym(const SymOp &op)=0
Function(const ArgumentContainer &_args)
virtual std::string type_name() const =0
ArgumentContainer m_argument
bool shallow_compare(Function const *RHS) const
static void extend_hierarchy()
bool accept(const FunctionVisitor &visitor, BasisSet const *home_basis_ptr=nullptr)
virtual bool _accept(const FunctionVisitor &visitor, BasisSet const *home_basis_ptr=nullptr) const =0
virtual jsonParser & to_json(jsonParser &json) const
virtual std::set< Index > dof_IDs() const =0
bool compare(Function const *RHS) const
virtual bool _accept(const FunctionVisitor &visitor, BasisSet const *home_basis_ptr=nullptr)=0
virtual Function * apply_sym_coeffs(const SymOp &op, int dependency_layer=1)
double _arg_eval_cache(Index i) const
virtual double get_coefficient(Index i) const =0
Function * minus(Function const *RHS) const
std::vector< std::shared_ptr< BasisSet > > ArgumentContainer
static Array< Array< InnerProduct * > > inner_prod_table
const ArgumentContainer & argument_bases() const
void set_identifier(char _key, std::string const &_value)
void print(std::ostream &stream) const
void set_formula(const std::string &new_formula)
void print_tex(std::ostream &stream) const
Function const * _argument(Index i) const
virtual double remote_deval(const DoF::RemoteHandle &dvar) const =0
bool update_dof_IDs(const std::vector< Index > &before_IDs, const std::vector< Index > &after_IDs)
Function * plus(Function const *RHS) const
Function * poly_quotient(Function const *RHS) const
double _arg_deval_cache(Index i) const
int _dependency_layer() const
double dot(Function const *RHS) const
std::string tex_formula() const
virtual int class_ID() const =0
virtual bool _update_dof_IDs(const std::vector< Index > &before_IDs, const std::vector< Index > &after_IDs)
static Array< Array< FunctionOperation * > > operation_table
Function * sym_copy_coeffs(const SymOp &op, int dependency_layer=1) const
virtual void small_to_zero(double tol=TOL)=0
virtual bool depends_on(const Function *test_func) const
Function(const Function &RHS)=default
void set_arguments(const ArgumentContainer &new_arg)
change arguments of this function
virtual double cache_deval(const DoF::RemoteHandle &dvar) const =0
Function * multiply(Function const *RHS) const
virtual Function * subtract(Function const *LHS, Function const *RHS) const
virtual Function * poly_quotient(Function const *LHS, Function const *RHS) const
virtual bool compare(Function const *LHS, Function const *RHS) const
virtual Function * add_to(Function *LHS, Function const *RHS) const
virtual Function * poly_remainder(Function const *LHS, Function const *RHS) const
virtual Function * multiply(Function const *LHS, Function const *RHS) const
virtual Function * subtract_from(Function *LHS, Function const *RHS) const
virtual Function * add(Function const *LHS, Function const *RHS) const
virtual Function * multiply_by(Function *LHS, Function const *RHS) const
virtual double dot(Function const *LHS, Function const *RHS) const =0
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
INDEX_TYPE Index
For long integer indexing: