My Project
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;
485  double eps;
488 
489 /*============================================================================
490  * Global variables
491  *============================================================================*/
492 
493 /*============================================================================
494  * Public function prototypes
495  *============================================================================*/
496 
497 /*----------------------------------------------------------------------------*/
505 /*----------------------------------------------------------------------------*/
506 
507 const char *
509 
510 /*----------------------------------------------------------------------------*/
518 /*----------------------------------------------------------------------------*/
519 
520 const char *
522 
523 /*----------------------------------------------------------------------------*/
531 /*----------------------------------------------------------------------------*/
532 
533 const char *
535 
536 /*----------------------------------------------------------------------------*/
544 /*----------------------------------------------------------------------------*/
545 
546 const char *
548 
549 /*----------------------------------------------------------------------------*/
557 /*----------------------------------------------------------------------------*/
558 
559 const char *
561 
562 /*----------------------------------------------------------------------------*/
570 /*----------------------------------------------------------------------------*/
571 
572 const char *
574 
575 /*----------------------------------------------------------------------------*/
583 /*----------------------------------------------------------------------------*/
584 
585 const char *
587 
588 /*----------------------------------------------------------------------------*/
589 
591 
592 #endif /* __CS_PARAM_H__ */
CS_TIME_N_SCHEMES
Definition: cs_param.h:191
CS_PARAM_N_BC_TYPES
Definition: cs_param.h:310
CS_PARAM_AMG_HOUSE_V
Definition: cs_param.h:391
CS_TIME_SCHEME_STEADY
Definition: cs_param.h:185
CS_PARAM_ITSOL_SYM_GAUSS_SEIDEL
Definition: cs_param.h:440
CS_PARAM_BC_HMG_DIRICHLET
Definition: cs_param.h:304
CS_PARAM_ITSOL_BICGSTAB2
Definition: cs_param.h:432
input
static int input(void)
CS_PARAM_ADVECTION_FORM_CONSERV
Definition: cs_param.h:214
CS_PARAM_BC_ENFORCE_ALGEBRAIC
Definition: cs_param.h:345
CS_PARAM_PRECOND_POLY2
Definition: cs_param.h:411
cs_param_dof_reduction_t
cs_param_dof_reduction_t
Definition: cs_param.h:151
cs_defs.h
CS_PARAM_SLES_CLASS_CS
Definition: cs_param.h:373
CS_PARAM_BC_DIRICHLET
Definition: cs_param.h:305
CS_PARAM_N_AMG_TYPES
Definition: cs_param.h:393
CS_PARAM_AMG_NONE
Definition: cs_param.h:387
CS_PARAM_PRECOND_BJACOB
Definition: cs_param.h:409
CS_PARAM_N_ADVECTION_SCHEMES
Definition: cs_param.h:265
CS_PARAM_SLES_N_CLASSES
Definition: cs_param.h:375
cs_param_get_time_scheme_name
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
CS_PARAM_ITSOL_JACOBI
Definition: cs_param.h:438
CS_PARAM_AMG_HYPRE_BOOMER
Definition: cs_param.h:388
CS_PARAM_PRECOND_SSOR
Definition: cs_param.h:412
cs_param_get_amg_type_name
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
cs_param_itsol_type_t
cs_param_itsol_type_t
Definition: cs_param.h:428
CS_PARAM_N_PRECOND_TYPES
Definition: cs_param.h:418
CS_SPACE_SCHEME_CDOVB
Definition: cs_param.h:128
cs_param_sles_t::solver
cs_param_itsol_type_t solver
Definition: cs_param.h:476
CS_PARAM_ADVECTION_SCHEME_CIP
Definition: cs_param.h:258
CS_PARAM_PRECOND_AS
Definition: cs_param.h:417
CS_PARAM_ITSOL_MINRES
Definition: cs_param.h:439
CS_PARAM_BC_ENFORCE_WEAK_SYM
Definition: cs_param.h:348
CS_PARAM_BC_ENFORCE_PENALIZED
Definition: cs_param.h:346
CS_SPACE_SCHEME_HHO_P0
Definition: cs_param.h:131
cs_param_sles_t::n_max_iter
int n_max_iter
Definition: cs_param.h:484
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
CS_PARAM_ADVECTION_SCHEME_SAMARSKII
Definition: cs_param.h:261
CS_PARAM_N_ADVECTION_FORMULATIONS
Definition: cs_param.h:217
cs_param_get_solver_name
const char * cs_param_get_solver_name(cs_param_itsol_type_t solver)
Get the name of the solver.
Definition: cs_param.c:204
cs_param_sles_t::resnorm_type
cs_param_resnorm_type_t resnorm_type
Definition: cs_param.h:483
cs_param_sles_t::eps
double eps
Definition: cs_param.h:485
cs_param_get_bc_enforcement_name
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
CS_PARAM_ITSOL_GMRES
Definition: cs_param.h:437
CS_TIME_SCHEME_EULER_EXPLICIT
Definition: cs_param.h:187
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
CS_PARAM_PRECOND_AMG
Definition: cs_param.h:415
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
CS_PARAM_ITSOL_CR3
Definition: cs_param.h:434
CS_SPACE_SCHEME_HHO_P1
Definition: cs_param.h:132
CS_PARAM_ADVECTION_SCHEME_UPWIND
Definition: cs_param.h:263
CS_PARAM_AMG_HOUSE_K
Definition: cs_param.h:392
cs_param_amg_type_t
cs_param_amg_type_t
Definition: cs_param.h:385
cs_param_advection_scheme_t
cs_param_advection_scheme_t
Definition: cs_param.h:255
CS_PARAM_PRECOND_ILU0
Definition: cs_param.h:413
cs_param_get_precond_name
const char * cs_param_get_precond_name(cs_param_precond_type_t precond)
Get the name of the preconditioner.
Definition: cs_param.c:261
CS_PARAM_PRECOND_POLY1
Definition: cs_param.h:410
CS_PARAM_ADVECTION_FORM_NONCONS
Definition: cs_param.h:215
cs_param_sles_t::amg_type
cs_param_amg_type_t amg_type
Definition: cs_param.h:477
cs_param_get_bc_name
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
CS_PARAM_BC_NEUMANN
Definition: cs_param.h:307
cs_time_func_t
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
CS_PARAM_ADVECTION_SCHEME_SG
Definition: cs_param.h:262
CS_PARAM_RESNORM_NONE
Definition: cs_param.h:453
CS_PARAM_BC_ENFORCE_WEAK_NITSCHE
Definition: cs_param.h:347
cs_param_resnorm_type_t
cs_param_resnorm_type_t
Definition: cs_param.h:451
CS_PARAM_PRECOND_AMG_BLOCK
Definition: cs_param.h:416
cs_param_get_space_scheme_name
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
CS_PARAM_ITSOL_AMG
Definition: cs_param.h:430
CS_SPACE_SCHEME_CDOFB
Definition: cs_param.h:130
cs_param_sles_class_t
cs_param_sles_class_t
Class of iterative solvers to consider for solver the linear system.
Definition: cs_param.h:371
CS_PARAM_ITSOL_CG
Definition: cs_param.h:433
CS_PARAM_SLES_CLASS_PETSC
Definition: cs_param.h:374
CS_PARAM_RESNORM_VOLTOT
Definition: cs_param.h:454
CS_PARAM_PRECOND_NONE
Definition: cs_param.h:407
cs_param_precond_type_t
cs_param_precond_type_t
Definition: cs_param.h:405
CS_PARAM_REDUCTION_DERHAM
Definition: cs_param.h:153
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
cs_param_sles_t::precond
cs_param_precond_type_t precond
Definition: cs_param.h:475
cs_param_space_scheme_t
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param.h:125
cs_param_advection_form_t
cs_param_advection_form_t
Definition: cs_param.h:212
cs_analytic_func_t
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,...
Definition: cs_param.h:66
CS_TIME_SCHEME_CRANKNICO
Definition: cs_param.h:188
CS_PARAM_ITSOL_FCG
Definition: cs_param.h:435
CS_PARAM_BC_ROBIN
Definition: cs_param.h:308
CS_PARAM_ADVECTION_SCHEME_MIX_CENTERED_UPWIND
Definition: cs_param.h:260
cs_param_sles_t::solver_class
cs_param_sles_class_t solver_class
Definition: cs_param.h:474
CS_TIME_SCHEME_EULER_IMPLICIT
Definition: cs_param.h:186
CS_PARAM_ITSOL_GAUSS_SEIDEL
Definition: cs_param.h:436
CS_PARAM_ITSOL_BICG
Definition: cs_param.h:431
cs_param_bc_enforce_t
cs_param_bc_enforce_t
Definition: cs_param.h:343
CS_PARAM_REDUCTION_AVERAGE
Definition: cs_param.h:154
CS_TIME_SCHEME_THETA
Definition: cs_param.h:189
CS_PARAM_AMG_PETSC_PCMG
Definition: cs_param.h:390
CS_PARAM_RESNORM_MAT_DIAG
Definition: cs_param.h:458
CS_SPACE_SCHEME_CDOVCB
Definition: cs_param.h:129
CS_PARAM_BC_HMG_NEUMANN
Definition: cs_param.h:306
CS_SPACE_SCHEME_HHO_P2
Definition: cs_param.h:133
CS_PARAM_BC_SLIDING
Definition: cs_param.h:309
CS_SPACE_N_SCHEMES
Definition: cs_param.h:135
CS_SPACE_SCHEME_LEGACY
Definition: cs_param.h:127
cs_param_sles_t::setup_done
bool setup_done
Definition: cs_param.h:471
coords
void const cs_int_t const cs_real_t const cs_real_t * coords
Definition: cs_measures_util.h:360
CS_PARAM_ADVECTION_SCHEME_CIP_CW
Definition: cs_param.h:259
CS_PARAM_AMG_PETSC_GAMG
Definition: cs_param.h:389
cs_param_time_scheme_t
cs_param_time_scheme_t
Definition: cs_param.h:183
cs_param_sles_t
Structure storing all metadata related to the resolution of a linear system with an iterative solver.
Definition: cs_param.h:469
CS_PARAM_N_REDUCTIONS
Definition: cs_param.h:156
type
void const cs_int_t * type
Definition: cs_measures_util.h:425
CS_PARAM_N_RESNORM_TYPES
Definition: cs_param.h:459
cs_param_bc_type_t
cs_param_bc_type_t
Definition: cs_param.h:302
CS_PARAM_PRECOND_DIAG
Definition: cs_param.h:408
cs_param_sles_t::verbosity
int verbosity
Definition: cs_param.h:472
CS_PARAM_PRECOND_ICC0
Definition: cs_param.h:414
CS_PARAM_ADVECTION_SCHEME_CENTERED
Definition: cs_param.h:257
CS_PARAM_N_ITSOL_TYPES
Definition: cs_param.h:441
CS_PARAM_RESNORM_WEIGHTED_RHS
Definition: cs_param.h:456
CS_PARAM_N_BC_ENFORCEMENTS
Definition: cs_param.h:350