Loading [MathJax]/extensions/TeX/newcommand.js
 deal.II version GIT relicensing-2628-g5436af8a2d 2025-02-12 20:00: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
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
32namespace boost
33{
34 namespace geometry
35 {
36 namespace traits
37 {
41 template <int dim, class Number>
42 struct tag<::Point<dim, Number>>
43 {
44 using type = point_tag;
45 };
46
50 template <int dim, class Number>
51 struct coordinate_type<::Point<dim, Number>>
52 {
53 using type = Number;
54 };
55
60 template <int dim, class Number>
61 struct coordinate_system<::Point<dim, Number>>
62 {
63 using type = cs::cartesian;
64 };
65
69 template <int dim, class Number>
70 struct dimension<::Point<dim, Number>> : boost::mpl::int_<dim>
71 {};
72
76 template <std::size_t D, int dim, class Number>
77 struct access<::Point<dim, Number>, D>
78 {
79 static inline double
80 get(const ::Point<dim, Number> &p)
81 {
82 return p[D];
83 }
84
88 static inline void
89 set(::Point<dim, Number> &p, Number value)
90 {
91 p[D] = value;
92 }
93 };
94 } // namespace traits
95 } // namespace geometry
96} // namespace boost
97
98
99
100#endif
Definition point.h:113
#define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
Definition config.h:532
#define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
Definition config.h:575
static void set(::Point< dim, Number > &p, Number value)
Definition point.h:89
static double get(const ::Point< dim, Number > &p)
Definition point.h:80