Skip to content

Commit b5e4298

Browse files
committed
Temporary workaround for MOOSE apps (mis)using LibmeshPetscCall
1 parent 0bb27d8 commit b5e4298

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

include/numerics/petsc_solver_exception.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,13 @@ class PetscSolverException : public SolverException
9292
// Remove me: for backward compatibility with MOOSE only
9393
#define LIBMESH_CHKERR(ierr) LIBMESH_CHKERRQ(ierr)
9494
#define LIBMESH_CHKERR2(comm, ierr) LIBMESH_CHKERRA(comm, ierr)
95+
#define LibmeshPetscCall(...) \
96+
do \
97+
{ \
98+
PetscErrorCode libmesh_petsc_call_ierr; \
99+
libmesh_petsc_call_ierr = __VA_ARGS__; \
100+
LIBMESH_CHKERRQ(libmesh_petsc_call_ierr); \
101+
} while (0)
95102

96103
#else
97104

@@ -139,8 +146,10 @@ PETSC_BEGIN_END(VecGhostUpdate) // VecGhostUpdateBeginEnd
139146

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

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

0 commit comments

Comments
 (0)