7.1
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-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_defs.h"
35 
36 /*----------------------------------------------------------------------------*/
37 
39 
40 /*============================================================================
41  * Macro definitions
42  *============================================================================*/
43 
50 /*
51  * Field property type
52  */
53 
56 #define CS_ISOTROPIC_DIFFUSION (1 << 0)
57 
60 #define CS_ORTHOTROPIC_DIFFUSION (1 << 1)
61 
64 #define CS_ANISOTROPIC_LEFT_DIFFUSION (1 << 2)
65 
68 #define CS_ANISOTROPIC_RIGHT_DIFFUSION (1 << 3)
69 
72 #define CS_ANISOTROPIC_DIFFUSION ((1 << 2) + (1 << 3))
73 
76 /*============================================================================
77  * Type definitions
78  *============================================================================*/
79 
80 /*----------------------------------------------------------------------------*/
97 /*----------------------------------------------------------------------------*/
98 
99 typedef void
101  cs_lnum_t n_elts,
102  const cs_lnum_t *elt_ids,
103  const cs_real_t *coords,
104  bool dense_output,
105  void *input,
106  cs_real_t *retval);
107 
108 /*----------------------------------------------------------------------------*/
124 /*----------------------------------------------------------------------------*/
125 
126 typedef void
128  const cs_lnum_t *elt_ids,
129  bool dense_output,
130  void *input,
131  cs_real_t *retval);
132 
133 /*----------------------------------------------------------------------------*/
142 /*----------------------------------------------------------------------------*/
143 
144 typedef void
145 (cs_time_func_t) (double time,
146  void *input,
147  cs_real_t *retval);
148 
180 typedef enum {
181 
190 
192 
194 
207 typedef enum {
208 
211 
213 
215 
242 typedef enum {
243 
250 
252 
254 
275 typedef enum {
276 
280 
282 
284 
319 typedef enum {
320 
328 
330 
332 
352 typedef enum {
353 
357 
359 
361 
386 typedef enum {
387 
391 
393 
395 
439 typedef enum {
440 
449 
451 
453 
483 typedef enum {
484 
489 
491 
493 
511 typedef enum {
512 
516 
518 
544 typedef enum {
545 
550 
552 
554 
562 typedef enum {
563 
574 
576 
621 typedef enum {
622 
624 
632 
634 
636 
688 typedef enum {
689 
700 
702 
704 
763 typedef enum {
764 
766 
779 
781 
783 
866 typedef enum {
867 
869 
890 
892 
894 
901 typedef enum {
902 
912 
914 
920 typedef enum {
921 
926 
928 
929 /*============================================================================
930  * Global variables
931  *============================================================================*/
932 
933 /* Separation lines: header1, header2 (compatible with markdown), other */
934 
935 extern const char cs_sep_h1[80];
936 extern const char cs_sep_h2[80];
937 extern const char cs_sepline[80];
938 extern const char cs_med_sepline[50];
939 
940 /*============================================================================
941  * Public function prototypes
942  *============================================================================*/
943 
944 /*----------------------------------------------------------------------------*/
953 /*----------------------------------------------------------------------------*/
954 
955 bool
956 cs_param_space_scheme_is_face_based(cs_param_space_scheme_t scheme);
957 
958 /*----------------------------------------------------------------------------*/
966 /*----------------------------------------------------------------------------*/
967 
968 const char *
969 cs_param_get_space_scheme_name(cs_param_space_scheme_t scheme);
970 
971 /*----------------------------------------------------------------------------*/
979 /*----------------------------------------------------------------------------*/
980 
981 const char *
982 cs_param_get_time_scheme_name(cs_param_time_scheme_t scheme);
983 
984 /*----------------------------------------------------------------------------*/
992 /*----------------------------------------------------------------------------*/
993 
994 const char *
995 cs_param_get_advection_form_name(cs_param_advection_form_t adv_form);
996 
997 /*----------------------------------------------------------------------------*/
1005 /*----------------------------------------------------------------------------*/
1006 
1007 const char *
1008 cs_param_get_advection_scheme_name(cs_param_advection_scheme_t scheme);
1009 
1010 /*----------------------------------------------------------------------------*/
1018 /*----------------------------------------------------------------------------*/
1019 
1020 const char *
1021 cs_param_get_advection_strategy_name(cs_param_advection_strategy_t adv_stra);
1022 
1023 /*----------------------------------------------------------------------------*/
1032 /*----------------------------------------------------------------------------*/
1033 
1034 const char *
1035 cs_param_get_advection_extrapol_name(cs_param_advection_extrapol_t extrapol);
1036 
1037 /*----------------------------------------------------------------------------*/
1045 /*----------------------------------------------------------------------------*/
1046 
1047 const char *
1048 cs_param_get_bc_name(cs_param_bc_type_t bc);
1049 
1050 /*----------------------------------------------------------------------------*/
1058 /*----------------------------------------------------------------------------*/
1059 
1060 const char *
1061 cs_param_get_bc_enforcement_name(cs_param_bc_enforce_t type);
1062 
1063 /*----------------------------------------------------------------------------*/
1071 /*----------------------------------------------------------------------------*/
1072 
1073 const char *
1074 cs_param_get_nl_algo_name(cs_param_nl_algo_t algo);
1075 
1076 /*----------------------------------------------------------------------------*/
1084 /*----------------------------------------------------------------------------*/
1085 
1086 const char *
1087 cs_param_get_dotprod_type_name(cs_param_dotprod_type_t dp_type);
1088 
1089 /*----------------------------------------------------------------------------*/
1097 /*----------------------------------------------------------------------------*/
1098 
1099 const char *
1100 cs_param_get_solver_name(cs_param_itsol_type_t solver);
1101 
1102 /*----------------------------------------------------------------------------*/
1110 /*----------------------------------------------------------------------------*/
1111 
1112 const char *
1113 cs_param_get_precond_name(cs_param_precond_type_t precond);
1114 
1115 /*----------------------------------------------------------------------------*/
1123 /*----------------------------------------------------------------------------*/
1124 
1125 const char *
1126 cs_param_get_precond_block_name(cs_param_precond_block_t type);
1127 
1128 /*----------------------------------------------------------------------------*/
1136 /*----------------------------------------------------------------------------*/
1137 
1138 const char *
1139 cs_param_get_schur_approx_name(cs_param_schur_approx_t type);
1140 
1141 /*----------------------------------------------------------------------------*/
1149 /*----------------------------------------------------------------------------*/
1150 
1151 const char *
1152 cs_param_get_amg_type_name(cs_param_amg_type_t type);
1153 
1154 /*----------------------------------------------------------------------------*/
1155 
1157 
1158 #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:265
Definition: cs_param_types.h:325
Definition: cs_param_types.h:765
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:236
cs_param_dotprod_type_t
Definition: cs_param_types.h:920
Definition: cs_param_types.h:447
Definition: cs_param_types.h:244
Definition: cs_param_types.h:767
Definition: cs_param_types.h:442
Definition: cs_param_types.h:885
Definition: cs_param_types.h:445
Definition: cs_param_types.h:571
Definition: cs_param_types.h:248
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:447
Definition: cs_param_types.h:327
Definition: cs_param_types.h:776
Definition: cs_param_types.h:629
Definition: cs_param_types.h:485
Definition: cs_param_types.h:872
cs_param_resnorm_type_t
Definition: cs_param_types.h:901
Definition: cs_param_types.h:775
const char cs_med_sepline[50]
Definition: cs_param_types.c:72
Definition: cs_param_types.h:547
Definition: cs_param_types.h:212
Definition: cs_param_types.h:443
Definition: cs_param_types.h:627
const char * cs_param_get_precond_name(cs_param_precond_type_t precond)
Get the name of the preconditioner.
Definition: cs_param_types.c:581
Definition: cs_param_types.h:770
cs_param_nl_algo_t
Class of non-linear iterative algorithm.
Definition: cs_param_types.h:511
Definition: cs_param_types.h:625
cs_param_bc_enforce_t
Definition: cs_param_types.h:483
Definition: cs_param_types.h:486
Definition: cs_param_types.h:189
#define BEGIN_C_DECLS
Definition: cs_defs.h:510
Definition: cs_param_types.h:446
Definition: cs_param_types.h:877
Definition: cs_param_types.h:696
Definition: cs_param_types.h:699
Definition: cs_param_types.h:573
Definition: cs_param_types.h:888
cs_param_amg_type_t
Definition: cs_param_types.h:562
Definition: cs_param_types.h:777
Definition: cs_param_types.h:514
Definition: cs_param_types.h:878
Definition: cs_param_types.h:701
Definition: cs_param_types.h:326
cs_param_precond_type_t
Definition: cs_param_types.h:763
const char cs_sep_h2[80]
Definition: cs_param_types.c:68
Definition: cs_param_types.h:569
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:393
Definition: cs_param_types.h:922
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:344
Definition: cs_param_types.h:324
Definition: cs_param_types.h:323
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
cs_param_advection_strategy_t
Choice of how to handle the advection term in an equation.
Definition: cs_param_types.h:352
Definition: cs_param_types.h:388
Definition: cs_param_types.h:881
Definition: cs_param_types.h:880
Definition: cs_param_types.h:210
Definition: cs_param_types.h:771
Definition: cs_param_types.h:191
double cs_real_t
Floating-point value.
Definition: cs_defs.h:322
Definition: cs_param_types.h:209
Definition: cs_param_types.h:769
Definition: cs_param_types.h:322
Definition: cs_param_types.h:773
Definition: cs_param_types.h:874
Definition: cs_param_types.h:882
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:292
Definition: cs_param_types.h:490
Definition: cs_param_types.h:697
Definition: cs_param_types.h:568
Definition: cs_param_types.h:356
Definition: cs_param_types.h:868
cs_param_advection_extrapol_t
Choice of how to extrapolate the advection field in the advection term.
Definition: cs_param_types.h:386
Definition: cs_param_types.h:565
Definition: cs_param_types.h:694
Definition: cs_param_types.h:876
Definition: cs_param_types.h:883
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:127
Definition: cs_param_types.h:513
Definition: cs_param_types.h:633
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param_types.h:180
Definition: cs_param_types.h:774
cs_param_schur_approx_t
Strategy to build the Schur complement approximation. This appears in block preconditioning or uzawa ...
Definition: cs_param_types.h:621
Definition: cs_param_types.h:566
Definition: cs_param_types.h:780
Definition: cs_param_types.h:886
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:100
Definition: cs_param_types.h:631
Definition: cs_param_types.h:567
Definition: cs_param_types.h:873
Definition: cs_param_types.h:392
Definition: cs_param_types.h:321
Definition: cs_param_types.h:515
Definition: cs_param_types.h:182
Definition: cs_param_types.h:246
Definition: cs_param_types.h:630
Definition: cs_param_types.h:871
Definition: cs_param_types.h:249
Definition: cs_param_types.h:183
Definition: cs_param_types.h:564
Definition: cs_param_types.h:879
Definition: cs_param_types.h:692
Definition: cs_param_types.h:278
Definition: cs_param_types.h:889
Definition: cs_param_types.h:390
Definition: cs_param_types.h:623
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:470
Definition: cs_param_types.h:488
Definition: cs_param_types.h:184
Definition: cs_param_types.h:911
Definition: cs_param_types.h:251
Definition: cs_param_types.h:448
Definition: cs_param_types.h:389
Definition: cs_param_types.h:329
Definition: cs_param_types.h:875
Definition: cs_param_types.h:768
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:422
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:316
Definition: cs_param_types.h:245
Definition: cs_param_types.h:186
Definition: cs_param_types.h:695
Definition: cs_param_types.h:891
Definition: cs_param_types.h:908
Definition: cs_param_types.h:887
Definition: cs_param_types.h:778
#define END_C_DECLS
Definition: cs_defs.h:511
Definition: cs_param_types.h:247
Definition: cs_param_types.h:450
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:145
Definition: cs_param_types.h:548
Definition: cs_param_types.h:870
cs_param_dof_reduction_t
Definition: cs_param_types.h:207
cs_param_bc_type_t
Definition: cs_param_types.h:439
cs_param_itsol_type_t
Definition: cs_param_types.h:866
Definition: cs_param_types.h:279
const char cs_sepline[80]
Definition: cs_param_types.c:70
Definition: cs_param_types.h:551
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:316
Definition: cs_param_types.h:923
Definition: cs_param_types.h:354
const char cs_sep_h1[80]
Definition: cs_param_types.c:66
Definition: cs_param_types.h:281
Definition: cs_param_types.h:185
Definition: cs_param_types.h:277
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:705
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:214
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:676
Definition: cs_param_types.h:698
Definition: cs_param_types.h:693
cs_param_advection_scheme_t
Definition: cs_param_types.h:319
Definition: cs_param_types.h:904
Definition: cs_param_types.h:628
Definition: cs_param_types.h:925
const char * cs_param_get_solver_name(cs_param_itsol_type_t solver)
Get the name of the solver.
Definition: cs_param_types.c:493
Definition: cs_param_types.h:626
Definition: cs_param_types.h:487
Definition: cs_param_types.h:355
Definition: cs_param_types.h:690
Definition: cs_param_types.h:570
Definition: cs_param_types.h:884
cs_param_time_scheme_t
Definition: cs_param_types.h:242
Definition: cs_param_types.h:691
Definition: cs_param_types.h:772
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:645
cs_param_advection_form_t
Definition: cs_param_types.h:275
Definition: cs_param_types.h:906
Definition: cs_param_types.h:546
Definition: cs_param_types.h:188
Definition: cs_param_types.h:903
Definition: cs_param_types.h:187
Definition: cs_param_types.h:441
Definition: cs_param_types.h:549
Definition: cs_param_types.h:444
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:369
Definition: cs_param_types.h:358