From: Wolfgang Bangerth Date: Sun, 31 Oct 2021 19:30:35 +0000 (-0600) Subject: Fix a test. X-Git-Tag: v9.4.0-rc1~873^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1bbf564a113e563326e338e31d6d477b0ae14d9;p=dealii.git Fix a test. --- diff --git a/tests/mpi/data_out_hdf5_02.cc b/tests/mpi/data_out_hdf5_02.cc index e0126fd1d8..5586a4be17 100644 --- a/tests/mpi/data_out_hdf5_02.cc +++ b/tests/mpi/data_out_hdf5_02.cc @@ -40,7 +40,23 @@ create_patches(std::vector> &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(patch.n_subdivisions) = nsub; +#endif + +#ifdef DEAL_II_HAVE_CXX17 + if constexpr (dim > 0) + patch.reference_cell = ReferenceCells::get_hypercube(); +#else + if (dim > 0) + const_cast(patch.reference_cell) = + ReferenceCells::get_hypercube(); +#endif + for (const unsigned int v : GeometryInfo::vertex_indices()) for (unsigned int d = 0; d < spacedim; ++d) patch.vertices[v](d) =