From 73dfaa40caf14a5d2d61ca537329d5b8ff9c7e33 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 4 Feb 2021 07:04:58 -0700 Subject: [PATCH] Provide correct mappings to function calls. --- source/grid/grid_generator.cc | 9 +++++---- source/particles/particle_handler.cc | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/source/grid/grid_generator.cc b/source/grid/grid_generator.cc index aca11b6270..31008cb1d5 100644 --- a/source/grid/grid_generator.cc +++ b/source/grid/grid_generator.cc @@ -2149,10 +2149,11 @@ namespace GridGenerator // Check that the order of the vertices makes sense, i.e., the volume of the // cell is positive. - Assert(GridTools::volume(tria) > 0., - ExcMessage( - "The volume of the cell is not greater than zero. " - "This could be due to the wrong ordering of the vertices.")); + Assert( + GridTools::volume(tria, ReferenceCell::get_default_linear_mapping(tria)) > + 0., + ExcMessage("The volume of the cell is not greater than zero. " + "This could be due to the wrong ordering of the vertices.")); } diff --git a/source/particles/particle_handler.cc b/source/particles/particle_handler.cc index 7d014f0748..b135d69a4a 100644 --- a/source/particles/particle_handler.cc +++ b/source/particles/particle_handler.cc @@ -1033,7 +1033,7 @@ namespace Particles const unsigned int closest_vertex = GridTools::find_closest_vertex_of_cell( - current_cell, out_particle->get_location()); + current_cell, out_particle->get_location(), *mapping); Tensor<1, spacedim> vertex_to_particle = out_particle->get_location() - current_cell->vertex(closest_vertex); vertex_to_particle /= vertex_to_particle.norm(); -- 2.39.5