From: David Wells Date: Tue, 8 Aug 2023 12:46:53 +0000 (-0400) Subject: Update the Maxwell-hp example. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dda5769dc93ddcd1b401a0fd19460dc2c1294b21;p=code-gallery.git Update the Maxwell-hp example. We made some breaking changes right after the 9.5 release. Lets keep things working both with the most recent release and the present prerelease. --- diff --git a/Maxwell-Eigenvalue-hp-Refinement/maxwell-hp.cc b/Maxwell-Eigenvalue-hp-Refinement/maxwell-hp.cc index 1d59cb5..8134ead 100644 --- a/Maxwell-Eigenvalue-hp-Refinement/maxwell-hp.cc +++ b/Maxwell-Eigenvalue-hp-Refinement/maxwell-hp.cc @@ -1679,7 +1679,11 @@ namespace ErrorIndicators void prune_eigenpairs(const double &TOL); +#if DEAL_II_VERSION_GTE(9, 6, 0) + std::vector *> eigenfunction_ptrs; +#else std::vector eigenfunction_ptrs; +#endif std::vector eigenvalue_ptrs; std::vector>> errors; @@ -1810,11 +1814,21 @@ namespace ErrorIndicators estimated_error_per_cell[i] = errors[i].get(); } +#if DEAL_II_VERSION_GTE(9, 6, 0) + const auto solution_view = make_array_view(eigenfunction_ptrs); + auto error_view = make_array_view(estimated_error_per_cell); + KellyErrorEstimator::estimate(this->dof_handler, + *this->face_quadrature_collection, + {}, + solution_view, + error_view); +#else KellyErrorEstimator::estimate(this->dof_handler, *this->face_quadrature_collection, {}, eigenfunction_ptrs, estimated_error_per_cell); +#endif for (auto &error_vec : errors) {