PARALUTION
1.0.0
PARALUTION
|
#include <dpcg.hpp>
Public Member Functions | |
DPCG () | |
virtual | ~DPCG () |
virtual void | Print (void) const |
Print information about the solver. More... | |
virtual void | Build (void) |
Build the solver (data allocation, structure computation, numerical computation) More... | |
virtual void | Clear (void) |
Clear (free all local data) the solver. More... | |
virtual void | SetNVectors (const int novecni) |
void | Init (const double abs_tol, const double rel_tol, const double div_tol, const int max_iter) |
Initialize the solver with absolute/relative/divergence tolerance and maximum number of iterations. More... | |
void | Init (const double abs_tol, const double rel_tol, const double div_tol, const int min_iter, const int max_iter) |
Initialize the solver with absolute/relative/divergence tolerance and minimum/maximum number of iterations. More... | |
void | InitMinIter (const int min_iter) |
Set the minimum number of iterations. More... | |
void | InitMaxIter (const int max_iter) |
Set the maximum number of iterations. More... | |
void | InitTol (const double abs, const double rel, const double div) |
Set the absolute/relative/divergence tolerance. More... | |
void | SetResidualNorm (const int resnorm) |
Set the residual norm to L1, L2 or Inf norm resnorm == 1 L1 Norm resnorm == 2 L2 Norm (default) resnorm == 3 Inf Norm. More... | |
void | RecordResidualHistory (void) |
Record the residual history. More... | |
void | RecordHistory (const std::string filename) const |
Write the history to file. More... | |
virtual void | Verbose (const int verb=1) |
Provide verbose output of the solver: verb == 0 no output verb == 1 print info about the solver (start,end); verb == 2 print (iter, residual) via iteration control;. More... | |
virtual void | Solve (const VectorType &rhs, VectorType *x) |
Solve Operator x = rhs. More... | |
virtual void | SetPreconditioner (Solver< OperatorType, VectorType, ValueType > &precond) |
Set a preconditioner of the linear solver. More... | |
virtual int | GetIterationCount (void) |
Return the iteration count. More... | |
virtual double | GetCurrentResidual (void) |
Return the current residual. More... | |
virtual int | GetSolverStatus (void) |
Return the current status. More... | |
virtual int | GetAmaxResidualIndex (void) |
Return absolute maximum index of residual vector when using Linf norm. More... | |
void | SetOperator (const OperatorType &op) |
Set the Operator of the solver. More... | |
virtual void | ResetOperator (const OperatorType &op) |
Reset the operator; see ReBuildNumeric. More... | |
virtual void | SolveZeroSol (const VectorType &rhs, VectorType *x) |
Solve Operator x = rhs; but set first the init x = 0. More... | |
virtual void | ReBuildNumeric (void) |
Rebuild only with numerical computation (no allocation or data structure computation) More... | |
virtual void | MoveToHost (void) |
Move all the data (i.e. move the solver) to the host. More... | |
virtual void | MoveToAccelerator (void) |
Move all the data (i.e. move the solver) to the accelerator. More... | |
Protected Member Functions | |
virtual void | SolveNonPrecond_ (const VectorType &rhs, VectorType *x) |
Non-preconditioner solution procedure. More... | |
virtual void | SolvePrecond_ (const VectorType &rhs, VectorType *x) |
Preconditioned solution procedure. More... | |
virtual void | PrintStart_ (void) const |
Print starting msg of the solver. More... | |
virtual void | PrintEnd_ (void) const |
Print ending msg of the solver. More... | |
virtual void | MoveToHostLocalData_ (void) |
Move all local data to the host. More... | |
virtual void | MoveToAcceleratorLocalData_ (void) |
Move all local data to the accelerator. More... | |
ValueType | Norm (const VectorType &vec) |
Computes the vector norm. More... | |
Protected Attributes | |
IterationControl | iter_ctrl_ |
Iteration control (monitor) More... | |
int | res_norm_ |
Residual norm res_norm = 1 L1 Norm res_norm = 2 L2 Norm res_norm = 3 Linf Norm. More... | |
int | index_ |
Absolute maximum index of residual vector when using Linf norm. More... | |
const OperatorType * | op_ |
Pointer to the operator. More... | |
Solver< OperatorType, VectorType, ValueType > * | precond_ |
Pointer to the defined preconditioner. More... | |
bool | build_ |
Flag == true after building the solver (e.g. Build()) More... | |
LocalVector< int > | permutation_ |
Permutation vector (used if the solver performs permutation/re-ordering techniques) More... | |
int | verb_ |
Verbose flag verb == 0 no output verb == 1 print info about the solver (start,end); verb == 2 print (iter, residual) via iteration control;. More... | |
size_t | global_obj_id |
Private Member Functions | |
void | MakeZ_COO (void) |
void | MakeZ_CSR (void) |
Private Attributes | |
OperatorType | L_ |
OperatorType | LT_ |
OperatorType | AZ_ |
OperatorType | ZT_ |
OperatorType | Z_ |
OperatorType | AZT_ |
OperatorType | E_ |
VectorType | r_ |
VectorType | w_ |
VectorType | p_ |
VectorType | q_ |
VectorType | Dinv_ |
VectorType | hat_ |
VectorType | intmed_ |
VectorType | Qb_ |
VectorType | Ptx_ |
VectorType | LLtx_ |
VectorType | LLtx2_ |
int | novecni_ |
paralution::DPCG< OperatorType, VectorType, ValueType >::DPCG | ( | ) |
|
virtual |
|
virtual |
Build the solver (data allocation, structure computation, numerical computation)
Reimplemented from paralution::Solver< OperatorType, VectorType, ValueType >.
Referenced by main().
|
virtual |
Clear (free all local data) the solver.
Reimplemented from paralution::Solver< OperatorType, VectorType, ValueType >.
Referenced by main().
|
virtualinherited |
Return absolute maximum index of residual vector when using Linf norm.
|
virtualinherited |
Return the current residual.
Referenced by paralution_fortran_solve().
|
virtualinherited |
Return the iteration count.
Referenced by paralution_fortran_solve().
|
virtualinherited |
Return the current status.
Referenced by paralution_fortran_solve().
|
inherited |
Initialize the solver with absolute/relative/divergence tolerance and maximum number of iterations.
Referenced by paralution::BaseAMG< OperatorType, VectorType, ValueType >::Build(), main(), mexFunction(), paralution_fortran_solve(), and paralution_solve().
|
inherited |
Initialize the solver with absolute/relative/divergence tolerance and minimum/maximum number of iterations.
|
inherited |
Set the maximum number of iterations.
Referenced by main().
|
inherited |
Set the minimum number of iterations.
|
inherited |
Set the absolute/relative/divergence tolerance.
|
private |
|
private |
|
virtualinherited |
Move all the data (i.e. move the solver) to the accelerator.
Referenced by main(), mexFunction(), and paralution_fortran_solve().
|
protectedvirtual |
Move all local data to the accelerator.
Implements paralution::Solver< OperatorType, VectorType, ValueType >.
|
virtualinherited |
Move all the data (i.e. move the solver) to the host.
|
protectedvirtual |
Move all local data to the host.
Implements paralution::Solver< OperatorType, VectorType, ValueType >.
|
protectedinherited |
Computes the vector norm.
|
virtual |
Print information about the solver.
Implements paralution::Solver< OperatorType, VectorType, ValueType >.
|
protectedvirtual |
Print ending msg of the solver.
Implements paralution::Solver< OperatorType, VectorType, ValueType >.
|
protectedvirtual |
Print starting msg of the solver.
Implements paralution::Solver< OperatorType, VectorType, ValueType >.
|
virtualinherited |
Rebuild only with numerical computation (no allocation or data structure computation)
Reimplemented in paralution::FixedPoint< OperatorType, VectorType, ValueType >, paralution::MultiColoredILU< OperatorType, VectorType, ValueType >, and paralution::MultiColoredSGS< OperatorType, VectorType, ValueType >.
|
inherited |
Write the history to file.
|
inherited |
Record the residual history.
|
virtualinherited |
Reset the operator; see ReBuildNumeric.
Reimplemented in paralution::SGS< OperatorType, VectorType, ValueType >, paralution::GS< OperatorType, VectorType, ValueType >, and paralution::Jacobi< OperatorType, VectorType, ValueType >.
Referenced by main().
|
virtual |
Referenced by main().
|
inherited |
Set the Operator of the solver.
Referenced by paralution::BaseAMG< OperatorType, VectorType, ValueType >::Build(), paralution::MultiElimination< OperatorType, VectorType, ValueType >::Build(), paralution::MultiColored< OperatorType, VectorType, ValueType >::Decompose_(), main(), mexFunction(), paralution_fortran_solve(), and paralution_solve().
|
virtualinherited |
Set a preconditioner of the linear solver.
Reimplemented in paralution::BaseMultiGrid< OperatorType, VectorType, ValueType >.
Referenced by paralution::AMG< OperatorType, VectorType, ValueType >::BuildSmoothers(), paralution::BaseAMG< OperatorType, VectorType, ValueType >::BuildSmoothers(), main(), mexFunction(), paralution_fortran_solve(), and paralution_solve().
|
inherited |
Set the residual norm to L1, L2 or Inf norm resnorm == 1 L1 Norm resnorm == 2 L2 Norm (default) resnorm == 3 Inf Norm.
|
virtualinherited |
Solve Operator x = rhs.
Implements paralution::Solver< OperatorType, VectorType, ValueType >.
Reimplemented in paralution::BaseMultiGrid< OperatorType, VectorType, ValueType >.
Referenced by main(), mexFunction(), paralution_fortran_solve(), and paralution_solve().
|
protectedvirtual |
Non-preconditioner solution procedure.
Implements paralution::IterativeLinearSolver< OperatorType, VectorType, ValueType >.
|
protectedvirtual |
Preconditioned solution procedure.
Implements paralution::IterativeLinearSolver< OperatorType, VectorType, ValueType >.
|
virtualinherited |
Solve Operator x = rhs; but set first the init x = 0.
Reimplemented in paralution::Preconditioner< OperatorType, VectorType, ValueType >, paralution::Preconditioner< paralution::LocalMatrix< ValueTypeL >, paralution::LocalVector< ValueTypeL >, ValueTypeL >, and paralution::Preconditioner< paralution::LocalMatrix< ValueTypeH >, paralution::LocalVector< ValueTypeH >, ValueTypeH >.
|
virtualinherited |
Provide verbose output of the solver: verb == 0 no output verb == 1 print info about the solver (start,end); verb == 2 print (iter, residual) via iteration control;.
Reimplemented from paralution::Solver< OperatorType, VectorType, ValueType >.
Referenced by paralution::BaseAMG< OperatorType, VectorType, ValueType >::Build(), paralution::AMG< OperatorType, VectorType, ValueType >::BuildSmoothers(), paralution::BaseAMG< OperatorType, VectorType, ValueType >::BuildSmoothers(), main(), mexFunction(), and paralution_solve().
|
private |
|
private |
|
protectedinherited |
Flag == true after building the solver (e.g. Build())
|
private |
|
private |
|
protectedinherited |
|
private |
|
protectedinherited |
Absolute maximum index of residual vector when using Linf norm.
|
private |
|
protectedinherited |
Iteration control (monitor)
|
private |
|
private |
|
private |
|
private |
|
private |
|
protectedinherited |
Pointer to the operator.
|
private |
|
protectedinherited |
Permutation vector (used if the solver performs permutation/re-ordering techniques)
|
protectedinherited |
Pointer to the defined preconditioner.
|
private |
|
private |
|
private |
|
private |
|
protectedinherited |
Residual norm res_norm = 1 L1 Norm res_norm = 2 L2 Norm res_norm = 3 Linf Norm.
|
protectedinherited |
Verbose flag verb == 0 no output verb == 1 print info about the solver (start,end); verb == 2 print (iter, residual) via iteration control;.
|
private |
|
private |
|
private |