19 #ifdef DEAL_II_WITH_PETSC
32 PETScAMGPreconditioner::PETScAMGPreconditioner(
33 const std::string &name,
34 const bool symmetric_operator,
35 const double strong_threshold,
36 const double max_row_sum,
37 const unsigned int aggressive_coarsening_num_levels,
38 const bool output_details,
42 const unsigned int n_sweeps_coarse,
44 const unsigned int max_iter,
48 , symmetric_operator(symmetric_operator)
49 , strong_threshold(strong_threshold)
50 , max_row_sum(max_row_sum)
51 , aggressive_coarsening_num_levels(aggressive_coarsening_num_levels)
52 , output_details(output_details)
53 , relaxation_type_up(relaxation_type_up)
54 , relaxation_type_down(relaxation_type_down)
55 , relaxation_type_coarse(relaxation_type_coarse)
56 , n_sweeps_coarse(n_sweeps_coarse)
70 "Set this flag to true if you have a symmetric system matrix and you want "
71 "to use a solver which assumes a symmetric preconditioner like CG.");
76 "Threshold of when nodes are considered strongly connected. See "
77 "HYPRE_BoomerAMGSetStrongThreshold(). Recommended values are 0.25 for 2d "
78 "and 0.5 for 3d problems, but it is problem dependent.");
83 "If set to a value smaller than 1.0 then diagonally dominant parts "
84 "of the matrix are treated as having no strongly connected nodes. If "
85 "the row sum weighted by the diagonal entry is bigger than the given "
86 "value, it is considered diagonally dominant. This feature is turned "
87 "of by setting the value to 1.0. This is the default as some matrices "
88 "can result in having only diagonally dominant entries and thus no "
89 "multigrid levels are constructed. The default in BoomerAMG for this "
90 "is 0.9. When you try this, check for a reasonable number of levels "
94 "Aggressive coarsening num levels",
96 "Number of levels of aggressive coarsening. Increasing this value "
97 "reduces the construction time and memory requirements but may "
98 "decrease effectiveness.");
103 "Setting this flag to true produces debug output from HYPRE, when the "
104 "preconditioner is constructed.");
119 const dealii::PETScWrappers::MatrixBase &matrix)
121 dealii::PETScWrappers::PreconditionBoomerAMG::AdditionalData data;
void add_parameter(const std::string &entry, ParameterType ¶meter, const std::string &documentation="", ParameterHandler &prm_=prm, const Patterns::PatternBase &pattern=*Patterns::Tools::Convert< ParameterType >::to_pattern())
double strong_threshold
Threshold of when nodes are considered strongly connected.
unsigned int aggressive_coarsening_num_levels
Number of levels of aggressive coarsening.
bool symmetric_operator
Set this flag to true if you have a symmetric system matrix and you want to use a solver which assume...
RelaxationType relaxation_type_coarse
Choose relaxation type coarse.
PETScWrappers::PreconditionBoomerAMG::AdditionalData::RelaxationType RelaxationType
unsigned int n_sweeps_coarse
Choose number of sweeps on coarse grid.
RelaxationType relaxation_type_up
Choose relaxation type up.
double tol
Choose BommerAMG tolerance.
void add_parameters()
Declare preconditioner options.
double max_row_sum
If set to a value smaller than 1.0 then diagonally dominant parts of the matrix are treated as having...
bool w_cycle
Defines whether a w-cycle should be used instead of the standard setting of a v-cycle.
unsigned int max_iter
Choose BommerAMG maximum number of cycles.
RelaxationType relaxation_type_down
Choose relaxation type down.
bool output_details
Setting this flag to true produces debug output from HYPRE, when the preconditioner is constructed.