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
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
762 cs_param_space_scheme_is_face_based(cs_param_space_scheme_t scheme);
763 
764 /*----------------------------------------------------------------------------*/
772 /*----------------------------------------------------------------------------*/
773 
774 const char *
775 cs_param_get_space_scheme_name(cs_param_space_scheme_t scheme);
776 
777 /*----------------------------------------------------------------------------*/
785 /*----------------------------------------------------------------------------*/
786 
787 const char *
788 cs_param_get_time_scheme_name(cs_param_time_scheme_t scheme);
789 
790 /*----------------------------------------------------------------------------*/
798 /*----------------------------------------------------------------------------*/
799 
800 const char *
801 cs_param_get_advection_form_name(cs_param_advection_form_t adv_form);
802 
803 /*----------------------------------------------------------------------------*/
811 /*----------------------------------------------------------------------------*/
812 
813 const char *
814 cs_param_get_advection_scheme_name(cs_param_advection_scheme_t scheme);
815 
816 /*----------------------------------------------------------------------------*/
824 /*----------------------------------------------------------------------------*/
825 
826 const char *
827 cs_param_get_advection_strategy_name(cs_param_advection_strategy_t adv_stra);
828 
829 /*----------------------------------------------------------------------------*/
838 /*----------------------------------------------------------------------------*/
839 
840 const char *
841 cs_param_get_advection_extrapol_name(cs_param_advection_extrapol_t extrapol);
842 
843 /*----------------------------------------------------------------------------*/
851 /*----------------------------------------------------------------------------*/
852 
853 const char *
854 cs_param_get_bc_name(cs_param_bc_type_t bc);
855 
856 /*----------------------------------------------------------------------------*/
864 /*----------------------------------------------------------------------------*/
865 
866 const char *
867 cs_param_get_bc_enforcement_name(cs_param_bc_enforce_t type);
868 
869 /*----------------------------------------------------------------------------*/
877 /*----------------------------------------------------------------------------*/
878 
879 const char *
880 cs_param_get_solver_name(cs_param_itsol_type_t solver);
881 
882 /*----------------------------------------------------------------------------*/
890 /*----------------------------------------------------------------------------*/
891 
892 const char *
893 cs_param_get_precond_name(cs_param_precond_type_t precond);
894 
895 /*----------------------------------------------------------------------------*/
903 /*----------------------------------------------------------------------------*/
904 
905 const char *
906 cs_param_get_amg_type_name(cs_param_amg_type_t type);
907 
908 /*----------------------------------------------------------------------------*/
909 
911 
912 #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:228
Definition: cs_param_types.h:317
Definition: cs_param_types.h:612
Definition: cs_param_types.h:606
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
Definition: cs_param_types.h:439
Definition: cs_param_types.h:236
Definition: cs_param_types.h:608
Definition: cs_param_types.h:434
Definition: cs_param_types.h:437
Definition: cs_param_types.h:535
Definition: cs_param_types.h:240
Definition: cs_param_types.h:319
Definition: cs_param_types.h:618
Definition: cs_param_types.h:477
Definition: cs_param_types.h:697
cs_param_resnorm_type_t
Definition: cs_param_types.h:722
Definition: cs_param_types.h:617
const char cs_med_sepline[50]
Definition: cs_param_types.c:72
Definition: cs_param_types.h:514
Definition: cs_param_types.h:204
Definition: cs_param_types.h:435
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
Definition: cs_param_types.h:613
cs_param_bc_enforce_t
Definition: cs_param_types.h:475
Definition: cs_param_types.h:478
Definition: cs_param_types.h:181
#define BEGIN_C_DECLS
Definition: cs_defs.h:495
Definition: cs_param_types.h:438
Definition: cs_param_types.h:702
Definition: cs_param_types.h:537
Definition: cs_param_types.h:710
cs_param_amg_type_t
Definition: cs_param_types.h:528
Definition: cs_param_types.h:619
Definition: cs_param_types.h:611
Definition: cs_param_types.h:318
cs_param_precond_type_t
Definition: cs_param_types.h:604
const char cs_sep_h2[80]
Definition: cs_param_types.c:68
Definition: cs_param_types.h:533
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
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
Definition: cs_param_types.h:316
Definition: cs_param_types.h:315
cs_param_sles_class_t
Class of iterative solvers to consider for solver the linear system.
Definition: cs_param_types.h:511
cs_param_advection_strategy_t
Choice of how to handle the advection term in an equation.
Definition: cs_param_types.h:344
Definition: cs_param_types.h:380
Definition: cs_param_types.h:705
Definition: cs_param_types.h:704
Definition: cs_param_types.h:202
Definition: cs_param_types.h:614
Definition: cs_param_types.h:183
double cs_real_t
Floating-point value.
Definition: cs_defs.h:307
Definition: cs_param_types.h:201
Definition: cs_param_types.h:610
Definition: cs_param_types.h:314
Definition: cs_param_types.h:699
Definition: cs_param_types.h:532
Definition: cs_param_types.h:706
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
Definition: cs_param_types.h:482
Definition: cs_param_types.h:348
Definition: cs_param_types.h:693
cs_param_advection_extrapol_t
Choice of how to extrapolate the advection field in the advection term.
Definition: cs_param_types.h:378
Definition: cs_param_types.h:701
Definition: cs_param_types.h:707
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
Definition: cs_param_types.h:616
Definition: cs_param_types.h:622
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
Definition: cs_param_types.h:698
Definition: cs_param_types.h:384
Definition: cs_param_types.h:313
Definition: cs_param_types.h:174
Definition: cs_param_types.h:238
Definition: cs_param_types.h:696
Definition: cs_param_types.h:241
Definition: cs_param_types.h:175
Definition: cs_param_types.h:530
Definition: cs_param_types.h:703
Definition: cs_param_types.h:270
Definition: cs_param_types.h:382
Definition: cs_param_types.h:480
Definition: cs_param_types.h:176
Definition: cs_param_types.h:732
Definition: cs_param_types.h:243
Definition: cs_param_types.h:440
Definition: cs_param_types.h:381
Definition: cs_param_types.h:321
Definition: cs_param_types.h:700
Definition: cs_param_types.h:609
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
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:301
Definition: cs_param_types.h:237
Definition: cs_param_types.h:178
Definition: cs_param_types.h:712
Definition: cs_param_types.h:729
Definition: cs_param_types.h:709
Definition: cs_param_types.h:620
#define END_C_DECLS
Definition: cs_defs.h:496
Definition: cs_param_types.h:239
Definition: cs_param_types.h:442
Definition: cs_param_types.h:531
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
Definition: cs_param_types.h:515
Definition: cs_param_types.h:695
cs_param_dof_reduction_t
Definition: cs_param_types.h:199
cs_param_bc_type_t
Definition: cs_param_types.h:431
cs_param_itsol_type_t
Definition: cs_param_types.h:691
Definition: cs_param_types.h:271
const char cs_sepline[80]
Definition: cs_param_types.c:70
Definition: cs_param_types.h:518
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
Definition: cs_param_types.h:346
const char cs_sep_h1[80]
Definition: cs_param_types.c:66
Definition: cs_param_types.h:273
Definition: cs_param_types.h:177
Definition: cs_param_types.h:269
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
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_advection_scheme_t
Definition: cs_param_types.h:311
Definition: cs_param_types.h:725
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
Definition: cs_param_types.h:479
Definition: cs_param_types.h:347
Definition: cs_param_types.h:534
Definition: cs_param_types.h:708
cs_param_time_scheme_t
Definition: cs_param_types.h:234
Definition: cs_param_types.h:615
cs_param_advection_form_t
Definition: cs_param_types.h:267
Definition: cs_param_types.h:727
Definition: cs_param_types.h:513
Definition: cs_param_types.h:180
Definition: cs_param_types.h:724
Definition: cs_param_types.h:179
Definition: cs_param_types.h:433
Definition: cs_param_types.h:516
Definition: cs_param_types.h:436
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
Definition: cs_param_types.h:350