Class ConstraintClass#

Inheritance Relationships#

Derived Types#

Class Documentation#

class ConstraintClass

Base class for a generic constraint

Note

This is a constraint such as fixed volume, or bond lengths.

Subclassed by ConstraintArea, ConstraintVolume

Public Functions

inline ConstraintClass(SystemClass &system)
inline virtual ~ConstraintClass()
inline virtual void enforce(void)

Enforce constraint.

inline virtual void compute_normal(void)

Computes normal to the surface.

inline virtual void compute_gradient(void)

Computer gradient at a point.

virtual void compute_ref_gradient(void) = 0

Compute reference gradient.

inline bool is_satisfied(void)

Return true if the constraint has been satisfied.

inline bool should_apply()

Return true if constraint needs to be applied.

inline std::map<std::string, std::string> info(void)

compute the value of the constraint, return the difference and the information

inline double get_LagrangeMultiplier(void)

Get the Lagrange multiplier for a given constraint.

inline void reset_LagrangeMultiplier(void)
inline void set_property_common(std::map<std::string, std::string> &region_map)
virtual void set_default_properties(void) = 0
inline virtual void set_property(std::map<std::string, std::map<std::pair<std::string, std::string>, std::string>> &value_map)
inline virtual void set_property(std::map<std::string, std::map<std::string, std::string>> &value_map)
inline virtual void set_property(std::map<std::string, std::string> &value_map)
inline void print_warning_calling_err(const std::string &message)
inline void print_warning_calling(const std::string &message)
inline void print_warning_property_name(const std::string &message)

Protected Attributes

SystemClass &_system
std::string name
double m_tol

Tolerance for the constraint to be satisfied.

double m_target

Targeted value for the constraint.

double m_value

Current value of the constrained quantity.

double m_lambda

Lagrange multiplier for a given constraint.

std::string m_type

Constraint type (i.e. equality or inequality)