Reference documentation for deal.II version 9.4.1
|
Classes | |
class | CSEDictionaryVisitor |
struct | DictionaryOptimizer |
class | DictionarySubstitutionVisitor |
struct | LambdaOptimizer |
struct | OptimizerHelper |
Functions | |
bool | use_symbolic_CSE (const enum OptimizationFlags &flags) |
int | get_LLVM_optimization_level (const enum OptimizationFlags &flags) |
template<typename NumberType , int rank, int dim, template< int, int, typename > class TensorType> | |
TensorType< rank, dim, NumberType > | tensor_evaluate_optimized (const TensorType< rank, dim, Expression > &symbol_tensor, const std::vector< NumberType > &cached_evaluation, const BatchOptimizer< NumberType > &optimizer) |
template<typename NumberType , int dim> | |
SymmetricTensor< 4, dim, NumberType > | tensor_evaluate_optimized (const SymmetricTensor< 4, dim, Expression > &symbol_tensor, const std::vector< NumberType > &cached_evaluation, const BatchOptimizer< NumberType > &optimizer) |
template<typename NumberType , typename T > | |
void | register_functions (BatchOptimizer< NumberType > &optimizer, const T &function) |
template<typename NumberType , typename T > | |
void | register_functions (BatchOptimizer< NumberType > &optimizer, const std::vector< T > &functions) |
template<typename NumberType , typename T , typename... Args> | |
void | register_functions (BatchOptimizer< NumberType > &optimizer, const T &function, const Args &...other_functions) |
template<int rank, int dim, template< int, int, typename > class TensorType> | |
types::symbol_vector | unroll_to_expression_vector (const TensorType< rank, dim, Expression > &symbol_tensor) |
template<int dim> | |
types::symbol_vector | unroll_to_expression_vector (const SymmetricTensor< 4, dim, Expression > &symbol_tensor) |
bool | is_valid_substitution_symbol (const SymEngine::Basic &entry) |
void | 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 | add_to_substitution_map (types::substitution_map &substitution_map, const SymEngine::RCP< const SymEngine::Basic > &symbol, const SymEngine::RCP< const SymEngine::Basic > &value) |
This namespace defines the classes and functions that help provide a structured interface to symbolic numbers and operations.
bool Differentiation::SD::internal::is_valid_substitution_symbol | ( | const SymEngine::Basic & | entry | ) |
Return whether or not an entry
is a valid symbol that we can expect to perform substitution on.
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 | ||
) |
A convenience function to set the value
associated with the symbol
in the substitution_map
.
Using this function ensures that the symbol
is one that is valid specifically for the purpose of symbolic substitution. It must therefore represent a symbol or symbolic derivative, otherwise an error will be thrown.
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 | ||
) |
A convenience function to add an entry to the substitution_map
. The new entry will have the key given by symbol
with its paired value
. Such maps are required to perform substitution of symbolic expressions, where all entries given as keys in the map are substituted by their value counterparts.
There are cases where it is convenient to simply ignore the fact that we may be trying to add invalid symbols. For example, one may wish to add a tensor where only some entries are symbols and the others are zero'd. In this case we ensure that the user knows what they're doing by forcing them to override this safety mechanism with a template parameter. These types of functions are typically called in a manner indicating that the user knows exactly what they're passing into it.
ignore_invalid_symbols | A template parameter that enforces whether or not the symbol has to be a valid one or not. In the overwhelming majority of cases, the default value of false should be selected, with the result that an exception will be thrown if the input symbolic is, in fact, not a symbolic value or expression. |