Skip to content

Add missing PETSc/SLEPc error checks#4160

Open
Siya-05 wants to merge 1 commit intoFEniCS:mainfrom
Siya-05:petsc-error-handling-clean
Open

Add missing PETSc/SLEPc error checks#4160
Siya-05 wants to merge 1 commit intoFEniCS:mainfrom
Siya-05:petsc-error-handling-clean

Conversation

@Siya-05
Copy link
Copy Markdown

@Siya-05 Siya-05 commented Apr 20, 2026

Summary

Refers to #4045.

Add missing PETSc/SLEPc error checks for previously unchecked calls in fem, la, and nls.

Changes

  • add checks for VecCreateNest in cpp/dolfinx/fem/petsc.cpp
  • add missing PETSc error checks in cpp/dolfinx/la/petsc.cpp using the existing CHECK_ERROR(...) pattern
  • add checks for selected SLEPc/PETSc calls in cpp/dolfinx/la/slepc.cpp
  • add checks for VecNorm, VecAXPY, and MatCreateVecs in cpp/dolfinx/nls/NewtonSolver.cpp

Notes

  • follow the existing per-file error-handling style
  • do not change behavior except to check and report PETSc/SLEPc errors consistently

@jhale
Copy link
Copy Markdown
Member

jhale commented Apr 20, 2026

This needs doing, but it would be good to drop into Slack #development to discuss precisely how it should be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants