12#include "AlephArcane.h"
27: TraceAccessor(nullptr)
28, m_param_epsilon(1.0e-10)
29, m_param_max_iteration(1024)
30, m_param_preconditioner_method(TypesSolver::DIAGONAL)
31, m_param_solver_method(TypesSolver::PCG)
34, m_param_xo_user(false)
35, m_param_check_real_residue(false)
36, m_param_print_real_residue(false)
37, m_param_debug_info(false)
38, m_param_min_rhs_norm(1.e-20)
39, m_param_convergence_analyse(false)
40, m_param_stop_error_strategy(true)
41, m_param_write_matrix_to_file_error_strategy(false)
42, m_param_write_matrix_name_error_strategy(
"SolveErrorAlephMatrix.dbg")
43, m_param_listing_output(false)
44, m_param_threshold(0.0)
45, m_param_print_cpu_time_resolution(false)
46, m_param_amg_coarsening_method(0)
47, m_param_output_level(0)
49, m_param_amg_solver_iterations(1)
50, m_param_amg_smoother_iterations(1)
51, m_param_amg_smootherOption(TypesSolver::SymHybGSJ_smoother)
52, m_param_amg_coarseningOption(TypesSolver::ParallelRugeStuben)
53, m_param_amg_coarseSolverOption(TypesSolver::CG_coarse_solver)
54, m_param_keep_solver_structure(false)
55, m_param_sequential_solver(false)
56, m_param_criteria_stop(TypesSolver::RB)
62AlephParams(ITraceMng* tm,
64 Integer max_iteration,
65 TypesSolver::ePreconditionerMethod preconditioner_method,
66 TypesSolver::eSolverMethod solver_method,
70 bool check_real_residue,
71 bool print_real_residue,
74 bool convergence_analyse,
75 bool stop_error_strategy,
76 bool write_matrix_to_file_error_strategy,
77 String write_matrix_name_error_strategy,
80 bool print_cpu_time_resolution,
81 Integer amg_coarsening_method,
84 Integer amg_solver_iterations,
85 Integer amg_smoother_iterations,
86 TypesSolver::eAmgSmootherOption amg_smootherOption,
87 TypesSolver::eAmgCoarseningOption amg_coarseningOption,
88 TypesSolver::eAmgCoarseSolverOption amg_coarseSolverOption,
89 bool keep_solver_structure,
90 bool sequential_solver,
91 TypesSolver::eCriteriaStop param_criteria_stop)
93, m_param_epsilon(epsilon)
94, m_param_max_iteration(max_iteration)
95, m_param_preconditioner_method(preconditioner_method)
96, m_param_solver_method(solver_method)
99, m_param_xo_user(xo_user)
100, m_param_check_real_residue(check_real_residue)
101, m_param_print_real_residue(print_real_residue)
102, m_param_debug_info(debug_info)
103, m_param_min_rhs_norm(min_rhs_norm)
104, m_param_convergence_analyse(convergence_analyse)
105, m_param_stop_error_strategy(stop_error_strategy)
106, m_param_write_matrix_to_file_error_strategy(write_matrix_to_file_error_strategy)
107, m_param_write_matrix_name_error_strategy(write_matrix_name_error_strategy)
108, m_param_listing_output(listing_output)
109, m_param_threshold(threshold)
110, m_param_print_cpu_time_resolution(print_cpu_time_resolution)
111, m_param_amg_coarsening_method(amg_coarsening_method)
112, m_param_output_level(output_level)
113, m_param_amg_cycle(amg_cycle)
114, m_param_amg_solver_iterations(amg_solver_iterations)
115, m_param_amg_smoother_iterations(amg_smoother_iterations)
116, m_param_amg_smootherOption(amg_smootherOption)
117, m_param_amg_coarseningOption(amg_coarseningOption)
118, m_param_amg_coarseSolverOption(amg_coarseSolverOption)
119, m_param_keep_solver_structure(keep_solver_structure)
120, m_param_sequential_solver(sequential_solver)
121, m_param_criteria_stop(param_criteria_stop)
133void AlephParams::setEpsilon(
const Real epsilon)
135 m_param_epsilon = epsilon;
137void AlephParams::setMaxIter(
const Integer max_iteration)
139 m_param_max_iteration = max_iteration;
141void AlephParams::setPrecond(
const TypesSolver::ePreconditionerMethod preconditioner_method)
143 m_param_preconditioner_method = preconditioner_method;
145void AlephParams::setMethod(
const TypesSolver::eSolverMethod solver_method)
147 m_param_solver_method = solver_method;
149void AlephParams::setAlpha(
const Real alpha)
151 m_param_alpha = alpha;
153void AlephParams::setGamma(
const Integer gamma)
155 m_param_gamma = gamma;
157void AlephParams::setXoUser(
const bool xo_user)
159 m_param_xo_user = xo_user;
161void AlephParams::setCheckRealResidue(
const bool check_real_residue)
163 m_param_check_real_residue = check_real_residue;
165void AlephParams::setPrintRealResidue(
const bool print_real_residue)
167 m_param_print_real_residue = print_real_residue;
169void AlephParams::setDebugInfo(
const bool debug_info)
171 m_param_debug_info = debug_info;
173void AlephParams::setMinRHSNorm(
const Real min_rhs_norm)
175 m_param_min_rhs_norm = min_rhs_norm;
177void AlephParams::setConvergenceAnalyse(
const bool convergence_analyse)
179 m_param_convergence_analyse = convergence_analyse;
181void AlephParams::setStopErrorStrategy(
const bool stop_error_strategy)
183 m_param_stop_error_strategy = stop_error_strategy;
185void AlephParams::setWriteMatrixToFileErrorStrategy(
const bool write_matrix_to_file_error_strategy)
187 m_param_write_matrix_to_file_error_strategy = write_matrix_to_file_error_strategy;
189void AlephParams::setWriteMatrixNameErrorStrategy(
const String& write_matrix_name_error_strategy)
191 m_param_write_matrix_name_error_strategy = write_matrix_name_error_strategy;
193void AlephParams::setDDMCParameterListingOutput(
const bool listing_output)
195 m_param_listing_output = listing_output;
197void AlephParams::setDDMCParameterAmgDiagonalThreshold(
const Real threshold)
199 m_param_threshold = threshold;
201void AlephParams::setPrintCpuTimeResolution(
const bool print_cpu_time_resolution)
203 m_param_print_cpu_time_resolution = print_cpu_time_resolution;
207setAmgCoarseningMethod(
const TypesSolver::eAmgCoarseningMethod method)
210 case TypesSolver::AMG_COARSENING_AUTO:
211 m_param_amg_coarsening_method = 6;
213 case TypesSolver::AMG_COARSENING_HYPRE_0:
214 m_param_amg_coarsening_method = 0;
216 case TypesSolver::AMG_COARSENING_HYPRE_1:
217 m_param_amg_coarsening_method = 1;
219 case TypesSolver::AMG_COARSENING_HYPRE_3:
220 m_param_amg_coarsening_method = 3;
222 case TypesSolver::AMG_COARSENING_HYPRE_6:
223 m_param_amg_coarsening_method = 6;
225 case TypesSolver::AMG_COARSENING_HYPRE_7:
226 m_param_amg_coarsening_method = 7;
228 case TypesSolver::AMG_COARSENING_HYPRE_8:
229 m_param_amg_coarsening_method = 8;
231 case TypesSolver::AMG_COARSENING_HYPRE_9:
232 m_param_amg_coarsening_method = 9;
234 case TypesSolver::AMG_COARSENING_HYPRE_10:
235 m_param_amg_coarsening_method = 10;
237 case TypesSolver::AMG_COARSENING_HYPRE_11:
238 m_param_amg_coarsening_method = 11;
240 case TypesSolver::AMG_COARSENING_HYPRE_21:
241 m_param_amg_coarsening_method = 21;
243 case TypesSolver::AMG_COARSENING_HYPRE_22:
244 m_param_amg_coarsening_method = 22;
247 throw NotImplementedException(A_FUNCINFO);
250void AlephParams::setOutputLevel(
const Integer output_level)
252 m_param_output_level = output_level;
254void AlephParams::setAmgCycle(
const Integer amg_cycle)
256 m_param_amg_cycle = amg_cycle;
258void AlephParams::setAmgSolverIter(
const Integer amg_solver_iterations)
260 m_param_amg_solver_iterations = amg_solver_iterations;
262void AlephParams::setAmgSmootherIter(
const Integer amg_smoother_iterations)
264 m_param_amg_smoother_iterations = amg_smoother_iterations;
266void AlephParams::setAmgSmootherOption(
const TypesSolver::eAmgSmootherOption amg_smootherOption)
268 m_param_amg_smootherOption = amg_smootherOption;
270void AlephParams::setAmgCoarseningOption(
const TypesSolver::eAmgCoarseningOption amg_coarseningOption)
272 m_param_amg_coarseningOption = amg_coarseningOption;
274void AlephParams::setAmgCoarseSolverOption(
const TypesSolver::eAmgCoarseSolverOption amg_coarseSolverOption)
276 m_param_amg_coarseSolverOption = amg_coarseSolverOption;
278void AlephParams::setKeepSolverStructure(
const bool keep_solver_structure)
280 m_param_keep_solver_structure = keep_solver_structure;
282void AlephParams::setSequentialSolver(
const bool sequential_solver)
284 m_param_sequential_solver = sequential_solver;
286void AlephParams::setCriteriaStop(
const TypesSolver::eCriteriaStop criteria_stop)
288 m_param_criteria_stop = criteria_stop;
292Real AlephParams::epsilon()
const
294 return m_param_epsilon;
296int AlephParams::maxIter()
const
298 return m_param_max_iteration;
300Real AlephParams::alpha()
const
302 return m_param_alpha;
304int AlephParams::gamma()
const
306 return m_param_gamma;
308TypesSolver::ePreconditionerMethod AlephParams::precond()
310 return m_param_preconditioner_method;
312TypesSolver::eSolverMethod AlephParams::method()
314 return m_param_solver_method;
316bool AlephParams::xoUser()
const
318 return m_param_xo_user;
320bool AlephParams::checkRealResidue()
const
322 return m_param_check_real_residue;
324bool AlephParams::printRealResidue()
const
326 return m_param_print_real_residue;
328bool AlephParams::debugInfo()
330 return m_param_debug_info;
332Real AlephParams::minRHSNorm()
334 return m_param_min_rhs_norm;
336bool AlephParams::convergenceAnalyse()
338 return m_param_convergence_analyse;
340bool AlephParams::stopErrorStrategy()
342 return m_param_stop_error_strategy;
344bool AlephParams::writeMatrixToFileErrorStrategy()
346 return m_param_write_matrix_to_file_error_strategy;
348String AlephParams::writeMatrixNameErrorStrategy()
350 return m_param_write_matrix_name_error_strategy;
352bool AlephParams::DDMCParameterListingOutput()
const
354 return m_param_listing_output;
356Real AlephParams::DDMCParameterAmgDiagonalThreshold()
const
358 return m_param_threshold;
360bool AlephParams::printCpuTimeResolution()
const
362 return m_param_print_cpu_time_resolution;
364int AlephParams::amgCoarseningMethod()
const
366 return m_param_amg_coarsening_method;
368int AlephParams::getOutputLevel()
const
370 return m_param_output_level;
372int AlephParams::getAmgCycle()
const
374 return m_param_amg_cycle;
376int AlephParams::getAmgSolverIter()
const
378 return m_param_amg_solver_iterations;
380int AlephParams::getAmgSmootherIter()
const
382 return m_param_amg_smoother_iterations;
384TypesSolver::eAmgSmootherOption AlephParams::getAmgSmootherOption()
const
386 return m_param_amg_smootherOption;
388TypesSolver::eAmgCoarseningOption AlephParams::getAmgCoarseningOption()
const
390 return m_param_amg_coarseningOption;
392TypesSolver::eAmgCoarseSolverOption AlephParams::getAmgCoarseSolverOption()
const
394 return m_param_amg_coarseSolverOption;
396bool AlephParams::getKeepSolverStructure()
const
398 return m_param_keep_solver_structure;
400bool AlephParams::getSequentialSolver()
const
402 return m_param_sequential_solver;
404TypesSolver::eCriteriaStop AlephParams::getCriteriaStop()
const
406 return m_param_criteria_stop;
Lecteur des fichiers de maillage via la bibliothèque LIMA.