26#ifndef dealii_petsc_compatibility_h
27#define dealii_petsc_compatibility_h
33#ifdef DEAL_II_WITH_PETSC
35# include <petscconf.h>
39# include <petscsnes.h>
55 const PetscErrorCode ierr =
56 PetscOptionsSetValue(
nullptr, name.c_str(), value.c_str());
71 const MatOption option_name,
72 const PetscBool option_value = PETSC_FALSE)
74 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)