8.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 * Set of definitions of structures and types used for setting a case
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2024 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
126typedef 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
153typedef void
154(cs_dof_func_t) (cs_lnum_t n_elts,
155 const cs_lnum_t *elt_ids,
156 bool dense_output,
157 void *input,
158 cs_real_t *retval);
159
160/*----------------------------------------------------------------------------*/
169/*----------------------------------------------------------------------------*/
170
171typedef void
172(cs_time_func_t) (double time,
173 void *input,
174 cs_real_t *retval);
175
215typedef enum {
216
227
229
231
244typedef enum {
245
248
250
252
279typedef enum {
280
287
289
291
312typedef enum {
313
317
319
321
356typedef enum {
357
365
367
369
389typedef enum {
390
394
396
398
424typedef enum {
425
429
431
433
481typedef enum {
482
496
498
500
501/* Compatibility macros */
502
503#define CS_PARAM_BC_HMG_DIRICHLET CS_BC_HMG_DIRICHLET
504#define CS_PARAM_BC_DIRICHLET CS_BC_DIRICHLET
505#define CS_PARAM_BC_HMG_NEUMANN CS_BC_SYMMETRY
506#define CS_PARAM_BC_NEUMANN CS_BC_NEUMANN
507#define CS_PARAM_BC_NEUMANN_FULL CS_BC_NEUMANN_FULL
508#define CS_PARAM_BC_ROBIN CS_BC_ROBIN
509#define CS_PARAM_BC_SLIDING CS_BC_SYMMETRY
510#define CS_PARAM_BC_CIRCULATION CS_BC_CIRCULATION
511#define CS_PARAM_BC_WALL_PRECRIBED CS_BC_WALL_MODELLED
512
542typedef enum {
543
548
550
552
558typedef struct {
559
575 double atol;
576 double rtol;
577 double dtol;
579
581
606typedef enum {
607
613
615
643typedef enum {
644
649
651
653
678typedef enum {
679
685
687
689
755typedef enum {
756
758
773
775
777
836typedef enum {
837
839
854
856
858
865typedef enum {
866
876
878
884typedef enum {
885
890
892
897/*============================================================================
898 * Global variables
899 *============================================================================*/
900
901/* Separation lines: header1, header2 (compatible with markdown), other */
902
903extern const char cs_sep_h1[80];
904extern const char cs_sep_h2[80];
905extern const char cs_sepline[80];
906extern const char cs_med_sepline[50];
907
908/*============================================================================
909 * Public function prototypes
910 *============================================================================*/
911
912/*----------------------------------------------------------------------------*/
921/*----------------------------------------------------------------------------*/
922
923bool
925
926/*----------------------------------------------------------------------------*/
934/*----------------------------------------------------------------------------*/
935
936const char *
938
939/*----------------------------------------------------------------------------*/
947/*----------------------------------------------------------------------------*/
948
949const char *
951
952/*----------------------------------------------------------------------------*/
960/*----------------------------------------------------------------------------*/
961
962const char *
964
965/*----------------------------------------------------------------------------*/
973/*----------------------------------------------------------------------------*/
974
975const char *
977
978/*----------------------------------------------------------------------------*/
986/*----------------------------------------------------------------------------*/
987
988const char *
990
991/*----------------------------------------------------------------------------*/
1000/*----------------------------------------------------------------------------*/
1001
1002const char *
1004
1005/*----------------------------------------------------------------------------*/
1013/*----------------------------------------------------------------------------*/
1014
1015const char *
1017
1018/*----------------------------------------------------------------------------*/
1026/*----------------------------------------------------------------------------*/
1027
1028const char *
1030
1031/*----------------------------------------------------------------------------*/
1039/*----------------------------------------------------------------------------*/
1040
1041const char *
1043
1044/*----------------------------------------------------------------------------*/
1052/*----------------------------------------------------------------------------*/
1053
1054const char *
1056
1057/*----------------------------------------------------------------------------*/
1065/*----------------------------------------------------------------------------*/
1066
1067const char *
1069
1070/*----------------------------------------------------------------------------*/
1078/*----------------------------------------------------------------------------*/
1079
1080const char *
1082
1083/*----------------------------------------------------------------------------*/
1091/*----------------------------------------------------------------------------*/
1092
1093const char *
1095
1096/*----------------------------------------------------------------------------*/
1104/*----------------------------------------------------------------------------*/
1105
1106const char *
1108
1109/*----------------------------------------------------------------------------*/
1110
1112
1113#endif /* __CS_PARAM_TYPES_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
#define END_C_DECLS
Definition: cs_defs.h:543
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:335
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
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param_types.h:215
@ CS_SPACE_SCHEME_CDOVCB
Definition: cs_param_types.h:219
@ CS_SPACE_SCHEME_HHO_P2
Definition: cs_param_types.h:225
@ CS_SPACE_SCHEME_LEGACY
Definition: cs_param_types.h:217
@ CS_SPACE_SCHEME_MACFB
Definition: cs_param_types.h:226
@ CS_SPACE_SCHEME_CDOEB
Definition: cs_param_types.h:220
@ CS_SPACE_SCHEME_CDOCB
Definition: cs_param_types.h:222
@ CS_SPACE_SCHEME_HHO_P0
Definition: cs_param_types.h:223
@ CS_SPACE_SCHEME_CDOFB
Definition: cs_param_types.h:221
@ CS_SPACE_SCHEME_CDOVB
Definition: cs_param_types.h:218
@ CS_SPACE_SCHEME_HHO_P1
Definition: cs_param_types.h:224
@ CS_SPACE_N_SCHEMES
Definition: cs_param_types.h:228
cs_param_advection_form_t
Definition: cs_param_types.h:312
@ CS_PARAM_ADVECTION_FORM_NONCONS
Definition: cs_param_types.h:315
@ CS_PARAM_ADVECTION_FORM_CONSERV
Definition: cs_param_types.h:314
@ CS_PARAM_ADVECTION_FORM_SKEWSYM
Definition: cs_param_types.h:316
@ CS_PARAM_N_ADVECTION_FORMULATIONS
Definition: cs_param_types.h:318
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
const char cs_sep_h2[80]
Definition: cs_param_types.cpp:68
cs_param_resnorm_type_t
Definition: cs_param_types.h:865
@ CS_PARAM_RESNORM_FILTERED_RHS
Definition: cs_param_types.h:872
@ CS_PARAM_N_RESNORM_TYPES
Definition: cs_param_types.h:875
@ CS_PARAM_RESNORM_NORM2_RHS
Definition: cs_param_types.h:868
@ CS_PARAM_RESNORM_WEIGHTED_RHS
Definition: cs_param_types.h:870
@ CS_PARAM_RESNORM_NONE
Definition: cs_param_types.h:867
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.cpp:249
cs_param_solver_class_t
Class of iterative solvers to consider for solver the linear system.
Definition: cs_param_types.h:643
@ CS_PARAM_SOLVER_CLASS_CS
Definition: cs_param_types.h:645
@ CS_PARAM_SOLVER_CLASS_PETSC
Definition: cs_param_types.h:648
@ CS_PARAM_SOLVER_CLASS_MUMPS
Definition: cs_param_types.h:647
@ CS_PARAM_SOLVER_CLASS_HYPRE
Definition: cs_param_types.h:646
@ CS_PARAM_N_SOLVER_CLASSES
Definition: cs_param_types.h:650
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.cpp:425
cs_param_bc_type_t
Definition: cs_param_types.h:481
@ CS_PARAM_N_BC_TYPES
Definition: cs_param_types.h:497
@ CS_BC_GENERALIZED_SYM
Definition: cs_param_types.h:494
@ CS_BC_IMPOSED_EXCHANGE_COEF
Definition: cs_param_types.h:495
@ CS_BC_NEUMANN_FULL
Definition: cs_param_types.h:490
@ CS_BC_CIRCULATION
Definition: cs_param_types.h:492
@ CS_BC_NEUMANN
Definition: cs_param_types.h:486
@ CS_BC_IMPOSED_TOT_FLUX
Definition: cs_param_types.h:493
@ CS_BC_RADIATIVE_OUTLET
Definition: cs_param_types.h:485
@ CS_BC_SYMMETRY
Definition: cs_param_types.h:487
@ CS_BC_DIRICHLET
Definition: cs_param_types.h:484
@ CS_BC_HMG_DIRICHLET
Definition: cs_param_types.h:483
@ CS_BC_WALL_MODELLED
Definition: cs_param_types.h:488
@ CS_BC_ROBIN
Definition: cs_param_types.h:491
@ CS_BC_ROUGH_WALL_MODELLED
Definition: cs_param_types.h:489
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.cpp:663
cs_param_precond_type_t
Definition: cs_param_types.h:755
@ CS_PARAM_PRECOND_ILU0
Definition: cs_param_types.h:766
@ CS_PARAM_PRECOND_LU
Definition: cs_param_types.h:765
@ CS_PARAM_PRECOND_BJACOB_ILU0
Definition: cs_param_types.h:760
@ CS_PARAM_PRECOND_NONE
Definition: cs_param_types.h:757
@ CS_PARAM_PRECOND_GKB_GMRES
Definition: cs_param_types.h:764
@ CS_PARAM_PRECOND_BJACOB_SGS
Definition: cs_param_types.h:761
@ CS_PARAM_PRECOND_SSOR
Definition: cs_param_types.h:772
@ CS_PARAM_PRECOND_HPDDM
Definition: cs_param_types.h:769
@ CS_PARAM_PRECOND_DIAG
Definition: cs_param_types.h:762
@ CS_PARAM_PRECOND_POLY1
Definition: cs_param_types.h:770
@ CS_PARAM_N_PRECOND_TYPES
Definition: cs_param_types.h:774
@ CS_PARAM_PRECOND_MUMPS
Definition: cs_param_types.h:768
@ CS_PARAM_PRECOND_AMG
Definition: cs_param_types.h:759
@ CS_PARAM_PRECOND_GKB_CG
Definition: cs_param_types.h:763
@ CS_PARAM_PRECOND_POLY2
Definition: cs_param_types.h:771
@ CS_PARAM_PRECOND_ICC0
Definition: cs_param_types.h:767
cs_param_advection_extrapol_t
Choice of how to extrapolate the advection field in the advection term.
Definition: cs_param_types.h:424
@ CS_PARAM_N_ADVECTION_EXTRAPOLATIONS
Definition: cs_param_types.h:430
@ CS_PARAM_ADVECTION_EXTRAPOL_NONE
Definition: cs_param_types.h:426
@ CS_PARAM_ADVECTION_EXTRAPOL_ADAMS_BASHFORTH_2
Definition: cs_param_types.h:428
@ CS_PARAM_ADVECTION_EXTRAPOL_TAYLOR_2
Definition: cs_param_types.h:427
const char cs_sepline[80]
Definition: cs_param_types.cpp:70
cs_param_precond_block_t
Definition: cs_param_types.h:678
@ CS_PARAM_PRECOND_BLOCK_NONE
Definition: cs_param_types.h:680
@ CS_PARAM_PRECOND_BLOCK_DIAG
Definition: cs_param_types.h:681
@ CS_PARAM_PRECOND_BLOCK_LOWER_TRIANGULAR
Definition: cs_param_types.h:682
@ CS_PARAM_PRECOND_BLOCK_UPPER_TRIANGULAR
Definition: cs_param_types.h:684
@ CS_PARAM_N_PCD_BLOCK_TYPES
Definition: cs_param_types.h:686
@ CS_PARAM_PRECOND_BLOCK_SYM_GAUSS_SEIDEL
Definition: cs_param_types.h:683
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.cpp:475
const char cs_med_sepline[50]
Definition: cs_param_types.cpp:72
cs_param_bc_enforce_t
Definition: cs_param_types.h:542
@ CS_PARAM_BC_ENFORCE_WEAK_SYM
Definition: cs_param_types.h:547
@ CS_PARAM_BC_ENFORCE_ALGEBRAIC
Definition: cs_param_types.h:544
@ CS_PARAM_BC_ENFORCE_PENALIZED
Definition: cs_param_types.h:545
@ CS_PARAM_BC_ENFORCE_WEAK_NITSCHE
Definition: cs_param_types.h:546
@ CS_PARAM_N_BC_ENFORCEMENTS
Definition: cs_param_types.h:549
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
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.cpp:197
cs_param_time_scheme_t
Definition: cs_param_types.h:279
@ CS_TIME_SCHEME_THETA
Definition: cs_param_types.h:285
@ CS_TIME_SCHEME_BDF2
Definition: cs_param_types.h:286
@ CS_TIME_SCHEME_STEADY
Definition: cs_param_types.h:281
@ CS_TIME_SCHEME_EULER_EXPLICIT
Definition: cs_param_types.h:283
@ CS_TIME_N_SCHEMES
Definition: cs_param_types.h:288
@ CS_TIME_SCHEME_EULER_IMPLICIT
Definition: cs_param_types.h:282
@ CS_TIME_SCHEME_CRANKNICO
Definition: cs_param_types.h:284
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.cpp:276
cs_param_nl_algo_t
Class of non-linear iterative algorithm.
Definition: cs_param_types.h:606
@ CS_PARAM_N_NL_ALGOS
Definition: cs_param_types.h:612
@ CS_PARAM_NL_ALGO_ANDERSON
Definition: cs_param_types.h:611
@ CS_PARAM_NL_ALGO_MODIFIED_PICARD
Definition: cs_param_types.h:610
@ CS_PARAM_NL_ALGO_PICARD
Definition: cs_param_types.h:609
@ CS_PARAM_NL_ALGO_NONE
Definition: cs_param_types.h:608
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.cpp:353
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.cpp:218
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.cpp:450
const char * cs_param_get_solver_name(cs_param_solver_type_t solver)
Get the name of the solver.
Definition: cs_param_types.cpp:523
cs_param_advection_scheme_t
Definition: cs_param_types.h:356
@ CS_PARAM_ADVECTION_SCHEME_UPWIND
Definition: cs_param_types.h:364
@ CS_PARAM_ADVECTION_SCHEME_SG
Definition: cs_param_types.h:363
@ CS_PARAM_N_ADVECTION_SCHEMES
Definition: cs_param_types.h:366
@ CS_PARAM_ADVECTION_SCHEME_HYBRID_CENTERED_UPWIND
Definition: cs_param_types.h:361
@ CS_PARAM_ADVECTION_SCHEME_CIP
Definition: cs_param_types.h:359
@ CS_PARAM_ADVECTION_SCHEME_SAMARSKII
Definition: cs_param_types.h:362
@ CS_PARAM_ADVECTION_SCHEME_CIP_CW
Definition: cs_param_types.h:360
@ CS_PARAM_ADVECTION_SCHEME_CENTERED
Definition: cs_param_types.h:358
const char * cs_param_get_precond_name(cs_param_precond_type_t precond)
Get the name of the preconditioner.
Definition: cs_param_types.cpp:593
cs_param_solver_type_t
Definition: cs_param_types.h:836
@ CS_PARAM_SOLVER_NONE
Definition: cs_param_types.h:838
@ CS_PARAM_SOLVER_USER_DEFINED
Definition: cs_param_types.h:853
@ CS_PARAM_SOLVER_GAUSS_SEIDEL
Definition: cs_param_types.h:847
@ CS_PARAM_SOLVER_MUMPS
Definition: cs_param_types.h:851
@ CS_PARAM_SOLVER_FGMRES
Definition: cs_param_types.h:846
@ CS_PARAM_SOLVER_GCR
Definition: cs_param_types.h:848
@ CS_PARAM_SOLVER_BICGS
Definition: cs_param_types.h:841
@ CS_PARAM_SOLVER_AMG
Definition: cs_param_types.h:840
@ CS_PARAM_N_SOLVER_TYPES
Definition: cs_param_types.h:855
@ CS_PARAM_SOLVER_GMRES
Definition: cs_param_types.h:849
@ CS_PARAM_SOLVER_BICGS2
Definition: cs_param_types.h:842
@ CS_PARAM_SOLVER_CR3
Definition: cs_param_types.h:844
@ CS_PARAM_SOLVER_JACOBI
Definition: cs_param_types.h:850
@ CS_PARAM_SOLVER_SYM_GAUSS_SEIDEL
Definition: cs_param_types.h:852
@ CS_PARAM_SOLVER_CG
Definition: cs_param_types.h:843
@ CS_PARAM_SOLVER_FCG
Definition: cs_param_types.h:845
cs_param_dof_reduction_t
Definition: cs_param_types.h:244
@ CS_PARAM_N_REDUCTIONS
Definition: cs_param_types.h:249
@ CS_PARAM_REDUCTION_AVERAGE
Definition: cs_param_types.h:247
@ CS_PARAM_REDUCTION_DERHAM
Definition: cs_param_types.h:246
const char cs_sep_h1[80]
Definition: cs_param_types.cpp:66
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.cpp:328
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.cpp:300
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.cpp:500
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.cpp:377
cs_param_advection_strategy_t
Choice of how to handle the advection term in an equation.
Definition: cs_param_types.h:389
@ CS_PARAM_ADVECTION_IMPLICIT_LINEARIZED
Definition: cs_param_types.h:392
@ CS_PARAM_N_ADVECTION_STRATEGIES
Definition: cs_param_types.h:395
@ CS_PARAM_ADVECTION_IMPLICIT_FULL
Definition: cs_param_types.h:391
@ CS_PARAM_ADVECTION_EXPLICIT
Definition: cs_param_types.h:393
cs_param_dotprod_type_t
Definition: cs_param_types.h:884
@ CS_PARAM_DOTPROD_CDO
Definition: cs_param_types.h:887
@ CS_PARAM_DOTPROD_EUCLIDEAN
Definition: cs_param_types.h:886
@ CS_PARAM_N_DOTPROD_TYPES
Definition: cs_param_types.h:889
char * algo
Definition: field_names.h:100
Set of parameters to check the convergence (or the divergence) of an iterative process (tolerances or...
Definition: cs_param_types.h:558
double atol
Definition: cs_param_types.h:575
double dtol
Definition: cs_param_types.h:577
int n_max_iter
Definition: cs_param_types.h:578
double rtol
Definition: cs_param_types.h:576