#include <BelosLinearProblem.hpp>
Public Member Functions | |
Constructors/Destructor | |
| LinearProblem (void) | |
| Default Constructor. | |
| LinearProblem (const RefCountPtr< const OP > &A, const RefCountPtr< MV > &X, const RefCountPtr< const MV > &B) | |
| Unpreconditioned linear system constructor. | |
| LinearProblem (const LinearProblem< ScalarType, MV, OP > &Problem) | |
| Copy Constructor. | |
| virtual | ~LinearProblem (void) |
| Destructor. | |
Set methods | |
| void | SetOperator (const RefCountPtr< const OP > &A) |
| Set Operator A of linear problem AX = B. | |
| void | SetLHS (const RefCountPtr< MV > &X) |
| Set left-hand-side X of linear problem AX = B. | |
| void | SetRHS (const RefCountPtr< const MV > &B) |
| Set right-hand-side B of linear problem AX = B. | |
| void | SetLeftPrec (const RefCountPtr< const OP > &LP) |
Set left preconditioning operator (LP) of linear problem AX = B. | |
| void | SetRightPrec (const RefCountPtr< const OP > &RP) |
Set right preconditioning operator (RP) of linear problem AX = B. | |
| void | SetParameterList (const RefCountPtr< ParameterList > &PL) |
| Set the parameter list for defining the behavior of the linear problem class. | |
| void | SetBlockSize (int blocksize) |
| Set the blocksize of the linear problem. This information is used to set up the linear problem for block solvers. | |
| void | SetCurrLSVec () |
| Inform the linear problem that the solver is finished with the current linear system. | |
| void | AssertSymmetric () |
| Inform the linear problem that the operator is symmetric. | |
| void | SolutionUpdated (const MV *SolnUpdate=0, ScalarType scale=Teuchos::ScalarTraits< ScalarType >::one()) |
| Inform the linear problem that the solution has been updated. | |
Reset method | |
| void | Reset (const RefCountPtr< MV > &newX=null, const RefCountPtr< const MV > &newB=null) |
| Reset the linear problem manager. | |
Accessor methods | |
| RefCountPtr< const OP > | GetOperator () const |
| Get a pointer to the operator A. | |
| RefCountPtr< MV > | GetLHS () const |
| Get a pointer to the left-hand side X. | |
| RefCountPtr< const MV > | GetRHS () const |
| Get a pointer to the right-hand side B. | |
| const MV & | GetInitResVec () |
| Get a pointer to the initial residual vector. | |
| const MV & | GetCurrResVec (const MV *CurrSoln=0) |
| Get a pointer to the current residual vector. | |
| RefCountPtr< MV > | GetCurrLHSVec () |
| Get a pointer to the current left-hand side (solution) of the linear system. | |
| RefCountPtr< MV > | GetCurrRHSVec () |
| Get a pointer to the current right-hand side of the linear system. | |
| RefCountPtr< const OP > | GetLeftPrec () const |
| Get a pointer to the left preconditioning operator. | |
| RefCountPtr< const OP > | GetRightPrec () const |
| Get a pointer to the right preconditioning operator. | |
| RefCountPtr< ParameterList > | GetParameterList () const |
| Get a pointer to the parameter list. | |
| int | GetBlockSize () const |
| Get the default blocksize being used by the linear problem. | |
| int | GetCurrBlockSize () const |
| Get the current blocksize being used by the linear problem. | |
| int | GetNumToSolve () const |
| Get the current number of linear systems being solved for. | |
| int | GetRHSIndex () const |
| Get the 0-based index of the first vector in the current right-hand side block being solved for. | |
| bool | IsSolutionUpdated () const |
| Get the current status of the solution. | |
| bool | IsOperatorSymmetric () const |
| Get operator symmetry bool. | |
Apply / Compute methods | |
| ReturnType | Apply (const MV &x, MV &y) |
Apply the composite operator of this linear problem to x, returning y. | |
| ReturnType | ApplyOp (const MV &x, MV &y) |
Apply ONLY the operator to x, returning y. | |
| ReturnType | ApplyLeftPrec (const MV &x, MV &y) |
Apply ONLY the left preconditioner to x, returning y. | |
| ReturnType | ApplyRightPrec (const MV &x, MV &y) |
Apply ONLY the right preconditioner to x, returning y. | |
| ReturnType | ComputeResVec (MV *R, const MV *X=0, const MV *B=0) |
Compute a residual R for this operator given a solution X, and right-hand side B. | |
Definition at line 57 of file BelosLinearProblem.hpp.
|
||||||||||
|
Default Constructor. Creates an empty Belos::LinearProblem instance. The operator A, left-hand-side X and right-hand-side B must be set using the SetOperator(), SetLHS() and SetRHS() methods respectively. Definition at line 379 of file BelosLinearProblem.hpp. |
|
||||||||||||||||||||
|
Unpreconditioned linear system constructor.
Creates an unpreconditioned LinearProblem instance with the Belos::Operator ( Definition at line 396 of file BelosLinearProblem.hpp. |
|
||||||||||
|
Copy Constructor. Makes copy of an existing LinearProblem instance. Definition at line 420 of file BelosLinearProblem.hpp. |
|
||||||||||
|
Destructor. Completely deletes a LinearProblem object. Definition at line 447 of file BelosLinearProblem.hpp. |
|
||||||||||
|
Set Operator A of linear problem AX = B. Sets a pointer to an Operator. No copy of the operator is made. Definition at line 98 of file BelosLinearProblem.hpp. |
|
||||||||||
|
Set left-hand-side X of linear problem AX = B. Sets a pointer to a MultiVec. No copy of the object is made. Definition at line 522 of file BelosLinearProblem.hpp. |
|
||||||||||
|
Set right-hand-side B of linear problem AX = B. Sets a pointer to a MultiVec. No copy of the object is made. Definition at line 108 of file BelosLinearProblem.hpp. |
|
||||||||||
|
Set left preconditioning operator ( Sets a pointer to an Operator. No copy of the operator is made. Definition at line 113 of file BelosLinearProblem.hpp. |
|
||||||||||
|
Set right preconditioning operator ( Sets a pointer to an Operator. No copy of the operator is made. Definition at line 118 of file BelosLinearProblem.hpp. |
|
||||||||||
|
Set the parameter list for defining the behavior of the linear problem class.
Definition at line 121 of file BelosLinearProblem.hpp. |
|
||||||||||
|
Set the blocksize of the linear problem. This information is used to set up the linear problem for block solvers.
Definition at line 124 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Inform the linear problem that the solver is finished with the current linear system.
Definition at line 529 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Inform the linear problem that the operator is symmetric. This knowledge may allow the operator to take advantage of the linear problem symmetry. However, this should not be set to true if the preconditioner is not symmetric, or symmetrically applied. Definition at line 139 of file BelosLinearProblem.hpp. |
|
||||||||||||||||
|
Inform the linear problem that the solution has been updated. Next time GetCurrResVecs is called, a new residual will be computed. This keeps the linear problem from having to recompute the residual vector everytime it's asked for if the solution hasn't been updated. Definition at line 564 of file BelosLinearProblem.hpp. |
|
||||||||||||||||
|
Reset the linear problem manager. This is useful for solving the linear system with another right-hand side. The internal flags will be set as if the linear system manager was just initialized. Definition at line 581 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get a pointer to the operator A.
Definition at line 165 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get a pointer to the left-hand side X.
Definition at line 168 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get a pointer to the right-hand side B.
Definition at line 171 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get a pointer to the initial residual vector.
Definition at line 594 of file BelosLinearProblem.hpp. |
|
||||||||||
|
Get a pointer to the current residual vector.
Definition at line 612 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get a pointer to the current left-hand side (solution) of the linear system. This method is called by the solver or any method that is interested in the current linear system being solved for.
Definition at line 635 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get a pointer to the current right-hand side of the linear system. This method is called by the solver of any method that is interested in the current linear system being solved for.
Definition at line 645 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get a pointer to the left preconditioning operator.
Definition at line 218 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get a pointer to the right preconditioning operator.
Definition at line 221 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get a pointer to the parameter list.
Definition at line 224 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get the default blocksize being used by the linear problem.
Definition at line 227 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get the current blocksize being used by the linear problem. This may be different from the default blocksize set for the linear problem in the event that the default blocksize doesn't divide evenly into the number of right-hand sides, but it should not be more than the default blocksize. Definition at line 234 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get the current number of linear systems being solved for. Since the block size is independent of the number of right-hand sides, it is important to know how many linear systems are being solved for when the status is checked. This is informative for residual checks because the entire block of residuals may not be of interest. Thus, this number can be anywhere between 1 and the blocksize of the linear system. Definition at line 243 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get the 0-based index of the first vector in the current right-hand side block being solved for. Since the block size is independent of the number of right-hand sides for some solvers (GMRES, CG, etc.), it is important to know which right-hand sides are being solved for. That may mean you need to update the information about the norms of your initial residual vector for weighting purposes. This information can keep you from querying the solver for information that rarely changes. Definition at line 253 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get the current status of the solution. This only means that the current linear system being solved for ( obtained by GetCurr<LHS/RHS>Vec() ) has been updated by the solver. This will be true every iteration for solvers like CG, but not true until restarts for GMRES. Definition at line 260 of file BelosLinearProblem.hpp. |
|
|||||||||
|
Get operator symmetry bool.
Definition at line 263 of file BelosLinearProblem.hpp. |
|
||||||||||||||||
|
Apply the composite operator of this linear problem to This application is the composition of the left/right preconditioner and operator. Most Krylov methods will use this application method within their code. Precondition:
Definition at line 655 of file BelosLinearProblem.hpp. |
|
||||||||||||||||
|
Apply ONLY the operator to This application is only of the linear problem operator, no preconditioners are applied. Flexible variants of Krylov methods will use this application method within their code. Precondition:
Definition at line 691 of file BelosLinearProblem.hpp. |
|
||||||||||||||||
|
Apply ONLY the left preconditioner to This application is only of the left preconditioner, which may be required for flexible variants of Krylov methods.
Definition at line 700 of file BelosLinearProblem.hpp. |
|
||||||||||||||||
|
Apply ONLY the right preconditioner to This application is only of the right preconditioner, which may be required for flexible variants of Krylov methods.
Definition at line 709 of file BelosLinearProblem.hpp. |
|
||||||||||||||||||||
|
Compute a residual
This method will compute the residual for the current linear system if
Definition at line 718 of file BelosLinearProblem.hpp. |
1.3.9.1