Reference documentation for deal.II version Git 8596a7cd07 2020-12-04 07:30:43 +0100
\(\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_types.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2019 - 2020 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_types_h
17 #define dealii_differentiation_sd_symengine_types_h
18 
19 #include <deal.II/base/config.h>
20 
21 #ifdef DEAL_II_WITH_SYMENGINE
22 
23 # include <boost/serialization/map.hpp>
24 
25 # include <map>
26 # include <vector>
27 
29 
30 namespace Differentiation
31 {
32  namespace SD
33  {
34  // Forward declarations
35  class Expression;
36 
37 
38  namespace types
39  {
40  namespace internal
41  {
46  {
47  bool
48  operator()(const SD::Expression &lhs,
49  const SD::Expression &rhs) const;
50  };
51  } // namespace internal
52 
61  using substitution_map =
62  std::map<SD::Expression, SD::Expression, internal::ExpressionKeyLess>;
63 
71  using symbol_vector = std::vector<SD::Expression>;
72 
73  } // namespace types
74 
75  } // namespace SD
76 } // namespace Differentiation
77 
78 
80 
81 
82 # ifndef DOXYGEN
83 
84 // Add serialization capability for SD::types::internal::ExpressionKeyLess
85 // We need to define this so that we can use this comparator in maps that
86 // are to be serialized.
87 namespace boost
88 {
89  namespace serialization
90  {
91  namespace SD = ::Differentiation::SD;
92 
93  template <typename Archive>
94  void
95  serialize(Archive & /*ar*/,
97  unsigned int /*version*/)
98  {
99  // Nothing to do.
100  }
101  } // namespace serialization
102 } // namespace boost
103 
104 # endif // DOXYGEN
105 
106 #endif // DEAL_II_WITH_SYMENGINE
107 
108 #endif // dealii_differentiation_sd_symengine_types_h
bool operator()(const SD::Expression &lhs, const SD::Expression &rhs) const
Definition: types.h:31
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:372
std::vector< SD::Expression > symbol_vector
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:371
std::map< SD::Expression, SD::Expression, internal::ExpressionKeyLess > substitution_map