deal.II version GIT relicensing-1936-ge55124254b 2024-10-04 21:10:00+00:00
\(\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// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2019 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_differentiation_sd_symengine_product_types_h
16#define dealii_differentiation_sd_symengine_product_types_h
17
18#include <deal.II/base/config.h>
19
20#ifdef DEAL_II_WITH_SYMENGINE
21
22
25# include <deal.II/base/tensor.h>
26
28
29# include <boost/type_traits.hpp>
30
31# include <type_traits>
32
33
35
36
37template <>
42
43
44namespace internal
45{
46 namespace SD
47 {
62 template <typename T, typename U, typename V = void>
64
65 template <typename T>
67 Differentiation::SD::Expression,
68 std::enable_if_t<std::is_arithmetic_v<T>>>
69 {
71 };
72
73 template <typename T>
75 T,
76 Differentiation::SD::Expression,
77 std::enable_if_t<boost::is_complex<T>::value &&
78 std::is_arithmetic_v<typename T::value_type>>>
79 {
81 };
82
83 template <int rank, int dim, typename T>
84 struct GeneralProductTypeImpl<Tensor<rank, dim, T>,
85 Differentiation::SD::Expression>
86 {
87 using type =
88 Tensor<rank,
89 dim,
91 };
92
93 template <int rank, int dim, typename T>
95 Differentiation::SD::Expression>
96 {
98 rank,
99 dim,
101 };
102
103 } // namespace SD
104
105
106 template <>
112
113
114 template <typename T>
115 struct ProductTypeImpl<T, Differentiation::SD::Expression>
116 {
117 using type = typename SD::
118 GeneralProductTypeImpl<T, Differentiation::SD::Expression>::type;
119 };
120
121 template <typename T>
122 struct ProductTypeImpl<Differentiation::SD::Expression, T>
123 {
124 using type = typename SD::
125 GeneralProductTypeImpl<T, Differentiation::SD::Expression>::type;
126 };
127
128} // namespace internal
129
131
132#endif // DEAL_II_WITH_SYMENGINE
133
134#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:498
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:499
typename internal::ProductTypeImpl< std::decay_t< T >, std::decay_t< U > >::type type
typename SD::GeneralProductTypeImpl< T, Differentiation::SD::Expression >::type type
typename SD::GeneralProductTypeImpl< T, Differentiation::SD::Expression >::type type