Reference documentation for deal.II version 9.5.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_types.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2019 - 2021 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
30namespace 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 std::map<SD::Expression, SD::Expression, internal::ExpressionKeyLess>;
62
69 using symbol_vector = std::vector<SD::Expression>;
70
71 } // namespace types
72
73 } // namespace SD
74} // namespace Differentiation
75
76
78
79
80# ifndef DOXYGEN
81
82// Add serialization capability for SD::types::internal::ExpressionKeyLess
83// We need to define this so that we can use this comparator in maps that
84// are to be serialized.
85namespace boost
86{
87 namespace serialization
88 {
89 namespace SD = ::Differentiation::SD;
90
91 template <typename Archive>
92 void
93 serialize(Archive & /*ar*/,
94 SD::types::internal::ExpressionKeyLess & /*cmp*/,
95 unsigned int /*version*/)
96 {
97 // Nothing to do.
98 }
99 } // namespace serialization
100} // namespace boost
101
102# endif // DOXYGEN
103
104#endif // DEAL_II_WITH_SYMENGINE
105
106#endif // dealii_differentiation_sd_symengine_types_h
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
std::vector< SD::Expression > symbol_vector
std::map< SD::Expression, SD::Expression, internal::ExpressionKeyLess > substitution_map
Definition types.h:33
bool operator()(const SD::Expression &lhs, const SD::Expression &rhs) const