svMultiPhysics
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
ActiveStressModelParameters Class Reference

Parameters for a generic active stress model. More...

#include <Parameters.h>

Inheritance diagram for ActiveStressModelParameters:
[legend]

Public Member Functions

 ActiveStressModelParameters (const std::string &xml_element_name_)
 Constructor.
 
bool defined () const
 Return whether the parameters represented by this object were defined.
 
void print_parameters () const
 Print the value of parameters.
 
void set_values (const tinyxml2::XMLElement *xml_elem)
 Set the values of parameters in this object from an XML element.
 
double get_scalar (const std::string &label) const
 Get the value of a parameter by label.
 
void set_scalar (const std::string &label, double value)
 Set the value of a scalar parameter by label.
 
std::string get_string (const std::string &label) const
 Get the value of a string parameter by label.
 
bool get_bool (const std::string &label) const
 Get the value of a bool parameter by label.
 
- Public Member Functions inherited from ParameterLists
void set_xml_element_name (const std::string &name)
 
void set_parameter (const std::string &name, const bool value, bool required, Parameter< bool > &param)
 Set the name, default value and the parameter required flag.
 
void set_parameter (const std::string &name, const double value, bool required, Parameter< double > &param)
 
void set_parameter (const std::string &name, std::initializer_list< double > value, bool required, VectorParameter< double > &param)
 
void set_parameter (const std::string &name, std::initializer_list< int > value, bool required, VectorParameter< int > &param)
 
void set_parameter (const std::string &name, std::initializer_list< std::string > value, bool required, VectorParameter< std::string > &param)
 
void set_parameter (const std::string &name, const int value, bool required, Parameter< int > &param, std::vector< int > range={})
 
void set_parameter (const std::string &name, const std::string &value, bool required, Parameter< std::string > &param)
 
void set_parameter_value_CANN (const std::string &name, const std::string &value)
 set_parameter function to handle CANNRow
 
void set_parameter_value (const std::string &name, const std::string &value)
 Set the value of a paramter from a string.
 
void check_required ()
 Check if any required parameters have not been set.
 
std::map< std::string, std::string > get_parameter_list () const
 Get the defined parameters as a map of strings.
 
void print_parameter_list ()
 Print the parameters.
 

Public Attributes

const std::string xml_element_name
 Name of the XML element for this object.
 
- Public Attributes inherited from ParameterLists
std::map< std::string, std::variant< Parameter< bool > *, Parameter< double > *, Parameter< int > *, Parameter< std::string > *, VectorParameter< double > *, VectorParameter< int > *, VectorParameter< std::string > * > > params_map
 Map used for storing parameters by name / Parameter template union.
 
std::string xml_element_name = ""
 

Protected Member Functions

void add_parameter (const std::string &label, double default_value, bool required)
 Add a new parameter to this object.
 
void add_parameter (const std::string &label, const std::string &default_value, bool required)
 Add a new parameter to this object.
 
void add_parameter (const std::string &label, bool default_value, bool required)
 Add a new parameter to this object.
 

Protected Attributes

std::map< std::string, Parameter< double > > double_parameters
 Double-valued parameters.
 
std::map< std::string, Parameter< std::string > > string_parameters
 String-valued parameters.
 
std::map< std::string, Parameter< bool > > bool_parameters
 Bool-valued parameters.
 
bool value_set = false
 

Detailed Description

Parameters for a generic active stress model.

This class is meant to be inherited from to implement parameters for specific active stress models. Derived classes will mostly have to call add_parameter in their constructor to define the model-specific parameters.

In the XML file, this class, and the classes derived from it, correspond to the element <Model_name> within the <Active_stress> element, where Model_name is the name of a concrete active stress model.

Constructor & Destructor Documentation

◆ ActiveStressModelParameters()

ActiveStressModelParameters::ActiveStressModelParameters ( const std::string &  xml_element_name_)

Constructor.

Member Function Documentation

◆ add_parameter() [1/3]

void ActiveStressModelParameters::add_parameter ( const std::string &  label,
bool  default_value,
bool  required 
)
inlineprotected

Add a new parameter to this object.

◆ add_parameter() [2/3]

void ActiveStressModelParameters::add_parameter ( const std::string &  label,
const std::string &  default_value,
bool  required 
)
inlineprotected

Add a new parameter to this object.

◆ add_parameter() [3/3]

void ActiveStressModelParameters::add_parameter ( const std::string &  label,
double  default_value,
bool  required 
)
inlineprotected

Add a new parameter to this object.

◆ defined()

bool ActiveStressModelParameters::defined ( ) const
inline

Return whether the parameters represented by this object were defined.

◆ get_bool()

bool ActiveStressModelParameters::get_bool ( const std::string &  label) const
inline

Get the value of a bool parameter by label.

◆ get_scalar()

double ActiveStressModelParameters::get_scalar ( const std::string &  label) const
inline

Get the value of a parameter by label.

◆ get_string()

std::string ActiveStressModelParameters::get_string ( const std::string &  label) const
inline

Get the value of a string parameter by label.

◆ print_parameters()

void ActiveStressModelParameters::print_parameters ( ) const

Print the value of parameters.

◆ set_scalar()

void ActiveStressModelParameters::set_scalar ( const std::string &  label,
double  value 
)
inline

Set the value of a scalar parameter by label.

◆ set_values()

void ActiveStressModelParameters::set_values ( const tinyxml2::XMLElement *  xml_elem)

Set the values of parameters in this object from an XML element.

Member Data Documentation

◆ bool_parameters

std::map<std::string, Parameter<bool> > ActiveStressModelParameters::bool_parameters
protected

Bool-valued parameters.

◆ double_parameters

std::map<std::string, Parameter<double> > ActiveStressModelParameters::double_parameters
protected

Double-valued parameters.

Parameters are stored in a map as key-parameter pairs. Derived classes should add parameters to this map in their constructors by calling add_parameter.

◆ string_parameters

std::map<std::string, Parameter<std::string> > ActiveStressModelParameters::string_parameters
protected

String-valued parameters.

◆ value_set

bool ActiveStressModelParameters::value_set = false
protected

Flag indicating whether the values of the parameters stored in this object have been set.

◆ xml_element_name

const std::string ActiveStressModelParameters::xml_element_name

Name of the XML element for this object.


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