From ce3c5810251972b57753ae3b615ad2e861c1673e Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Fri, 6 May 2022 00:07:53 +0300 Subject: [PATCH] Do not check for orientation in codim-one simplex. --- source/grid/tria.cc | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 1174e3f9f0..c1cdf3f6c4 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -11641,35 +11641,35 @@ Triangulation::create_triangulation( /* - When the triangulation is a manifold (dim < spacedim), the normal field - provided from the map class depends on the order of the vertices. - It may happen that this normal field is discontinuous. - The following code takes care that this is not the case by setting the - cell direction flag on those cell that produce the wrong orientation. - - To determine if 2 neighbours have the same or opposite orientation - we use a table of truth. - Its entries are indexes by the local indices of the common face. - For example if two elements share a face, and this face is - face 0 for element 0 and face 1 for element 1, then - table(0,1) will tell whether the orientation are the same (true) or - opposite (false). - - Even though there may be a combinatorial/graph theory argument to get - this table in any dimension, I tested by hand all the different possible - cases in 1D and 2D to generate the table. + When the triangulation is a manifold (dim < spacedim) and made of + quadrilaterals, the normal field provided from the map class depends on + the order of the vertices. It may happen that this normal field is + discontinuous. The following code takes care that this is not the case by + setting the cell direction flag on those cell that produce the wrong + orientation. + + To determine if 2 neighbours have the same or opposite orientation we use + a table of truth. Its entries are indexes by the local indices of the + common face. For example if two elements share a face, and this face is + face 0 for element 0 and face 1 for element 1, then table(0,1) will tell + whether the orientation are the same (true) or opposite (false). + + Even though there may be a combinatorial/graph theory argument to get this + table in any dimension, I tested by hand all the different possible cases + in 1D and 2D to generate the table. Assuming that a surface respects the standard orientation for 2d meshes, the tables of truth are symmetric and their true values are the following - 1D curves: (0,1) - 2D surface: (0,1),(0,2),(1,3),(2,3) + + - 1D curves: (0,1) + - 2D surface: (0,1),(0,2),(1,3),(2,3) We store this data using an n_faces x n_faces full matrix, which is actually much bigger than the minimal data required, but it makes the code more readable. */ - if (dim < spacedim) + if (dim < spacedim && all_reference_cells_are_hyper_cube()) { Table<2, bool> correct(GeometryInfo::faces_per_cell, GeometryInfo::faces_per_cell); -- 2.39.5