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
bounding_box.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) 2018 - 2025 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_boost_adaptor_bounding_box_h
14#define dealii_boost_adaptor_bounding_box_h
15
16#include <deal.II/base/config.h>
17
19
21
23#include <boost/geometry/core/coordinate_dimension.hpp>
24#include <boost/geometry/core/coordinate_system.hpp>
25#include <boost/geometry/core/coordinate_type.hpp>
26#include <boost/geometry/core/cs.hpp>
27#include <boost/geometry/core/tag.hpp>
28#include <boost/geometry/strategies/strategies.hpp>
30
31
33DEAL_II_NAMESPACE_CLOSE // Do not convert for module purposes
34
35 namespace boost
36{
37 namespace geometry
38 {
39 namespace traits
40 {
44 template <int dim, class Number>
45 struct tag<::BoundingBox<dim, Number>>
46 {
47 using type = box_tag;
48 };
49
53 template <int dim, class Number>
54 struct point_type<::BoundingBox<dim, Number>>
55 {
57 };
58
63 template <int dim, class Number, std::size_t D>
64 struct indexed_access<::BoundingBox<dim, Number>,
65#if DEAL_II_BOOST_VERSION_GTE(1, 89, 0)
66 min_corner,
67#else
68 // Until Boost 1.88, max_corner was a
69 // static variable in a header file, which
70 // we can't export in the module wrapper
71 // for Boost. Use the variable's numeric
72 // value instead.
73 /*min_corner*/ 0,
74#endif
75 D>
76 {
81 static inline double
82 get(const ::BoundingBox<dim, Number> &box)
83 {
84 return box.get_boundary_points().first[D];
85 }
86
91 static inline void
92 set(::BoundingBox<dim, Number> &box, Number value)
93 {
94 box.get_boundary_points().first[D] = value;
95 }
96 };
97
102 template <int dim, class Number, std::size_t D>
103 struct indexed_access<::BoundingBox<dim, Number>,
104#if DEAL_II_BOOST_VERSION_GTE(1, 89, 0)
105 max_corner,
106#else
107 // Until Boost 1.88, max_corner was a
108 // static variable in a header file, which
109 // we can't export in the module wrapper
110 // for Boost. Use the variable's numeric
111 // value instead.
112 /*max_corner*/ 1,
113#endif
114 D>
115 {
120 static inline double
121 get(const ::BoundingBox<dim, Number> &box)
122 {
123 return box.get_boundary_points().second[D];
124 }
125
130 static inline void
131 set(::BoundingBox<dim, Number> &box, Number value)
132 {
133 box.get_boundary_points().second[D] = value;
134 }
135 };
136 } // namespace traits
137 } // namespace geometry
138} // namespace boost
139
140DEAL_II_NAMESPACE_OPEN // Do not convert for module purposes
142
143#endif
std::pair< Point< spacedim, Number >, Point< spacedim, Number > > & get_boundary_points()
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
Definition config.h:636
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
Definition config.h:680
static void set(::BoundingBox< dim, Number > &box, Number value)
static double get(const ::BoundingBox< dim, Number > &box)
static void set(::BoundingBox< dim, Number > &box, Number value)
static double get(const ::BoundingBox< dim, Number > &box)