deal.II version GIT relicensing-3683-g2da9d4bdba 2025-07-07 18:10:00+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: 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// 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_boost_adaptor_bounding_box_h
16#define dealii_boost_adaptor_bounding_box_h
17
18#include <deal.II/base/config.h>
19
21
23
25#include <boost/geometry/core/coordinate_dimension.hpp>
26#include <boost/geometry/core/coordinate_system.hpp>
27#include <boost/geometry/core/coordinate_type.hpp>
28#include <boost/geometry/core/cs.hpp>
29#include <boost/geometry/core/tag.hpp>
30#include <boost/geometry/strategies/strategies.hpp>
32
33
35DEAL_II_NAMESPACE_CLOSE // Do not convert for module purposes
36
37 namespace boost
38{
39 namespace geometry
40 {
41 namespace traits
42 {
46 template <int dim, class Number>
47 struct tag<::BoundingBox<dim, Number>>
48 {
49 using type = box_tag;
50 };
51
55 template <int dim, class Number>
56 struct point_type<::BoundingBox<dim, Number>>
57 {
59 };
60
65 template <int dim, class Number, std::size_t D>
66 struct indexed_access<::BoundingBox<dim, Number>,
67#if DEAL_II_BOOST_VERSION_GTE(1, 89, 0)
68 min_corner,
69#else
70 // Until Boost 1.88, max_corner was a
71 // static variable in a header file, which
72 // we can't export in the module wrapper
73 // for Boost. Use the variable's numeric
74 // value instead.
75 /*min_corner*/ 0,
76#endif
77 D>
78 {
83 static inline double
84 get(const ::BoundingBox<dim, Number> &box)
85 {
86 return box.get_boundary_points().first[D];
87 }
88
93 static inline void
94 set(::BoundingBox<dim, Number> &box, Number value)
95 {
96 box.get_boundary_points().first[D] = value;
97 }
98 };
99
104 template <int dim, class Number, std::size_t D>
105 struct indexed_access<::BoundingBox<dim, Number>,
106#if DEAL_II_BOOST_VERSION_GTE(1, 89, 0)
107 max_corner,
108#else
109 // Until Boost 1.88, max_corner was a
110 // static variable in a header file, which
111 // we can't export in the module wrapper
112 // for Boost. Use the variable's numeric
113 // value instead.
114 /*max_corner*/ 1,
115#endif
116 D>
117 {
122 static inline double
123 get(const ::BoundingBox<dim, Number> &box)
124 {
125 return box.get_boundary_points().second[D];
126 }
127
132 static inline void
133 set(::BoundingBox<dim, Number> &box, Number value)
134 {
135 box.get_boundary_points().second[D] = value;
136 }
137 };
138 } // namespace traits
139 } // namespace geometry
140} // namespace boost
141
142DEAL_II_NAMESPACE_OPEN // Do not convert for module purposes
144
145#endif
std::pair< Point< spacedim, Number >, Point< spacedim, Number > > & get_boundary_points()
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:35
#define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
Definition config.h:598
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:36
#define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
Definition config.h:641
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)