CASM  1.1.0
A Clusters Approach to Statistical Mechanics
CASM::VariableLabeler Class Reference

#include <FunctionVisitor.hh>

+ Inheritance diagram for CASM::VariableLabeler:

Detailed Description

Selectively relabel all Variabless in a Function tree, using their set_formula() method. VariableLabeler is constructed using a template string, which should be of the form (substr1 + "%n" + substr2 + "%p" + substr3 + "%s" + substr4), where substr1, etc, are user-defined substrings. "%n" indicates the placement of the neighbor_list index, "%p" indicates placement of the DoF-type prefix, and "%s" indicates placement of the DoF-type suffix (all ContinuousDoFs are assumed to report a type-name of the form "prefix_suffix", where 'prefix' denotes the general class of DoF and 'suffix' denotes the particular designation of the type (e.g., STRAIN_F, STRAIN_GL, disp_x, disp_y, etc)

Definition at line 137 of file FunctionVisitor.hh.

Public Member Functions

 VariableLabeler (std::string const &m_type_name, std::string const &_template)
 
std::string type_name () const
 
bool visit (Variable &host, BasisSet const *bset_ptr) const
 
virtual bool visit (Variable const &host, BasisSet const *bset_ptr) const
 
virtual bool visit (OccupantFunction const &host, BasisSet const *bset_ptr) const
 
virtual bool visit (OccupantFunction &host, BasisSet const *bset_ptr) const
 
virtual bool visit (PolynomialFunction const &host, BasisSet const *bset_ptr) const
 
virtual bool visit (PolynomialFunction &host, BasisSet const *bset_ptr) const
 

Private Member Functions

virtual bool _generic_visit (Function &host, BasisSet const *bset_ptr) const
 
virtual bool _generic_visit (Function const &host, BasisSet const *bset_ptr) const
 
virtual bool _visit (const Array< Function * > &host_list, BasisSet const *bset_ptr) const
 

Private Attributes

std::string m_type_name
 
std::vector< std::string > m_sub_strings
 

Constructor & Destructor Documentation

◆ VariableLabeler()

CASM::VariableLabeler::VariableLabeler ( std::string const &  m_type_name,
std::string const &  _template 
)

Definition at line 115 of file FunctionVisitor.cc.

Member Function Documentation

◆ _generic_visit() [1/2]

bool CASM::FunctionVisitor::_generic_visit ( Function host,
BasisSet const *  bset_ptr 
) const
privatevirtualinherited

Reimplemented in CASM::SubExpressionLabeler.

Definition at line 55 of file FunctionVisitor.cc.

◆ _generic_visit() [2/2]

bool CASM::FunctionVisitor::_generic_visit ( Function const &  host,
BasisSet const *  bset_ptr 
) const
privatevirtualinherited

Reimplemented in CASM::SubExpressionLabeler, and CASM::OccFuncEvaluator.

Definition at line 61 of file FunctionVisitor.cc.

◆ _visit()

virtual bool CASM::FunctionVisitor::_visit ( const Array< Function * > &  host_list,
BasisSet const *  bset_ptr 
) const
inlineprivatevirtualinherited

Definition at line 60 of file FunctionVisitor.hh.

◆ type_name()

std::string CASM::VariableLabeler::type_name ( ) const
inlinevirtual

Implements CASM::FunctionVisitor.

Definition at line 141 of file FunctionVisitor.hh.

◆ visit() [1/6]

bool CASM::FunctionVisitor::visit ( OccupantFunction host,
BasisSet const *  bset_ptr 
) const
virtualinherited

Reimplemented in CASM::OccFuncEvaluator, CASM::OccFuncBasisIndexer, and CASM::OccFuncLabeler.

Definition at line 40 of file FunctionVisitor.cc.

◆ visit() [2/6]

bool CASM::FunctionVisitor::visit ( OccupantFunction const &  host,
BasisSet const *  bset_ptr 
) const
virtualinherited

Reimplemented in CASM::OccFuncEvaluator.

Definition at line 35 of file FunctionVisitor.cc.

◆ visit() [3/6]

bool CASM::FunctionVisitor::visit ( PolynomialFunction host,
BasisSet const *  bset_ptr 
) const
virtualinherited

Definition at line 50 of file FunctionVisitor.cc.

◆ visit() [4/6]

bool CASM::FunctionVisitor::visit ( PolynomialFunction const &  host,
BasisSet const *  bset_ptr 
) const
virtualinherited

Definition at line 45 of file FunctionVisitor.cc.

◆ visit() [5/6]

bool CASM::VariableLabeler::visit ( Variable host,
BasisSet const *  bset_ptr 
) const
virtual

Reimplemented from CASM::FunctionVisitor.

Definition at line 123 of file FunctionVisitor.cc.

◆ visit() [6/6]

bool CASM::FunctionVisitor::visit ( Variable const &  host,
BasisSet const *  bset_ptr 
) const
virtualinherited

Definition at line 26 of file FunctionVisitor.cc.

Member Data Documentation

◆ m_sub_strings

std::vector<std::string> CASM::VariableLabeler::m_sub_strings
private

Definition at line 147 of file FunctionVisitor.hh.

◆ m_type_name

std::string CASM::VariableLabeler::m_type_name
private

Definition at line 146 of file FunctionVisitor.hh.


The documentation for this class was generated from the following files: