Reference documentation for deal.II version 9.5.0
\(\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\}}\)
Loading...
Searching...
No Matches
symengine_product_types.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2019 - 2022 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE at
12// the top level of the deal.II distribution.
13//
14// ---------------------------------------------------------------------
15
16#ifndef dealii_differentiation_sd_symengine_product_types_h
17#define dealii_differentiation_sd_symengine_product_types_h
18
19#include <deal.II/base/config.h>
20
21#ifdef DEAL_II_WITH_SYMENGINE
22
23
26# include <deal.II/base/tensor.h>
27
29
30# include <boost/type_traits.hpp>
31
32# include <type_traits>
33
34
36
37
38template <>
39struct EnableIfScalar<Differentiation::SD::Expression>
40{
42};
43
44
45namespace internal
46{
47 namespace SD
48 {
63 template <typename T, typename U, typename V = void>
65
66 template <typename T>
68 T,
69 Differentiation::SD::Expression,
70 std::enable_if_t<std::is_arithmetic<T>::value>>
71 {
73 };
74
75 template <typename T>
77 T,
78 Differentiation::SD::Expression,
79 std::enable_if_t<boost::is_complex<T>::value &&
80 std::is_arithmetic<typename T::value_type>::value>>
81 {
83 };
84
85 template <int rank, int dim, typename T>
86 struct GeneralProductTypeImpl<Tensor<rank, dim, T>,
87 Differentiation::SD::Expression>
88 {
89 using type =
90 Tensor<rank,
91 dim,
93 };
94
95 template <int rank, int dim, typename T>
97 Differentiation::SD::Expression>
98 {
100 rank,
101 dim,
103 };
104
105 } // namespace SD
106
107
108 template <>
109 struct ProductTypeImpl<Differentiation::SD::Expression,
111 {
113 };
114
115
116 template <typename T>
117 struct ProductTypeImpl<T, Differentiation::SD::Expression>
118 {
119 using type = typename SD::
120 GeneralProductTypeImpl<T, Differentiation::SD::Expression>::type;
121 };
122
123 template <typename T>
124 struct ProductTypeImpl<Differentiation::SD::Expression, T>
125 {
126 using type = typename SD::
127 GeneralProductTypeImpl<T, Differentiation::SD::Expression>::type;
128 };
129
130} // namespace internal
131
133
134#endif // DEAL_II_WITH_SYMENGINE
135
136#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
typename internal::ProductTypeImpl< typename std::decay< T >::type, typename std::decay< U >::type >::type type
typename SD::GeneralProductTypeImpl< T, Differentiation::SD::Expression >::type type
typename SD::GeneralProductTypeImpl< T, Differentiation::SD::Expression >::type type