From 976799aa53a47e03b5c717deea5f724010bc3a91 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Thu, 6 May 2021 12:32:53 +0200 Subject: [PATCH] Switch order of parameters in GridGenerator::reference_cell() --- include/deal.II/fe/fe_tools.templates.h | 8 ++++---- include/deal.II/grid/grid_generator.h | 4 ++-- source/grid/grid_generator.cc | 4 ++-- source/grid/grid_generator.inst.in | 4 ++-- source/grid/reference_cell.cc | 2 +- tests/simplex/fe_p_bubbles_02.cc | 2 +- tests/simplex/orientation_02.cc | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/deal.II/fe/fe_tools.templates.h b/include/deal.II/fe/fe_tools.templates.h index ee985f56ea..2eef7535e1 100644 --- a/include/deal.II/fe/fe_tools.templates.h +++ b/include/deal.II/fe/fe_tools.templates.h @@ -1584,7 +1584,7 @@ namespace FETools // First, create a local mass matrix for the unit cell Triangulation tr; - GridGenerator::reference_cell(reference_cell, tr); + GridGenerator::reference_cell(tr, reference_cell); const auto &mapping = reference_cell.template get_default_linear_mapping(); @@ -1792,7 +1792,7 @@ namespace FETools // Set up meshes, one with a single // reference cell and refine it once Triangulation tria; - GridGenerator::reference_cell(reference_cell, tria); + GridGenerator::reference_cell(tria, reference_cell); tria.begin_active()->set_refine_flag(RefinementCase(ref_case)); tria.execute_coarsening_and_refinement(); @@ -2183,7 +2183,7 @@ namespace FETools { // set up a triangulation for coarse cell Triangulation tr; - GridGenerator::reference_cell(reference_cell, tr); + GridGenerator::reference_cell(tr, reference_cell); FEValues coarse(mapping, fe, @@ -2239,7 +2239,7 @@ namespace FETools // create a respective refinement on the triangulation Triangulation tr; - GridGenerator::reference_cell(reference_cell, tr); + GridGenerator::reference_cell(tr, reference_cell); tr.begin_active()->set_refine_flag(RefinementCase(ref_case)); tr.execute_coarsening_and_refinement(); diff --git a/include/deal.II/grid/grid_generator.h b/include/deal.II/grid/grid_generator.h index c5467c904b..538d7c122b 100644 --- a/include/deal.II/grid/grid_generator.h +++ b/include/deal.II/grid/grid_generator.h @@ -136,8 +136,8 @@ namespace GridGenerator */ template void - reference_cell(const ReferenceCell & reference_cell, - Triangulation &tria); + reference_cell(Triangulation &tria, + const ReferenceCell & reference_cell); /** diff --git a/source/grid/grid_generator.cc b/source/grid/grid_generator.cc index 9a8d0d662a..13741825d2 100644 --- a/source/grid/grid_generator.cc +++ b/source/grid/grid_generator.cc @@ -1719,8 +1719,8 @@ namespace GridGenerator template void - reference_cell(const ReferenceCell & reference_cell, - Triangulation &tria) + reference_cell(Triangulation &tria, + const ReferenceCell & reference_cell) { AssertDimension(dim, reference_cell.get_dimension()); diff --git a/source/grid/grid_generator.inst.in b/source/grid/grid_generator.inst.in index 3f063e77d0..935db02075 100644 --- a/source/grid/grid_generator.inst.in +++ b/source/grid/grid_generator.inst.in @@ -271,8 +271,8 @@ for (deal_II_dimension : DIMENSIONS; deal_II_space_dimension : SPACE_DIMENSIONS) #if deal_II_dimension <= deal_II_space_dimension template void reference_cell( - const ReferenceCell &, - Triangulation &); + Triangulation &, + const ReferenceCell &); template void convert_hypercube_to_simplex_mesh( diff --git a/source/grid/reference_cell.cc b/source/grid/reference_cell.cc index cb95a1b31b..5f61ee0499 100644 --- a/source/grid/reference_cell.cc +++ b/source/grid/reference_cell.cc @@ -203,7 +203,7 @@ ReferenceCell::get_nodal_type_quadrature() const // reference cell const auto create_quadrature = [](const ReferenceCell &reference_cell) { Triangulation tria; - GridGenerator::reference_cell(reference_cell, tria); + GridGenerator::reference_cell(tria, reference_cell); return Quadrature(tria.get_vertices()); }; diff --git a/tests/simplex/fe_p_bubbles_02.cc b/tests/simplex/fe_p_bubbles_02.cc index 4841b0fb2e..49c32bd395 100644 --- a/tests/simplex/fe_p_bubbles_02.cc +++ b/tests/simplex/fe_p_bubbles_02.cc @@ -51,7 +51,7 @@ compute_nodal_quadrature(const FiniteElement &fe) const Quadrature q_gauss = type.get_gauss_type_quadrature(fe.tensor_degree() + 1); Triangulation tria; - GridGenerator::reference_cell(type, tria); + GridGenerator::reference_cell(tria, type); const Mapping &mapping = type.template get_default_linear_mapping(); diff --git a/tests/simplex/orientation_02.cc b/tests/simplex/orientation_02.cc index 0c14729c78..1b5f92b5de 100644 --- a/tests/simplex/orientation_02.cc +++ b/tests/simplex/orientation_02.cc @@ -30,7 +30,7 @@ test(const unsigned int orientation) Triangulation<3> dummy, tria; - GridGenerator::reference_cell(ReferenceCells::Tetrahedron, dummy); + GridGenerator::reference_cell(dummy, ReferenceCells::Tetrahedron); auto vertices = dummy.get_vertices(); -- 2.39.5