Reference documentation for deal.II version 9.3.3
|
#include <deal.II/differentiation/sd/symengine_number_types.h>
Public Member Functions | |
Constructors | |
Expression () | |
Expression (const bool value) | |
template<typename NumberType , typename = typename std::enable_if< std::is_arithmetic<NumberType>::value>::type> | |
Expression (const NumberType &value) | |
template<typename NumberType , typename = typename std::enable_if< std::is_arithmetic<NumberType>::value>::type> | |
Expression (const std::complex< NumberType > &value) | |
Expression (const SymEngine::integer_class &value) | |
template<typename NumberType , typename = typename std::enable_if< std::is_integral<NumberType>::value>::type> | |
Expression (const NumberType &numerator, const NumberType &denominator) | |
Expression (const SymEngine::rational_class &value) | |
Expression (const Expression &condition, const Expression &expression_if_true, const Expression &expression_if_false) | |
Expression (const std::vector< std::pair< Expression, Expression > > &condition_expression, const Expression &expression_otherwise) | |
Expression (const std::vector< std::pair< Expression, Expression > > &condition_expression) | |
Expression (const char *symbol) | |
Expression (const std::string &symb_expr, const bool parse_as_expression=false) | |
Expression (const std::string &symbol_func, const types::symbol_vector &arguments) | |
Expression (const Expression &rhs)=default | |
Expression (const SymEngine::Expression &rhs) | |
Expression (const SymEngine::RCP< const SymEngine::Basic > &rhs) | |
Expression (Expression &&rhs)=default | |
Expression (SymEngine::RCP< const SymEngine::Basic > &&rhs) | |
virtual | ~Expression ()=default |
Expression & | parse (const std::string &expression) |
std::ostream & | print (std::ostream &stream) const |
void | save (std::ostream &stream) const |
void | load (std::istream &stream) |
template<class Archive > | |
void | save (Archive &archive, const unsigned int version) const |
template<class Archive > | |
void | load (Archive &archive, const unsigned int version) |
template<class Archive > | |
void | serialize (Archive &archive, const unsigned int version) |
Values | |
const SymEngine::Expression & | get_expression () const |
const SymEngine::Basic & | get_value () const |
const SymEngine::RCP< const SymEngine::Basic > & | get_RCP () const |
Math and relational operators with (potentially) symbolic types | |
Expression & | operator= (const Expression &rhs) |
Expression & | operator= (Expression &&rhs) noexcept |
Expression & | operator+= (const Expression &rhs) |
Expression & | operator-= (const Expression &rhs) |
Expression & | operator*= (const Expression &rhs) |
Expression & | operator/= (const Expression &rhs) |
Math and relational operators with numeric types | |
template<typename NumberType > | |
Expression & | operator= (const NumberType &rhs) |
Expression | operator- () const |
template<typename NumberType > | |
Expression & | operator+= (const NumberType &rhs) |
template<typename NumberType > | |
Expression & | operator-= (const NumberType &rhs) |
template<typename NumberType > | |
Expression & | operator*= (const NumberType &rhs) |
template<typename NumberType > | |
Expression & | operator/= (const NumberType &rhs) |
Differentiation | |
Expression | differentiate (const Expression &symbol) const |
Expression | differentiate (const SymEngine::RCP< const SymEngine::Symbol > &symbol) const |
Expression | differentiate (const SymEngine::RCP< const SymEngine::Basic > &symbol) const |
Dictionary-based substitution | |
Expression | substitute (const types::substitution_map &substitution_values) const |
Expression | substitute (const SymEngine::map_basic_basic &substitution_values) const |
Expression | substitute (const Expression &symbol, const Expression &value) const |
template<typename NumberType > | |
Expression | substitute (const Expression &symbol, const NumberType &value) const |
template<typename ReturnType > | |
ReturnType | substitute_and_evaluate (const types::substitution_map &substitution_values) const |
template<typename ReturnType > | |
ReturnType | substitute_and_evaluate (const SymEngine::map_basic_basic &substitution_values) const |
Conversion operators | |
SymEngine::Expression | expression |
template<typename ResultType > | |
operator ResultType () const | |
operator const SymEngine::Expression & () const | |
operator const SymEngine::RCP< const SymEngine::Basic > & () const | |
SymEngine::Expression & | get_expression () |
A class to wrap SymEngine expressions.
With this number type, SymEngine numbers can be used to perform scalar and tensor mathematics in deal.II. It (or the SymEngine::Expression class, of which it stores an instance) therefore forms the basis of symbolic computation via SymEngine in deal.II. With it one can perform symbolic differentiation and subsequent substitution with both scalars and deal.II's native Tensor and SymmetricTensor types.
The symbolic features that this class supports includes:
A simple example of how this class may be used is as follows:
A more intricate example of conditional evaluation is as follows:
Lastly, here is an example using symbolic differentiation:
Definition at line 177 of file symengine_number_types.h.