|
| template<typename Type> |
| Type | string_to_type (const std::string &string, const std::unordered_map< std::string, Type > &table) |
| | Helper function that converts a string to some type, given a mapping.
|
| |
| template<typename Type, typename OtherType> |
| std::pair< OtherType, Type > | string_to_type_pair_with_delimiters (const std::string &string, const std::unordered_map< std::string, Type > &table, const std::unordered_map< std::string, OtherType > &other_table, const std::pair< char, char > &delimiters={'(', ')'}) |
| | Helper function that converts a string to some type pair, given two mappings and a set of delimiters.
|
| |
| template<typename Number> |
| DEAL_II_ALWAYS_INLINE Number | pmod (const Number &value, const Number &modulus) |
| | Positive moldulo (remainder) returns the normal remainder. (c++ fmod is defined abnormally for negative numbers)
|
| |
| template<unsigned int dim, typename T> |
| DEAL_II_ALWAYS_INLINE void | compute_stress (const dealii::Tensor< 2, voigt_tensor_size< dim >, T > &elasticity_tensor, const dealii::Tensor< 1, voigt_tensor_size< dim >, T > &strain, dealii::Tensor< 1, voigt_tensor_size< dim >, T > &stress) |
| | Compute the stress with a given displacement and elasticity tensor. This assumes that the provided parameters are in Voigt notation.
|
| |
| template<unsigned int dim, typename T> |
| DEAL_II_ALWAYS_INLINE void | compute_stress (const dealii::Tensor< 2, voigt_tensor_size< dim >, T > &elasticity_tensor, const dealii::Tensor< 2, dim, T > &strain, dealii::Tensor< 2, dim, T > &stress) |
| | Compute the stress with a given displacement and elasticity tensor. Note: this functions internally converts to Voigt notation.
|
| |
| std::string | strip_whitespace (const std::string &_text) |
| | Remove whitespace from strings.
|
| |
| const char * | bool_to_string (bool boolean) |
| | Convert bool to string.
|
| |
| std::string | eval_flags_to_string (dealii::EvaluationFlags::EvaluationFlags flag) |
| | Convert evaluation flags to string.
|
| |
| template<unsigned int dim, typename number> |
| DEAL_II_ALWAYS_INLINE std::vector< number > | dealii_point_to_vector (const dealii::Point< dim, number > &point) |
| |
template<typename
Type, typename OtherType>
| std::pair< OtherType, Type > string_to_type_pair_with_delimiters |
( |
const std::string & | string, |
|
|
const std::unordered_map< std::string, Type > & | table, |
|
|
const std::unordered_map< std::string, OtherType > & | other_table, |
|
|
const std::pair< char, char > & | delimiters = {'(', ')'} ) |
Helper function that converts a string to some type pair, given two mappings and a set of delimiters.
Note that this function requires the general form of one of the below cases. Parentheses are used for delimiters for simplicity.
Case 1: Input - Type(OtherType) Output - {OtherType, Type} Case 2: Input - OtherType Output - {OtherType, Type}
The input string would have the types replaced with their respective mappings.