Reference documentation for deal.II version 9.6.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// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2019 - 2021 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_differentiation_sd_symengine_types_h
16#define dealii_differentiation_sd_symengine_types_h
17
18#include <deal.II/base/config.h>
19
20#ifdef DEAL_II_WITH_SYMENGINE
21
22# include <boost/serialization/map.hpp>
23
24# include <map>
25# include <vector>
26
28
29namespace Differentiation
30{
31 namespace SD
32 {
33 // Forward declarations
34 class Expression;
35
36
37 namespace types
38 {
39 namespace internal
40 {
45 {
46 bool
47 operator()(const SD::Expression &lhs,
48 const SD::Expression &rhs) const;
49 };
50 } // namespace internal
51
60 std::map<SD::Expression, SD::Expression, internal::ExpressionKeyLess>;
61
68 using symbol_vector = std::vector<SD::Expression>;
69
70 } // namespace types
71
72 } // namespace SD
73} // namespace Differentiation
74
75
77
78
79# ifndef DOXYGEN
80
81// Add serialization capability for SD::types::internal::ExpressionKeyLess
82// We need to define this so that we can use this comparator in maps that
83// are to be serialized.
84namespace boost
85{
86 namespace serialization
87 {
88 namespace SD = ::Differentiation::SD;
89
90 template <typename Archive>
91 void
92 serialize(Archive & /*ar*/,
93 SD::types::internal::ExpressionKeyLess & /*cmp*/,
94 unsigned int /*version*/)
95 {
96 // Nothing to do.
97 }
98 } // namespace serialization
99} // namespace boost
100
101# endif // DOXYGEN
102
103#endif // DEAL_II_WITH_SYMENGINE
104
105#endif // dealii_differentiation_sd_symengine_types_h
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:503
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504
std::map< SD::Expression, SD::Expression, internal::ExpressionKeyLess > substitution_map
std::vector< SD::Expression > symbol_vector
Definition types.h:32
bool operator()(const SD::Expression &lhs, const SD::Expression &rhs) const