18 #ifdef DEAL_II_WITH_TRILINOS
28 AMGPreconditioner::AMGPreconditioner(
const std::string &name,
30 const bool &higher_order_elements,
31 const unsigned int &n_cycles,
33 const double &aggregation_threshold,
34 const unsigned int &smoother_sweeps,
35 const unsigned int &smoother_overlap,
36 const bool &output_details,
37 const std::string &smoother_type,
38 const std::string &coarse_type)
42 , higher_order_elements(higher_order_elements)
45 , aggregation_threshold(aggregation_threshold)
46 , smoother_sweeps(smoother_sweeps)
47 , smoother_overlap(smoother_overlap)
48 , output_details(output_details)
49 , smoother_type(smoother_type)
50 , coarse_type(coarse_type)
61 "Determines whether the AMG preconditioner should be optimized for "
62 "elliptic problems (ML option smoothed aggregation SA, using a "
63 "Chebyshev smoother) or for non-elliptic problems (ML option "
64 "non-symmetric smoothed aggregation NSSA, smoother is SSOR with "
68 "High Order Elements",
70 "Determines whether the matrix that the preconditioner is built upon is "
71 "generated from linear or higher-order elements.");
76 "Defines how many multigrid cycles should be performed by the "
82 "defines whether a w-cycle should be used instead of the standard "
83 "setting of a v-cycle.");
86 "Aggregation threshold",
88 "This threshold tells the AMG setup how the coarsening should be "
89 "performed. In the AMG used by ML, all points that strongly couple with "
90 "the tentative coarse-level point form one aggregate. The term strong "
91 "coupling is controlled by the variable aggregation_threshold, meaning "
92 "that all elements that are not smaller than aggregation_threshold "
93 "times the diagonal element do couple strongly.");
98 "Determines how many sweeps of the smoother should be performed. When "
99 "the flag elliptic is set to true, i.e., for elliptic or almost "
100 "elliptic problems, the polynomial degree of the Chebyshev smoother is "
101 "set to smoother_sweeps. The term sweeps refers to the number of "
102 "matrix-vector products performed in the Chebyshev case. In the "
103 "non-elliptic case, smoother_sweeps sets the number of SSOR relaxation "
104 "sweeps for post-smoothing to be performed.");
109 "Determines the overlap in the SSOR/Chebyshev error smoother when run "
115 "If this flag is set to true, then internal information from the ML "
116 "preconditioner is printed to screen. This can be useful when debugging "
117 "the preconditioner.");
122 "Determines which smoother to use for the AMG cycle.",
125 "|Aztec|IFPACK|Jacobi"
126 "|ML symmetric Gauss-Seidel|symmetric Gauss-Seidel"
127 "|ML Gauss-Seidel|Gauss-Seidel|block Gauss-Seidel"
128 "|symmetric block Gauss-Seidel|Chebyshev|MLS|Hiptmair"
129 "|Amesos-KLU|Amesos-Superlu|Amesos-UMFPACK|Amesos-Superludist"
130 "|Amesos-MUMPS|user-defined|SuperLU|IFPACK-Chebyshev|self"
131 "|do-nothing|IC|ICT|ILU|ILUT|Block Chebyshev"
132 "|IFPACK-Block Chebyshev"));
137 "Determines which solver to use on the coarsest level. The same "
138 "settings as for the smoother type are possible.",
141 "|Aztec|IFPACK|Jacobi"
142 "|ML symmetric Gauss-Seidel|symmetric Gauss-Seidel"
143 "|ML Gauss-Seidel|Gauss-Seidel|block Gauss-Seidel"
144 "|symmetric block Gauss-Seidel|Chebyshev|MLS|Hiptmair"
145 "|Amesos-KLU|Amesos-Superlu|Amesos-UMFPACK|Amesos-Superludist"
146 "|Amesos-MUMPS|user-defined|SuperLU|IFPACK-Chebyshev|self"
147 "|do-nothing|IC|ICT|ILU|ILUT|Block Chebyshev"
148 "|IFPACK-Block Chebyshev"));
155 const std::vector<std::vector<bool>> &constant_modes)
162 template <
typename Matrix>
185 dealii::TrilinosWrappers::SparseMatrix>(
186 const dealii::TrilinosWrappers::SparseMatrix &);
190 ParsedLAC::AMGPreconditioner::initialize<dealii::SparseMatrix<double>>(
191 const dealii::SparseMatrix<double> &);
static ParameterHandler prm
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())
void initialize(const SparseMatrix &matrix, const AdditionalData &additional_data=AdditionalData())
bool elliptic
Determines whether the AMG preconditioner should be optimized for elliptic problems (ML option smooth...
double aggregation_threshold
This threshold tells the AMG setup how the coarsening should be performed.
void add_parameters()
Declare preconditioner options.
unsigned int n_cycles
Defines how many multigrid cycles should be performed by the preconditioner.
std::string smoother_type
Determines which smoother to use for the AMG cycle.
std::string coarse_type
Determines which solver to use on the coarsest level.
bool w_cycle
Defines whether a w-cycle should be used instead of the standard setting of a v-cycle.
std::vector< std::vector< bool > > constant_modes
Constant modes of the matrix.
bool output_details
If this flag is set to true, then internal information from the ML preconditioner is printed to scree...
unsigned int smoother_overlap
Determines the overlap in the SSOR/Chebyshev error smoother when run in parallel.
void set_constant_modes(const std::vector< std::vector< bool >> &constant_modes)
Set the constant modes of the AMG preconditioner.
void initialize(const Matrix &matrix)
Initialize the preconditioner using matrix.
bool higher_order_elements
Determines whether the matrix that the preconditioner is built upon is generated from linear or highe...
unsigned int smoother_sweeps
Determines how many sweeps of the smoother should be performed.
std::vector< std::vector< bool > > constant_modes
double aggregation_threshold
unsigned int smoother_sweeps
bool higher_order_elements
unsigned int smoother_overlap
const char * smoother_type