7.3
general documentation
cs_param_types.h
Go to the documentation of this file.
1 #ifndef __CS_PARAM_TYPES_H__
2 #define __CS_PARAM_TYPES_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-2022 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 
57 #define CS_DOF_VTX_SCAL 0
58 #define CS_DOF_VTX_VECT 1
59 #define CS_DOF_FACE_SCAL 2
60 #define CS_DOF_FACE_VECT 3
61 #define CS_DOF_FACE_SCAP1 3
62 #define CS_DOF_FACE_SCAP2 4
63 #define CS_DOF_FACE_VECP0 3
64 #define CS_DOF_FACE_VECP1 5
65 #define CS_DOF_FACE_VECP2 6
66 #define CS_DOF_EDGE_SCAL 7
68 #define CS_N_DOF_CASES 8
69 
77 /*
78  * Field property type
79  */
80 
83 #define CS_ISOTROPIC_DIFFUSION (1 << 0)
84 
87 #define CS_ORTHOTROPIC_DIFFUSION (1 << 1)
88 
91 #define CS_ANISOTROPIC_LEFT_DIFFUSION (1 << 2)
92 
95 #define CS_ANISOTROPIC_RIGHT_DIFFUSION (1 << 3)
96 
99 #define CS_ANISOTROPIC_DIFFUSION ((1 << 2) + (1 << 3))
100 
103 /*============================================================================
104  * Type definitions
105  *============================================================================*/
106 
107 /*----------------------------------------------------------------------------*/
124 /*----------------------------------------------------------------------------*/
125 
126 typedef void
128  cs_lnum_t n_elts,
129  const cs_lnum_t *elt_ids,
130  const cs_real_t *coords,
131  bool dense_output,
132  void *input,
133  cs_real_t *retval);
134 
135 /*----------------------------------------------------------------------------*/
151 /*----------------------------------------------------------------------------*/
152 
153 typedef void
155  const cs_lnum_t *elt_ids,
156  bool dense_output,
157  void *input,
158  cs_real_t *retval);
159 
160 /*----------------------------------------------------------------------------*/
169 /*----------------------------------------------------------------------------*/
170 
171 typedef void
172 (cs_time_func_t) (double time,
173  void *input,
174  cs_real_t *retval);
175 
207 typedef enum {
208 
217 
219 
221 
234 typedef enum {
235 
238 
240 
242 
269 typedef enum {
270 
277 
279 
281 
302 typedef enum {
303 
307 
309 
311 
346 typedef enum {
347 
355 
357 
359 
379 typedef enum {
380 
384 
386 
388 
413 typedef enum {
414 
418 
420 
422 
470 typedef enum {
471 
481 
483 
485 
515 typedef enum {
516 
521 
523 
525 
546 typedef enum {
547 
552 
554 
580 typedef enum {
581 
586 
588 
590 
598 typedef enum {
599 
610 
612 
657 typedef enum {
658 
660 
668 
670 
672 
724 typedef enum {
725 
736 
738 
740 
825 typedef enum {
826 
828 
847 
849 
851 
943 typedef enum {
944 
946 
969 
971 
973 
980 typedef enum {
981 
991 
993 
999 typedef enum {
1000 
1005 
1007 
1012 /*============================================================================
1013  * Global variables
1014  *============================================================================*/
1015 
1016 /* Separation lines: header1, header2 (compatible with markdown), other */
1017 
1018 extern const char cs_sep_h1[80];
1019 extern const char cs_sep_h2[80];
1020 extern const char cs_sepline[80];
1021 extern const char cs_med_sepline[50];
1022 
1023 /*============================================================================
1024  * Public function prototypes
1025  *============================================================================*/
1026 
1027 /*----------------------------------------------------------------------------*/
1036 /*----------------------------------------------------------------------------*/
1037 
1038 bool
1039 cs_param_space_scheme_is_face_based(cs_param_space_scheme_t scheme);
1040 
1041 /*----------------------------------------------------------------------------*/
1049 /*----------------------------------------------------------------------------*/
1050 
1051 const char *
1052 cs_param_get_space_scheme_name(cs_param_space_scheme_t scheme);
1053 
1054 /*----------------------------------------------------------------------------*/
1062 /*----------------------------------------------------------------------------*/
1063 
1064 const char *
1065 cs_param_get_time_scheme_name(cs_param_time_scheme_t scheme);
1066 
1067 /*----------------------------------------------------------------------------*/
1075 /*----------------------------------------------------------------------------*/
1076 
1077 const char *
1078 cs_param_get_advection_form_name(cs_param_advection_form_t adv_form);
1079 
1080 /*----------------------------------------------------------------------------*/
1088 /*----------------------------------------------------------------------------*/
1089 
1090 const char *
1091 cs_param_get_advection_scheme_name(cs_param_advection_scheme_t scheme);
1092 
1093 /*----------------------------------------------------------------------------*/
1101 /*----------------------------------------------------------------------------*/
1102 
1103 const char *
1104 cs_param_get_advection_strategy_name(cs_param_advection_strategy_t adv_stra);
1105 
1106 /*----------------------------------------------------------------------------*/
1115 /*----------------------------------------------------------------------------*/
1116 
1117 const char *
1118 cs_param_get_advection_extrapol_name(cs_param_advection_extrapol_t extrapol);
1119 
1120 /*----------------------------------------------------------------------------*/
1128 /*----------------------------------------------------------------------------*/
1129 
1130 const char *
1131 cs_param_get_bc_name(cs_param_bc_type_t bc);
1132 
1133 /*----------------------------------------------------------------------------*/
1141 /*----------------------------------------------------------------------------*/
1142 
1143 const char *
1144 cs_param_get_bc_enforcement_name(cs_param_bc_enforce_t type);
1145 
1146 /*----------------------------------------------------------------------------*/
1154 /*----------------------------------------------------------------------------*/
1155 
1156 const char *
1157 cs_param_get_nl_algo_name(cs_param_nl_algo_t algo);
1158 
1159 /*----------------------------------------------------------------------------*/
1167 /*----------------------------------------------------------------------------*/
1168 
1169 const char *
1170 cs_param_get_nl_algo_label(cs_param_nl_algo_t algo);
1171 
1172 /*----------------------------------------------------------------------------*/
1180 /*----------------------------------------------------------------------------*/
1181 
1182 const char *
1183 cs_param_get_dotprod_type_name(cs_param_dotprod_type_t dp_type);
1184 
1185 /*----------------------------------------------------------------------------*/
1193 /*----------------------------------------------------------------------------*/
1194 
1195 const char *
1196 cs_param_get_solver_name(cs_param_itsol_type_t solver);
1197 
1198 /*----------------------------------------------------------------------------*/
1206 /*----------------------------------------------------------------------------*/
1207 
1208 const char *
1209 cs_param_get_precond_name(cs_param_precond_type_t precond);
1210 
1211 /*----------------------------------------------------------------------------*/
1219 /*----------------------------------------------------------------------------*/
1220 
1221 const char *
1222 cs_param_get_precond_block_name(cs_param_precond_block_t type);
1223 
1224 /*----------------------------------------------------------------------------*/
1232 /*----------------------------------------------------------------------------*/
1233 
1234 const char *
1235 cs_param_get_schur_approx_name(cs_param_schur_approx_t type);
1236 
1237 /*----------------------------------------------------------------------------*/
1245 /*----------------------------------------------------------------------------*/
1246 
1247 const char *
1248 cs_param_get_amg_type_name(cs_param_amg_type_t type);
1249 
1250 /*----------------------------------------------------------------------------*/
1251 
1253 
1254 #endif /* __CS_PARAM_TYPES_H__ */
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_types.c:273
Definition: cs_param_types.h:352
Definition: cs_param_types.h:827
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_types.c:244
cs_param_dotprod_type_t
Definition: cs_param_types.h:999
Definition: cs_param_types.h:478
Definition: cs_param_types.h:271
Definition: cs_param_types.h:829
Definition: cs_param_types.h:473
Definition: cs_param_types.h:962
Definition: cs_param_types.h:476
Definition: cs_param_types.h:607
Definition: cs_param_types.h:275
const char * cs_param_get_nl_algo_name(cs_param_nl_algo_t algo)
Get the name of the non-linear algorithm.
Definition: cs_param_types.c:456
Definition: cs_param_types.h:354
Definition: cs_param_types.h:844
Definition: cs_param_types.h:665
Definition: cs_param_types.h:517
const char * cs_param_get_nl_algo_label(cs_param_nl_algo_t algo)
Get the label (short name) of the non-linear algorithm.
Definition: cs_param_types.c:480
Definition: cs_param_types.h:949
cs_param_resnorm_type_t
Definition: cs_param_types.h:980
Definition: cs_param_types.h:837
const char cs_med_sepline[50]
Definition: cs_param_types.c:72
Definition: cs_param_types.h:583
Definition: cs_param_types.h:239
Definition: cs_param_types.h:474
Definition: cs_param_types.h:840
Definition: cs_param_types.h:663
const char * cs_param_get_precond_name(cs_param_precond_type_t precond)
Get the name of the preconditioner.
Definition: cs_param_types.c:621
Definition: cs_param_types.h:832
cs_param_nl_algo_t
Class of non-linear iterative algorithm.
Definition: cs_param_types.h:546
Definition: cs_param_types.h:661
cs_param_bc_enforce_t
Definition: cs_param_types.h:515
Definition: cs_param_types.h:518
Definition: cs_param_types.h:216
#define BEGIN_C_DECLS
Definition: cs_defs.h:512
Definition: cs_param_types.h:477
Definition: cs_param_types.h:954
Definition: cs_param_types.h:732
Definition: cs_param_types.h:735
Definition: cs_param_types.h:609
Definition: cs_param_types.h:967
cs_param_amg_type_t
Definition: cs_param_types.h:598
Definition: cs_param_types.h:845
Definition: cs_param_types.h:550
Definition: cs_param_types.h:955
Definition: cs_param_types.h:737
Definition: cs_param_types.h:353
cs_param_precond_type_t
Definition: cs_param_types.h:825
const char cs_sep_h2[80]
Definition: cs_param_types.c:68
Definition: cs_param_types.h:605
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_types.c:401
Definition: cs_param_types.h:1001
const char * cs_param_get_advection_strategy_name(cs_param_advection_strategy_t adv_stra)
Get the label associated to the advection strategy.
Definition: cs_param_types.c:352
Definition: cs_param_types.h:351
Definition: cs_param_types.h:350
cs_param_precond_block_t
Definition: cs_param_types.h:724
cs_param_sles_class_t
Class of iterative solvers to consider for solver the linear system.
Definition: cs_param_types.h:580
Definition: cs_param_types.h:841
cs_param_advection_strategy_t
Choice of how to handle the advection term in an equation.
Definition: cs_param_types.h:379
Definition: cs_param_types.h:415
Definition: cs_param_types.h:958
Definition: cs_param_types.h:957
Definition: cs_param_types.h:237
Definition: cs_param_types.h:833
Definition: cs_param_types.h:218
double cs_real_t
Floating-point value.
Definition: cs_defs.h:322
Definition: cs_param_types.h:236
Definition: cs_param_types.h:831
Definition: cs_param_types.h:349
Definition: cs_param_types.h:835
Definition: cs_param_types.h:951
Definition: cs_param_types.h:959
const char * cs_param_get_advection_form_name(cs_param_advection_form_t adv_form)
Get the label associated to the advection formulation.
Definition: cs_param_types.c:300
Definition: cs_param_types.h:522
Definition: cs_param_types.h:733
Definition: cs_param_types.h:604
Definition: cs_param_types.h:383
Definition: cs_param_types.h:945
cs_param_advection_extrapol_t
Choice of how to extrapolate the advection field in the advection term.
Definition: cs_param_types.h:413
Definition: cs_param_types.h:601
Definition: cs_param_types.h:730
Definition: cs_param_types.h:953
Definition: cs_param_types.h:960
void() cs_dof_func_t(cs_lnum_t n_elts, const cs_lnum_t *elt_ids, bool dense_output, void *input, cs_real_t *retval)
Generic function pointer for computing a quantity at predefined locations such as degrees of freedom ...
Definition: cs_param_types.h:154
Definition: cs_param_types.h:549
Definition: cs_param_types.h:669
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param_types.h:207
Definition: cs_param_types.h:836
cs_param_schur_approx_t
Strategy to build the Schur complement approximation. This appears in block preconditioning or uzawa ...
Definition: cs_param_types.h:657
Definition: cs_param_types.h:602
Definition: cs_param_types.h:848
Definition: cs_param_types.h:838
Definition: cs_param_types.h:963
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 dense_output, void *input, cs_real_t *retval)
Generic function pointer for an evaluation relying on an analytic function.
Definition: cs_param_types.h:127
Definition: cs_param_types.h:839
Definition: cs_param_types.h:667
Definition: cs_param_types.h:603
Definition: cs_param_types.h:950
Definition: cs_param_types.h:419
Definition: cs_param_types.h:348
Definition: cs_param_types.h:551
Definition: cs_param_types.h:209
Definition: cs_param_types.h:273
Definition: cs_param_types.h:666
Definition: cs_param_types.h:948
Definition: cs_param_types.h:276
Definition: cs_param_types.h:210
Definition: cs_param_types.h:600
Definition: cs_param_types.h:956
Definition: cs_param_types.h:728
Definition: cs_param_types.h:305
Definition: cs_param_types.h:968
Definition: cs_param_types.h:417
Definition: cs_param_types.h:659
const char * cs_param_get_dotprod_type_name(cs_param_dotprod_type_t dp_type)
Get the name of the type of dot product to apply.
Definition: cs_param_types.c:504
Definition: cs_param_types.h:520
Definition: cs_param_types.h:211
Definition: cs_param_types.h:990
Definition: cs_param_types.h:843
Definition: cs_param_types.h:278
Definition: cs_param_types.h:479
Definition: cs_param_types.h:416
Definition: cs_param_types.h:356
Definition: cs_param_types.h:952
Definition: cs_param_types.h:830
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_types.c:431
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:316
Definition: cs_param_types.h:272
Definition: cs_param_types.h:213
Definition: cs_param_types.h:731
Definition: cs_param_types.h:970
Definition: cs_param_types.h:987
Definition: cs_param_types.h:965
Definition: cs_param_types.h:846
#define END_C_DECLS
Definition: cs_defs.h:513
Definition: cs_param_types.h:274
Definition: cs_param_types.h:482
void() cs_time_func_t(double time, void *input, cs_real_t *retval)
Function which defines the evolution of a quantity according to the current time and any structure gi...
Definition: cs_param_types.h:172
Definition: cs_param_types.h:584
Definition: cs_param_types.h:947
cs_param_dof_reduction_t
Definition: cs_param_types.h:234
cs_param_bc_type_t
Definition: cs_param_types.h:470
Definition: cs_param_types.h:480
cs_param_itsol_type_t
Definition: cs_param_types.h:943
Definition: cs_param_types.h:306
const char cs_sepline[80]
Definition: cs_param_types.c:70
Definition: cs_param_types.h:587
const char * cs_param_get_advection_scheme_name(cs_param_advection_scheme_t scheme)
Get the label of the advection scheme.
Definition: cs_param_types.c:324
Definition: cs_param_types.h:1002
Definition: cs_param_types.h:381
const char cs_sep_h1[80]
Definition: cs_param_types.c:66
Definition: cs_param_types.h:308
Definition: cs_param_types.h:966
Definition: cs_param_types.h:212
Definition: cs_param_types.h:304
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_types.c:763
bool cs_param_space_scheme_is_face_based(cs_param_space_scheme_t scheme)
Return true if the space scheme has degrees of freedom on faces, otherwise false. ...
Definition: cs_param_types.c:222
const char * cs_param_get_schur_approx_name(cs_param_schur_approx_t type)
Get the name of the type of Schur complement approximation.
Definition: cs_param_types.c:734
Definition: cs_param_types.h:734
Definition: cs_param_types.h:729
cs_param_advection_scheme_t
Definition: cs_param_types.h:346
Definition: cs_param_types.h:983
Definition: cs_param_types.h:664
Definition: cs_param_types.h:1004
const char * cs_param_get_solver_name(cs_param_itsol_type_t solver)
Get the name of the solver.
Definition: cs_param_types.c:527
Definition: cs_param_types.h:662
Definition: cs_param_types.h:519
Definition: cs_param_types.h:382
Definition: cs_param_types.h:726
Definition: cs_param_types.h:606
Definition: cs_param_types.h:961
cs_param_time_scheme_t
Definition: cs_param_types.h:269
Definition: cs_param_types.h:727
Definition: cs_param_types.h:834
const char * cs_param_get_precond_block_name(cs_param_precond_block_t type)
Get the name of the type of block preconditioning.
Definition: cs_param_types.c:703
cs_param_advection_form_t
Definition: cs_param_types.h:302
Definition: cs_param_types.h:985
Definition: cs_param_types.h:548
Definition: cs_param_types.h:582
Definition: cs_param_types.h:215
Definition: cs_param_types.h:842
Definition: cs_param_types.h:964
Definition: cs_param_types.h:982
Definition: cs_param_types.h:214
Definition: cs_param_types.h:472
Definition: cs_param_types.h:585
Definition: cs_param_types.h:475
const char * cs_param_get_advection_extrapol_name(cs_param_advection_extrapol_t extrapol)
Get the label associated to the extrapolation used for the advection field.
Definition: cs_param_types.c:377
Definition: cs_param_types.h:385