7.0
general documentation
cs_param_sles.h
Go to the documentation of this file.
1 #ifndef __CS_PARAM_SLES_H__
2 #define __CS_PARAM_SLES_H__
3 
4 /*============================================================================
5  * Routines to handle the SLES settings
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2021 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------*/
29 
30 /*----------------------------------------------------------------------------
31  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_param_types.h"
35 
36 /*----------------------------------------------------------------------------*/
37 
39 
48 /*============================================================================
49  * Macro definitions
50  *============================================================================*/
51 
52 /*============================================================================
53  * Type definitions
54  *============================================================================*/
55 
62 typedef struct {
63 
64  bool setup_done;
65  int verbosity;
66  int field_id;
68  char *name;
81  int n_max_iter;
82  double eps;
85 
86 /*============================================================================
87  * Global variables
88  *============================================================================*/
89 
90 /*============================================================================
91  * Public function prototypes
92  *============================================================================*/
93 
94 /*----------------------------------------------------------------------------*/
104 /*----------------------------------------------------------------------------*/
105 
107 cs_param_sles_create(int field_id,
108  const char *system_name);
109 
110 /*----------------------------------------------------------------------------*/
116 /*----------------------------------------------------------------------------*/
117 
118 void
120 
121 /*----------------------------------------------------------------------------*/
128 /*----------------------------------------------------------------------------*/
129 
130 void
132 
133 /*----------------------------------------------------------------------------*/
140 /*----------------------------------------------------------------------------*/
141 
142 void
144  cs_param_sles_t *dst);
145 
146 /*----------------------------------------------------------------------------*/
155 /*----------------------------------------------------------------------------*/
156 
157 void
158 cs_equation_param_set_saturne_sles(bool use_field_id,
159  cs_param_sles_t *slesp);
160 
161 /*----------------------------------------------------------------------------*/
170 /*----------------------------------------------------------------------------*/
171 
172 void
173 cs_equation_param_set_mumps_sles(bool use_field_id,
174  cs_param_sles_t *slesp);
175 
176 /*----------------------------------------------------------------------------*/
185 /*----------------------------------------------------------------------------*/
186 
187 void
189  cs_param_sles_t *slesp);
190 
191 /*----------------------------------------------------------------------------*/
201 /*----------------------------------------------------------------------------*/
202 
203 int
204 cs_param_sles_set(bool use_field_id,
205  cs_param_sles_t *slesp);
206 
207 /*----------------------------------------------------------------------------*/
208 
210 
211 #endif /* __CS_PARAM_SLES_H__ */
bool setup_done
Definition: cs_param_sles.h:64
cs_param_sles_t * cs_param_sles_create(int field_id, const char *system_name)
Create a cs_param_sles_t structure and assign a default settings.
Definition: cs_param_sles.c:875
double eps
Definition: cs_param_sles.h:82
cs_param_precond_type_t precond
Definition: cs_param_sles.h:72
void cs_param_sles_copy_from(cs_param_sles_t *src, cs_param_sles_t *dst)
Copy a cs_param_sles_t structure from src to dst.
Definition: cs_param_sles.c:1006
cs_param_resnorm_type_t
Definition: cs_param_types.h:722
cs_param_sles_class_t solver_class
Definition: cs_param_sles.h:71
#define BEGIN_C_DECLS
Definition: cs_defs.h:495
void cs_param_sles_log(cs_param_sles_t *slesp)
Log information related to the linear settings stored in the structure.
Definition: cs_param_sles.c:938
cs_param_amg_type_t
Definition: cs_param_types.h:528
cs_param_precond_type_t
Definition: cs_param_types.h:604
cs_param_sles_class_t
Class of iterative solvers to consider for solver the linear system.
Definition: cs_param_types.h:511
int n_max_iter
Definition: cs_param_sles.h:81
cs_param_resnorm_type_t resnorm_type
Definition: cs_param_sles.h:80
void cs_equation_param_set_mumps_sles(bool use_field_id, cs_param_sles_t *slesp)
Set parameters for initializing SLES structures used for the resolution of the linear system...
Definition: cs_param_sles.c:1329
int verbosity
Definition: cs_param_sles.h:65
cs_param_itsol_type_t solver
Definition: cs_param_sles.h:73
void cs_equation_param_set_saturne_sles(bool use_field_id, cs_param_sles_t *slesp)
Set parameters for initializing SLES structures used for the resolution of the linear system...
Definition: cs_param_sles.c:1040
#define END_C_DECLS
Definition: cs_defs.h:496
char * name
Definition: cs_param_sles.h:68
int field_id
Definition: cs_param_sles.h:66
cs_param_itsol_type_t
Definition: cs_param_types.h:691
void cs_param_sles_free(cs_param_sles_t **p_slesp)
Free a cs_param_sles_t structure.
Definition: cs_param_sles.c:913
int cs_param_sles_set(bool use_field_id, cs_param_sles_t *slesp)
Define cs_sles_t structure in accordance with the settings of a cs_param_sles_t structure (SLES = Spa...
Definition: cs_param_sles.c:1445
void cs_equation_param_set_petsc_hypre_sles(bool use_field_id, cs_param_sles_t *slesp)
Set parameters for initializing SLES structures used for the resolution of the linear system...
Definition: cs_param_sles.c:1369
cs_param_amg_type_t amg_type
Definition: cs_param_sles.h:74
Structure storing all metadata related to the resolution of a linear system with an iterative solver...
Definition: cs_param_sles.h:62