Add missing PETSc/SLEPc error checks#4160
Conversation
|
This needs doing, but it would be good to drop into Slack #development to discuss precisely how it should be done. |
340e86b to
ddec38a
Compare
|
Sorry for being late on this, While looking through the remaining PETSc-related files, I noticed that NewtonSolver.cpp and slepc.cpp also have a few unchecked PETSc calls. Unlike la/petsc.cpp, they don't have access to the local CHECK_ERROR macro. So I updated the PETSc error handling in la/petsc.cpp by replacing remaining manual if (ierr != 0) petsc::error(...). |
|
I still see a number of |
|
If the macro is an issue, just reimplement the macro where you need it? |
|
@jhale I've reimplemented the CHECK_ERROR macro where needed and updated the remaining manual PETSc/SLEPc error checks to use it consistently. When you have a chance, could you please take another look? Thanks! |
Summary
Refers to #4045.
Add missing PETSc/SLEPc error checks for previously unchecked calls in
fem,la, andnls.Changes
VecCreateNestincpp/dolfinx/fem/petsc.cppcpp/dolfinx/la/petsc.cppusing the existingCHECK_ERROR(...)patterncpp/dolfinx/la/slepc.cppVecNorm,VecAXPY, andMatCreateVecsincpp/dolfinx/nls/NewtonSolver.cppNotes