Reference documentation for deal.II version Git 7e76c9f1da 2019-09-19 09:07:25 +0200
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PETScWrappers::SolverTCQMR Class Reference

#include <deal.II/lac/petsc_solver.h>

Inheritance diagram for PETScWrappers::SolverTCQMR:
[legend]

Classes

struct  AdditionalData
 

Public Member Functions

 SolverTCQMR (SolverControl &cn, const MPI_Comm &mpi_communicator=PETSC_COMM_SELF, const AdditionalData &data=AdditionalData())
 
- Public Member Functions inherited from PETScWrappers::SolverBase
 SolverBase (SolverControl &cn, const MPI_Comm &mpi_communicator)
 
virtual ~SolverBase ()=default
 
void solve (const MatrixBase &A, VectorBase &x, const VectorBase &b, const PreconditionerBase &preconditioner)
 
virtual void reset ()
 
void set_prefix (const std::string &prefix)
 
SolverControlcontrol () const
 
void initialize (const PreconditionerBase &preconditioner)
 

Protected Member Functions

virtual void set_solver_type (KSP &ksp) const override
 

Protected Attributes

const AdditionalData additional_data
 
- Protected Attributes inherited from PETScWrappers::SolverBase
SolverControlsolver_control
 
const MPI_Comm mpi_communicator
 
std::string prefix_name
 

Detailed Description

An implementation of the solver interface using the PETSc TFQMR-2 solver (called TCQMR in PETSc). Note that this solver had a serious bug in versions up to and including PETSc 2.1.6, in that it did not check convergence and always returned an error code. Thus, this class will abort with an error indicating failure to converge with PETSc 2.1.6 and prior. This should be fixed in later versions of PETSc, though.

Author
Wolfgang Bangerth, 2004

Definition at line 711 of file petsc_solver.h.

Constructor & Destructor Documentation

◆ SolverTCQMR()

PETScWrappers::SolverTCQMR::SolverTCQMR ( SolverControl cn,
const MPI_Comm &  mpi_communicator = PETSC_COMM_SELF,
const AdditionalData data = AdditionalData() 
)

Constructor. In contrast to deal.II's own solvers, there is no need to give a vector memory object. However, PETSc solvers want to have an MPI communicator context over which computations are parallelized. By default, PETSC_COMM_SELF is used here, but you can change this. Note that for single processor (non-MPI) versions, this parameter does not have any effect.

The last argument takes a structure with additional, solver dependent flags for tuning.

Note that the communicator used here must match the communicator used in the system matrix, solution, and right hand side object of the solve to be done with this solver. Otherwise, PETSc will generate hard to track down errors, see the documentation of the SolverBase class.

Definition at line 520 of file petsc_solver.cc.

Member Function Documentation

◆ set_solver_type()

void PETScWrappers::SolverTCQMR::set_solver_type ( KSP &  ksp) const
overrideprotectedvirtual

Function that takes a Krylov Subspace Solver context object, and sets the type of solver that is appropriate for this class.

Implements PETScWrappers::SolverBase.

Definition at line 529 of file petsc_solver.cc.

Member Data Documentation

◆ additional_data

const AdditionalData PETScWrappers::SolverTCQMR::additional_data
protected

Store a copy of the flags for this particular solver.

Definition at line 744 of file petsc_solver.h.


The documentation for this class was generated from the following files: