deal.II version GIT relicensing-3540-g7552a02177 2025-06-20 13:50: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
point.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_point_h
16#define dealii_boost_adaptor_point_h
17
18#include <deal.II/base/config.h>
19
20#include <deal.II/base/point.h>
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<::Point<dim, Number>>
46 {
47 using type = point_tag;
48 };
49
53 template <int dim, class Number>
54 struct coordinate_type<::Point<dim, Number>>
55 {
56 using type = Number;
57 };
58
63 template <int dim, class Number>
64 struct coordinate_system<::Point<dim, Number>>
65 {
66 using type = cs::cartesian;
67 };
68
72 template <int dim, class Number>
73 struct dimension<::Point<dim, Number>> : boost::mpl::int_<dim>
74 {};
75
79 template <std::size_t D, int dim, class Number>
80 struct access<::Point<dim, Number>, D>
81 {
82 static inline double
83 get(const ::Point<dim, Number> &p)
84 {
85 return p[D];
86 }
87
91 static inline void
92 set(::Point<dim, Number> &p, Number value)
93 {
94 p[D] = value;
95 }
96 };
97 } // namespace traits
98 } // namespace geometry
99} // namespace boost
100
101DEAL_II_NAMESPACE_OPEN // Do not convert for module purposes
103
104
105#endif
Definition point.h:113
#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(::Point< dim, Number > &p, Number value)
Definition point.h:92
static double get(const ::Point< dim, Number > &p)
Definition point.h:83