]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add some assertions.
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 9 Jan 2022 17:19:55 +0000 (10:19 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 9 Jan 2022 18:57:27 +0000 (11:57 -0700)
include/deal.II/fe/fe_tools_extrapolate.templates.h

index 96c5a9248455808a4fb0739311e0841609df2b00..18617b8facd2dc9a4cc5af9c61748b5ba7a6a641 100644 (file)
@@ -1747,6 +1747,9 @@ namespace FETools
     const AffineConstraints<typename OutVector::value_type> &constraints,
     OutVector &                                              u2)
   {
+    Assert(dof1.get_fe_collection().size() == 1, ExcNotImplemented());
+    Assert(dof2.get_fe_collection().size() == 1, ExcNotImplemented());
+
     Assert(dof1.get_fe(0).n_components() == dof2.get_fe(0).n_components(),
            ExcDimensionMismatch(dof1.get_fe(0).n_components(),
                                 dof2.get_fe(0).n_components()));
@@ -1769,6 +1772,13 @@ namespace FETools
     if (dynamic_cast<const parallel::distributed::Triangulation<dim, spacedim>
                        *>(&dof2.get_triangulation()) != nullptr)
       {
+        Assert(dof1.get_fe()[0].reference_cell() ==
+                 ReferenceCells::get_hypercube<dim>(),
+               ExcNotImplemented());
+        Assert(dof2.get_fe()[0].reference_cell() ==
+                 ReferenceCells::get_hypercube<dim>(),
+               ExcNotImplemented());
+
         interpolate(dof1, u1, dof2, constraints, u3);
 
         internal::BlockType<OutVector> u3_relevant;

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.