Class the stores and manages user-defined constants.
More...
#include <user_constants.h>
|
| class | VariantPrinter |
| | Class for printing of variant types. This is bad practice and should be fixed. More...
|
| |
|
| InputVariant | construct_user_constant (std::vector< std::string > &model_constants_strings) |
| | Assign the specified user constant to whatever type.
|
| |
| double | get_double (const std::string &constant_name) const |
| | Retrieve the double from the model_constants that are defined from the parameters.prm parser. This is essentially just a wrapper for boost::get.
|
| |
| int | get_int (const std::string &constant_name) const |
| | Retrieve the int from the model_constants that are defined from the parameters.prm parser. This is essentially just a wrapper for boost::get.
|
| |
| bool | get_bool (const std::string &constant_name) const |
| | Retrieve the bool from the model_constants that are defined from the parameters.prm parser. This is essentially just a wrapper for boost::get.
|
| |
| dealii::Tensor< 1, dim > | get_rank_1_tensor (const std::string &constant_name) const |
| | Retrieve the rank 1 tensor from the model_constants that are defined from the parameters.prm parser. This is essentially just a wrapper for boost::get.
|
| |
| dealii::Tensor< 2, dim > | get_rank_2_tensor (const std::string &constant_name) const |
| | Retrieve the rank 2 tensor from the model_constants that are defined from the parameters.prm parser. This is essentially just a wrapper for boost::get.
|
| |
| dealii::Tensor< 2,(2 *dim) - 1+(dim/3)> | get_elasticity_tensor (const std::string &constant_name) const |
| | Retrieve the elasticity tensor from the model_constants that are defined from the parameters.prm parser. This is essentially just a wrapper for boost::get.
|
| |
| void | add_user_constant (const std::string &constant_name, std::vector< std::string > &model_constants_strings) |
| | Print all user-specified constants.
|
| |
| void | print () const |
| | Print all user-specified constants.
|
| |
|
| unsigned int | compute_tensor_parentheses (const unsigned int &n_elements, const std::vector< std::string > &tensor_elements) |
| | Compute the number of tensor rows.
|
| |
| void | remove_parentheses (std::vector< std::string > &tensor_elements) |
| | Remove and leading and trailing parentheses.
|
| |
| dealii::Tensor< 1, dim > | compute_rank_1_tensor_constant (const unsigned int &n_elements, const std::vector< std::string > &tensor_elements) |
| | Compute a 1st rank tensor from user inputs .
|
| |
| dealii::Tensor< 2, dim > | compute_rank_2_tensor_constant (const unsigned int &n_elements, const std::vector< std::string > &tensor_elements) |
| | Compute a 2nd rank tensor from user inputs .
|
| |
| InputVariant | primitive_model_constant (std::vector< std::string > &model_constants_strings) |
| | Assign the primitive user constants (e.g., int, double, bool).
|
| |
| dealii::Tensor< 2,(2 *dim) - 1+(dim/3)> | get_cij_tensor (std::vector< double > elastic_constants, const std::string &elastic_const_symmetry) const |
| |
| dealii::Tensor< 2,(2 *dim) - 1+(dim/3)> | get_cij_matrix (const ElasticityModel &model, const std::vector< double > &constants) const |
| |
template<unsigned int dim>
class UserConstants< dim >
Class the stores and manages user-defined constants.
◆ InputVariant
template<unsigned int dim>
Initial value: boost::variant<double,
int,
bool,
dealii::Tensor<1, dim>,
dealii::Tensor<2, dim>,
dealii::Tensor<2, (2 * dim) - 1 + (dim / 3)>>
◆ add_user_constant()
template<unsigned int dim>
| void UserConstants< dim >::add_user_constant |
( |
const std::string & | constant_name, |
|
|
std::vector< std::string > & | model_constants_strings ) |
|
inline |
Print all user-specified constants.
◆ compute_rank_1_tensor_constant()
template<unsigned int dim>
| dealii::Tensor< 1, dim > UserConstants< dim >::compute_rank_1_tensor_constant |
( |
const unsigned int & | n_elements, |
|
|
const std::vector< std::string > & | tensor_elements ) |
|
inlineprivate |
Compute a 1st rank tensor from user inputs .
◆ compute_rank_2_tensor_constant()
template<unsigned int dim>
| dealii::Tensor< 2, dim > UserConstants< dim >::compute_rank_2_tensor_constant |
( |
const unsigned int & | n_elements, |
|
|
const std::vector< std::string > & | tensor_elements ) |
|
inlineprivate |
Compute a 2nd rank tensor from user inputs .
◆ compute_tensor_parentheses()
template<unsigned int dim>
| unsigned int UserConstants< dim >::compute_tensor_parentheses |
( |
const unsigned int & | n_elements, |
|
|
const std::vector< std::string > & | tensor_elements ) |
|
inlineprivate |
Compute the number of tensor rows.
◆ construct_user_constant()
template<unsigned int dim>
Assign the specified user constant to whatever type.
◆ get_bool()
template<unsigned int dim>
| bool UserConstants< dim >::get_bool |
( |
const std::string & | constant_name | ) |
const |
|
inlinenodiscard |
Retrieve the bool from the model_constants that are defined from the parameters.prm parser. This is essentially just a wrapper for boost::get.
- Parameters
-
| constant_name | Name of the constant to retrieve. |
◆ get_cij_matrix()
template<unsigned int dim>
| dealii::Tensor< 2,(2 *dim) - 1+(dim/3)> UserConstants< dim >::get_cij_matrix |
( |
const ElasticityModel & | model, |
|
|
const std::vector< double > & | constants ) const |
|
inlinenodiscardprivate |
◆ get_cij_tensor()
template<unsigned int dim>
| dealii::Tensor< 2,(2 *dim) - 1+(dim/3)> UserConstants< dim >::get_cij_tensor |
( |
std::vector< double > | elastic_constants, |
|
|
const std::string & | elastic_const_symmetry ) const |
|
inlinenodiscardprivate |
◆ get_double()
template<unsigned int dim>
| double UserConstants< dim >::get_double |
( |
const std::string & | constant_name | ) |
const |
|
inlinenodiscard |
Retrieve the double from the model_constants that are defined from the parameters.prm parser. This is essentially just a wrapper for boost::get.
- Parameters
-
| constant_name | Name of the constant to retrieve. |
◆ get_elasticity_tensor()
template<unsigned int dim>
| dealii::Tensor< 2,(2 *dim) - 1+(dim/3)> UserConstants< dim >::get_elasticity_tensor |
( |
const std::string & | constant_name | ) |
const |
|
inlinenodiscard |
Retrieve the elasticity tensor from the model_constants that are defined from the parameters.prm parser. This is essentially just a wrapper for boost::get.
- Parameters
-
| constant_name | Name of the constant to retrieve. |
◆ get_int()
template<unsigned int dim>
| int UserConstants< dim >::get_int |
( |
const std::string & | constant_name | ) |
const |
|
inlinenodiscard |
Retrieve the int from the model_constants that are defined from the parameters.prm parser. This is essentially just a wrapper for boost::get.
- Parameters
-
| constant_name | Name of the constant to retrieve. |
◆ get_rank_1_tensor()
template<unsigned int dim>
| dealii::Tensor< 1, dim > UserConstants< dim >::get_rank_1_tensor |
( |
const std::string & | constant_name | ) |
const |
|
inlinenodiscard |
Retrieve the rank 1 tensor from the model_constants that are defined from the parameters.prm parser. This is essentially just a wrapper for boost::get.
- Parameters
-
| constant_name | Name of the constant to retrieve. |
◆ get_rank_2_tensor()
template<unsigned int dim>
| dealii::Tensor< 2, dim > UserConstants< dim >::get_rank_2_tensor |
( |
const std::string & | constant_name | ) |
const |
|
inlinenodiscard |
Retrieve the rank 2 tensor from the model_constants that are defined from the parameters.prm parser. This is essentially just a wrapper for boost::get.
- Parameters
-
| constant_name | Name of the constant to retrieve. |
◆ primitive_model_constant()
template<unsigned int dim>
Assign the primitive user constants (e.g., int, double, bool).
◆ print()
template<unsigned int dim>
Print all user-specified constants.
◆ remove_parentheses()
template<unsigned int dim>
| void UserConstants< dim >::remove_parentheses |
( |
std::vector< std::string > & | tensor_elements | ) |
|
|
inlineprivate |
Remove and leading and trailing parentheses.
◆ model_constants
template<unsigned int dim>
List of user-defined constants.
The documentation for this class was generated from the following file: