43 return visitor.
visit(*
this, home_basis_ptr);
49 BasisSet const *home_basis_ptr )
const {
50 return visitor.
visit(*
this, home_basis_ptr);
60 std::stringstream tformula, ttex;
70 if (!var_ind.
size()) {
76 if (one_count ==
dof().
size()) {
89 if (var_ind.
size() > 1) {
93 for (
Index i = 0; i < var_ind.
size(); i++) {
105 if (i > 0 &&
m_eval_table[var_ind[i]] / var_scale > 0) {
116 tformula <<
"p_" << var_ind[i];
117 ttex <<
"p_" << var_ind[i];
119 tformula <<
"_{" <<
m_var->ID() <<
"}";
120 ttex <<
"_{" <<
m_var->ID() <<
"}";
123 if (var_ind.
size() > 1) {
134 const std::vector<DoF::RemoteHandle> &remote_handles) {
135 std::vector<DoF::RemoteHandle>::const_iterator it =
136 find(remote_handles.begin(), remote_handles.end(),
m_var->handle());
137 if (it != remote_handles.end()) {
139 throw std::runtime_error(
140 std::string(
"In OccupantFunction::register_remotes(), attempting to "
141 "register dof with ID = ") +
144 m_var->register_remote(*it);
153 const std::vector<Index> &after_IDs) {
154 if (
dof().is_locked())
return false;
158 if (ID_ind < after_IDs.size()) {
159 m_var->set_ID(after_IDs[ID_ind]);
254 std::cerr <<
"WARNING: Attempting to reference invalid symmetry matrix in "
255 "OccupantFunction::apply_sym! Continuing...\n";
283 std::cerr <<
"CRITICAL ERROR: OccupantFunction::remote_deval() is not "
284 "implemented! Exiting...\n";
Basic std::vector like container (deprecated)
static int get_class_ID()
virtual Index size() const =0
Index ID() const
Const access of integer ID.
std::string type_name() const
Const access of DoF type name.
const int * i_ptr() const
std::string m_tex_formula
virtual jsonParser & to_json(jsonParser &json) const
static Array< Array< FunctionOperation * > > operation_table
virtual bool visit(Variable const &host, BasisSet const *bset_ptr) const
bool compare(Function const *LHS, Function const *RHS) const
const DiscreteDoF & dof() const
void small_to_zero(double tol=TOL) override
Eigen::VectorXd const * get_eigen_coeffs() const override
double get_coefficient(Index i) const override
Eigen::VectorXd m_eval_table
jsonParser & to_json(jsonParser &json) const override
bool _update_dof_IDs(const std::vector< Index > &before_IDs, const std::vector< Index > &after_IDs) override
notstd::cloneable_ptr< DiscreteDoF > m_var
void scale(double scale_factor) override
int class_ID() const override
double discrete_eval(int state) const
int register_remotes(const std::vector< DoF::RemoteHandle > &remote_handles) override
Function * _apply_sym(const SymOp &op) override
void make_formula() const override
double leading_coefficient() const override
bool compare(const OccupantFunction *RHS) const
SymGroupRepID m_sym_rep_ID
bool is_zero() const override
bool _accept(const FunctionVisitor &visitor, BasisSet const *home_basis_ptr=NULL) override
Function * copy() const override
static void fill_dispatch_table()
Index num_terms() const override
double remote_eval() const override
double remote_deval(const DoF::RemoteHandle &dvar) const override
bool is_identity() const
Returns true if SymGroupRepID corresponds to an Identity representation.
SymOp is the Coordinate representation of a symmetry operation it keeps fraction (FRAC) and Cartesian...
Eigen::MatrixXd const * get_matrix_rep(SymGroupRepID _rep_ID) const
get pointer to matrix representation corresponding to rep_ID
void push_back(const T &toPush)
std::string to_string(ENUM val)
Return string representation of enum class.
bool almost_equal(ClusterInvariants const &A, ClusterInvariants const &B, double tol)
Check if ClusterInvariants are equal.
jsonParser & to_json(const ClexDescription &desc, jsonParser &json)
Index find_index(Iterator begin, Iterator end, const T &value)
Equivalent to std::distance(begin, std::find(begin, end, value))
bool almost_zero(const T &val, double tol=TOL)
If T is not integral, use std::abs(val) < tol;.
Iterator find(Iterator begin, Iterator end, const T &value, BinaryCompare q)
Equivalent to std::find(begin, end, value), but with custom comparison.
std::string irrational_to_tex_string(double val, int lim, int max_pow=2)
Eigen::MatrixXd::Index EigenIndex
bool valid_index(Index i)
INDEX_TYPE Index
For long integer indexing: