]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make some manifold checks in MappingQGeneric dimension independent. 4599/head
authorDavid Wells <wellsd2@rpi.edu>
Tue, 11 Jul 2017 12:32:58 +0000 (08:32 -0400)
committerDavid Wells <wellsd2@rpi.edu>
Tue, 11 Jul 2017 13:03:16 +0000 (09:03 -0400)
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.

doc/news/changes/incompatibilities/20170711DavidWells [new file with mode: 0644]
source/fe/mapping_q_generic.cc

diff --git a/doc/news/changes/incompatibilities/20170711DavidWells b/doc/news/changes/incompatibilities/20170711DavidWells
new file mode 100644 (file)
index 0000000..6ce08bb
--- /dev/null
@@ -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).
+<br>
+(David Wells, 2017/07/10)
index 292af5d8b90b4f326215d1e52918c775f58df755..7b41d2d690e4384cb3781b6f0e32cf2ee900674c 100644 (file)
@@ -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 <typename Iterator>
-      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<GeometryInfo<3>::faces_per_cell; ++f)
-          if (&cell->face(f)->get_manifold() != &cell->get_manifold())
-            return false;
-        return true;
-      }
-
-
-
       template <int dim, int spacedim, int rank>
       void
       transform_fields(const ArrayView<const Tensor<rank,dim> >               &input,
@@ -3662,13 +3643,14 @@ compute_mapping_support_points(const typename Triangulation<dim,spacedim>::cell_
       if (all_manifold_ids_are_equal &&
           dynamic_cast<const TransfiniteInterpolationManifold<dim,spacedim>*>(&cell->get_manifold()) == nullptr)
         {
-          if (dim > 1)
+          for (unsigned int f=0; f<GeometryInfo<dim>::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<GeometryInfo<dim>::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)

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.