Skip to content

Commit 7de408a

Browse files
committed
Remove deprecated methods at compile time
libmesh_deprecated() is sometimes necessary, when one possible input is deprecated but another supported, but if *any* call to a method is deprecated we can just get rid of it completely in `--disable-deprecated` builds.
1 parent 0e76bd8 commit 7de408a

28 files changed

+289
-123
lines changed

include/base/dof_object.h

+4
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,14 @@ class DofObject : public ReferenceCountedObject<DofObject>
181181
*/
182182
unique_id_type unique_id () const;
183183

184+
#ifdef LIBMESH_ENABLE_DEPRECATED
184185
/**
185186
* \returns The globally \p unique_id for this \p DofObject as a
186187
* writable reference. Deprecated; use the API taking an input
187188
* instead.
188189
*/
189190
unique_id_type & set_unique_id ();
191+
#endif // LIBMESH_ENABLE_DEPRECATED
190192

191193
/**
192194
* Sets the \p unique_id for this \p DofObject
@@ -851,6 +853,7 @@ unique_id_type DofObject::unique_id () const
851853

852854

853855

856+
#ifdef LIBMESH_ENABLE_DEPRECATED
854857
inline
855858
unique_id_type & DofObject::set_unique_id ()
856859
{
@@ -861,6 +864,7 @@ unique_id_type & DofObject::set_unique_id ()
861864
libmesh_not_implemented();
862865
#endif
863866
}
867+
#endif // LIBMESH_ENABLE_DEPRECATED
864868

865869

866870

include/fe/fe_abstract.h

+6-3
Original file line numberDiff line numberDiff line change
@@ -201,20 +201,23 @@ class FEAbstract : public ReferenceCountedObject<FEAbstract>
201201
const std::vector<Point> & reference_side_points,
202202
std::vector<Point> & reference_points) = 0;
203203

204+
#ifdef LIBMESH_ENABLE_DEPRECATED
204205
/**
205206
* \returns \p true if the point p is located on the reference element
206207
* for element type t, false otherwise. Since we are doing floating
207208
* point comparisons here the parameter \p eps can be specified to
208209
* indicate a tolerance. For example, \f$ x \le 1 \f$ becomes
209210
* \f$ x \le 1 + \epsilon \f$.
210211
*
211-
* This method overload does not support all finite element types;
212-
* e.g. the Polygon1 type may differ from element to element. Use
213-
* \p Elem::on_reference_element() instead.
212+
* This method overload is now deprecated, since it cannot support
213+
* all finite element types; e.g. the Polygon1 type may differ from
214+
* element to element. Use \p Elem::on_reference_element() instead.
214215
*/
215216
static bool on_reference_element(const Point & p,
216217
const ElemType t,
217218
const Real eps = TOLERANCE);
219+
#endif // LIBMESH_ENABLE_DEPRECATED
220+
218221
/**
219222
* \returns The reference space coordinates of \p nodes based on the
220223
* element type.

0 commit comments

Comments
 (0)