Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
symengine_product_types.h
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 
24 # include <deal.II/base/template_constraints.h>
25 
26 # include <deal.II/differentiation/sd/symengine_number_types.h>
27 
28 # include <boost/type_traits.hpp>
29 
30 # include <type_traits>
31 
32 
33 DEAL_II_NAMESPACE_OPEN
34 
35 
36 template <>
37 struct EnableIfScalar<Differentiation::SD::Expression>
38 {
40 };
41 
42 
43 namespace internal
44 {
45  namespace SD
46  {
63  template <typename T, typename U, typename V = void>
65 
66  template <typename T>
68  T,
69  Differentiation::SD::Expression,
70  typename std::enable_if<std::is_arithmetic<T>::value>::type>
71  {
73  };
74 
75  template <typename T>
77  T,
78  Differentiation::SD::Expression,
79  typename std::enable_if<
80  boost::is_complex<T>::value &&
81  std::is_arithmetic<typename T::value_type>::value>::type>
82  {
84  };
85 
86  } // namespace SD
87 
88 
89  template <>
90  struct ProductTypeImpl<Differentiation::SD::Expression,
92  {
94  };
95 
96 
97  template <typename T>
98  struct ProductTypeImpl<T, Differentiation::SD::Expression>
99  {
100  typedef
101  typename SD::GeneralProductTypeImpl<T,
103  type;
104  };
105 
106  template <typename T>
107  struct ProductTypeImpl<Differentiation::SD::Expression, T>
108  {
109  typedef
110  typename SD::GeneralProductTypeImpl<T,
112  type;
113  };
114 
115 } // namespace internal
116 
117 DEAL_II_NAMESPACE_CLOSE
118 
119 #endif // DEAL_II_WITH_SYMENGINE
120 
121 #endif