]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Provide correct mappings to function calls. 11680/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 4 Feb 2021 14:04:58 +0000 (07:04 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Thu, 4 Feb 2021 16:04:58 +0000 (09:04 -0700)
source/grid/grid_generator.cc
source/particles/particle_handler.cc

index aca11b6270e28702de16cc67e3194b8401dc7c9d..31008cb1d54eb6bf1148654eba044295a1fa1fb9 100644 (file)
@@ -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."));
   }
 
 
index 7d014f07481ce6431c6fb7b17d1f4932afbd150d..b135d69a4a2106411229740b1a3967d449e0cafd 100644 (file)
@@ -1033,7 +1033,7 @@ namespace Particles
 
           const unsigned int closest_vertex =
             GridTools::find_closest_vertex_of_cell<dim, spacedim>(
-              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();

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.