101 amg_type = AMGType::ML;
103#ifdef DEAL_II_WITH_TRILINOS
104 ml_data.smoother_sweeps = 1;
105 ml_data.n_cycles = 1;
106 ml_data.smoother_type =
"ILU";
109#ifdef DEAL_II_WITH_PETSC
110 boomer_data.n_sweeps_coarse = 1;
111 boomer_data.max_iter = 1;
112 boomer_data.relaxation_type_down =
113 dealii::PETScWrappers::PreconditionBoomerAMG::AdditionalData::RelaxationType::Chebyshev;
114 boomer_data.relaxation_type_up =
115 dealii::PETScWrappers::PreconditionBoomerAMG::AdditionalData::RelaxationType::Chebyshev;
116 boomer_data.relaxation_type_coarse =
117 dealii::PETScWrappers::PreconditionBoomerAMG::AdditionalData::RelaxationType::Chebyshev;
122 print(dealii::ConditionalOStream
const & pcout)
const
124 print_parameter(pcout,
" AMG type", amg_type);
126 if(amg_type == AMGType::ML)
128#ifdef DEAL_II_WITH_TRILINOS
129 print_parameter(pcout,
" Smoother sweeps", ml_data.smoother_sweeps);
130 print_parameter(pcout,
" Number of cycles", ml_data.n_cycles);
131 print_parameter(pcout,
" Smoother type", ml_data.smoother_type);
134 else if(amg_type == AMGType::BoomerAMG)
136#ifdef DEAL_II_WITH_PETSC
137 print_parameter(pcout,
" Smoother sweeps", boomer_data.n_sweeps_coarse);
138 print_parameter(pcout,
" Number of cycles", boomer_data.max_iter);
139 print_parameter(pcout,
" Smoother type down", boomer_data.relaxation_type_down);
140 print_parameter(pcout,
" Smoother type up", boomer_data.relaxation_type_up);
141 print_parameter(pcout,
" Smoother type coarse", boomer_data.relaxation_type_coarse);
146 AssertThrow(
false, dealii::ExcNotImplemented());
152#ifdef DEAL_II_WITH_TRILINOS
153 dealii::TrilinosWrappers::PreconditionAMG::AdditionalData ml_data;
156#ifdef DEAL_II_WITH_PETSC
157 dealii::PETScWrappers::PreconditionBoomerAMG::AdditionalData boomer_data;
172 : smoother(MultigridSmoother::Chebyshev),
173 preconditioner(PreconditionerSmoother::PointJacobi),
175 relaxation_factor(0.8),
177 iterations_eigenvalue_estimation(20)
182 print(dealii::ConditionalOStream
const & pcout)
const
184 print_parameter(pcout,
"Smoother", smoother);
185 print_parameter(pcout,
"Preconditioner smoother", preconditioner);
186 print_parameter(pcout,
"Iterations smoother", iterations);
188 if(smoother == MultigridSmoother::Jacobi)
190 print_parameter(pcout,
"Relaxation factor", relaxation_factor);
193 if(smoother == MultigridSmoother::Chebyshev)
195 print_parameter(pcout,
"Smoothing range", smoothing_range);
196 print_parameter(pcout,
"Iterations eigenvalue estimation", iterations_eigenvalue_estimation);
201 MultigridSmoother smoother;
204 PreconditionerSmoother preconditioner;
207 unsigned int iterations;
210 double relaxation_factor;
213 double smoothing_range;
216 unsigned int iterations_eigenvalue_estimation;
222 : solver(MultigridCoarseGridSolver::Chebyshev),
223 preconditioner(MultigridCoarseGridPreconditioner::PointJacobi),
230 print(dealii::ConditionalOStream
const & pcout)
const
232 print_parameter(pcout,
"Coarse grid solver", solver);
233 print_parameter(pcout,
"Coarse grid preconditioner", preconditioner);
235 solver_data.print(pcout);
237 if(solver == MultigridCoarseGridSolver::AMG or
238 preconditioner == MultigridCoarseGridPreconditioner::AMG)
240 amg_data.print(pcout);
245 MultigridCoarseGridSolver solver;
248 MultigridCoarseGridPreconditioner preconditioner;
261 : type(MultigridType::hMG),
262 p_sequence(PSequenceType::Bisect),
269 print(dealii::ConditionalOStream
const & pcout)
const
271 print_parameter(pcout,
"Multigrid type", type);
273 if(involves_p_transfer())
275 print_parameter(pcout,
"p-sequence", p_sequence);
278 smoother_data.print(pcout);
280 coarse_problem.print(pcout);
284 involves_h_transfer()
const;
287 involves_c_transfer()
const;
290 involves_p_transfer()
const;
296 PSequenceType p_sequence;