From: David Wells Date: Tue, 11 Jul 2017 12:32:58 +0000 (-0400) Subject: Make some manifold checks in MappingQGeneric dimension independent. X-Git-Tag: v9.0.0-rc1~1430^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4599%2Fhead;p=dealii.git Make some manifold checks in MappingQGeneric dimension independent. As of db5ea0f52db we support get_manifold on 1D manifolds, so we can remove the overload workaround here for 1D. This changes the behavior of this function slightly: we now correctly calculate all_manifold_ids_are_equal = false if the cell manifold, in 1D, does not equal one of the face (vertex) manifolds. Note that in 2D lines are faces, so we still check all lines. --- diff --git a/doc/news/changes/incompatibilities/20170711DavidWells b/doc/news/changes/incompatibilities/20170711DavidWells new file mode 100644 index 0000000000..6ce08bb9da --- /dev/null +++ b/doc/news/changes/incompatibilities/20170711DavidWells @@ -0,0 +1,3 @@ +Changed: In 1D, MappingQGeneric now considers a cell to have multiple manifolds if the manifold attached to the cell does not match one of the manifolds attached to a face (i.e., vertex). +
+(David Wells, 2017/07/10) diff --git a/source/fe/mapping_q_generic.cc b/source/fe/mapping_q_generic.cc index 292af5d8b9..7b41d2d690 100644 --- a/source/fe/mapping_q_generic.cc +++ b/source/fe/mapping_q_generic.cc @@ -2971,25 +2971,6 @@ namespace internal { namespace { - // We cannot query a manifold from the faces of a 1D elements (i.e., - // vertices), which is why we add a specialization for the 3D case here - template - bool check_identical_manifolds_of_quads(const Iterator &) - { - Assert(false, ExcNotImplemented()); - return true; - } - - bool check_identical_manifolds_of_quads(const dealii::Triangulation<3,3>::cell_iterator &cell) - { - for (unsigned int f=0; f::faces_per_cell; ++f) - if (&cell->face(f)->get_manifold() != &cell->get_manifold()) - return false; - return true; - } - - - template void transform_fields(const ArrayView > &input, @@ -3662,13 +3643,14 @@ compute_mapping_support_points(const typename Triangulation::cell_ if (all_manifold_ids_are_equal && dynamic_cast*>(&cell->get_manifold()) == nullptr) { - if (dim > 1) + for (unsigned int f=0; f::faces_per_cell; ++f) + if (&cell->face(f)->get_manifold() != &cell->get_manifold()) + all_manifold_ids_are_equal = false; + + if (dim == 3) for (unsigned int l=0; l::lines_per_cell; ++l) if (&cell->line(l)->get_manifold() != &cell->get_manifold()) all_manifold_ids_are_equal = false; - if (dim == 3) - if (internal::MappingQGeneric::check_identical_manifolds_of_quads(cell) == false) - all_manifold_ids_are_equal = false; } if (all_manifold_ids_are_equal)