From e771a6a73190328aab21a53e091fd28723f2454b Mon Sep 17 00:00:00 2001 From: Jean-Paul Pelteret Date: Sat, 11 May 2019 19:59:28 +0200 Subject: [PATCH] Add further documentation on template parameters --- .../sd/symengine_scalar_operations.h | 20 ++++++++++++++++++- .../sd/symengine_tensor_operations.h | 10 ++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/include/deal.II/differentiation/sd/symengine_scalar_operations.h b/include/deal.II/differentiation/sd/symengine_scalar_operations.h index ce712bd3eb..c750115923 100644 --- a/include/deal.II/differentiation/sd/symengine_scalar_operations.h +++ b/include/deal.II/differentiation/sd/symengine_scalar_operations.h @@ -1306,6 +1306,11 @@ namespace Differentiation * @note It is not required that all symbolic expressions be fully resolved * when using this function. In other words, partial substitutions are * valid. + * + * @tparam ValueType A type that corresponds to the @p value that the + * @p symbol is to represent. Although it is typically + * arithmetic in nature, it may also represent another symbolic + * expression type. */ template Expression @@ -1330,13 +1335,17 @@ namespace Differentiation * when using this function. In other words, partial substitutions are * valid. * + * @tparam ExpressionType A type that represents a symbolic expression. + * The Differentiation::SD::Expression class is often suitable for + * this purpose, but this may also represent Tensors and + * SymmetricTensors of Expressions. * @tparam Args Any symbolic type and value combination that is understood * by the make_substitution_map() functions. This includes * arguments involving individual Expressions, * std::vector, as well as Tensors and SymmetricTensors * of Expressions. */ - template + template ExpressionType substitute(const ExpressionType &expression, const Args &... symbol_values); @@ -1358,6 +1367,11 @@ namespace Differentiation * @note It is required that all symbols in the @p expression be * successfully resolved by the @p substitution_map. * If only partial substitution is performed, then an error is thrown. + * + * @tparam ValueType A type that corresponds to the @p value that the + * @p symbol is to represent. In the context of this particular + * function, this template parameter is typically arithmetic in + * nature. */ template ValueType @@ -1384,6 +1398,10 @@ namespace Differentiation * input collection of @p symbol_values. * If only partial substitution is performed, then an error is thrown. * + * @tparam ValueType A type that corresponds to the @p value that the + * @p symbol is to represent. In the context of this particular + * function, this template parameter is typically arithmetic in + * nature. * @tparam Args Any symbolic type and value combination that is understood * by the make_substitution_map() functions. This includes * arguments involving individual Expressions, diff --git a/include/deal.II/differentiation/sd/symengine_tensor_operations.h b/include/deal.II/differentiation/sd/symengine_tensor_operations.h index 12eeaec958..ba6aa92e25 100644 --- a/include/deal.II/differentiation/sd/symengine_tensor_operations.h +++ b/include/deal.II/differentiation/sd/symengine_tensor_operations.h @@ -705,6 +705,11 @@ namespace Differentiation * @note It is required that all symbols in @p expression_tensor be * successfully resolved by the @p substitution_map. * If only partial substitution is performed, then an error is thrown. + * + * @tparam ValueType A type that corresponds to the @p value that the + * @p symbol is to represent. In the context of this particular + * function, this template parameter is typically arithmetic in + * nature. */ template Tensor @@ -731,6 +736,11 @@ namespace Differentiation * @note It is required that all symbols in @p expression_tensor be * successfully resolved by the @p substitution_map. * If only partial substitution is performed, then an error is thrown. + * + * @tparam ValueType A type that corresponds to the @p value that the + * @p symbol is to represent. In the context of this particular + * function, this template parameter is typically arithmetic in + * nature. */ template SymmetricTensor -- 2.39.5