Skip to content

Commit

Permalink
Catch return values of petsc calls
Browse files Browse the repository at this point in the history
Perhaps this is from the MOOSE PETSc update? I'm worried I'm going
to see a lot more of these...
  • Loading branch information
lindsayad committed Aug 14, 2024
1 parent cff62cb commit 32b4e29
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/miscellaneous/miscellaneous_ex3/miscellaneous_ex3.C
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,11 @@ int main (int argc, char ** argv)
#ifdef LIBMESH_HAVE_PETSC
//Use the jacobian for preconditioning.
# if PETSC_VERSION_LESS_THAN(3,7,0)
PetscOptionsSetValue("-snes_mf_operator",
LIBMESH_PETSC_NULLPTR);
LibmeshPetscCall2(init.comm(), PetscOptionsSetValue("-snes_mf_operator",
LIBMESH_PETSC_NULLPTR));
# else
PetscOptionsSetValue(LIBMESH_PETSC_NULLPTR, "-snes_mf_operator",
LIBMESH_PETSC_NULLPTR);
LibmeshPetscCall2(init.comm(), PetscOptionsSetValue(LIBMESH_PETSC_NULLPTR, "-snes_mf_operator",
LIBMESH_PETSC_NULLPTR));
# endif
#else
libMesh::err << "Must be using PETSc to use jacobian based preconditioning" << std::endl;
Expand Down

0 comments on commit 32b4e29

Please sign in to comment.