Skip to content

Commit 59f2eca

Browse files
authored
Merge pull request #4109 from roystgnr/deprecated_n_dofs_fixes
Assorted fixes for uncommon configurations
2 parents 900d2c2 + 9bb878d commit 59f2eca

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

examples/miscellaneous/miscellaneous_ex1/miscellaneous_ex1.C

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ void assemble_wave(EquationSystems & es,
438438
// points, the number of shape functions may also be obtained
439439
// in a different manner. This offers the great advantage
440440
// of being valid for both finite and infinite elements.
441-
const unsigned int n_sf = cfe->n_shape_functions();
441+
const unsigned int n_sf =
442+
FEInterface::n_dofs(cfe->get_fe_type(), elem);
442443

443444
// Now we will build the element matrices. Since the infinite
444445
// elements are based on a Petrov-Galerkin scheme, the

examples/miscellaneous/miscellaneous_ex14/miscellaneous_ex14.C

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,8 @@ void assemble_SchroedingerEquation(EquationSystems &es, const std::string &syste
465465
Number potval=-1./(q_point[qp]).norm();
466466

467467
// Now, get number of shape functions that are nonzero at this point::
468-
unsigned int n_sf = cfe->n_shape_functions();
468+
const unsigned int n_sf =
469+
FEInterface::n_dofs(cfe->get_fe_type(), elem);
469470
// loop over them:
470471
for (unsigned int i=0; i<n_sf; i++)
471472
{
@@ -539,7 +540,8 @@ void assemble_SchroedingerEquation(EquationSystems &es, const std::string &syste
539540
// the base side always has number 0
540541
const unsigned int side=0;
541542
face_fe->reinit (elem, side);
542-
unsigned int n_sf = face_fe->n_shape_functions();
543+
const unsigned int n_sf =
544+
FEInterface::n_dofs(face_fe->get_fe_type(), elem);
543545

544546
H.resize (dof_indices.size(), dof_indices.size());
545547

@@ -639,7 +641,8 @@ void assemble_SchroedingerEquation(EquationSystems &es, const std::string &syste
639641
//out<<"neighbor id: "<<relevant_neighbor->id();
640642
//out<<" this id: "<<elem->id()<<std::endl;
641643
face_fe->reinit (elem, side);
642-
unsigned int n_sf = face_fe->n_shape_functions();
644+
const unsigned int n_sf =
645+
FEInterface::n_dofs(face_fe->get_fe_type(), elem);
643646

644647
H.resize (dof_indices.size(), dof_indices.size());
645648

examples/miscellaneous/miscellaneous_ex15/miscellaneous_ex15.C

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ void assemble_func(EquationSystems & es, const std::string & system_name)
123123
const unsigned int max_qp = cfe->n_quadrature_points();
124124
for (unsigned int qp=0; qp<max_qp; ++qp)
125125
{
126-
const unsigned int n_sf = cfe->n_shape_functions();
126+
const unsigned int n_sf =
127+
FEInterface::n_dofs(cfe->get_fe_type(), elem);
127128
for (unsigned int i=0; i<n_sf; ++i)
128129
{
129130
if (rho > 0)
@@ -169,17 +170,6 @@ int main (int argc, char** argv)
169170
libmesh_example_requires(false, "--enable-ifem");
170171
#else
171172

172-
#ifdef LIBMESH_ENABLE_NODE_CONSTRAINTS
173-
// Node constraints are not yet implemented for infinite elements.
174-
libmesh_example_requires(false, "--disable-node-constraints");
175-
#endif
176-
177-
#ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
178-
// UniformRefinement uses second derivatives if they are enabled,
179-
// but for infinite elements they are not implemented.
180-
libmesh_example_requires(false, "--disable-second");
181-
#endif
182-
183173
// Skip this example if libMesh was compiled with <3 dimensions.
184174
// INFINITE ELEMENTS ARE IMPLEMENTED ONLY FOR 3 DIMENSIONS AT THE MOMENT.
185175
libmesh_example_requires(3 <= LIBMESH_DIM, "3D support");

tests/numerics/petsc_matrix_test.C

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ public:
2323

2424
SPARSEMATRIXTEST
2525

26+
// Our repo's test files use PetscScalar==double
27+
#ifndef LIBMESH_USE_COMPLEX_NUMBERS
28+
#ifdef LIBMESH_DEFAULT_DOUBLE_PRECISION
2629
CPPUNIT_TEST(testPetscBinaryRead);
30+
#endif
31+
#endif
32+
2733
CPPUNIT_TEST(testPetscBinaryWrite);
2834
#if PETSC_RELEASE_GREATER_EQUALS(3, 23, 0)
2935
CPPUNIT_TEST(testPetscCopyFromHash);

0 commit comments

Comments
 (0)