// ------------------------------------------------------------------------ // // 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_bounding_box_h #define dealii_boost_adaptor_bounding_box_h #include #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::BoundingBox. */ template struct tag> { using type = box_tag; }; /** * Point type adaptor for dealii::BoundingBox. */ template struct point_type> { using type = dealii::Point; }; /** * Access to the D-th coordinate of the lower left corner of a * dealii::BoundingBox. */ template struct indexed_access, #if DEAL_II_BOOST_VERSION_GTE(1, 89, 0) min_corner, #else // Until Boost 1.88, max_corner was a // static variable in a header file, which // we can't export in the module wrapper // for Boost. Use the variable's numeric // value instead. /*min_corner*/ 0, #endif D> { /** * Getter function for the D-th coordinate of the lower left corner of * a dealii::BoundingBox. */ static inline double get(const dealii::BoundingBox &box) { return box.get_boundary_points().first[D]; } /** * Setter function for the D-th coordinate of the lower left corner of * a dealii::BoundingBox. */ static inline void set(dealii::BoundingBox &box, Number value) { box.get_boundary_points().first[D] = value; } }; /** * Access to the D-th coordinate of the upper right corner of a * dealii::BoundingBox. */ template struct indexed_access, #if DEAL_II_BOOST_VERSION_GTE(1, 89, 0) max_corner, #else // Until Boost 1.88, max_corner was a // static variable in a header file, which // we can't export in the module wrapper // for Boost. Use the variable's numeric // value instead. /*max_corner*/ 1, #endif D> { /** * Getter function for the D-th coordinate of the upper right corner of * a dealii::BoundingBox. */ static inline double get(const dealii::BoundingBox &box) { return box.get_boundary_points().second[D]; } /** * Setter function for the D-th coordinate of the upper right corner of * a dealii::BoundingBox. */ static inline void set(dealii::BoundingBox &box, Number value) { box.get_boundary_points().second[D] = value; } }; } // namespace traits } // namespace geometry } // namespace boost DEAL_II_NAMESPACE_OPEN // Do not convert for module purposes DEAL_II_NAMESPACE_CLOSE #endif