Reference documentation for deal.II version 9.3.3
\(\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\}}\)
Namespaces | Functions
symengine_scalar_operations.h File Reference
#include <deal.II/base/config.h>
#include <deal.II/base/numbers.h>
#include <deal.II/differentiation/sd/symengine_number_types.h>
#include <deal.II/differentiation/sd/symengine_types.h>
#include <symengine/basic.h>
#include <symengine/symengine_rcp.h>
#include <algorithm>
#include <type_traits>
#include <utility>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  Differentiation
 
namespace  Differentiation::SD
 
namespace  Differentiation::SD::internal
 

Functions

bool Differentiation::SD::internal::is_valid_substitution_symbol (const SymEngine::Basic &entry)
 
void Differentiation::SD::internal::set_value_in_symbol_map (types::substitution_map &substitution_map, const SymEngine::RCP< const SymEngine::Basic > &symbol, const SymEngine::RCP< const SymEngine::Basic > &value)
 
template<bool ignore_invalid_symbols = false>
void Differentiation::SD::internal::add_to_substitution_map (types::substitution_map &substitution_map, const SymEngine::RCP< const SymEngine::Basic > &symbol, const SymEngine::RCP< const SymEngine::Basic > &value)
 
Symbolic variable creation
Expression Differentiation::SD::make_symbol (const std::string &symbol)
 
Expression Differentiation::SD::make_symbolic_function (const std::string &symbol, const types::symbol_vector &arguments)
 
Expression Differentiation::SD::make_symbolic_function (const std::string &symbol, const types::substitution_map &arguments)
 
Symbolic differentiation
Expression Differentiation::SD::differentiate (const Expression &f, const Expression &x)
 
Symbol map creation and manipulation
template<bool ignore_invalid_symbols = false, typename ValueType = double, typename SymbolicType >
types::substitution_map Differentiation::SD::make_symbol_map (const SymbolicType &symbol)
 
template<bool ignore_invalid_symbols = false, typename ValueType = double, typename SymbolicType , typename... Args>
types::substitution_map Differentiation::SD::make_symbol_map (const SymbolicType &symbol, const Args &... other_symbols)
 
template<bool ignore_invalid_symbols = false, typename ValueType = double>
void Differentiation::SD::add_to_symbol_map (types::substitution_map &symbol_map, const Expression &symbol)
 
template<bool ignore_invalid_symbols = false, typename ValueType = double, typename SymbolicType , typename T = typename std::enable_if< !std::is_base_of<Expression, SymbolicType>::value && ::internal::is_explicitly_convertible< SymbolicType, const SymEngine::RCP<const SymEngine::Basic> &>::value>::type>
void Differentiation::SD::add_to_symbol_map (types::substitution_map &symbol_map, const SymbolicType &symbol)
 
template<bool ignore_invalid_symbols = false, typename ValueType = double, typename SymbolicType >
void Differentiation::SD::add_to_symbol_map (types::substitution_map &symbol_map, const std::vector< SymbolicType > &symbols)
 
template<bool ignore_invalid_symbols = false, typename ValueType = double>
void Differentiation::SD::add_to_symbol_map (types::substitution_map &symbol_map, const types::substitution_map &other_symbols)
 
template<bool ignore_invalid_symbols = false, typename ValueType = double, typename SymbolicType , typename... Args>
void Differentiation::SD::add_to_symbol_map (types::substitution_map &symbol_map, const SymbolicType &symbol, const Args &... other_symbols)
 
void Differentiation::SD::set_value_in_symbol_map (types::substitution_map &substitution_map, const Expression &symbol, const Expression &value)
 
template<typename SymbolicType , typename ValueType , typename T = typename std::enable_if< ::internal::is_explicitly_convertible< SymbolicType, const SymEngine::RCP<const SymEngine::Basic> &>::value && std::is_constructible<SymbolicType, ValueType>::value>::type>
void Differentiation::SD::set_value_in_symbol_map (types::substitution_map &substitution_map, const SymbolicType &symbol, const ValueType &value)
 
template<typename SymbolicType , typename ValueType >
void Differentiation::SD::set_value_in_symbol_map (types::substitution_map &substitution_map, const std::vector< SymbolicType > &symbols, const std::vector< ValueType > &values)
 
template<typename SymbolicType , typename ValueType >
void Differentiation::SD::set_value_in_symbol_map (types::substitution_map &substitution_map, const std::pair< SymbolicType, ValueType > &symbol_value)
 
template<typename SymbolicType , typename ValueType , typename... Args>
void Differentiation::SD::set_value_in_symbol_map (types::substitution_map &substitution_map, const std::pair< SymbolicType, ValueType > &symbol_value, const Args &... other_symbol_values)
 
template<typename SymbolicType , typename ValueType >
void Differentiation::SD::set_value_in_symbol_map (types::substitution_map &substitution_map, const std::vector< std::pair< SymbolicType, ValueType > > &symbol_values)
 
void Differentiation::SD::set_value_in_symbol_map (types::substitution_map &substitution_map, const types::substitution_map &symbol_values)
 
Symbol substitution map creation
types::substitution_map Differentiation::SD::make_substitution_map (const Expression &symbol, const Expression &value)
 
template<typename ExpressionType , typename ValueType , typename T = typename std::enable_if< ::internal::is_explicitly_convertible< ExpressionType, const SymEngine::RCP<const SymEngine::Basic> &>::value && std::is_constructible<ExpressionType, ValueType>::value>::type>
types::substitution_map Differentiation::SD::make_substitution_map (const ExpressionType &symbol, const ValueType &value)
 
template<typename ExpressionType , typename ValueType >
types::substitution_map Differentiation::SD::make_substitution_map (const std::vector< ExpressionType > &symbols, const std::vector< ValueType > &values)
 
template<typename ExpressionType , typename ValueType >
types::substitution_map Differentiation::SD::make_substitution_map (const std::pair< ExpressionType, ValueType > &symbol_value)
 
template<typename ExpressionType , typename ValueType >
types::substitution_map Differentiation::SD::make_substitution_map (const std::vector< std::pair< ExpressionType, ValueType > > &symbol_values)
 
template<typename ExpressionType , typename ValueType , typename... Args>
types::substitution_map Differentiation::SD::make_substitution_map (const std::pair< ExpressionType, ValueType > &symbol_value, const Args &... other_symbol_values)
 
Symbol substitution map enlargement
template<bool ignore_invalid_symbols = false>
void Differentiation::SD::add_to_substitution_map (types::substitution_map &substitution_map, const Expression &symbol, const Expression &value)
 
template<bool ignore_invalid_symbols = false, typename ExpressionType , typename ValueType , typename = typename std::enable_if< ::internal::is_explicitly_convertible< ExpressionType, const SymEngine::RCP<const SymEngine::Basic> &>::value && std::is_constructible<ExpressionType, ValueType>::value>::type>
void Differentiation::SD::add_to_substitution_map (types::substitution_map &substitution_map, const ExpressionType &symbol, const ValueType &value)
 
template<bool ignore_invalid_symbols = false, typename ExpressionType , typename ValueType , typename = typename std::enable_if< ::internal::is_explicitly_convertible< ExpressionType, const SymEngine::RCP<const SymEngine::Basic> &>::value && std::is_constructible<ExpressionType, ValueType>::value>::type>
void Differentiation::SD::add_to_substitution_map (types::substitution_map &substitution_map, const std::vector< ExpressionType > &symbols, const std::vector< ValueType > &values)
 
template<bool ignore_invalid_symbols = false>
void Differentiation::SD::add_to_substitution_map (types::substitution_map &substitution_map, const types::substitution_map &symbol_values)
 
template<bool ignore_invalid_symbols = false, typename ExpressionType , typename ValueType >
void Differentiation::SD::add_to_substitution_map (types::substitution_map &substitution_map, const std::pair< ExpressionType, ValueType > &symbol_value)
 
template<bool ignore_invalid_symbols = false, typename ExpressionType , typename ValueType >
void Differentiation::SD::add_to_substitution_map (types::substitution_map &substitution_map, const std::vector< std::pair< ExpressionType, ValueType > > &symbol_values)
 
template<bool ignore_invalid_symbols = false, typename ExpressionType , typename ValueType , typename... Args>
void Differentiation::SD::add_to_substitution_map (types::substitution_map &substitution_map, const std::pair< ExpressionType, ValueType > &symbol_value, const Args &... other_symbol_values)
 
void Differentiation::SD::merge_substitution_maps (types::substitution_map &substitution_map_out, const types::substitution_map &substitution_map_in)
 
template<typename... Args>
void Differentiation::SD::merge_substitution_maps (types::substitution_map &substitution_map_out, const types::substitution_map &substitution_map_in, const Args &... other_substitution_maps_in)
 
template<typename... Args>
types::substitution_map Differentiation::SD::merge_substitution_maps (const types::substitution_map &substitution_map_in, const Args &... other_substitution_maps_in)
 
Symbol substitution and evaluation
types::substitution_map Differentiation::SD::resolve_explicit_dependencies (const types::substitution_map &substitution_map, const bool force_cyclic_dependency_resolution=false)
 
template<typename ExpressionType , typename ValueType >
types::substitution_map Differentiation::SD::resolve_explicit_dependencies (const std::vector< std::pair< ExpressionType, ValueType > > &symbol_values, const bool force_cyclic_dependency_resolution=false)
 
Expression Differentiation::SD::substitute (const Expression &expression, const types::substitution_map &substitution_map)
 
template<typename ValueType >
Expression Differentiation::SD::substitute (const Expression &expression, const Expression &symbol, const ValueType &value)
 
template<typename ExpressionType , typename... Args>
ExpressionType Differentiation::SD::substitute (const ExpressionType &expression, const Args &... symbol_values)
 
template<typename ValueType >
ValueType Differentiation::SD::substitute_and_evaluate (const Expression &expression, const types::substitution_map &substitution_map)
 
template<typename ValueType , typename... Args>
ValueType Differentiation::SD::substitute_and_evaluate (const Expression &expression, const Args &... symbol_values)