1 #ifndef VIENNACL_LINALG_DETAIL_AMG_AMG_BASE_HPP_
2 #define VIENNACL_LINALG_DETAIL_AMG_AMG_BASE_HPP_
34 #ifdef VIENNACL_WITH_OPENMP
80 strong_connection_threshold_(0.1), jacobi_weight_(1.0),
81 presmooth_steps_(2), postsmooth_steps_(2),
82 coarse_levels_(0), coarse_cutoff_(50) {}
155 double strong_connection_threshold_, jacobi_weight_;
156 vcl_size_t presmooth_steps_, postsmooth_steps_, coarse_levels_, coarse_cutoff_;
viennacl::context const & get_setup_context() const
Returns the ViennaCL context for the preconditioenr setup.
amg_coarsening_method get_coarsening_method() const
Returns the current coarsening strategy.
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 setu...
void set_strong_connection_threshold(double threshold)
Sets the strong connection threshold. Customizations by the user essential for best results! ...
void set_jacobi_weight(double w)
Sets the weight (damping) for the Jacobi smoother.
void set_target_context(viennacl::context ctx)
Sets the ViennaCL context for the solver cycle stage (i.e. preconditioner applications).
double get_jacobi_weight() const
Returns the Jacobi smoother weight (damping).
vcl_size_t get_presmooth_steps() const
Returns the number of smoother applications on the fine level before restriction to the coarser level...
void set_postsmooth_steps(vcl_size_t steps)
Sets the number of smoother applications on the coarse level before interpolation to the finer level...
vcl_size_t get_postsmooth_steps() const
Returns the number of smoother applications on the coarse level before interpolation to the finer lev...
vcl_size_t get_coarsening_cutoff() const
Returns the coarse grid size for which the recursive multigrid scheme is stopped and a direct solver ...
Implementation of a OpenCL-like context, which serves as a unification of {OpenMP, CUDA, OpenCL} at the user API.
Represents a generic 'context' similar to an OpenCL context, but is backend-agnostic and thus also su...
viennacl::context const & get_target_context() const
Returns the ViennaCL context for the solver cycle stage (i.e. preconditioner applications).
vcl_size_t size(VectorType const &vec)
Generic routine for obtaining the size of a vector (ViennaCL, uBLAS, etc.)
void set_interpolation_method(amg_interpolation_method interpol)
Sets the interpolation method to the provided method.
void set_presmooth_steps(vcl_size_t steps)
Sets the number of smoother applications on the fine level before restriction to the coarser level...
double get_strong_connection_threshold() const
Returns the strong connection threshold parameter.
void resize(size_type new_size, bool preserve=true)
Resizes the allocated memory for the vector. Pads the memory to be a multiple of 'AlignmentV'.
void set_coarsening_method(amg_coarsening_method s)
Sets the strategy used for constructing coarse grids.
vcl_size_t get_coarse_levels() const
Returns the number of coarse levels. If zero, then coarse levels are constructed until the cutoff siz...
A tag for algebraic multigrid (AMG). Used to transport information from the user to the implementatio...
void switch_context(viennacl::context ctx)
viennacl::vector< unsigned int > point_types_
amg_interpolation_method get_interpolation_method() const
Returns the current interpolation method.
amg_coarsening_method
Enumeration of coarsening methods for algebraic multigrid.
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 ...
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...
amg_tag()
The constructor, setting default values for the various parameters.
viennacl::vector< unsigned int > coarse_id_
viennacl::vector< unsigned int > influence_values_
amg_interpolation_method
Enumeration of interpolation methods for algebraic multigrid.
viennacl::vector< unsigned int > influence_ids_
enum viennacl::linalg::detail::amg::amg_level_context::@21 amg_point_types
void switch_memory_context(viennacl::context new_ctx)
void resize(vcl_size_t num_points, vcl_size_t max_nnz)
viennacl::vector< unsigned int > influence_jumper_