From 6e9383bfde2cc63ce683382579e0c917cec070a4 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Sun, 10 May 2020 18:49:06 +0200 Subject: [PATCH] Reverse order of mapping and triangulation in compute_aspect_ratio --- include/deal.II/grid/grid_tools.h | 8 ++++---- source/grid/grid_tools.cc | 10 +++++----- source/grid/grid_tools.inst.in | 4 ++-- tests/grid/grid_generator_open_torus.cc | 4 ++-- tests/grid/grid_tools_aspect_ratio.cc | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index 9a8016766c..fc9015fd58 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -260,8 +260,8 @@ namespace GridTools */ template Vector - compute_aspect_ratio_of_cells(const Triangulation &triangulation, - const Mapping & mapping, + compute_aspect_ratio_of_cells(const Mapping & mapping, + const Triangulation &triangulation, const Quadrature & quadrature); /** @@ -275,8 +275,8 @@ namespace GridTools */ template double - compute_maximum_aspect_ratio(const Triangulation &triangulation, - const Mapping & mapping, + compute_maximum_aspect_ratio(const Mapping & mapping, + const Triangulation &triangulation, const Quadrature & quadrature); /** diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 6a78bf705e..5b41068c71 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -189,8 +189,8 @@ namespace GridTools template Vector - compute_aspect_ratio_of_cells(const Triangulation &triangulation, - const Mapping & mapping, + compute_aspect_ratio_of_cells(const Mapping & mapping, + const Triangulation &triangulation, const Quadrature & quadrature) { FE_Nothing fe; @@ -255,12 +255,12 @@ namespace GridTools template double - compute_maximum_aspect_ratio(const Triangulation &triangulation, - const Mapping & mapping, + compute_maximum_aspect_ratio(const Mapping & mapping, + const Triangulation &triangulation, const Quadrature & quadrature) { Vector aspect_ratio_vector = - compute_aspect_ratio_of_cells(triangulation, mapping, quadrature); + compute_aspect_ratio_of_cells(mapping, triangulation, quadrature); return VectorTools::compute_global_error(triangulation, aspect_ratio_vector, diff --git a/source/grid/grid_tools.inst.in b/source/grid/grid_tools.inst.in index 77b083198d..e08f457d1c 100644 --- a/source/grid/grid_tools.inst.in +++ b/source/grid/grid_tools.inst.in @@ -178,13 +178,13 @@ for (deal_II_space_dimension : SPACE_DIMENSIONS) const std::vector> &, MPI_Comm); template Vector GridTools::compute_aspect_ratio_of_cells( - const Triangulation &, const Mapping &, + const Triangulation &, const Quadrature &); template double GridTools::compute_maximum_aspect_ratio( - const Triangulation &, const Mapping &, + const Triangulation &, const Quadrature &); } diff --git a/tests/grid/grid_generator_open_torus.cc b/tests/grid/grid_generator_open_torus.cc index cc665493a7..a50e53e919 100644 --- a/tests/grid/grid_generator_open_torus.cc +++ b/tests/grid/grid_generator_open_torus.cc @@ -52,9 +52,9 @@ test() QGauss<3> const gauss(4); double const ar_full_torus = - GridTools::compute_maximum_aspect_ratio(tria, mapping, gauss); + GridTools::compute_maximum_aspect_ratio(mapping, tria, gauss); double const ar_open_torus = - GridTools::compute_maximum_aspect_ratio(tria_open, mapping, gauss); + GridTools::compute_maximum_aspect_ratio(mapping, tria_open, gauss); deallog << "N_active_cells_full = " << tria.n_global_active_cells() << std::endl; diff --git a/tests/grid/grid_tools_aspect_ratio.cc b/tests/grid/grid_tools_aspect_ratio.cc index 5822658c05..39e310cb6e 100644 --- a/tests/grid/grid_tools_aspect_ratio.cc +++ b/tests/grid/grid_tools_aspect_ratio.cc @@ -76,7 +76,7 @@ compute_aspect_ratio_hyper_rectangle( QGauss const gauss(n_q_points); Vector ratios = - GridTools::compute_aspect_ratio_of_cells(tria, mapping, gauss); + GridTools::compute_aspect_ratio_of_cells(mapping, tria, gauss); deallog << std::endl << "Parameters:" @@ -87,7 +87,7 @@ compute_aspect_ratio_hyper_rectangle( deallog << "Aspect ratio vector = " << std::endl; ratios.print(deallog.get_file_stream()); - return GridTools::compute_maximum_aspect_ratio(tria, mapping, gauss); + return GridTools::compute_maximum_aspect_ratio(mapping, tria, gauss); } int -- 2.39.5