Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
AlephParams.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* AlephParams.h (C) 2010 */
9/* */
10/*---------------------------------------------------------------------------*/
11#ifndef ALEPH_PARAMS_H
12#define ALEPH_PARAMS_H
13/*---------------------------------------------------------------------------*/
14/*---------------------------------------------------------------------------*/
15
16#include "arcane/aleph/AlephGlobal.h"
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
21namespace Arcane
22{
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
30class ARCANE_ALEPH_EXPORT AlephParams
31: public TraceAccessor
32{
33 public:
34
35 AlephParams();
36 AlephParams(ITraceMng*, Real, Integer,
37 Integer,
38 Integer,
39 Integer, Real, bool, bool, bool, bool, Real, bool, bool, bool,
41 TypesSolver::eAmgSmootherOption,
42 TypesSolver::eAmgCoarseningOption,
43 TypesSolver::eAmgCoarseSolverOption,
44 bool, bool,
45 TypesSolver::eCriteriaStop);
46 AlephParams(ITraceMng*, Real, Integer,
47 TypesSolver::ePreconditionerMethod,
48 TypesSolver::eSolverMethod,
49 Integer, Real, bool, bool, bool, bool, Real, bool, bool, bool,
51 TypesSolver::eAmgSmootherOption,
52 TypesSolver::eAmgCoarseningOption,
53 TypesSolver::eAmgCoarseSolverOption,
54 bool, bool,
55 TypesSolver::eCriteriaStop);
56 ~AlephParams();
57
58 // set
59 void setEpsilon(const Real epsilon);
60 void setMaxIter(const Integer max_iteration);
61 void setPrecond(const TypesSolver::ePreconditionerMethod preconditioner_method);
62 void setMethod(const TypesSolver::eSolverMethod solver_method);
63 void setAlpha(const Real alpha);
64 void setGamma(const Integer gamma);
65 void setXoUser(const bool xo_user);
66 void setCheckRealResidue(const bool check_real_residue);
67 void setPrintRealResidue(const bool print_real_residue);
68 void setDebugInfo(const bool debug_info);
69 void setMinRHSNorm(const Real min_rhs_norm);
70 void setConvergenceAnalyse(const bool convergence_analyse);
71 void setStopErrorStrategy(const bool stop_error_strategy);
72 void setWriteMatrixToFileErrorStrategy(const bool write_matrix_to_file_error_strategy);
73 void setWriteMatrixNameErrorStrategy(const String& write_matrix_name_error_strategy);
74 void setDDMCParameterListingOutput(const bool listing_output);
75 void setDDMCParameterAmgDiagonalThreshold(const Real threshold);
76 void setPrintCpuTimeResolution(const bool print_cpu_time_resolution);
77 void setAmgCoarseningMethod(const TypesSolver::eAmgCoarseningMethod method);
78 void setOutputLevel(const Integer output_level);
79 void setAmgCycle(const Integer amg_cycle);
80 void setAmgSolverIter(const Integer amg_solver_iterations);
81 void setAmgSmootherIter(const Integer amg_smoother_iterations);
82 void setAmgSmootherOption(const TypesSolver::eAmgSmootherOption amg_smootherOption);
83 void setAmgCoarseningOption(const TypesSolver::eAmgCoarseningOption amg_coarseningOption);
84 void setAmgCoarseSolverOption(const TypesSolver::eAmgCoarseSolverOption amg_coarseSolverOption);
85 void setKeepSolverStructure(const bool keep_solver_structure);
86 void setSequentialSolver(const bool sequential_solver);
87 void setCriteriaStop(const TypesSolver::eCriteriaStop criteria_stop);
88
89 // get
90 Real epsilon() const;
91 int maxIter() const;
92 Real alpha() const;
93 int gamma() const;
94 TypesSolver::ePreconditionerMethod precond();
95 TypesSolver::eSolverMethod method();
96 bool xoUser() const;
97 bool checkRealResidue() const;
98 bool printRealResidue() const;
99 bool debugInfo();
100 Real minRHSNorm();
101 bool convergenceAnalyse();
102 bool stopErrorStrategy();
103 bool writeMatrixToFileErrorStrategy();
104 String writeMatrixNameErrorStrategy();
105 bool DDMCParameterListingOutput() const;
106 Real DDMCParameterAmgDiagonalThreshold() const;
107 bool printCpuTimeResolution() const;
108 int amgCoarseningMethod() const;
109 int getOutputLevel() const;
110 int getAmgCycle() const;
111 int getAmgSolverIter() const;
112 int getAmgSmootherIter() const;
113 TypesSolver::eAmgSmootherOption getAmgSmootherOption() const;
114 TypesSolver::eAmgCoarseningOption getAmgCoarseningOption() const;
115 TypesSolver::eAmgCoarseSolverOption getAmgCoarseSolverOption() const;
116 bool getKeepSolverStructure() const;
117 bool getSequentialSolver() const;
118 TypesSolver::eCriteriaStop getCriteriaStop() const;
119
120 private:
121
122 Real m_param_epsilon; // convergence epsilon
123 Integer m_param_max_iteration; // max number of iterations
124 TypesSolver::ePreconditionerMethod m_param_preconditioner_method; // preconditioner used (default DIAG)
125 TypesSolver::eSolverMethod m_param_solver_method; // default PCG solution method
126 Integer m_param_gamma; // intended for preconditioner parameterization
127 Real m_param_alpha; // intended for preconditioner parameterization
128 bool m_param_xo_user; // allows the user to initialize the PGC with an Xo different from zero
129 bool m_param_check_real_residue;
130 bool m_param_print_real_residue;
131 bool m_param_debug_info;
132 Real m_param_min_rhs_norm;
133 bool m_param_convergence_analyse;
134 bool m_param_stop_error_strategy;
135 bool m_param_write_matrix_to_file_error_strategy;
136 String m_param_write_matrix_name_error_strategy;
137 bool m_param_listing_output;
138 Real m_param_threshold;
139 bool m_param_print_cpu_time_resolution;
140 Integer m_param_amg_coarsening_method;
141 Integer m_param_output_level;
142 Integer m_param_amg_cycle;
143 Integer m_param_amg_solver_iterations;
144 Integer m_param_amg_smoother_iterations;
145 TypesSolver::eAmgSmootherOption m_param_amg_smootherOption;
146 TypesSolver::eAmgCoarseningOption m_param_amg_coarseningOption;
147 TypesSolver::eAmgCoarseSolverOption m_param_amg_coarseSolverOption;
148 bool m_param_keep_solver_structure;
149 bool m_param_sequential_solver;
150 TypesSolver::eCriteriaStop m_param_criteria_stop;
151};
152
153/*---------------------------------------------------------------------------*/
154/*---------------------------------------------------------------------------*/
155
156} // namespace Arcane
157
158/*---------------------------------------------------------------------------*/
159/*---------------------------------------------------------------------------*/
160
161#endif
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.
double Real
Type representing a real number.