programmer's documentation
cs_param.h
Go to the documentation of this file.
1 #ifndef __CS_PARAM_H__
2 #define __CS_PARAM_H__
3 
4 /*============================================================================
5  * Manage the definition/setting of a computation
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2019 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_defs.h"
35 
36 /*----------------------------------------------------------------------------*/
37 
39 
40 /*============================================================================
41  * Macro definitions
42  *============================================================================*/
43 
44 /*============================================================================
45  * Type definitions
46  *============================================================================*/
47 
48 /*----------------------------------------------------------------------------*/
63 /*----------------------------------------------------------------------------*/
64 
65 typedef void
67  cs_lnum_t n_elts,
68  const cs_lnum_t *elt_ids,
69  const cs_real_t *coords,
70  bool compact,
71  void *input,
72  cs_real_t *retval);
73 
74 /*----------------------------------------------------------------------------*/
85 /*----------------------------------------------------------------------------*/
86 
87 typedef void
88 (cs_time_func_t) (int time_iter,
89  double time,
90  void *input,
91  cs_real_t *retval);
92 
93 /* ================
94  * ENUM definitions
95  * ================ */
96 
125 typedef enum {
126 
134 
136 
138 
151 typedef enum {
152 
155 
157 
159 
183 typedef enum {
184 
190 
192 
194 
212 typedef enum {
213 
216 
218 
220 
255 typedef enum {
256 
264 
266 
268 
302 typedef enum {
303 
311 
313 
343 typedef enum {
344 
349 
351 
353 
371 typedef enum {
372 
376 
378 
385 typedef enum {
386 
394 
396 
405 typedef enum {
406 
419 
421 
428 typedef enum {
429 
442 
444 
451 typedef enum {
452 
460 
462 
469 typedef struct {
470 
471  bool setup_done;
472  int verbosity;
474  cs_param_sles_class_t solver_class;
475  cs_param_precond_type_t precond;
476  cs_param_itsol_type_t solver;
477  cs_param_amg_type_t amg_type;
483  cs_param_resnorm_type_t resnorm_type;
485  double eps;
488 
489 /*============================================================================
490  * Global variables
491  *============================================================================*/
492 
493 /*============================================================================
494  * Public function prototypes
495  *============================================================================*/
496 
497 /*----------------------------------------------------------------------------*/
505 /*----------------------------------------------------------------------------*/
506 
507 const char *
508 cs_param_get_space_scheme_name(cs_param_space_scheme_t scheme);
509 
510 /*----------------------------------------------------------------------------*/
518 /*----------------------------------------------------------------------------*/
519 
520 const char *
521 cs_param_get_time_scheme_name(cs_param_time_scheme_t scheme);
522 
523 /*----------------------------------------------------------------------------*/
531 /*----------------------------------------------------------------------------*/
532 
533 const char *
534 cs_param_get_bc_name(cs_param_bc_type_t bc);
535 
536 /*----------------------------------------------------------------------------*/
544 /*----------------------------------------------------------------------------*/
545 
546 const char *
547 cs_param_get_bc_enforcement_name(cs_param_bc_enforce_t type);
548 
549 /*----------------------------------------------------------------------------*/
557 /*----------------------------------------------------------------------------*/
558 
559 const char *
560 cs_param_get_solver_name(cs_param_itsol_type_t solver);
561 
562 /*----------------------------------------------------------------------------*/
570 /*----------------------------------------------------------------------------*/
571 
572 const char *
573 cs_param_get_precond_name(cs_param_precond_type_t precond);
574 
575 /*----------------------------------------------------------------------------*/
583 /*----------------------------------------------------------------------------*/
584 
585 const char *
586 cs_param_get_amg_type_name(cs_param_amg_type_t type);
587 
588 /*----------------------------------------------------------------------------*/
589 
591 
592 #endif /* __CS_PARAM_H__ */
Definition: cs_param.h:187
const char * cs_param_get_time_scheme_name(cs_param_time_scheme_t scheme)
Get the name of the time discretization scheme.
Definition: cs_param.c:147
bool setup_done
Definition: cs_param.h:471
Definition: cs_param.h:129
double eps
Definition: cs_param.h:485
void() cs_analytic_func_t(cs_real_t time, cs_lnum_t n_elts, const cs_lnum_t *elt_ids, const cs_real_t *coords, bool compact, void *input, cs_real_t *retval)
Generic function pointer for an analytic function elt_ids is optional. If not NULL, it enables to access in coords at the right location and the same thing to fill retval if compact is set to false.
Definition: cs_param.h:66
cs_param_precond_type_t precond
Definition: cs_param.h:475
Definition: cs_param.h:215
Definition: cs_param.h:410
Definition: cs_param.h:306
Definition: cs_param.h:127
Definition: cs_param.h:413
Definition: cs_param.h:392
Definition: cs_param.h:436
Definition: cs_param.h:389
Definition: cs_param.h:390
Definition: cs_param.h:433
cs_param_resnorm_type_t
Definition: cs_param.h:451
Definition: cs_param.h:430
Definition: cs_param.h:263
Definition: cs_param.h:191
cs_param_sles_class_t solver_class
Definition: cs_param.h:474
cs_param_advection_scheme_t
Definition: cs_param.h:255
Definition: cs_param.h:407
const char * cs_param_get_bc_enforcement_name(cs_param_bc_enforce_t type)
Get the name of the type of enforcement of the boundary condition.
Definition: cs_param.c:185
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
Definition: cs_param.h:459
Definition: cs_param.h:347
Definition: cs_param.h:440
Definition: cs_param.h:188
Definition: cs_param.h:408
Definition: cs_param.h:133
Definition: cs_param.h:304
Definition: cs_param.h:345
Definition: cs_param.h:257
Definition: cs_param.h:438
Definition: cs_param.h:156
const char * cs_param_get_precond_name(cs_param_precond_type_t precond)
Get the name of the preconditioner.
Definition: cs_param.c:261
Definition: cs_param.h:441
Definition: cs_param.h:375
Definition: cs_param.h:432
Definition: cs_param.h:189
Definition: cs_param.h:414
Definition: cs_param.h:128
Definition: cs_param.h:456
cs_param_advection_form_t
Definition: cs_param.h:212
Definition: cs_param.h:431
Definition: cs_param.h:135
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
int n_max_iter
Definition: cs_param.h:484
Definition: cs_param.h:435
Definition: cs_param.h:305
Definition: cs_param.h:185
Definition: cs_param.h:418
Definition: cs_param.h:153
Definition: cs_param.h:411
cs_param_resnorm_type_t resnorm_type
Definition: cs_param.h:483
cs_param_sles_class_t
Class of iterative solvers to consider for solver the linear system.
Definition: cs_param.h:371
Definition: cs_param.h:374
Definition: cs_param.h:261
Definition: cs_param.h:387
Definition: cs_param.h:458
Definition: cs_param.h:350
Definition: cs_param.h:259
const char * cs_param_get_bc_name(cs_param_bc_type_t bc)
Get the name of the type of boundary condition.
Definition: cs_param.c:166
Definition: cs_param.h:391
int verbosity
Definition: cs_param.h:472
Definition: cs_param.h:258
cs_param_precond_type_t
Definition: cs_param.h:405
cs_param_time_scheme_t
Definition: cs_param.h:183
static int input(void)
Definition: cs_param.h:409
cs_param_dof_reduction_t
Definition: cs_param.h:151
cs_param_itsol_type_t solver
Definition: cs_param.h:476
cs_param_itsol_type_t
Definition: cs_param.h:428
Definition: cs_param.h:373
Definition: cs_param.h:186
Definition: cs_param.h:393
Definition: cs_param.h:154
cs_param_bc_type_t
Definition: cs_param.h:302
Definition: cs_param.h:309
Definition: cs_param.h:346
Definition: cs_param.h:310
Definition: cs_param.h:412
cs_param_amg_type_t
Definition: cs_param.h:385
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
Definition: cs_param.h:388
Definition: cs_param.h:437
Definition: cs_param.h:416
Definition: cs_param.h:434
const char * cs_param_get_solver_name(cs_param_itsol_type_t solver)
Get the name of the solver.
Definition: cs_param.c:204
void() cs_time_func_t(int time_iter, double time, void *input, cs_real_t *retval)
Function which defines the evolution of a quantity according to the number of iteration already done...
Definition: cs_param.h:88
#define END_C_DECLS
Definition: cs_defs.h:468
Definition: cs_param.h:131
Definition: cs_param.h:265
Definition: cs_param.h:262
const char * cs_param_get_amg_type_name(cs_param_amg_type_t type)
Get the name of the type of algebraic multigrid (AMG)
Definition: cs_param.c:317
Definition: cs_param.h:214
Definition: cs_param.h:454
Definition: cs_param.h:348
cs_param_amg_type_t amg_type
Definition: cs_param.h:477
Definition: cs_param.h:415
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param.h:125
Definition: cs_param.h:439
Definition: cs_param.h:308
const char * cs_param_get_space_scheme_name(cs_param_space_scheme_t scheme)
Get the name of the space discretization scheme.
Definition: cs_param.c:128
Definition: cs_param.h:130
cs_param_bc_enforce_t
Definition: cs_param.h:343
Definition: cs_param.h:453
Definition: cs_param.h:417
Structure storing all metadata related to the resolution of a linear system with an iterative solver...
Definition: cs_param.h:469
Definition: cs_param.h:217
Definition: cs_param.h:132
Definition: cs_param.h:307