From dda5769dc93ddcd1b401a0fd19460dc2c1294b21 Mon Sep 17 00:00:00 2001 From: David Wells Date: Tue, 8 Aug 2023 08:46:53 -0400 Subject: [PATCH] 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. --- Maxwell-Eigenvalue-hp-Refinement/maxwell-hp.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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) { -- 2.39.5