|
Reference documentation for deal.II version 9.2.0
|
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\)
\(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\)
\(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\)
\(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Go to the documentation of this file.
16 #ifndef dealii_differentiation_sd_symengine_utilities_h
17 #define dealii_differentiation_sd_symengine_utilities_h
21 #ifdef DEAL_II_WITH_SYMENGINE
26 # include <symengine/basic.h>
27 # include <symengine/dict.h>
40 SymEngine::map_basic_basic
69 std::vector<std::pair<Expression, Expression>>
71 const SymEngine::vec_pair &symbol_value_vector);
96 template <
typename NumberType,
typename ExpressionType = SD::Expression>
97 std::vector<NumberType>
103 template <
typename StreamType>
127 template <
typename NumberType,
typename ExpressionType>
128 std::vector<NumberType>
131 std::vector<NumberType> values;
132 values.reserve(substitution_values.size());
134 for (
const auto &entry : substitution_values)
136 static_cast<NumberType
>(ExpressionType(entry.second)));
142 template <
typename StreamType>
148 for (
const auto &entry : symbol_value_map)
149 stream << entry.first <<
" = " << entry.second <<
"\n";
151 stream << std::flush;
166 #endif // DEAL_II_WITH_SYMENGINE
168 #endif // dealii_differentiation_sd_symengine_utilities_h
SD::types::symbol_vector extract_symbols(const SD::types::substitution_map &substitution_values)
std::vector< std::pair< Expression, Expression > > convert_basic_pair_vector_to_expression_pair_vector(const SymEngine::vec_pair &symbol_value_vector)
SymEngine::vec_basic convert_expression_vector_to_basic_vector(const SD::types::symbol_vector &symbol_vector)
std::vector< SD::Expression > symbol_vector
std::map< SD::Expression, SD::Expression, internal::ExpressionKeyLess > substitution_map
#define DEAL_II_NAMESPACE_OPEN
SD::types::substitution_map convert_basic_map_to_expression_map(const SymEngine::map_basic_basic &substitution_map)
SymEngine::map_basic_basic convert_expression_map_to_basic_map(const SD::types::substitution_map &substitution_map)
SD::types::symbol_vector convert_basic_vector_to_expression_vector(const SymEngine::vec_basic &symbol_vector)
StreamType & print_substitution_map(StreamType &stream, const SD::types::substitution_map &symbol_value_map)
#define DEAL_II_NAMESPACE_CLOSE
std::vector< NumberType > extract_values(const SD::types::substitution_map &substitution_values)