deal.II version GIT relicensing-6842-g793a97d2aa 2026-10-02 14:00: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
point.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_point_h
14#define dealii_boost_adaptor_point_h
15
16#include <deal.II/base/config.h>
17
18#include <deal.II/base/point.h>
19
21#include <boost/geometry/core/coordinate_dimension.hpp>
22#include <boost/geometry/core/coordinate_system.hpp>
23#include <boost/geometry/core/coordinate_type.hpp>
24#include <boost/geometry/core/cs.hpp>
25#include <boost/geometry/core/tag.hpp>
26#include <boost/geometry/strategies/strategies.hpp>
28
29
31DEAL_II_NAMESPACE_CLOSE // Do not convert for module purposes
32
33 namespace boost
34{
35 namespace geometry
36 {
37 namespace traits
38 {
42 template <int dim, class Number>
43 struct tag<::Point<dim, Number>>
44 {
45 using type = point_tag;
46 };
47
51 template <int dim, class Number>
52 struct coordinate_type<::Point<dim, Number>>
53 {
54 using type = Number;
55 };
56
61 template <int dim, class Number>
62 struct coordinate_system<::Point<dim, Number>>
63 {
64 using type = cs::cartesian;
65 };
66
70 template <int dim, class Number>
71 struct dimension<::Point<dim, Number>> : boost::mpl::int_<dim>
72 {};
73
77 template <std::size_t D, int dim, class Number>
78 struct access<::Point<dim, Number>, D>
79 {
80 static inline double
81 get(const ::Point<dim, Number> &p)
82 {
83 return p[D];
84 }
85
89 static inline void
90 set(::Point<dim, Number> &p, Number value)
91 {
92 p[D] = value;
93 }
94 };
95 } // namespace traits
96 } // namespace geometry
97} // namespace boost
98
99DEAL_II_NAMESPACE_OPEN // Do not convert for module purposes
101
102
103#endif
Definition point.h:111
#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(::Point< dim, Number > &p, Number value)
Definition point.h:90
static double get(const ::Point< dim, Number > &p)
Definition point.h:81