]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix a test. 12901/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 31 Oct 2021 19:30:35 +0000 (13:30 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 31 Oct 2021 19:30:35 +0000 (13:30 -0600)
tests/mpi/data_out_hdf5_02.cc

index e0126fd1d8ddeda7b3b65ff5501573ac13c8e3d5..5586a4be17a79a9f014b134b2cd63862ab22b069 100644 (file)
@@ -40,7 +40,23 @@ create_patches(std::vector<DataOutBase::Patch<dim, spacedim>> &patches)
       const unsigned int nsub  = p + 1;
       const unsigned int nsubp = nsub + 1;
 
-      patch.n_subdivisions = nsub;
+#ifdef DEAL_II_HAVE_CXX17
+      if constexpr (dim > 0)
+        patch.n_subdivisions = nsub;
+#else
+      if (dim > 0)
+        const_cast<unsigned int &>(patch.n_subdivisions) = nsub;
+#endif
+
+#ifdef DEAL_II_HAVE_CXX17
+      if constexpr (dim > 0)
+        patch.reference_cell = ReferenceCells::get_hypercube<dim>();
+#else
+      if (dim > 0)
+        const_cast<ReferenceCell &>(patch.reference_cell) =
+          ReferenceCells::get_hypercube<dim>();
+#endif
+
       for (const unsigned int v : GeometryInfo<dim>::vertex_indices())
         for (unsigned int d = 0; d < spacedim; ++d)
           patch.vertices[v](d) =

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.