Loading [MathJax]/extensions/TeX/newcommand.js
 deal.II version GIT relicensing-2684-gc61376a70f 2025-02-22 15:30: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\}}
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
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 - 2023 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
33namespace boost
34{
35 namespace geometry
36 {
37 namespace traits
38 {
42 template <int dim, class Number>
43 struct tag<::BoundingBox<dim, Number>>
44 {
45 using type = box_tag;
46 };
47
51 template <int dim, class Number>
52 struct point_type<::BoundingBox<dim, Number>>
53 {
55 };
56
61 template <int dim, class Number, std::size_t D>
62 struct indexed_access<::BoundingBox<dim, Number>, min_corner, D>
63 {
68 static inline double
69 get(const ::BoundingBox<dim, Number> &box)
70 {
71 return box.get_boundary_points().first[D];
72 }
73
78 static inline void
79 set(::BoundingBox<dim, Number> &box, Number value)
80 {
81 box.get_boundary_points().first[D] = value;
82 }
83 };
84
89 template <int dim, class Number, std::size_t D>
90 struct indexed_access<::BoundingBox<dim, Number>, max_corner, D>
91 {
96 static inline double
97 get(const ::BoundingBox<dim, Number> &box)
98 {
99 return box.get_boundary_points().second[D];
100 }
101
106 static inline void
107 set(::BoundingBox<dim, Number> &box, Number value)
108 {
109 box.get_boundary_points().second[D] = value;
110 }
111 };
112 } // namespace traits
113 } // namespace geometry
114} // namespace boost
115
116#endif
std::pair< Point< spacedim, Number >, Point< spacedim, Number > > & get_boundary_points()
#define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
Definition config.h:536
#define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
Definition config.h:579
static void set(::BoundingBox< dim, Number > &box, Number value)
static void set(::BoundingBox< dim, Number > &box, Number value)