Skip to content

Commit

Permalink
Merge pull request #29876 from roystgnr/qbase_compat
Browse files Browse the repository at this point in the history
Match changes in libMesh::QBase APIs
  • Loading branch information
roystgnr authored Feb 14, 2025
2 parents 40cebfd + 2e3b80b commit b05d63c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 11 deletions.
11 changes: 9 additions & 2 deletions framework/include/utils/ArbitraryQuadrature.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,20 @@ class ArbitraryQuadrature : public libMesh::QBase
private:
/**
* These functions must be defined to fulfill the interface expected
* by the quadrature initialization routines. Please do not
* modify the function names or signatures.
* by the quadrature initialization routines. The names and
* signatures depend on what version of libMesh we are compiled
* against.
*/
#ifdef LIBMESH_QBASE_INIT_ARGUMENTS_REMOVED
void init_1D() override;
void init_2D() override;
void init_3D() override;
#else
void init_1D(const libMesh::ElemType _type = libMesh::INVALID_ELEM,
unsigned int p_level = 0) override;
void init_2D(const libMesh::ElemType _type = libMesh::INVALID_ELEM,
unsigned int p_level = 0) override;
void init_3D(const libMesh::ElemType _type = libMesh::INVALID_ELEM,
unsigned int p_level = 0) override;
#endif // LIBMESH_QBASE_INIT_ARGUMENTS_REMOVED
};
30 changes: 21 additions & 9 deletions framework/src/utils/ArbitraryQuadrature.C
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,35 @@ ArbitraryQuadrature::setWeights(const std::vector<Real> & weights)
_weights = weights;
}

#ifdef LIBMESH_QBASE_INIT_ARGUMENTS_REMOVED
void
ArbitraryQuadrature::init_1D(const ElemType _type, unsigned int p_level)
ArbitraryQuadrature::init_1D()
{
this->_type = _type;
this->_p_level = p_level;
}

void
ArbitraryQuadrature::init_2D(const ElemType _type, unsigned int p_level)
ArbitraryQuadrature::init_2D()
{
this->_type = _type;
this->_p_level = p_level;
}

void
ArbitraryQuadrature::init_3D(const ElemType _type, unsigned int p_level)
ArbitraryQuadrature::init_3D()
{
this->_type = _type;
this->_p_level = p_level;
}

#else
void
ArbitraryQuadrature::init_1D(const ElemType, unsigned int)
{
}

void
ArbitraryQuadrature::init_2D(const ElemType, unsigned int)
{
}

void
ArbitraryQuadrature::init_3D(const ElemType, unsigned int)
{
}
#endif // LIBMESH_QBASE_INIT_ARGUMENTS_REMOVED

0 comments on commit b05d63c

Please sign in to comment.