concepts::PETScFabric Class Referenceabstract
Fabric class for PETSc
solvers.
More...
#include <PETScFabric.hh>
Public Member Functions | |
virtual Operator< Real > * | operator() ()=0 |
Creates a linear solver from matrix . More... | |
virtual Operator< Real > * | operator() (Operator< Real > &matrix) |
virtual Operator< Real > * | operator() (Operator< Real > &matrix)=0 |
PETScFabric (const Real maxeps, const std::string ksptype, const std::string pctype=std::string("none")) | |
Constructor. More... | |
~PETScFabric () | |
Protected Member Functions | |
virtual std::ostream & | info (std::ostream &os) const |
Private Attributes | |
const std::string | ksptype_ |
Type of Krylov Subspace Solver. More... | |
const Real | maxeps_ |
Maximal residual. More... | |
const std::string | pctype_ |
Type of preconditioner. More... | |
std::list< concepts::PETScMat * > | petscmat_ |
Created auxiliary PETSc Matrices. More... | |
Detailed Description
Fabric class for PETSc
solvers.
Creates a PETScMat
if Operator is not a PETScMat
and a preconditioner is desired. This may have severe disadvantages:
- It is always memory inefficent.
- It may be O(n^2) slow, if Operator is not Matrix, LiCo, LiCoI or Compose
- It may cause a segmentation fault if the fabric goes out of scope before any of the solvers created like this. Make sure this does not happen.
Definition at line 30 of file PETScFabric.hh.
Constructor & Destructor Documentation
◆ PETScFabric()
|
inline |
Constructor.
- Parameters
-
maxeps Maximal residual ksptype Type of Krylov Subspace Solver pctype Type of preconditioner
Definition at line 37 of file PETScFabric.hh.
◆ ~PETScFabric()
|
inline |
Definition at line 56 of file PETScFabric.hh.
Member Function Documentation
◆ info()
|
inlineprotectedvirtual |
Definition at line 63 of file PETScFabric.hh.
◆ operator()() [1/3]
|
pure virtualinherited |
Creates a linear solver from matrix
.
The caller is responsible for the deletion of the delivered object.
- Returns
- Reference to the linear solver
Implemented in concepts::UmfpackFabric, concepts::SuperLUFabric< F >, concepts::MumpsOverlapFabric< F >, and concepts::MumpsFabric< F >.
◆ operator()() [2/3]
|
inlinevirtual |
Definition at line 40 of file PETScFabric.hh.
◆ operator()() [3/3]
|
pure virtualinherited |
Implemented in vectorial::CGUzawaFabric, and vectorial::BramblePasciakFabric.
Member Data Documentation
◆ ksptype_
|
private |
Type of Krylov Subspace Solver.
Definition at line 71 of file PETScFabric.hh.
◆ maxeps_
|
private |
Maximal residual.
Definition at line 69 of file PETScFabric.hh.
◆ pctype_
|
private |
Type of preconditioner.
Definition at line 73 of file PETScFabric.hh.
◆ petscmat_
|
private |
Created auxiliary PETSc Matrices.
Definition at line 75 of file PETScFabric.hh.
The documentation for this class was generated from the following file:
- operator/PETScFabric.hh