Reference documentation for deal.II version Git f40be01994 2020-04-09 07:13:12 +0200
\(\newcommand{\vcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\vcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
bounding_box.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2018 - 2019 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_boost_adaptor_bounding_box_h
17 #define dealii_boost_adaptor_bounding_box_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/bounding_box.h>
22 
23 DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
24 #include <deal.II/boost_adaptors/point.h>
25 DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
26 
27 
28 namespace boost
29 {
30  namespace geometry
31  {
32  namespace traits
33  {
37  template <int dim, class Number>
38  struct tag<::BoundingBox<dim, Number>>
39  {
40  using type = box_tag;
41  };
42 
46  template <int dim, class Number>
47  struct point_type<::BoundingBox<dim, Number>>
48  {
49  using type = ::Point<dim, Number>;
50  };
51 
56  template <int dim, class Number, std::size_t D>
57  struct indexed_access<::BoundingBox<dim, Number>, min_corner, D>
58  {
63  static inline double
65  {
66  return box.get_boundary_points().first[D];
67  }
68 
73  static inline void
74  set(::BoundingBox<dim, Number> &box, Number value)
75  {
76  box.get_boundary_points().first[D] = value;
77  }
78  };
79 
84  template <int dim, class Number, std::size_t D>
85  struct indexed_access<::BoundingBox<dim, Number>, max_corner, D>
86  {
91  static inline double
93  {
94  return box.get_boundary_points().second[D];
95  }
96 
101  static inline void
102  set(::BoundingBox<dim, Number> &box, Number value)
103  {
104  box.get_boundary_points().second[D] = value;
105  }
106  };
107  } // namespace traits
108  } // namespace geometry
109 } // namespace boost
110 
111 #endif
Definition: point.h:111
std::pair< Point< spacedim, Number >, Point< spacedim, Number > > & get_boundary_points()