![]() |
PARALUTION
1.0.0
PARALUTION
|
#include <mixed_precision.hpp>
Public Member Functions | |
MixedPrecisionDC () | |
virtual | ~MixedPrecisionDC () |
virtual void | Print (void) const |
Print information about the solver. More... | |
void | Set (Solver< OperatorTypeL, VectorTypeL, ValueTypeL > &Solver_L) |
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... | |
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 VectorTypeH &rhs, VectorTypeH *x) |
Solve Operator x = rhs. More... | |
virtual void | SetPreconditioner (Solver< OperatorTypeH, VectorTypeH, ValueTypeH > &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 OperatorTypeH &op) |
Set the Operator of the solver. More... | |
virtual void | ResetOperator (const OperatorTypeH &op) |
Reset the operator; see ReBuildNumeric. More... | |
virtual void | SolveZeroSol (const VectorTypeH &rhs, VectorTypeH *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 VectorTypeH &rhs, VectorTypeH *x) |
Non-preconditioner solution procedure. More... | |
virtual void | SolvePrecond_ (const VectorTypeH &rhs, VectorTypeH *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... | |
ValueTypeH | Norm (const VectorTypeH &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 OperatorTypeH * | op_ |
Pointer to the operator. More... | |
Solver< OperatorTypeH, VectorTypeH, ValueTypeH > * | 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 Attributes | |
Solver< OperatorTypeL, VectorTypeL, ValueTypeL > * | Solver_L_ |
VectorTypeH | r_h_ |
VectorTypeL | r_l_ |
VectorTypeH * | x_h_ |
VectorTypeL | d_l_ |
VectorTypeH | d_h_ |
const OperatorTypeH * | op_h_ |
OperatorTypeL * | op_l_ |
paralution::MixedPrecisionDC< OperatorTypeH, VectorTypeH, ValueTypeH, OperatorTypeL, VectorTypeL, ValueTypeL >::MixedPrecisionDC | ( | ) |
|
virtual |
|
virtual |
Build the solver (data allocation, structure computation, numerical computation)
Reimplemented from paralution::Solver< OperatorTypeH, VectorTypeH, ValueTypeH >.
Referenced by main().
|
virtual |
Clear (free all local data) the solver.
Reimplemented from paralution::Solver< OperatorTypeH, VectorTypeH, ValueTypeH >.
Referenced by main().
|
virtualinherited |
Return absolute maximum index of residual vector when using Linf norm.
|
virtualinherited |
Return the current residual.
|
virtualinherited |
Return the iteration count.
|
virtualinherited |
Return the current status.
|
inherited |
Initialize the solver with absolute/relative/divergence tolerance and maximum number of iterations.
|
inherited |
Initialize the solver with absolute/relative/divergence tolerance and minimum/maximum number of iterations.
|
inherited |
Set the maximum number of iterations.
|
inherited |
Set the minimum number of iterations.
|
inherited |
Set the absolute/relative/divergence tolerance.
|
virtualinherited |
Move all the data (i.e. move the solver) to the accelerator.
|
protectedvirtual |
Move all local data to the accelerator.
Implements paralution::Solver< OperatorTypeH, VectorTypeH, ValueTypeH >.
|
virtualinherited |
Move all the data (i.e. move the solver) to the host.
|
protectedvirtual |
Move all local data to the host.
Implements paralution::Solver< OperatorTypeH, VectorTypeH, ValueTypeH >.
|
protectedinherited |
Computes the vector norm.
|
virtual |
Print information about the solver.
Implements paralution::Solver< OperatorTypeH, VectorTypeH, ValueTypeH >.
|
protectedvirtual |
Print ending msg of the solver.
Implements paralution::Solver< OperatorTypeH, VectorTypeH, ValueTypeH >.
|
protectedvirtual |
Print starting msg of the solver.
Implements paralution::Solver< OperatorTypeH, VectorTypeH, ValueTypeH >.
|
virtualinherited |
Rebuild only with numerical computation (no allocation or data structure computation)
|
inherited |
Write the history to file.
|
inherited |
Record the residual history.
|
virtualinherited |
Reset the operator; see ReBuildNumeric.
void paralution::MixedPrecisionDC< OperatorTypeH, VectorTypeH, ValueTypeH, OperatorTypeL, VectorTypeL, ValueTypeL >::Set | ( | Solver< OperatorTypeL, VectorTypeL, ValueTypeL > & | Solver_L | ) |
Referenced by main().
|
inherited |
Set the Operator of the solver.
Referenced by main().
|
virtualinherited |
Set a preconditioner of the linear solver.
|
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< OperatorTypeH, VectorTypeH, ValueTypeH >.
Referenced by main().
|
protectedvirtual |
Non-preconditioner solution procedure.
Implements paralution::IterativeLinearSolver< OperatorTypeH, VectorTypeH, ValueTypeH >.
|
protectedvirtual |
Preconditioned solution procedure.
Implements paralution::IterativeLinearSolver< OperatorTypeH, VectorTypeH, ValueTypeH >.
|
virtualinherited |
Solve Operator x = rhs; but set first the init x = 0.
|
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< OperatorTypeH, VectorTypeH, ValueTypeH >.
|
protectedinherited |
Flag == true after building the solver (e.g. Build())
|
private |
|
private |
|
protectedinherited |
|
protectedinherited |
Absolute maximum index of residual vector when using Linf norm.
|
protectedinherited |
Iteration control (monitor)
|
protectedinherited |
Pointer to the operator.
|
private |
|
private |
|
protectedinherited |
Permutation vector (used if the solver performs permutation/re-ordering techniques)
|
protectedinherited |
Pointer to the defined preconditioner.
|
private |
|
private |
|
protectedinherited |
Residual norm res_norm = 1 L1 Norm res_norm = 2 L2 Norm res_norm = 3 Linf Norm.
|
private |
|
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 |