16 #ifndef dealii__petsc_solver_h 17 #define dealii__petsc_solver_h 20 #include <deal.II/base/config.h> 22 #ifdef DEAL_II_WITH_PETSC 24 # include <deal.II/lac/exceptions.h> 25 # include <deal.II/lac/solver_control.h> 26 # include <deal.II/base/std_cxx11/shared_ptr.h> 28 # include <petscksp.h> 30 #ifdef DEAL_II_WITH_SLEPC 31 #include <deal.II/lac/slepc_spectral_transformation.h> 34 DEAL_II_NAMESPACE_OPEN
36 #ifdef DEAL_II_WITH_SLEPC 49 class PreconditionerBase;
144 virtual void reset();
173 <<
"An error with error number " << arg1
174 <<
" occurred while calling a PETSc function") DEAL_II_DEPRECATED;
214 const PetscInt iteration,
215 const PetscReal residual_norm,
216 KSPConvergedReason *reason,
255 #ifdef DEAL_II_WITH_SLEPC 976 const PetscInt iteration,
977 const PetscReal residual_norm,
978 KSPConvergedReason *reason,
997 std_cxx11::shared_ptr<SolverDataMUMPS> solver_data;
1007 DEAL_II_NAMESPACE_CLOSE
1009 #endif // DEAL_II_WITH_PETSC void solve(const MatrixBase &A, VectorBase &x, const VectorBase &b, const PreconditionerBase &preconditioner)
virtual void set_solver_type(KSP &ksp) const =0
const AdditionalData additional_data
const AdditionalData additional_data
const AdditionalData additional_data
virtual void set_solver_type(KSP &ksp) const
const AdditionalData additional_data
AdditionalData(const unsigned int restart_parameter=30, const bool right_preconditioning=false)
SolverRichardson(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
const AdditionalData additional_data
virtual void set_solver_type(KSP &ksp) const
std_cxx11::shared_ptr< SolverData > solver_data
const AdditionalData additional_data
virtual void set_solver_type(KSP &ksp) const
SparseDirectMUMPS(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
void set_prefix(const std::string &prefix)
#define DeclException1(Exception1, type1, outsequence)
const MPI_Comm mpi_communicator
bool right_preconditioning
SolverBase(SolverControl &cn, const MPI_Comm &mpi_communicator)
static PetscErrorCode convergence_test(KSP ksp, const PetscInt iteration, const PetscReal residual_norm, KSPConvergedReason *reason, void *solver_control)
virtual void set_solver_type(KSP &ksp) const
const AdditionalData additional_data
virtual void set_solver_type(KSP &ksp) const
virtual void set_solver_type(KSP &ksp) const
AdditionalData(const double omega=1)
SolverCR(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
SolverControl & solver_control
const AdditionalData additional_data
SolverBiCG(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
SolverLSQR(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
SolverChebychev(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
SolverCGS(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
virtual void set_solver_type(KSP &ksp) const
const AdditionalData additional_data
void initialize(const PreconditionerBase &preconditioner)
SolverBicgstab(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
const AdditionalData additional_data
void solve(const MatrixBase &A, VectorBase &x, const VectorBase &b)
virtual void set_solver_type(KSP &ksp) const
virtual void set_solver_type(KSP &ksp) const
SolverTCQMR(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
SolverControl & control() const
virtual void set_solver_type(KSP &ksp) const
const AdditionalData additional_data
SolverTFQMR(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
void set_symmetric_mode(const bool flag)
virtual void set_solver_type(KSP &ksp) const
virtual void set_solver_type(KSP &ksp) const
static PetscErrorCode convergence_test(KSP ksp, const PetscInt iteration, const PetscReal residual_norm, KSPConvergedReason *reason, void *solver_control)
SolverCG(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
SolverPreOnly(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
const AdditionalData additional_data
SolverGMRES(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
unsigned int restart_parameter
const AdditionalData additional_data
virtual void set_solver_type(KSP &ksp) const