16 #include <deal.II/base/config.h> 18 #include <deal.II/lac/exceptions.h> 20 #ifdef DEAL_II_WITH_PETSC 21 #include <petscconf.h> 23 #include <petscerror.h> 24 #endif // DEAL_II_WITH_PETSC 26 DEAL_II_NAMESPACE_OPEN
30 ExcPETScError::ExcPETScError (
const int error_code)
32 error_code (error_code)
35 void ExcPETScError::print_info (std::ostream &out)
const 37 out <<
"deal.II encountered an error while calling a PETSc function." 39 #ifdef DEAL_II_WITH_PETSC 42 const char *petsc_message;
43 const PetscErrorCode ierr = PetscErrorMessage (error_code, &petsc_message,
45 if (ierr == 0 && petsc_message !=
nullptr)
47 out <<
"The description of the error provided by PETSc is \"" 54 out <<
"PETSc was not able to determine a description for this particular error code." 57 #endif // DEAL_II_WITH_PETSC 58 out <<
"The numerical value of the original error code is " 65 DEAL_II_NAMESPACE_CLOSE