Skip to content

Commit

Permalink
Temporary workaround for MOOSE apps (mis)using LibmeshPetscCall
Browse files Browse the repository at this point in the history
  • Loading branch information
nmnobre committed Oct 30, 2024
1 parent 0bb27d8 commit b5e4298
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/numerics/petsc_solver_exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ class PetscSolverException : public SolverException
// Remove me: for backward compatibility with MOOSE only
#define LIBMESH_CHKERR(ierr) LIBMESH_CHKERRQ(ierr)
#define LIBMESH_CHKERR2(comm, ierr) LIBMESH_CHKERRA(comm, ierr)
#define LibmeshPetscCall(...) \
do \
{ \
PetscErrorCode libmesh_petsc_call_ierr; \
libmesh_petsc_call_ierr = __VA_ARGS__; \
LIBMESH_CHKERRQ(libmesh_petsc_call_ierr); \
} while (0)

#else

Expand Down Expand Up @@ -139,8 +146,10 @@ PETSC_BEGIN_END(VecGhostUpdate) // VecGhostUpdateBeginEnd

// Shortcut for LibmeshPetscCallA for use within a ParallelObject, i.e. when
// we can rely on the communicator being available from the "this" pointer.
/*
#define LibmeshPetscCall(...) \
LibmeshPetscCallA(this->comm().get(), __VA_ARGS__)
*/

// Shortcut for LibmeshPetscCallA for use when we have a Parallel::Communicator
// available instead of just a bare MPI communicator.
Expand Down

0 comments on commit b5e4298

Please sign in to comment.