From: maier Date: Tue, 4 Dec 2012 22:46:53 +0000 (+0000) Subject: Bugfix: Implement correct return values for ->face_flip and ->face_rotation in 1d... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a353c8cdbb090a1143b2245dbd05ebe4b23a1e4;p=dealii-svn.git Bugfix: Implement correct return values for ->face_flip and ->face_rotation in 1d and 2d This fixes a regression introduced with r27714 which made GeometryInfo<2>::child_cell_on_face face_flip aware in 2d. git-svn-id: https://svn.dealii.org/trunk@27757 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/grid/tria_accessor.templates.h b/deal.II/include/deal.II/grid/tria_accessor.templates.h index 82737cd117..432c472f13 100644 --- a/deal.II/include/deal.II/grid/tria_accessor.templates.h +++ b/deal.II/include/deal.II/grid/tria_accessor.templates.h @@ -628,9 +628,7 @@ namespace internal /** - * Implementation of the function - * of some name in the mother - * class. + * Implementation of the function of some name in the mother class */ template static @@ -638,6 +636,12 @@ namespace internal face_orientation (const TriaAccessor &, const unsigned int) { + /* + * Default implementation used in 1d and 2d + * + * In 1d and 2d, face_orientation is always true + */ + return true; } @@ -665,7 +669,22 @@ namespace internal face_flip (const TriaAccessor &, const unsigned int) { - return true; + /* + * Default implementation used in 1d and 2d + * + * In 1d, face_flip is always false as there is no such concept as + * "flipped" faces in 1d. + * + * In 2d, we currently only support meshes where all faces are in + * standard orientation, so the result is also false. + * + * TODO: If we support meshes with flipped faces one day, this + * function has to be implemented for that as well. + * Maier, 2012 + */ + + return false; + } @@ -701,7 +720,13 @@ namespace internal face_rotation (const TriaAccessor &, const unsigned int) { - return true; + /* + * Default implementation used in 1d and 2d + * + * In 1d and 2d, face_rotation is always false as there is no such + * concept as "rotated" faces in 1d and 2d. + */ + return false; } @@ -745,8 +770,7 @@ namespace internal line_orientation (const TriaAccessor<2, 2, spacedim> &, const unsigned int) { - // quads in 2d have no - // non-standard orientation + // quads in 2d have no non-standard orientation return true; } @@ -757,10 +781,9 @@ namespace internal line_orientation (const TriaAccessor<2, 3, spacedim> &accessor, const unsigned int line) { - // quads as part of 3d hexes - // can have non-standard - // orientation -//TODO: why is this face_orientation, not line_orientation as in the setter function? + // quads as part of 3d hexes can have non-standard orientation + + //TODO: why is this face_orientation, not line_orientation as in the setter function? return accessor.tria->faces->quads.face_orientation(accessor.present_index, line); }