deal.II version 9.8.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// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2019 - 2026 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_differentiation_sd_symengine_product_types_h
14#define dealii_differentiation_sd_symengine_product_types_h
15
16#include <deal.II/base/config.h>
17
18#ifdef DEAL_II_WITH_SYMENGINE
19
20
23# include <deal.II/base/tensor.h>
24
26
27# include <boost/type_traits.hpp>
28
29# include <type_traits>
30
31#endif // DEAL_II_WITH_SYMENGINE
32
34
35#ifdef DEAL_II_WITH_SYMENGINE
36template <>
41
42
43namespace internal
44{
45 namespace SD
46 {
61 template <typename T, typename U, typename V = void>
63
64 template <typename T>
66 Differentiation::SD::Expression,
67 std::enable_if_t<std::is_arithmetic_v<T>>>
68 {
70 };
71
72 template <typename T>
74 T,
75 Differentiation::SD::Expression,
76 std::enable_if_t<boost::is_complex<T>::value &&
77 std::is_arithmetic_v<typename T::value_type>>>
78 {
80 };
81
82 template <int rank, int dim, typename T>
83 struct GeneralProductTypeImpl<Tensor<rank, dim, T>,
84 Differentiation::SD::Expression>
85 {
86 using type =
87 Tensor<rank,
88 dim,
90 };
91
92 template <int rank, int dim, typename T>
94 Differentiation::SD::Expression>
95 {
97 rank,
98 dim,
100 };
101
102 } // namespace SD
103
104
105 template <>
111
112
113 template <typename T>
114 struct ProductTypeImpl<T, Differentiation::SD::Expression>
115 {
116 using type = typename SD::
117 GeneralProductTypeImpl<T, Differentiation::SD::Expression>::type;
118 };
119
120 template <typename T>
121 struct ProductTypeImpl<Differentiation::SD::Expression, T>
122 {
123 using type = typename SD::
124 GeneralProductTypeImpl<T, Differentiation::SD::Expression>::type;
125 };
126
127} // namespace internal
128
129#endif // DEAL_II_WITH_SYMENGINE
130
132
133#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
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
SymmetricTensor< rank, dim, typename ProductType< T, Differentiation::SD::Expression >::type > type
Tensor< rank, dim, typename ProductType< T, Differentiation::SD::Expression >::type > type