7.2
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 
799 typedef enum {
800 
802 
815 
817 
819 
902 typedef enum {
903 
905 
926 
928 
930 
937 typedef enum {
938 
948 
950 
956 typedef enum {
957 
962 
964 
965 /*============================================================================
966  * Global variables
967  *============================================================================*/
968 
969 /* Separation lines: header1, header2 (compatible with markdown), other */
970 
971 extern const char cs_sep_h1[80];
972 extern const char cs_sep_h2[80];
973 extern const char cs_sepline[80];
974 extern const char cs_med_sepline[50];
975 
976 /*============================================================================
977  * Public function prototypes
978  *============================================================================*/
979 
980 /*----------------------------------------------------------------------------*/
989 /*----------------------------------------------------------------------------*/
990 
991 bool
992 cs_param_space_scheme_is_face_based(cs_param_space_scheme_t scheme);
993 
994 /*----------------------------------------------------------------------------*/
1002 /*----------------------------------------------------------------------------*/
1003 
1004 const char *
1005 cs_param_get_space_scheme_name(cs_param_space_scheme_t scheme);
1006 
1007 /*----------------------------------------------------------------------------*/
1015 /*----------------------------------------------------------------------------*/
1016 
1017 const char *
1018 cs_param_get_time_scheme_name(cs_param_time_scheme_t scheme);
1019 
1020 /*----------------------------------------------------------------------------*/
1028 /*----------------------------------------------------------------------------*/
1029 
1030 const char *
1031 cs_param_get_advection_form_name(cs_param_advection_form_t adv_form);
1032 
1033 /*----------------------------------------------------------------------------*/
1041 /*----------------------------------------------------------------------------*/
1042 
1043 const char *
1044 cs_param_get_advection_scheme_name(cs_param_advection_scheme_t scheme);
1045 
1046 /*----------------------------------------------------------------------------*/
1054 /*----------------------------------------------------------------------------*/
1055 
1056 const char *
1057 cs_param_get_advection_strategy_name(cs_param_advection_strategy_t adv_stra);
1058 
1059 /*----------------------------------------------------------------------------*/
1068 /*----------------------------------------------------------------------------*/
1069 
1070 const char *
1071 cs_param_get_advection_extrapol_name(cs_param_advection_extrapol_t extrapol);
1072 
1073 /*----------------------------------------------------------------------------*/
1081 /*----------------------------------------------------------------------------*/
1082 
1083 const char *
1084 cs_param_get_bc_name(cs_param_bc_type_t bc);
1085 
1086 /*----------------------------------------------------------------------------*/
1094 /*----------------------------------------------------------------------------*/
1095 
1096 const char *
1097 cs_param_get_bc_enforcement_name(cs_param_bc_enforce_t type);
1098 
1099 /*----------------------------------------------------------------------------*/
1107 /*----------------------------------------------------------------------------*/
1108 
1109 const char *
1110 cs_param_get_nl_algo_name(cs_param_nl_algo_t algo);
1111 
1112 /*----------------------------------------------------------------------------*/
1120 /*----------------------------------------------------------------------------*/
1121 
1122 const char *
1123 cs_param_get_nl_algo_label(cs_param_nl_algo_t algo);
1124 
1125 /*----------------------------------------------------------------------------*/
1133 /*----------------------------------------------------------------------------*/
1134 
1135 const char *
1136 cs_param_get_dotprod_type_name(cs_param_dotprod_type_t dp_type);
1137 
1138 /*----------------------------------------------------------------------------*/
1146 /*----------------------------------------------------------------------------*/
1147 
1148 const char *
1149 cs_param_get_solver_name(cs_param_itsol_type_t solver);
1150 
1151 /*----------------------------------------------------------------------------*/
1159 /*----------------------------------------------------------------------------*/
1160 
1161 const char *
1162 cs_param_get_precond_name(cs_param_precond_type_t precond);
1163 
1164 /*----------------------------------------------------------------------------*/
1172 /*----------------------------------------------------------------------------*/
1173 
1174 const char *
1175 cs_param_get_precond_block_name(cs_param_precond_block_t type);
1176 
1177 /*----------------------------------------------------------------------------*/
1185 /*----------------------------------------------------------------------------*/
1186 
1187 const char *
1188 cs_param_get_schur_approx_name(cs_param_schur_approx_t type);
1189 
1190 /*----------------------------------------------------------------------------*/
1198 /*----------------------------------------------------------------------------*/
1199 
1200 const char *
1201 cs_param_get_amg_type_name(cs_param_amg_type_t type);
1202 
1203 /*----------------------------------------------------------------------------*/
1204 
1206 
1207 #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:801
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:956
Definition: cs_param_types.h:478
Definition: cs_param_types.h:271
Definition: cs_param_types.h:803
Definition: cs_param_types.h:473
Definition: cs_param_types.h:921
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:812
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:908
cs_param_resnorm_type_t
Definition: cs_param_types.h:937
Definition: cs_param_types.h:811
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: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:615
Definition: cs_param_types.h:806
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:510
Definition: cs_param_types.h:477
Definition: cs_param_types.h:913
Definition: cs_param_types.h:732
Definition: cs_param_types.h:735
Definition: cs_param_types.h:609
Definition: cs_param_types.h:924
cs_param_amg_type_t
Definition: cs_param_types.h:598
Definition: cs_param_types.h:813
Definition: cs_param_types.h:550
Definition: cs_param_types.h:914
Definition: cs_param_types.h:737
Definition: cs_param_types.h:353
cs_param_precond_type_t
Definition: cs_param_types.h:799
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:958
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
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:917
Definition: cs_param_types.h:916
Definition: cs_param_types.h:237
Definition: cs_param_types.h:807
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:805
Definition: cs_param_types.h:349
Definition: cs_param_types.h:809
Definition: cs_param_types.h:910
Definition: cs_param_types.h:918
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:904
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:912
Definition: cs_param_types.h:919
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:810
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:816
Definition: cs_param_types.h:922
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:667
Definition: cs_param_types.h:603
Definition: cs_param_types.h:909
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:907
Definition: cs_param_types.h:276
Definition: cs_param_types.h:210
Definition: cs_param_types.h:600
Definition: cs_param_types.h:915
Definition: cs_param_types.h:728
Definition: cs_param_types.h:305
Definition: cs_param_types.h:925
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:947
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:911
Definition: cs_param_types.h:804
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:927
Definition: cs_param_types.h:944
Definition: cs_param_types.h:923
Definition: cs_param_types.h:814
#define END_C_DECLS
Definition: cs_defs.h:511
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:906
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:902
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:959
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: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:739
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:710
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:940
Definition: cs_param_types.h:664
Definition: cs_param_types.h:961
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:920
cs_param_time_scheme_t
Definition: cs_param_types.h:269
Definition: cs_param_types.h:727
Definition: cs_param_types.h:808
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:679
cs_param_advection_form_t
Definition: cs_param_types.h:302
Definition: cs_param_types.h:942
Definition: cs_param_types.h:548
Definition: cs_param_types.h:582
Definition: cs_param_types.h:215
Definition: cs_param_types.h:939
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