18#ifdef DEAL_II_WITH_SYMENGINE
26# include <symengine/complex_double.h>
27# include <symengine/logic.h>
28# include <symengine/number.h>
29# include <symengine/parser.h>
30# include <symengine/real_double.h>
31# include <symengine/symbol.h>
32# include <symengine/symengine_exception.h>
42 namespace SE = ::SymEngine;
74 "The conditional expression must return a boolean type."));
77 SE::rcp_static_cast<const SE::Boolean>(
condition.get_RCP());
94 Assert(SE::is_a_Boolean(entry.first.get_value()),
96 "The conditional expression must return a boolean type."));
98 {entry.second.get_RCP(),
99 SE::rcp_static_cast<const SE::Boolean>(entry.first.get_RCP())});
118 Expression(numbers::signaling_nan<double>()));
135 SE::rcp_static_cast<const SE::Basic>(SE::symbol(
149 Utilities::convert_expression_vector_to_basic_vector(arguments)))
212 const SE::Expression &
233 const SE::RCP<const SE::Basic> &
245 const SymEngine::RCP<const SymEngine::Symbol> &
symbol)
const
253 const SymEngine::RCP<const SymEngine::Basic> &
symbol)
const
270 Expression::operator
const SymEngine::Expression &()
const
272 return get_expression();
276 Expression::operator
const SymEngine::RCP<const SymEngine::Basic> &()
const
278 return get_expression().get_basic();
308 "Substitution with a number that does not represent a symbol."));
333 this->expression = std::move(
rhs.expression);
381 stream <<
expr.get_expression();
442 ExcMessage(
"The expression must return a boolean type."));
445 SE::rcp_static_cast<const SE::Boolean>(expression.
get_RCP());
454 Assert(SE::is_a_Boolean(
lhs.get_value()),
455 ExcMessage(
"The lhs expression must return a boolean type."));
456 Assert(SE::is_a_Boolean(
rhs.get_value()),
457 ExcMessage(
"The rhs expression must return a boolean type."));
459 const SE::RCP<const SE::Boolean>
lhs_rcp =
460 SE::rcp_static_cast<const SE::Boolean>(
lhs.get_RCP());
461 const SE::RCP<const SE::Boolean>
rhs_rcp =
462 SE::rcp_static_cast<const SE::Boolean>(
rhs.get_RCP());
471 Assert(SE::is_a_Boolean(
lhs.get_value()),
472 ExcMessage(
"The lhs expression must return a boolean type."));
473 Assert(SE::is_a_Boolean(
rhs.get_value()),
474 ExcMessage(
"The rhs expression must return a boolean type."));
476 const SE::RCP<const SE::Boolean>
lhs_rcp =
477 SE::rcp_static_cast<const SE::Boolean>(
lhs.get_RCP());
478 const SE::RCP<const SE::Boolean>
rhs_rcp =
479 SE::rcp_static_cast<const SE::Boolean>(
rhs.get_RCP());
488 Assert(SE::is_a_Boolean(
lhs.get_value()),
489 ExcMessage(
"The lhs expression must return a boolean type."));
490 Assert(SE::is_a_Boolean(
rhs.get_value()),
491 ExcMessage(
"The rhs expression must return a boolean type."));
493 const SE::RCP<const SE::Boolean>
lhs_rcp =
494 SE::rcp_static_cast<const SE::Boolean>(
lhs.get_RCP());
495 const SE::RCP<const SE::Boolean>
rhs_rcp =
496 SE::rcp_static_cast<const SE::Boolean>(
rhs.get_RCP());
Expression & operator/=(const Expression &rhs)
Expression & parse(const std::string &expression)
Expression operator-() const
Expression & operator=(const Expression &rhs)
const SymEngine::RCP< const SymEngine::Basic > & get_RCP() const
void load(std::istream &stream)
Expression & operator*=(const Expression &rhs)
std::ostream & print(std::ostream &stream) const
Expression substitute(const types::substitution_map &substitution_values) const
void save(std::ostream &stream) const
Expression & operator-=(const Expression &rhs)
const SymEngine::Basic & get_value() const
const SymEngine::Expression & get_expression() const
Expression & operator+=(const Expression &rhs)
SymEngine::Expression expression
Expression differentiate(const Expression &symbol) const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcIO()
static ::ExceptionBase & ExcSymEngineParserError(std::string arg1)
#define Assert(cond, exc)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
SymEngine::map_basic_basic convert_expression_map_to_basic_map(const SD::types::substitution_map &substitution_map)
std::vector< SD::Expression > symbol_vector
std::map< SD::Expression, SD::Expression, internal::ExpressionKeyLess > substitution_map
Expression operator*(Expression lhs, const Expression &rhs)
Expression operator<(const Expression &lhs, const Expression &rhs)
Expression operator-(Expression lhs, const Expression &rhs)
Expression operator+(Expression lhs, const Expression &rhs)
Expression operator!(const Expression &expression)
Expression operator||(const Expression &lhs, const Expression &rhs)
Expression operator^(const Expression &lhs, const Expression &rhs)
Expression operator>=(const Expression &lhs, const Expression &rhs)
Expression operator!=(const Expression &lhs, const Expression &rhs)
Expression operator|(const Expression &lhs, const Expression &rhs)
Expression operator>(const Expression &lhs, const Expression &rhs)
Expression operator&(const Expression &lhs, const Expression &rhs)
Expression operator/(Expression lhs, const Expression &rhs)
Expression operator<=(const Expression &lhs, const Expression &rhs)
Expression operator&&(const Expression &lhs, const Expression &rhs)
std::ostream & operator<<(std::ostream &stream, const Expression &expression)
Expression operator==(const Expression &lhs, const Expression &rhs)
std::istream & operator>>(std::istream &stream, Expression &expression)