// ------------------------------------------------------------------------ // // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2018 - 2025 by the deal.II authors // // This file is part of the deal.II library. // // Part of the source code is dual licensed under Apache-2.0 WITH // LLVM-exception OR LGPL-2.1-or-later. Detailed license information // governing the source code and code contributions can be found in // LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II. // // ------------------------------------------------------------------------ #ifndef dealii_boost_adaptor_point_h #define dealii_boost_adaptor_point_h #include #include DEAL_II_DISABLE_EXTRA_DIAGNOSTICS #include #include #include #include #include #include DEAL_II_ENABLE_EXTRA_DIAGNOSTICS DEAL_II_NAMESPACE_OPEN DEAL_II_NAMESPACE_CLOSE // Do not convert for module purposes namespace boost { namespace geometry { namespace traits { /** * Tag adaptor for dealii::Point. */ template struct tag> { using type = point_tag; }; /** * Coordinate type adaptor for dealii::Point. */ template struct coordinate_type> { using type = Number; }; /** * Coordinate system adaptor for dealii::Point. By default, we assume * that a dealii Point is cartesian point. */ template struct coordinate_system> { using type = cs::cartesian; }; /** * Dimension adaptor. */ template struct dimension> : boost::mpl::int_ {}; /** * Getter function for D-th coordinate of a dealii Point. */ template struct access, D> { static inline double get(const dealii::Point &p) { return p[D]; } /** * Setter function for D-th coordinate of a dealii Point. */ static inline void set(dealii::Point &p, Number value) { p[D] = value; } }; } // namespace traits } // namespace geometry } // namespace boost DEAL_II_NAMESPACE_OPEN // Do not convert for module purposes DEAL_II_NAMESPACE_CLOSE #endif