From: Jean-Paul Pelteret Date: Fri, 10 May 2019 21:29:57 +0000 (+0200) Subject: Better document some template parameters X-Git-Tag: v9.1.0-rc1~71^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=630c275df82db260882b55e98fbe0e313bd6aa0b;p=dealii.git Better document some template parameters --- diff --git a/include/deal.II/differentiation/sd/symengine_scalar_operations.h b/include/deal.II/differentiation/sd/symengine_scalar_operations.h index 863839d05d..692273a65e 100644 --- a/include/deal.II/differentiation/sd/symengine_scalar_operations.h +++ b/include/deal.II/differentiation/sd/symengine_scalar_operations.h @@ -182,10 +182,28 @@ namespace Differentiation * a situation the resolve_explicit_dependencies() function may be useful * to simplify the final substitution map by resolving all explicit * interdependencies between entries in the substitution map. + * + * @tparam ExpressionType A type that represents a symbolic expression. + * The Differentiation::SD::Expression class is often suitable for + * this purpose, although if the @p ValueType is not supported + * by this class then a user-defined @p ExpressionType should be + * used. + * @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 or be a special type that a user-defined + * @p ExpressionType can be constructed from. + * @tparam T An arbitrary type resulting from the application of + * the SFINAE idiom to selectively specialize this class. + * The required condition is fulfilled when the @p ExpressionType + * can be explicitly converted to a + * `const SymEngine::RCP &`, and it is + * possible to construct an @p ExpressionType directly from the + * @p ValueType. */ - template &>::value && @@ -202,8 +220,19 @@ namespace Differentiation * using this function. For more details on this, see the other * @ref make_substitution_map(const Expression &,const ValueType &) * function. + * + * @tparam ExpressionType A type that represents a symbolic expression. + * The Differentiation::SD::Expression class is often suitable for + * this purpose, although if the @p ValueType is not supported + * by this class then a user-defined @p ExpressionType should be + * used. + * @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 or be a special type that a user-defined + * @p ExpressionType can be constructed from. */ - template + template types::substitution_map make_substitution_map(const std::vector &symbols, const std::vector & values); @@ -217,8 +246,19 @@ namespace Differentiation * using this function. For more details on this, see the other * @ref make_substitution_map(const Expression &,const ValueType &) * function. + * + * @tparam ExpressionType A type that represents a symbolic expression. + * The Differentiation::SD::Expression class is often suitable for + * this purpose, although if the @p ValueType is not supported + * by this class then a user-defined @p ExpressionType should be + * used. + * @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 or be a special type that a user-defined + * @p ExpressionType can be constructed from. */ - template + template types::substitution_map make_substitution_map( const std::pair &symbol_value); @@ -233,8 +273,19 @@ namespace Differentiation * using this function. For more details on this, see the other * @ref make_substitution_map(const Expression &,const ValueType &) * function. + * + * @tparam ExpressionType A type that represents a symbolic expression. + * The Differentiation::SD::Expression class is often suitable for + * this purpose, although if the @p ValueType is not supported + * by this class then a user-defined @p ExpressionType should be + * used. + * @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 or be a special type that a user-defined + * @p ExpressionType can be constructed from. */ - template + template types::substitution_map make_substitution_map( const std::vector> &symbol_values); @@ -366,9 +417,20 @@ namespace Differentiation * @ref add_to_substitution_map(types::substitution_map &,const * Expression &,const Expression &) function for a detailed * discussion on the role of this template argument. + * + * @tparam ExpressionType A type that represents a symbolic expression. + * The Differentiation::SD::Expression class is often suitable for + * this purpose, although if the @p ValueType is not supported + * by this class then a user-defined @p ExpressionType should be + * used. + * @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 or be a special type that a user-defined + * @p ExpressionType can be constructed from. */ template