Reference documentation for deal.II version Git 193422c69f 2020-07-08 17:07:46 +0200
\(\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\}}\)
symengine_product_types.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2019 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 
25 
27 
28 # include <boost/type_traits.hpp>
29 
30 # include <type_traits>
31 
32 
34 
35 
36 template <>
37 struct EnableIfScalar<Differentiation::SD::Expression>
38 {
40 };
41 
42 
43 namespace internal
44 {
45  namespace SD
46  {
61  template <typename T, typename U, typename V = void>
63 
64  template <typename T>
66  T,
67  Differentiation::SD::Expression,
68  typename std::enable_if<std::is_arithmetic<T>::value>::type>
69  {
71  };
72 
73  template <typename T>
75  T,
76  Differentiation::SD::Expression,
77  typename std::enable_if<
78  boost::is_complex<T>::value &&
79  std::is_arithmetic<typename T::value_type>::value>::type>
80  {
82  };
83 
84  } // namespace SD
85 
86 
87  template <>
88  struct ProductTypeImpl<Differentiation::SD::Expression,
90  {
92  };
93 
94 
95  template <typename T>
96  struct ProductTypeImpl<T, Differentiation::SD::Expression>
97  {
98  using type = typename SD::
99  GeneralProductTypeImpl<T, Differentiation::SD::Expression>::type;
100  };
101 
102  template <typename T>
103  struct ProductTypeImpl<Differentiation::SD::Expression, T>
104  {
105  using type = typename SD::
106  GeneralProductTypeImpl<T, Differentiation::SD::Expression>::type;
107  };
108 
109 } // namespace internal
110 
112 
113 #endif // DEAL_II_WITH_SYMENGINE
114 
115 #endif
static const char T
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:363
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:362
typename SD::GeneralProductTypeImpl< T, Differentiation::SD::Expression >::type type
typename SD::GeneralProductTypeImpl< T, Differentiation::SD::Expression >::type type