|
PARALUTION
1.0.0
PARALUTION
|
#include <base_amg.hpp>
Public Member Functions | |
| BaseAMG () | |
| virtual | ~BaseAMG () |
| 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 | ClearLocal (void) |
| virtual void | BuildHierarchy (void) |
| Creates AMG hierarchy. More... | |
| virtual void | BuildSmoothers (void) |
| Creates AMG smoothers. More... | |
| virtual void | SetCoarsestLevel (const int coarseSize) |
| Sets coarsest level for hierarchy creation. More... | |
| virtual void | SetManualSmoothers (const bool sm_manual) |
| Sets flag to pass smoothers manually for each level. More... | |
| virtual void | SetManualSolver (const bool s_manual) |
| Sets flag to pass coarse grid solver manually. More... | |
| virtual void | SetDefaultSmootherFormat (const unsigned int op_format) |
| Sets the smoother operator format. More... | |
| virtual void | SetOperatorFormat (const unsigned int op_format) |
| Sets the operator format. More... | |
| virtual int | GetNumLevels () |
| Returns the number of levels in hierarchy. More... | |
| virtual void | SetRestrictOperator (OperatorType **op) |
| disabled function More... | |
| virtual void | SetProlongOperator (OperatorType **op) |
| disabled function More... | |
| virtual void | SetOperatorHierarchy (OperatorType **op) |
| disabled function More... | |
| virtual void | Print (void) const |
| Print information about the solver. More... | |
| virtual void | SetPreconditioner (Solver< OperatorType, VectorType, ValueType > &precond) |
| disabled function More... | |
| virtual void | SetSolver (Solver< OperatorType, VectorType, ValueType > &solver) |
| Set the smoother for each level. More... | |
| virtual void | SetSmoother (IterativeLinearSolver< OperatorType, VectorType, ValueType > **smoother) |
| Set the smoother for each level. More... | |
| virtual void | SetSmootherPreIter (const int iter) |
| Set the number of pre-smoothing steps. More... | |
| virtual void | SetSmootherPostIter (const int iter) |
| Set the number of post-smoothing steps. More... | |
| virtual void | SetScaling (const bool scaling) |
| Enable/disable scaling of intergrid transfers. More... | |
| virtual void | SetCycle (const _cycle cycle) |
| Set the MultiGrid Cycle (default: Vcycle) More... | |
| virtual void | SetKcycleFull (const bool kcycle_full) |
| Set the MultiGrid Kcycle on all levels or only on finest level. More... | |
| virtual void | InitLevels (const int levels) |
| Set the depth of the multigrid solver. More... | |
| virtual void | Solve (const VectorType &rhs, VectorType *x) |
| Called by default the V-cycle. 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 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 | Aggregate (const OperatorType &op, Operator< ValueType > *pro, Operator< ValueType > *res, OperatorType *coarse)=0 |
| Constructs the prolongation, restriction and coarse operator. More... | |
| virtual void | Restrict_ (const VectorType &fine, VectorType *coarse, const int level) |
| virtual void | Prolong_ (const VectorType &coarse, VectorType *fine, const int level) |
| void | Vcycle_ (const VectorType &rhs, VectorType *x) |
| void | Wcycle_ (const VectorType &rhs, VectorType *x) |
| void | Fcycle_ (const VectorType &rhs, VectorType *x) |
| void | Kcycle_ (const VectorType &rhs, VectorType *x) |
| virtual void | SolveNonPrecond_ (const VectorType &rhs, VectorType *x) |
| disabled function More... | |
| virtual void | SolvePrecond_ (const VectorType &rhs, VectorType *x) |
| disabled function 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 | |
| int | coarse_size_ |
| maximal coarse grid size More... | |
| bool | set_sm_ |
| manual smoother or not More... | |
| Solver< OperatorType, VectorType, ValueType > ** | sm_default_ |
| bool | set_s_ |
| manual coarse grid solver or not More... | |
| bool | hierarchy_ |
| true if hierarchy is built More... | |
| unsigned int | sm_format_ |
| smoother operator format More... | |
| unsigned int | op_format_ |
| operator format More... | |
| int | levels_ |
| int | current_level_ |
| bool | scaling_ |
| int | iter_pre_smooth_ |
| int | iter_post_smooth_ |
| int | cycle_ |
| bool | kcycle_full_ |
| double | res_norm_ |
| OperatorType ** | op_level_ |
| Operator< ValueType > ** | restrict_op_level_ |
| Operator< ValueType > ** | prolong_op_level_ |
| VectorType ** | d_level_ |
| VectorType ** | r_level_ |
| VectorType ** | t_level_ |
| VectorType ** | s_level_ |
| VectorType ** | p_level_ |
| VectorType ** | q_level_ |
| VectorType ** | k_level_ |
| VectorType ** | l_level_ |
| Solver< OperatorType, VectorType, ValueType > * | solver_coarse_ |
| IterativeLinearSolver< OperatorType, VectorType, ValueType > ** | smoother_level_ |
| IterationControl | iter_ctrl_ |
| Iteration control (monitor) 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 |
| paralution::BaseAMG< OperatorType, VectorType, ValueType >::BaseAMG | ( | ) |
|
virtual |
|
protectedpure virtual |
Constructs the prolongation, restriction and coarse operator.
Implemented in paralution::AMG< OperatorType, VectorType, ValueType >.
|
virtual |
Build the solver (data allocation, structure computation, numerical computation)
Reimplemented from paralution::BaseMultiGrid< OperatorType, VectorType, ValueType >.
Referenced by main().
|
virtual |
|
virtual |
Creates AMG smoothers.
Reimplemented in paralution::AMG< OperatorType, VectorType, ValueType >.
|
virtual |
Clear (free all local data) the solver.
Reimplemented from paralution::BaseMultiGrid< OperatorType, VectorType, ValueType >.
Referenced by main().
|
virtual |
|
protectedinherited |
|
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().
|
virtual |
Returns the number of levels in hierarchy.
Referenced by main().
|
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.
|
virtualinherited |
Set the depth of the multigrid solver.
|
inherited |
Set the maximum number of iterations.
Referenced by main().
|
inherited |
Set the minimum number of iterations.
|
inherited |
Set the absolute/relative/divergence tolerance.
|
protectedinherited |
|
virtualinherited |
Move all the data (i.e. move the solver) to the accelerator.
Referenced by main(), mexFunction(), and paralution_fortran_solve().
|
protectedvirtualinherited |
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.
|
protectedvirtualinherited |
Move all local data to the host.
Implements paralution::Solver< OperatorType, VectorType, ValueType >.
|
protectedinherited |
Computes the vector norm.
|
virtualinherited |
Print information about the solver.
Implements paralution::Solver< OperatorType, VectorType, ValueType >.
Reimplemented in paralution::AMG< OperatorType, VectorType, ValueType >.
|
protectedvirtualinherited |
Print ending msg of the solver.
Implements paralution::Solver< OperatorType, VectorType, ValueType >.
Reimplemented in paralution::AMG< OperatorType, VectorType, ValueType >.
|
protectedvirtualinherited |
Print starting msg of the solver.
Implements paralution::Solver< OperatorType, VectorType, ValueType >.
Reimplemented in paralution::AMG< OperatorType, VectorType, ValueType >.
|
protectedvirtualinherited |
|
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().
|
protectedvirtualinherited |
|
virtual |
Sets coarsest level for hierarchy creation.
Referenced by main().
|
virtualinherited |
Set the MultiGrid Cycle (default: Vcycle)
|
virtual |
Sets the smoother operator format.
|
virtualinherited |
Set the MultiGrid Kcycle on all levels or only on finest level.
|
virtual |
Sets flag to pass smoothers manually for each level.
Referenced by main().
|
virtual |
Sets flag to pass coarse grid solver manually.
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().
|
virtual |
Sets the operator format.
Referenced by main().
|
virtual |
disabled function
Implements paralution::BaseMultiGrid< OperatorType, VectorType, ValueType >.
|
virtualinherited |
disabled function
Reimplemented from paralution::IterativeLinearSolver< OperatorType, VectorType, ValueType >.
|
virtual |
disabled function
Implements paralution::BaseMultiGrid< OperatorType, VectorType, ValueType >.
|
inherited |
Set the residual norm to L1, L2 or Inf norm resnorm == 1 L1 Norm resnorm == 2 L2 Norm (default) resnorm == 3 Inf Norm.
|
virtual |
disabled function
Implements paralution::BaseMultiGrid< OperatorType, VectorType, ValueType >.
|
virtualinherited |
Enable/disable scaling of intergrid transfers.
Referenced by main().
|
virtualinherited |
Set the smoother for each level.
Referenced by main().
|
virtualinherited |
Set the number of post-smoothing steps.
Referenced by main().
|
virtualinherited |
Set the number of pre-smoothing steps.
Referenced by main().
|
virtualinherited |
Set the smoother for each level.
Referenced by main().
|
virtualinherited |
Called by default the V-cycle.
Reimplemented from paralution::IterativeLinearSolver< OperatorType, VectorType, ValueType >.
Referenced by main().
|
protectedvirtualinherited |
disabled function
Implements paralution::IterativeLinearSolver< OperatorType, VectorType, ValueType >.
|
protectedvirtualinherited |
disabled function
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 >.
|
protectedinherited |
|
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().
|
protectedinherited |
|
protectedinherited |
Flag == true after building the solver (e.g. Build())
|
protected |
maximal coarse grid size
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protected |
true if hierarchy is built
|
protectedinherited |
Absolute maximum index of residual vector when using Linf norm.
|
protectedinherited |
Iteration control (monitor)
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Pointer to the operator.
|
protected |
operator format
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Permutation vector (used if the solver performs permutation/re-ordering techniques)
|
protectedinherited |
Pointer to the defined preconditioner.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protected |
manual coarse grid solver or not
|
protected |
manual smoother or not
|
protected |
|
protected |
smoother operator format
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
Verbose flag verb == 0 no output verb == 1 print info about the solver (start,end); verb == 2 print (iter, residual) via iteration control;.