A tag for algebraic multigrid (AMG). Used to transport information from the user to the implementation. More...
#include <amg_base.hpp>
Public Member Functions | |
amg_tag () | |
The constructor, setting default values for the various parameters. More... | |
void | set_coarsening_method (amg_coarsening_method s) |
Sets the strategy used for constructing coarse grids. More... | |
amg_coarsening_method | get_coarsening_method () const |
Returns the current coarsening strategy. More... | |
void | set_interpolation_method (amg_interpolation_method interpol) |
Sets the interpolation method to the provided method. More... | |
amg_interpolation_method | get_interpolation_method () const |
Returns the current interpolation method. More... | |
void | set_strong_connection_threshold (double threshold) |
Sets the strong connection threshold. Customizations by the user essential for best results! More... | |
double | get_strong_connection_threshold () const |
Returns the strong connection threshold parameter. More... | |
void | set_jacobi_weight (double w) |
Sets the weight (damping) for the Jacobi smoother. More... | |
double | get_jacobi_weight () const |
Returns the Jacobi smoother weight (damping). More... | |
void | set_presmooth_steps (vcl_size_t steps) |
Sets the number of smoother applications on the fine level before restriction to the coarser level. More... | |
vcl_size_t | get_presmooth_steps () const |
Returns the number of smoother applications on the fine level before restriction to the coarser level. More... | |
void | set_postsmooth_steps (vcl_size_t steps) |
Sets the number of smoother applications on the coarse level before interpolation to the finer level. More... | |
vcl_size_t | get_postsmooth_steps () const |
Returns the number of smoother applications on the coarse level before interpolation to the finer level. More... | |
void | set_coarse_levels (vcl_size_t levels) |
Sets the number of coarse levels. If set to zero, then coarse levels are constructed until the cutoff size is reached. More... | |
vcl_size_t | get_coarse_levels () const |
Returns the number of coarse levels. If zero, then coarse levels are constructed until the cutoff size is reached. More... | |
void | set_coarsening_cutoff (vcl_size_t size) |
Sets the coarse grid size for which the recursive multigrid scheme is stopped and a direct solver is used. More... | |
vcl_size_t | get_coarsening_cutoff () const |
Returns the coarse grid size for which the recursive multigrid scheme is stopped and a direct solver is used. More... | |
void | set_setup_context (viennacl::context ctx) |
Sets the ViennaCL context for the setup stage. Set this to a host context if you want to run the setup on the host. More... | |
viennacl::context const & | get_setup_context () const |
Returns the ViennaCL context for the preconditioenr setup. More... | |
void | set_target_context (viennacl::context ctx) |
Sets the ViennaCL context for the solver cycle stage (i.e. preconditioner applications). More... | |
viennacl::context const & | get_target_context () const |
Returns the ViennaCL context for the solver cycle stage (i.e. preconditioner applications). More... | |
A tag for algebraic multigrid (AMG). Used to transport information from the user to the implementation.
Definition at line 64 of file amg_base.hpp.
|
inline |
The constructor, setting default values for the various parameters.
Default coarsening routine: Aggreggation based on maximum independent sets of distance (MIS-2) Default interpolation routine: Smoothed aggregation Default threshold for strong connections: 0.1 (customizations are recommeded!) Default weight for Jacobi smoother: 1.0 Default number of pre-smooth operations: 2 Default number of post-smooth operations: 2 Default number of coarse levels: 0 (this indicates that as many coarse levels as needed are constructed until the cutoff is reached) Default coarse grid size for direct solver (coarsening cutoff): 50
Definition at line 78 of file amg_base.hpp.
|
inline |
Returns the number of coarse levels. If zero, then coarse levels are constructed until the cutoff size is reached.
Definition at line 128 of file amg_base.hpp.
|
inline |
Returns the coarse grid size for which the recursive multigrid scheme is stopped and a direct solver is used.
Definition at line 133 of file amg_base.hpp.
|
inline |
Returns the current coarsening strategy.
Definition at line 88 of file amg_base.hpp.
|
inline |
Returns the current interpolation method.
Definition at line 93 of file amg_base.hpp.
|
inline |
Returns the Jacobi smoother weight (damping).
Definition at line 113 of file amg_base.hpp.
|
inline |
Returns the number of smoother applications on the coarse level before interpolation to the finer level.
Definition at line 123 of file amg_base.hpp.
|
inline |
Returns the number of smoother applications on the fine level before restriction to the coarser level.
Definition at line 118 of file amg_base.hpp.
|
inline |
Returns the ViennaCL context for the preconditioenr setup.
Definition at line 142 of file amg_base.hpp.
|
inline |
Returns the strong connection threshold parameter.
Definition at line 105 of file amg_base.hpp.
|
inline |
Returns the ViennaCL context for the solver cycle stage (i.e. preconditioner applications).
Definition at line 150 of file amg_base.hpp.
|
inline |
Sets the number of coarse levels. If set to zero, then coarse levels are constructed until the cutoff size is reached.
Definition at line 126 of file amg_base.hpp.
|
inline |
Sets the coarse grid size for which the recursive multigrid scheme is stopped and a direct solver is used.
Definition at line 131 of file amg_base.hpp.
|
inline |
Sets the strategy used for constructing coarse grids.
Definition at line 86 of file amg_base.hpp.
|
inline |
Sets the interpolation method to the provided method.
Definition at line 91 of file amg_base.hpp.
|
inline |
Sets the weight (damping) for the Jacobi smoother.
The optimal value depends on the problem at hand. Values of 0.67 or 1.0 are usually a good starting point for further experiments.
Definition at line 111 of file amg_base.hpp.
|
inline |
Sets the number of smoother applications on the coarse level before interpolation to the finer level.
Definition at line 121 of file amg_base.hpp.
|
inline |
Sets the number of smoother applications on the fine level before restriction to the coarser level.
Definition at line 116 of file amg_base.hpp.
|
inline |
Sets the ViennaCL context for the setup stage. Set this to a host context if you want to run the setup on the host.
Set the ViennaCL context for the solver application via set_target_context(). Target and setup context can be different.
Definition at line 140 of file amg_base.hpp.
|
inline |
Sets the strong connection threshold. Customizations by the user essential for best results!
With classical interpolation, a connection is considered strong if |a_ij| >= threshold * max_k(|a_ik|) Strength of connection currently ignored for aggregation-based coarsening (to be added in the future).
Definition at line 100 of file amg_base.hpp.
|
inline |
Sets the ViennaCL context for the solver cycle stage (i.e. preconditioner applications).
Since the cycle stage easily benefits from accelerators, you usually want to set this to a CUDA or OpenCL-enabled context.
Definition at line 148 of file amg_base.hpp.