25#ifndef dealii_petsc_compatibility_h
26#define dealii_petsc_compatibility_h
32#ifdef DEAL_II_WITH_PETSC
37# include <petscsnes.h>
39# if DEAL_II_PETSC_VERSION_LT(3, 19, 0)
40# define PETSC_SUCCESS 0
56 const PetscErrorCode ierr =
57 PetscOptionsSetValue(
nullptr, name.c_str(), value.c_str());
72 const MatOption option_name,
73 const PetscBool option_value = PETSC_FALSE)
75 const PetscErrorCode ierr = MatSetOption(matrix, option_name, option_value);
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
#define AssertThrow(cond, exc)
void set_use_matrix_free(SNES snes, const bool mf_operator, const bool mf)
void set_option_value(const std::string &name, const std::string &value)
void set_keep_zero_rows(Mat &matrix)
PetscErrorCode pc_set_failed_reason(PC pc, PCFailedReason reason)
void ts_set_max_time(TS ts, const PetscReal maxtime)
void snes_reset_domain_flags(SNES snes)
void set_matrix_option(Mat &matrix, const MatOption option_name, const PetscBool option_value=PETSC_FALSE)
void snes_set_jacobian_domain_error(SNES snes)
void ts_set_max_steps(TS ts, const PetscInt maxsteps)
void petsc_increment_state_counter(Vec v)
void close_matrix(Mat &matrix)
unsigned int ts_get_step_number(TS ts)