7.0
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 
55 #define CS_ISOTROPIC_DIFFUSION (1 << 0)
56 
58 #define CS_ORTHOTROPIC_DIFFUSION (1 << 1)
59 
61 #define CS_ANISOTROPIC_LEFT_DIFFUSION (1 << 2)
62 
64 #define CS_ANISOTROPIC_RIGHT_DIFFUSION (1 << 3)
65 
67 #define CS_ANISOTROPIC_DIFFUSION ((1 << 2) + (1 << 3))
68 
71 /*============================================================================
72  * Type definitions
73  *============================================================================*/
74 
75 /*----------------------------------------------------------------------------*/
91 /*----------------------------------------------------------------------------*/
92 
93 typedef void
95  cs_lnum_t n_elts,
96  const cs_lnum_t *elt_ids,
97  const cs_real_t *coords,
98  bool dense_output,
99  void *input,
100  cs_real_t *retval);
101 
102 /*----------------------------------------------------------------------------*/
116 /*----------------------------------------------------------------------------*/
117 
118 typedef void
119 (cs_dof_func_t) (cs_lnum_t n_elts,
120  const cs_lnum_t *elt_ids,
121  bool dense_output,
122  void *input,
123  cs_real_t *retval);
124 
125 /*----------------------------------------------------------------------------*/
134 /*----------------------------------------------------------------------------*/
135 
136 typedef void
137 (cs_time_func_t) (double time,
138  void *input,
139  cs_real_t *retval);
140 
172 typedef enum {
173 
182 
184 
186 
199 typedef enum {
200 
203 
205 
207 
234 typedef enum {
235 
242 
244 
246 
267 typedef enum {
268 
272 
274 
276 
311 typedef enum {
312 
320 
322 
324 
344 typedef enum {
345 
349 
351 
353 
378 typedef enum {
379 
383 
385 
387 
431 typedef enum {
432 
441 
443 
445 
475 typedef enum {
476 
481 
483 
485 
511 typedef enum {
512 
517 
519 
521 
528 typedef enum {
529 
538 
540 
604 typedef enum {
605 
607 
621 
623 
625 
691 typedef enum {
692 
694 
711 
713 
715 
722 typedef enum {
723 
733 
735 
736 /*============================================================================
737  * Global variables
738  *============================================================================*/
739 
740 /* Separation lines: header1, header2 (compatible with markdown), other */
741 extern const char cs_sep_h1[80];
742 extern const char cs_sep_h2[80];
743 extern const char cs_sepline[80];
744 extern const char cs_med_sepline[50];
745 
746 /*============================================================================
747  * Public function prototypes
748  *============================================================================*/
749 
750 /*----------------------------------------------------------------------------*/
759 /*----------------------------------------------------------------------------*/
760 
761 bool
763 
764 /*----------------------------------------------------------------------------*/
772 /*----------------------------------------------------------------------------*/
773 
774 const char *
776 
777 /*----------------------------------------------------------------------------*/
785 /*----------------------------------------------------------------------------*/
786 
787 const char *
789 
790 /*----------------------------------------------------------------------------*/
798 /*----------------------------------------------------------------------------*/
799 
800 const char *
802 
803 /*----------------------------------------------------------------------------*/
811 /*----------------------------------------------------------------------------*/
812 
813 const char *
815 
816 /*----------------------------------------------------------------------------*/
824 /*----------------------------------------------------------------------------*/
825 
826 const char *
828 
829 /*----------------------------------------------------------------------------*/
838 /*----------------------------------------------------------------------------*/
839 
840 const char *
842 
843 /*----------------------------------------------------------------------------*/
851 /*----------------------------------------------------------------------------*/
852 
853 const char *
855 
856 /*----------------------------------------------------------------------------*/
864 /*----------------------------------------------------------------------------*/
865 
866 const char *
868 
869 /*----------------------------------------------------------------------------*/
877 /*----------------------------------------------------------------------------*/
878 
879 const char *
881 
882 /*----------------------------------------------------------------------------*/
890 /*----------------------------------------------------------------------------*/
891 
892 const char *
894 
895 /*----------------------------------------------------------------------------*/
903 /*----------------------------------------------------------------------------*/
904 
905 const char *
907 
908 /*----------------------------------------------------------------------------*/
909 
911 
912 #endif /* __CS_PARAM_TYPES_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:492
double cs_real_t
Floating-point value.
Definition: cs_defs.h:304
#define END_C_DECLS
Definition: cs_defs.h:493
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
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:119
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param_types.h:172
@ CS_SPACE_SCHEME_CDOVCB
Definition: cs_param_types.h:176
@ CS_SPACE_SCHEME_HHO_P2
Definition: cs_param_types.h:181
@ CS_SPACE_SCHEME_LEGACY
Definition: cs_param_types.h:174
@ CS_SPACE_SCHEME_CDOEB
Definition: cs_param_types.h:177
@ CS_SPACE_SCHEME_HHO_P0
Definition: cs_param_types.h:179
@ CS_SPACE_SCHEME_CDOFB
Definition: cs_param_types.h:178
@ CS_SPACE_SCHEME_CDOVB
Definition: cs_param_types.h:175
@ CS_SPACE_SCHEME_HHO_P1
Definition: cs_param_types.h:180
@ CS_SPACE_N_SCHEMES
Definition: cs_param_types.h:183
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:332
cs_param_advection_form_t
Definition: cs_param_types.h:267
@ CS_PARAM_ADVECTION_FORM_NONCONS
Definition: cs_param_types.h:270
@ CS_PARAM_ADVECTION_FORM_CONSERV
Definition: cs_param_types.h:269
@ CS_PARAM_ADVECTION_FORM_SKEWSYM
Definition: cs_param_types.h:271
@ CS_PARAM_N_ADVECTION_FORMULATIONS
Definition: cs_param_types.h:273
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 elt_ids is optional....
Definition: cs_param_types.h:94
const char cs_sep_h2[80]
Definition: cs_param_types.c:68
cs_param_resnorm_type_t
Definition: cs_param_types.h:722
@ CS_PARAM_RESNORM_FILTERED_RHS
Definition: cs_param_types.h:729
@ CS_PARAM_N_RESNORM_TYPES
Definition: cs_param_types.h:732
@ CS_PARAM_RESNORM_NORM2_RHS
Definition: cs_param_types.h:725
@ CS_PARAM_RESNORM_WEIGHTED_RHS
Definition: cs_param_types.h:727
@ CS_PARAM_RESNORM_NONE
Definition: cs_param_types.h:724
const char * cs_param_get_precond_name(cs_param_precond_type_t precond)
Get the name of the preconditioner.
Definition: cs_param_types.c:486
cs_param_bc_type_t
Definition: cs_param_types.h:431
@ CS_PARAM_N_BC_TYPES
Definition: cs_param_types.h:442
@ CS_PARAM_BC_SLIDING
Definition: cs_param_types.h:439
@ CS_PARAM_BC_ROBIN
Definition: cs_param_types.h:438
@ CS_PARAM_BC_NEUMANN
Definition: cs_param_types.h:436
@ CS_PARAM_BC_DIRICHLET
Definition: cs_param_types.h:434
@ CS_PARAM_BC_HMG_DIRICHLET
Definition: cs_param_types.h:433
@ CS_PARAM_BC_NEUMANN_FULL
Definition: cs_param_types.h:437
@ CS_PARAM_BC_CIRCULATION
Definition: cs_param_types.h:440
@ CS_PARAM_BC_HMG_NEUMANN
Definition: cs_param_types.h:435
cs_param_precond_type_t
Definition: cs_param_types.h:604
@ CS_PARAM_PRECOND_ILU0
Definition: cs_param_types.h:616
@ CS_PARAM_PRECOND_BJACOB_ILU0
Definition: cs_param_types.h:608
@ CS_PARAM_PRECOND_NONE
Definition: cs_param_types.h:606
@ CS_PARAM_PRECOND_GKB_GMRES
Definition: cs_param_types.h:615
@ CS_PARAM_PRECOND_BJACOB_SGS
Definition: cs_param_types.h:609
@ CS_PARAM_PRECOND_SSOR
Definition: cs_param_types.h:620
@ CS_PARAM_PRECOND_DIAG
Definition: cs_param_types.h:613
@ CS_PARAM_PRECOND_POLY1
Definition: cs_param_types.h:618
@ CS_PARAM_PRECOND_AS
Definition: cs_param_types.h:612
@ CS_PARAM_N_PRECOND_TYPES
Definition: cs_param_types.h:622
@ CS_PARAM_PRECOND_AMG
Definition: cs_param_types.h:610
@ CS_PARAM_PRECOND_GKB_CG
Definition: cs_param_types.h:614
@ CS_PARAM_PRECOND_AMG_BLOCK
Definition: cs_param_types.h:611
@ CS_PARAM_PRECOND_POLY2
Definition: cs_param_types.h:619
@ CS_PARAM_PRECOND_ICC0
Definition: cs_param_types.h:617
cs_param_advection_extrapol_t
Choice of how to extrapolate the advection field in the advection term.
Definition: cs_param_types.h:378
@ CS_PARAM_N_ADVECTION_EXTRAPOLATIONS
Definition: cs_param_types.h:384
@ CS_PARAM_ADVECTION_EXTRAPOL_NONE
Definition: cs_param_types.h:380
@ CS_PARAM_ADVECTION_EXTRAPOL_ADAMS_BASHFORTH_2
Definition: cs_param_types.h:382
@ CS_PARAM_ADVECTION_EXTRAPOL_TAYLOR_2
Definition: cs_param_types.h:381
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:279
const char cs_sepline[80]
Definition: cs_param_types.c:70
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:255
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:553
cs_param_sles_class_t
Class of iterative solvers to consider for solver the linear system.
Definition: cs_param_types.h:511
@ CS_PARAM_SLES_CLASS_HYPRE
Definition: cs_param_types.h:514
@ CS_PARAM_SLES_CLASS_CS
Definition: cs_param_types.h:513
@ CS_PARAM_SLES_N_CLASSES
Definition: cs_param_types.h:518
@ CS_PARAM_SLES_CLASS_PETSC
Definition: cs_param_types.h:516
@ CS_PARAM_SLES_CLASS_MUMPS
Definition: cs_param_types.h:515
cs_param_itsol_type_t
Definition: cs_param_types.h:691
@ CS_PARAM_N_ITSOL_TYPES
Definition: cs_param_types.h:712
@ CS_PARAM_ITSOL_GAUSS_SEIDEL
Definition: cs_param_types.h:702
@ CS_PARAM_ITSOL_BICGSTAB2
Definition: cs_param_types.h:697
@ CS_PARAM_ITSOL_GKB_GMRES
Definition: cs_param_types.h:704
@ CS_PARAM_ITSOL_JACOBI
Definition: cs_param_types.h:706
@ CS_PARAM_ITSOL_GKB_CG
Definition: cs_param_types.h:703
@ CS_PARAM_ITSOL_BICG
Definition: cs_param_types.h:696
@ CS_PARAM_ITSOL_AMG
Definition: cs_param_types.h:695
@ CS_PARAM_ITSOL_CR3
Definition: cs_param_types.h:699
@ CS_PARAM_ITSOL_MUMPS
Definition: cs_param_types.h:708
@ CS_PARAM_ITSOL_FGMRES
Definition: cs_param_types.h:701
@ CS_PARAM_ITSOL_MUMPS_LDLT
Definition: cs_param_types.h:709
@ CS_PARAM_ITSOL_CG
Definition: cs_param_types.h:698
@ CS_PARAM_ITSOL_MINRES
Definition: cs_param_types.h:707
@ CS_PARAM_ITSOL_GMRES
Definition: cs_param_types.h:705
@ CS_PARAM_ITSOL_FCG
Definition: cs_param_types.h:700
@ CS_PARAM_ITSOL_NONE
Definition: cs_param_types.h:693
@ CS_PARAM_ITSOL_SYM_GAUSS_SEIDEL
Definition: cs_param_types.h:710
const char cs_med_sepline[50]
Definition: cs_param_types.c:72
cs_param_bc_enforce_t
Definition: cs_param_types.h:475
@ CS_PARAM_BC_ENFORCE_WEAK_SYM
Definition: cs_param_types.h:480
@ CS_PARAM_BC_ENFORCE_ALGEBRAIC
Definition: cs_param_types.h:477
@ CS_PARAM_BC_ENFORCE_PENALIZED
Definition: cs_param_types.h:478
@ CS_PARAM_BC_ENFORCE_WEAK_NITSCHE
Definition: cs_param_types.h:479
@ CS_PARAM_N_BC_ENFORCEMENTS
Definition: cs_param_types.h:482
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:307
const char * cs_param_get_solver_name(cs_param_itsol_type_t solver)
Get the name of the solver.
Definition: cs_param_types.c:410
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:137
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:177
cs_param_time_scheme_t
Definition: cs_param_types.h:234
@ CS_TIME_SCHEME_THETA
Definition: cs_param_types.h:240
@ CS_TIME_SCHEME_BDF2
Definition: cs_param_types.h:241
@ CS_TIME_SCHEME_STEADY
Definition: cs_param_types.h:236
@ CS_TIME_SCHEME_EULER_EXPLICIT
Definition: cs_param_types.h:238
@ CS_TIME_N_SCHEMES
Definition: cs_param_types.h:243
@ CS_TIME_SCHEME_EULER_IMPLICIT
Definition: cs_param_types.h:237
@ CS_TIME_SCHEME_CRANKNICO
Definition: cs_param_types.h:239
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:385
cs_param_advection_scheme_t
Definition: cs_param_types.h:311
@ CS_PARAM_ADVECTION_SCHEME_UPWIND
Definition: cs_param_types.h:319
@ CS_PARAM_ADVECTION_SCHEME_SG
Definition: cs_param_types.h:318
@ CS_PARAM_N_ADVECTION_SCHEMES
Definition: cs_param_types.h:321
@ CS_PARAM_ADVECTION_SCHEME_HYBRID_CENTERED_UPWIND
Definition: cs_param_types.h:316
@ CS_PARAM_ADVECTION_SCHEME_CIP
Definition: cs_param_types.h:314
@ CS_PARAM_ADVECTION_SCHEME_SAMARSKII
Definition: cs_param_types.h:317
@ CS_PARAM_ADVECTION_SCHEME_CIP_CW
Definition: cs_param_types.h:315
@ CS_PARAM_ADVECTION_SCHEME_CENTERED
Definition: cs_param_types.h:313
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:356
cs_param_amg_type_t
Definition: cs_param_types.h:528
@ CS_PARAM_N_AMG_TYPES
Definition: cs_param_types.h:537
@ CS_PARAM_AMG_PETSC_GAMG
Definition: cs_param_types.h:532
@ CS_PARAM_AMG_HOUSE_K
Definition: cs_param_types.h:535
@ CS_PARAM_AMG_HOUSE_V
Definition: cs_param_types.h:534
@ CS_PARAM_AMG_PETSC_PCMG
Definition: cs_param_types.h:533
@ CS_PARAM_AMG_HYPRE_BOOMER
Definition: cs_param_types.h:531
@ CS_PARAM_AMG_NONE
Definition: cs_param_types.h:530
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:228
cs_param_dof_reduction_t
Definition: cs_param_types.h:199
@ CS_PARAM_N_REDUCTIONS
Definition: cs_param_types.h:204
@ CS_PARAM_REDUCTION_AVERAGE
Definition: cs_param_types.h:202
@ CS_PARAM_REDUCTION_DERHAM
Definition: cs_param_types.h:201
const char cs_sep_h1[80]
Definition: cs_param_types.c:66
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:199
cs_param_advection_strategy_t
Choice of how to handle the advection term in an equation.
Definition: cs_param_types.h:344
@ CS_PARAM_ADVECTION_IMPLICIT_LINEARIZED
Definition: cs_param_types.h:347
@ CS_PARAM_N_ADVECTION_STRATEGIES
Definition: cs_param_types.h:350
@ CS_PARAM_ADVECTION_IMPLICIT_FULL
Definition: cs_param_types.h:346
@ CS_PARAM_ADVECTION_EXPLICIT
Definition: cs_param_types.h:348