From 108441bc6e317f790b5d1f30549d471eafc2d3f0 Mon Sep 17 00:00:00 2001 From: John Peterson Date: Mon, 24 Nov 2025 14:40:16 -0600 Subject: [PATCH] Drop deprecated MeshRefinement accessor APIs These APIs have been deprecated for a very long time (e43e3450, Dec 2014), in release 0.9.5 and all subsequent releases. They are therefore also the oldest deprecated code I've run across during the latest cleanup activity. Since we have moved away from reference-returning combined setter/getter APIs recently, and back towards separate APIs for setting and getting internal data (which is what the deprecated code actually did!) I also decided to augment the remaining API with a const reference returning version and an overloaded setter version that takes an input. This seems more consistent with e.g. the more recent MeshBase accessor APIs. --- include/mesh/mesh_refinement.h | 40 +++++++++------------------------- 1 file changed, 10 insertions(+), 30 deletions(-) diff --git a/include/mesh/mesh_refinement.h b/include/mesh/mesh_refinement.h index 26b6323f647..7788eaf3d1b 100644 --- a/include/mesh/mesh_refinement.h +++ b/include/mesh/mesh_refinement.h @@ -499,31 +499,13 @@ class MeshRefinement : public ParallelObject */ bool make_flags_parallel_consistent (); - /** - * \returns The value of the \p _enforce_mismatch_limit_prior_to_refinement flag, - * false by default. - * - * \deprecated Use enforce_mismatch_limit_prior_to_refinement() instead. - */ -#ifdef LIBMESH_ENABLE_DEPRECATED - bool get_enforce_mismatch_limit_prior_to_refinement(); -#endif - - /** - * Set _enforce_mismatch_limit_prior_to_refinement option. - * Defaults to false. - * - * \deprecated Use enforce_mismatch_limit_prior_to_refinement() instead. - */ -#ifdef LIBMESH_ENABLE_DEPRECATED - void set_enforce_mismatch_limit_prior_to_refinement(bool enforce); -#endif - /** * Get/set the _enforce_mismatch_limit_prior_to_refinement flag. * The default value for this flag is false. */ bool & enforce_mismatch_limit_prior_to_refinement(); + bool enforce_mismatch_limit_prior_to_refinement() const; + void enforce_mismatch_limit_prior_to_refinement(bool enforce); private: @@ -969,23 +951,21 @@ inline bool & MeshRefinement::allow_unrefined_patches() return _allow_unrefined_patches; } -#ifdef LIBMESH_ENABLE_DEPRECATED -inline bool MeshRefinement::get_enforce_mismatch_limit_prior_to_refinement() +inline bool & MeshRefinement::enforce_mismatch_limit_prior_to_refinement() { - libmesh_deprecated(); - return enforce_mismatch_limit_prior_to_refinement(); + return _enforce_mismatch_limit_prior_to_refinement; } -inline void MeshRefinement::set_enforce_mismatch_limit_prior_to_refinement(bool enforce) +inline bool +MeshRefinement::enforce_mismatch_limit_prior_to_refinement() const { - libmesh_deprecated(); - enforce_mismatch_limit_prior_to_refinement() = enforce; + return _enforce_mismatch_limit_prior_to_refinement; } -#endif -inline bool & MeshRefinement::enforce_mismatch_limit_prior_to_refinement() +inline void +MeshRefinement::enforce_mismatch_limit_prior_to_refinement(bool enforce) { - return _enforce_mismatch_limit_prior_to_refinement; + _enforce_mismatch_limit_prior_to_refinement = enforce; }