7.1
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;
78 
83 
89  int n_max_iter;
90  int restart;
91  double eps;
94 
95 /*============================================================================
96  * Global variables
97  *============================================================================*/
98 
99 /*============================================================================
100  * Public function prototypes
101  *============================================================================*/
102 
103 /*----------------------------------------------------------------------------*/
113 /*----------------------------------------------------------------------------*/
114 
116 cs_param_sles_create(int field_id,
117  const char *system_name);
118 
119 /*----------------------------------------------------------------------------*/
125 /*----------------------------------------------------------------------------*/
126 
127 void
129 
130 /*----------------------------------------------------------------------------*/
137 /*----------------------------------------------------------------------------*/
138 
139 void
141 
142 /*----------------------------------------------------------------------------*/
149 /*----------------------------------------------------------------------------*/
150 
151 void
153  cs_param_sles_t *dst);
154 
155 /*----------------------------------------------------------------------------*/
165 /*----------------------------------------------------------------------------*/
166 
167 int
168 cs_param_sles_set(bool use_field_id,
169  cs_param_sles_t *slesp);
170 
171 /*----------------------------------------------------------------------------*/
181 /*----------------------------------------------------------------------------*/
182 
185 
186 
187 #if defined(HAVE_PETSC)
188 /*----------------------------------------------------------------------------*/
197 /*----------------------------------------------------------------------------*/
198 
199 void
200 cs_param_sles_petsc_cmd(bool use_prefix,
201  const char *prefix,
202  const char *keyword,
203  const char *keyval);
204 #endif
205 
206 /*----------------------------------------------------------------------------*/
207 
209 
210 #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:1735
double eps
Definition: cs_param_sles.h:91
cs_param_precond_type_t precond
Definition: cs_param_sles.h:72
cs_param_precond_block_t pcd_block_type
Definition: cs_param_sles.h:82
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:1884
cs_param_resnorm_type_t
Definition: cs_param_types.h:901
cs_param_sles_class_t solver_class
Definition: cs_param_sles.h:71
#define BEGIN_C_DECLS
Definition: cs_defs.h:510
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:1806
cs_param_amg_type_t
Definition: cs_param_types.h:562
cs_param_precond_type_t
Definition: cs_param_types.h:763
cs_param_precond_block_t
Definition: cs_param_types.h:688
cs_param_sles_class_t
Class of iterative solvers to consider for solver the linear system.
Definition: cs_param_types.h:544
int n_max_iter
Definition: cs_param_sles.h:89
int restart
Definition: cs_param_sles.h:90
cs_param_resnorm_type_t resnorm_type
Definition: cs_param_sles.h:88
cs_param_sles_class_t cs_param_sles_check_class(cs_param_sles_class_t wanted_class)
Check the availability of a solver library and return the requested one if this is possible or an alt...
Definition: cs_param_sles.c:1982
int verbosity
Definition: cs_param_sles.h:65
cs_param_itsol_type_t solver
Definition: cs_param_sles.h:73
cs_param_amg_type_t amg_type
Definition: cs_param_sles.h:77
#define END_C_DECLS
Definition: cs_defs.h:511
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:866
void cs_param_sles_free(cs_param_sles_t **p_slesp)
Free a cs_param_sles_t structure.
Definition: cs_param_sles.c:1781
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:1920
Structure storing all metadata related to the resolution of a linear system with an iterative solver...
Definition: cs_param_sles.h:62