Skip to content

Commit 450fc1b

Browse files
committed
Drop deprecated InfFE::n_dofs(), n_shape_functions() taking an ElemType
These functions have been marked libmesh_deprecated() since 1ec8fcd (Jun 2020), in release series 1.6.x and later. This removal also triggers the removal of the FEInterface functions ifem_n_shape_functions() and ifem_n_dofs() since they called the version of InfFE::n_dofs() which is being removed. Technically, these FEInterface functions have not been marked libmesh_deprecated() for quite as long (a133c3d, Feb 2025) but they have *effectively* been deprecated for just as long. To avoid also dropping the deprecated FE APIs with the same names, we've simply placed libmesh_not_implemented() error messages in those deprecated functions for now to handle the infinite Elem case. This seems like a reasonable compromise to avoid dropping both the FE and InfFE deprecated functions at the same time.
1 parent 001b6e1 commit 450fc1b

5 files changed

Lines changed: 8 additions & 135 deletions

File tree

include/fe/fe_interface.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -890,29 +890,9 @@ class FEInterface
890890
* the calls to \p FE and \p InfFE.
891891
*/
892892

893-
#ifdef LIBMESH_ENABLE_DEPRECATED
894-
/**
895-
* \deprecated Call the version of ifem_n_shape_functions() which
896-
* takes a pointer-to-Elem instead.
897-
*/
898-
static unsigned int ifem_n_shape_functions(const unsigned int dim,
899-
const FEType & fe_t,
900-
const ElemType t);
901-
#endif // LIBMESH_ENABLE_DEPRECATED
902-
903893
static unsigned int ifem_n_shape_functions(const FEType & fe_t,
904894
const Elem * elem);
905895

906-
#ifdef LIBMESH_ENABLE_DEPRECATED
907-
/**
908-
* \deprecated Call the version of ifem_n_dofs() which takes a
909-
* pointer-to-Elem instead.
910-
*/
911-
static unsigned int ifem_n_dofs(const unsigned int dim,
912-
const FEType & fe_t,
913-
const ElemType t);
914-
#endif // LIBMESH_ENABLE_DEPRECATED
915-
916896
static unsigned int ifem_n_dofs(const FEType & fe_t,
917897
const Elem * elem);
918898

include/fe/inf_fe.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -382,23 +382,6 @@ class InfFE : public FEBase
382382
const Elem * inf_elem)
383383
{ return n_dofs(fet, inf_elem); }
384384

385-
#ifdef LIBMESH_ENABLE_DEPRECATED
386-
/*
387-
* \deprecated Call the version of this function that takes a
388-
* pointer-to-Elem instead.
389-
*/
390-
static unsigned int n_shape_functions (const FEType & fet,
391-
const ElemType t)
392-
{ return n_dofs(fet, t); }
393-
394-
/**
395-
* \deprecated Call the version of this function that takes an Elem*
396-
* instead for consistency with other FEInterface::n_dofs() methods.
397-
*/
398-
static unsigned int n_dofs(const FEType & fet,
399-
const ElemType inf_elem_type);
400-
#endif // LIBMESH_ENABLE_DEPRECATED
401-
402385
/**
403386
* \returns The number of shape functions associated with this
404387
* infinite element. Currently, we have \p o_radial+1 modes in

src/fe/fe_interface.C

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -276,14 +276,12 @@ unsigned int FEInterface::n_shape_functions(const unsigned int dim,
276276
libmesh_deprecated();
277277

278278
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
279-
/*
280-
* Since the FEType, stored in DofMap/(some System child), has to
281-
* be the _same_ for InfFE and FE, we have to catch calls
282-
* to infinite elements through the element type.
283-
*/
284279

280+
// We no longer support calling this function with an infinite
281+
// ElemType, you must call the FeInterface::n_shape_functions()
282+
// taking an Elem* instead.
285283
if (is_InfFE_elem(t))
286-
return ifem_n_shape_functions(dim, fe_t, t);
284+
libmesh_not_implemented();
287285

288286
#endif
289287

@@ -360,8 +358,11 @@ unsigned int FEInterface::n_dofs(const unsigned int dim,
360358

361359
#ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
362360

361+
// We no longer support calling this function with an infinite
362+
// ElemType, you must call the FeInterface::n_dofs() taking an Elem*
363+
// instead.
363364
if (is_InfFE_elem(t))
364-
return ifem_n_dofs(dim, fe_t, t);
365+
libmesh_not_implemented();
365366

366367
#endif
367368

src/fe/fe_interface_inf_fe.C

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -36,40 +36,6 @@ namespace libMesh
3636

3737

3838

39-
#ifdef LIBMESH_ENABLE_DEPRECATED
40-
unsigned int FEInterface::ifem_n_shape_functions(const unsigned int dim,
41-
const FEType & fe_t,
42-
const ElemType t)
43-
{
44-
libmesh_deprecated();
45-
46-
switch (dim)
47-
{
48-
// 1D
49-
case 1:
50-
/*
51-
* Since InfFE<Dim,T_radial,T_map>::n_shape_functions(...)
52-
* is actually independent of T_radial and T_map, we can use
53-
* just any T_radial and T_map
54-
*/
55-
return InfFE<1,JACOBI_20_00,CARTESIAN>::n_shape_functions(fe_t, t);
56-
57-
// 2D
58-
case 2:
59-
return InfFE<2,JACOBI_20_00,CARTESIAN>::n_shape_functions(fe_t, t);
60-
61-
// 3D
62-
case 3:
63-
return InfFE<3,JACOBI_20_00,CARTESIAN>::n_shape_functions(fe_t, t);
64-
65-
default:
66-
libmesh_error_msg("Unsupported dim = " << dim);
67-
}
68-
}
69-
#endif // LIBMESH_ENABLE_DEPRECATED
70-
71-
72-
7339
unsigned int FEInterface::ifem_n_shape_functions(const FEType & fe_t,
7440
const Elem * elem)
7541
{
@@ -99,40 +65,6 @@ unsigned int FEInterface::ifem_n_shape_functions(const FEType & fe_t,
9965

10066

10167

102-
#ifdef LIBMESH_ENABLE_DEPRECATED
103-
unsigned int FEInterface::ifem_n_dofs(const unsigned int dim,
104-
const FEType & fe_t,
105-
const ElemType t)
106-
{
107-
libmesh_deprecated();
108-
109-
switch (dim)
110-
{
111-
// 1D
112-
case 1:
113-
/*
114-
* Since InfFE<Dim,T_radial,T_map>::n_dofs(...)
115-
* is actually independent of T_radial and T_map, we can use
116-
* just any T_radial and T_map
117-
*/
118-
return InfFE<1,JACOBI_20_00,CARTESIAN>::n_dofs(fe_t, t);
119-
120-
// 2D
121-
case 2:
122-
return InfFE<2,JACOBI_20_00,CARTESIAN>::n_dofs(fe_t, t);
123-
124-
// 3D
125-
case 3:
126-
return InfFE<3,JACOBI_20_00,CARTESIAN>::n_dofs(fe_t, t);
127-
128-
default:
129-
libmesh_error_msg("Unsupported dim = " << dim);
130-
}
131-
}
132-
#endif // LIBMESH_ENABLE_DEPRECATED
133-
134-
135-
13668
unsigned int
13769
FEInterface::ifem_n_dofs(const FEType & fe_t,
13870
const Elem * elem)

src/fe/inf_fe_static.C

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -62,25 +62,6 @@ bool InfFE<Dim,T_radial,T_map>::_warned_for_dshape = false;
6262

6363
// ------------------------------------------------------------
6464
// InfFE static class members
65-
#ifdef LIBMESH_ENABLE_DEPRECATED
66-
template <unsigned int Dim, FEFamily T_radial, InfMapType T_map>
67-
unsigned int InfFE<Dim,T_radial,T_map>::n_dofs (const FEType & fet,
68-
const ElemType inf_elem_type)
69-
{
70-
libmesh_deprecated();
71-
72-
const ElemType base_et (InfFEBase::get_elem_type(inf_elem_type));
73-
74-
if (Dim > 1)
75-
return FEInterface::n_dofs(Dim-1, fet, base_et) *
76-
InfFERadial::n_dofs(fet.radial_order);
77-
else
78-
return InfFERadial::n_dofs(fet.radial_order);
79-
}
80-
#endif // LIBMESH_ENABLE_DEPRECATED
81-
82-
83-
8465
template <unsigned int Dim, FEFamily T_radial, InfMapType T_map>
8566
unsigned int InfFE<Dim,T_radial,T_map>::n_dofs(const FEType & fet,
8667
const Elem * inf_elem)
@@ -1370,7 +1351,6 @@ void InfFE<Dim,T_radial,T_map>::compute_shape_indices (const FEType & fet,
13701351

13711352
else // range of i: 134..169
13721353
{
1373-
libmesh_assert_less (i, n_dofs(fet, inf_elem_type));
13741354
// belongs to the outer shell and is an element associated shape
13751355
const unsigned int i_offset = i - (n_dof_at_all_vertices
13761356
+ n_dof_at_all_sides
@@ -1713,9 +1693,6 @@ void InfFE<Dim, T_radial, T_map>::inf_compute_constraints (DofConstraints & cons
17131693
//#include "libmesh/inf_fe_instantiate_3D.h"
17141694

17151695
#ifdef LIBMESH_ENABLE_DEPRECATED
1716-
INSTANTIATE_INF_FE_MBRF(1, CARTESIAN, unsigned int, n_dofs(const FEType &, const ElemType));
1717-
INSTANTIATE_INF_FE_MBRF(2, CARTESIAN, unsigned int, n_dofs(const FEType &, const ElemType));
1718-
INSTANTIATE_INF_FE_MBRF(3, CARTESIAN, unsigned int, n_dofs(const FEType &, const ElemType));
17191696
INSTANTIATE_INF_FE_MBRF(1, CARTESIAN, unsigned int, n_dofs_per_elem(const FEType &, const ElemType));
17201697
INSTANTIATE_INF_FE_MBRF(2, CARTESIAN, unsigned int, n_dofs_per_elem(const FEType &, const ElemType));
17211698
INSTANTIATE_INF_FE_MBRF(3, CARTESIAN, unsigned int, n_dofs_per_elem(const FEType &, const ElemType));

0 commit comments

Comments
 (0)