deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20:01+00:00
\(\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: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2019 - 2026 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_differentiation_sd_symengine_types_h
14#define dealii_differentiation_sd_symengine_types_h
15
16#include <deal.II/base/config.h>
17
18#ifdef DEAL_II_WITH_SYMENGINE
19
20# include <boost/serialization/map.hpp>
21
22# include <map>
23# include <vector>
24
25#endif // DEAL_II_WITH_SYMENGINE
26
28
29#ifdef DEAL_II_WITH_SYMENGINE
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#endif // DEAL_II_WITH_SYMENGINE
77
78// Close the dealii namespace, but do not close the export{} block yet if we
79// are building C++20 modules:
80DEAL_II_NAMESPACE_CLOSE // Do not convert for module purposes
81
82#ifdef DEAL_II_WITH_SYMENGINE
83
84# ifndef DOXYGEN
85
86 // Add serialization capability for SD::types::internal::ExpressionKeyLess
87 // We need to define this so that we can use this comparator in maps that
88 // are to be serialized.
89 namespace boost
90{
91 namespace serialization
92 {
93 namespace SD = ::Differentiation::SD;
94
95 template <typename Archive>
96 void
97 serialize(Archive & /*ar*/,
98 SD::types::internal::ExpressionKeyLess & /*cmp*/,
99 unsigned int /*version*/)
100 {
101 // Nothing to do.
102 }
103 } // namespace serialization
104} // namespace boost
105
106# endif // DOXYGEN
107
108#endif // DEAL_II_WITH_SYMENGINE
109
110// Re-open and then close the namespace, and this time also close the
111// export{} block if we are building C++20 modules:
112DEAL_II_NAMESPACE_OPEN // Do not convert for module purposes
114
115#endif // dealii_differentiation_sd_symengine_types_h
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
std::vector< SD::Expression > symbol_vector
std::map< SD::Expression, SD::Expression, internal::ExpressionKeyLess > substitution_map
void serialize(Archive &ar, ::std_cxx26::inplace_vector< T, N > &t, const unsigned int file_version)
Definition types.h:30
bool operator()(const SD::Expression &lhs, const SD::Expression &rhs) const