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> 27 # include <petscksp.h> 31 # ifdef DEAL_II_WITH_SLEPC 32 # include <deal.II/lac/slepc_spectral_transformation.h> 35 DEAL_II_NAMESPACE_OPEN
37 # ifdef DEAL_II_WITH_SLEPC 50 class PreconditionerBase;
206 static PetscErrorCode
208 const PetscInt iteration,
209 const PetscReal residual_norm,
210 KSPConvergedReason *reason,
249 # ifdef DEAL_II_WITH_SLEPC 979 static PetscErrorCode
981 const PetscInt iteration,
982 const PetscReal residual_norm,
983 KSPConvergedReason *reason,
1002 std::unique_ptr<SolverDataMUMPS> solver_data;
1012 DEAL_II_NAMESPACE_CLOSE
1014 # endif // DEAL_II_WITH_PETSC virtual void set_solver_type(KSP &ksp) const override
virtual void set_solver_type(KSP &ksp) const =0
const AdditionalData additional_data
virtual void set_solver_type(KSP &ksp) const override
virtual void set_solver_type(KSP &ksp) const override
const AdditionalData additional_data
const AdditionalData additional_data
void set_prefix(const std::string &prefix)
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
const AdditionalData additional_data
void initialize(const PreconditionerBase &preconditioner)
virtual void set_solver_type(KSP &ksp) const override
SparseDirectMUMPS(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
const MPI_Comm mpi_communicator
std::unique_ptr< SolverData > solver_data
virtual void set_solver_type(KSP &ksp) const override
bool right_preconditioning
void solve(const MatrixBase &A, VectorBase &x, const VectorBase &b, const PreconditionerBase &preconditioner)
virtual void set_solver_type(KSP &ksp) const override
virtual void set_solver_type(KSP &ksp) const override
const AdditionalData additional_data
SolverBase(SolverControl &cn, const MPI_Comm &mpi_communicator)
virtual void set_solver_type(KSP &ksp) const override
virtual void set_solver_type(KSP &ksp) const override
AdditionalData(const double omega=1)
virtual void set_solver_type(KSP &ksp) const override
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())
const AdditionalData additional_data
virtual ~SolverBase()=default
SolverBicgstab(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
const AdditionalData additional_data
SolverControl & control() const
virtual void set_solver_type(KSP &ksp) const override
void solve(const MatrixBase &A, VectorBase &x, const VectorBase &b)
SolverTCQMR(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
const AdditionalData additional_data
SolverTFQMR(SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
static PetscErrorCode convergence_test(KSP ksp, const PetscInt iteration, const PetscReal residual_norm, KSPConvergedReason *reason, void *solver_control)
void set_symmetric_mode(const bool flag)
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
virtual void set_solver_type(KSP &ksp) const override
const AdditionalData additional_data
virtual void set_solver_type(KSP &ksp) const override