20#ifndef dealii_petsc_compatibility_h
21#define dealii_petsc_compatibility_h
27#ifdef DEAL_II_WITH_PETSC
29# include <petscconf.h>
48# if DEAL_II_PETSC_VERSION_LT(3, 7, 0)
49 const PetscErrorCode ierr =
50 PetscOptionsSetValue(name.c_str(), value.c_str());
52 const PetscErrorCode ierr =
53 PetscOptionsSetValue(
nullptr, name.c_str(), value.c_str());
73 return MatDestroy(&
matrix);
92 return KSPDestroy(&krylov_solver);
106 const MatOption option_name,
107 const PetscBool option_value = PETSC_FALSE)
109 const PetscErrorCode ierr = MatSetOption(
matrix, option_name, option_value);
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define AssertThrow(cond, exc)
@ matrix
Contents is actually a matrix.
void set_option_value(const std::string &name, const std::string &value)
void set_keep_zero_rows(Mat &matrix)
void set_matrix_option(Mat &matrix, const MatOption option_name, const PetscBool option_value=PETSC_FALSE)
PetscErrorCode destroy_krylov_solver(KSP &krylov_solver)
PetscErrorCode destroy_matrix(Mat &matrix)
void close_matrix(Mat &matrix)