deal.II version GIT relicensing-2289-g1e5549a87a 2024-12-21 21: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\}}\)
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
22namespace boost
23{
24 namespace geometry
25 {
26 namespace traits
27 {
31 template <int dim, class Number>
32 struct tag<::Point<dim, Number>>
33 {
34 using type = point_tag;
35 };
36
40 template <int dim, class Number>
41 struct coordinate_type<::Point<dim, Number>>
42 {
43 using type = Number;
44 };
45
50 template <int dim, class Number>
51 struct coordinate_system<::Point<dim, Number>>
52 {
53 using type = cs::cartesian;
54 };
55
59 template <int dim, class Number>
60 struct dimension<::Point<dim, Number>> : boost::mpl::int_<dim>
61 {};
62
66 template <std::size_t D, int dim, class Number>
67 struct access<::Point<dim, Number>, D>
68 {
69 static inline double
70 get(const ::Point<dim, Number> &p)
71 {
72 return p[D];
73 }
74
78 static inline void
79 set(::Point<dim, Number> &p, Number value)
80 {
81 p[D] = value;
82 }
83 };
84 } // namespace traits
85 } // namespace geometry
86} // namespace boost
87
88
89
90#endif
Definition point.h:111
static void set(::Point< dim, Number > &p, Number value)
Definition point.h:79
static double get(const ::Point< dim, Number > &p)
Definition point.h:70