From 92aa86688fbad8326d4803fdcd11118259375a96 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Sun, 1 May 2022 23:22:59 +0300 Subject: [PATCH] Code review. --- cmake/configure/configure_cgal.cmake | 2 +- cmake/modules/FindCGAL.cmake | 2 +- include/deal.II/cgal/utilities.h | 15 ++++++++------- tests/cgal/cgal_point_01.cc | 10 +++++----- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/cmake/configure/configure_cgal.cmake b/cmake/configure/configure_cgal.cmake index d13ac066ba..bd7d53d71d 100644 --- a/cmake/configure/configure_cgal.cmake +++ b/cmake/configure/configure_cgal.cmake @@ -1,6 +1,6 @@ ## --------------------------------------------------------------------- ## -## Copyright (C) 2017 by the deal.II authors +## Copyright (C) 2022 by the deal.II authors ## ## This file is part of the deal.II library. ## diff --git a/cmake/modules/FindCGAL.cmake b/cmake/modules/FindCGAL.cmake index 6fe00d2b21..06c380d74f 100644 --- a/cmake/modules/FindCGAL.cmake +++ b/cmake/modules/FindCGAL.cmake @@ -1,6 +1,6 @@ ## --------------------------------------------------------------------- ## -## Copyright (C) 2017 by the deal.II authors +## Copyright (C) 2022 by the deal.II authors ## ## This file is part of the deal.II library. ## diff --git a/include/deal.II/cgal/utilities.h b/include/deal.II/cgal/utilities.h index deba433c95..b0c3020938 100644 --- a/include/deal.II/cgal/utilities.h +++ b/include/deal.II/cgal/utilities.h @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2020 by the deal.II authors +// Copyright (C) 2022 by the deal.II authors // // This file is part of the deal.II library. // @@ -47,18 +47,19 @@ namespace CGALWrappers */ template inline CGALPointType - to_cgal(const dealii::Point &p); + dealii_point_to_cgal_point(const dealii::Point &p); /** * Convert from various CGAL point types to deal.II Point. + * * @tparam dim Dimension of the point * @tparam CGALPointType Any of the CGAL point types - * @param p - * @return dealii::Point + * @param p An input CGAL point type + * @return dealii::Point The corresponding deal.II point. */ template inline dealii::Point - to_dealii(const CGALPointType &p); + cgal_point_to_dealii_point(const CGALPointType &p); } // namespace CGALWrappers # ifndef DOXYGEN @@ -67,7 +68,7 @@ namespace CGALWrappers { template inline CGALPointType - to_cgal(const dealii::Point &p) + dealii_point_to_cgal_point(const dealii::Point &p) { constexpr int cdim = CGALPointType::Ambient_dimension::value; static_assert(dim <= cdim, "Only dim <= cdim supported"); @@ -86,7 +87,7 @@ namespace CGALWrappers template inline dealii::Point - to_dealii(const CGALPointType &p) + cgal_point_to_dealii_point(const CGALPointType &p) { constexpr int cdim = CGALPointType::Ambient_dimension::value; if constexpr (dim == 1) diff --git a/tests/cgal/cgal_point_01.cc b/tests/cgal/cgal_point_01.cc index 26ca14cb2b..81e2ac516c 100644 --- a/tests/cgal/cgal_point_01.cc +++ b/tests/cgal/cgal_point_01.cc @@ -1,6 +1,6 @@ // --------------------------------------------------------------------- // -// Copyright (C) 2020 by the deal.II authors +// Copyright (C) 2022 by the deal.II authors // // This file is part of the deal.II library. // @@ -32,15 +32,15 @@ main() using CGALPoint = CGAL::Point_3>; // Test conversion from deal.II Point to CGAL Point { - const Point<3> p(1.0, 2.0, 3.0); - const auto cgal_point = to_cgal(p); + const Point<3> dealii_point(1.0, 2.0, 3.0); + const auto cgal_point = dealii_point_to_cgal_point(dealii_point); deallog << "CGAL Point: " << cgal_point << std::endl; } // Test conversion from CGAL Point to deal.II Point { const CGALPoint cgal_point(1.0, 2.0, 3.0); - const auto deal_ii_point = to_dealii<3>(cgal_point); - deallog << "deal.II Point: " << deal_ii_point << std::endl; + const auto dealii_point = cgal_point_to_dealii_point<3>(cgal_point); + deallog << "deal.II Point: " << dealii_point << std::endl; } } -- 2.39.5