programmer's documentation
cs_param.h
Go to the documentation of this file.
1 #ifndef __CS_PARAM_H__
2 #define __CS_PARAM_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-2018 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 
44 /*============================================================================
45  * Type definitions
46  *============================================================================*/
47 
48 /*----------------------------------------------------------------------------*/
63 /*----------------------------------------------------------------------------*/
64 
65 typedef void
67  cs_lnum_t n_elts,
68  const cs_lnum_t *elt_ids,
69  const cs_real_t *coords,
70  bool compact,
71  void *input,
72  cs_real_t *retval);
73 
74 /*----------------------------------------------------------------------------*/
86 /*----------------------------------------------------------------------------*/
87 
88 typedef cs_real_t
89 (cs_timestep_func_t) (int time_iter,
90  double time,
91  void *input);
92 
93 /* ================
94  * ENUM definitions
95  * ================ */
96 
122 typedef enum {
123 
131 
133 
135 
148 typedef enum {
149 
152 
154 
156 
180 typedef enum {
181 
187 
189 
191 
209 typedef enum {
210 
213 
215 
217 
247 typedef enum {
248 
255 
257 
259 
285 typedef enum {
286 
293 
295 
325 typedef enum {
326 
331 
333 
335 
346 typedef enum {
347 
354 
356 
364 typedef enum {
365 
377 
379 
386 typedef enum {
387 
399 
401 
408 typedef struct {
409 
410  cs_param_precond_type_t precond;
411  cs_param_itsol_type_t solver;
412  cs_param_amg_type_t amg_type;
414  double eps;
420 
422 
423 /*============================================================================
424  * Global variables
425  *============================================================================*/
426 
427 /*============================================================================
428  * Public function prototypes
429  *============================================================================*/
430 
431 /*----------------------------------------------------------------------------*/
439 /*----------------------------------------------------------------------------*/
440 
441 const char *
442 cs_param_get_space_scheme_name(cs_param_space_scheme_t scheme);
443 
444 /*----------------------------------------------------------------------------*/
452 /*----------------------------------------------------------------------------*/
453 
454 const char *
455 cs_param_get_time_scheme_name(cs_param_time_scheme_t scheme);
456 
457 /*----------------------------------------------------------------------------*/
465 /*----------------------------------------------------------------------------*/
466 
467 const char *
468 cs_param_get_bc_name(cs_param_bc_type_t bc);
469 
470 /*----------------------------------------------------------------------------*/
478 /*----------------------------------------------------------------------------*/
479 
480 const char *
481 cs_param_get_bc_enforcement_name(cs_param_bc_enforce_t type);
482 
483 /*----------------------------------------------------------------------------*/
491 /*----------------------------------------------------------------------------*/
492 
493 const char *
494 cs_param_get_solver_name(cs_param_itsol_type_t solver);
495 
496 /*----------------------------------------------------------------------------*/
504 /*----------------------------------------------------------------------------*/
505 
506 const char *
507 cs_param_get_precond_name(cs_param_precond_type_t precond);
508 
509 /*----------------------------------------------------------------------------*/
517 /*----------------------------------------------------------------------------*/
518 
519 const char *
520 cs_param_get_amg_type_name(cs_param_amg_type_t type);
521 
522 /*----------------------------------------------------------------------------*/
523 
525 
526 #endif /* __CS_PARAM_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.c:145
cs_param_precond_type_t precond
Definition: cs_param.h:410
Definition: cs_param.h:126
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 compact, void *input, cs_real_t *retval)
Generic function pointer for an analytic function elt_ids is optional. If not NULL, it enables to access in coords at the right location and the same thing to fill retval if compact is set to false.
Definition: cs_param.h:66
Definition: cs_param.h:212
Definition: cs_param.h:369
Definition: cs_param.h:289
Definition: cs_param.h:124
Definition: cs_param.h:372
Definition: cs_param.h:352
Definition: cs_param.h:389
cs_param_amg_type_t amg_type
Definition: cs_param.h:412
Definition: cs_param.h:391
Definition: cs_param.h:397
Definition: cs_param.h:254
Definition: cs_param.h:188
cs_param_itsol_type_t solver
Definition: cs_param.h:411
cs_param_advection_scheme_t
Definition: cs_param.h:247
Definition: cs_param.h:366
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.c:183
#define BEGIN_C_DECLS
Definition: cs_defs.h:462
Definition: cs_param.h:291
Definition: cs_param.h:349
Definition: cs_param.h:329
Definition: cs_param.h:390
Definition: cs_param.h:185
Definition: cs_param.h:367
Definition: cs_param.h:130
Definition: cs_param.h:287
Definition: cs_param.h:327
Definition: cs_param.h:249
Definition: cs_param.h:388
Definition: cs_param.h:153
const char * cs_param_get_precond_name(cs_param_precond_type_t precond)
Get the name of the preconditioner.
Definition: cs_param.c:255
Definition: cs_param.h:398
Definition: cs_param.h:393
Definition: cs_param.h:186
Definition: cs_param.h:373
Definition: cs_param.h:125
cs_param_advection_form_t
Definition: cs_param.h:209
Definition: cs_param.h:392
Definition: cs_param.h:132
Definition: cs_param.h:183
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
cs_real_t() cs_timestep_func_t(int time_iter, double time, void *input)
Function which defines the time step according to the number of iteration already done...
Definition: cs_param.h:89
Definition: cs_param.h:396
Definition: cs_param.h:288
Definition: cs_param.h:182
Definition: cs_param.h:376
Definition: cs_param.h:150
Definition: cs_param.h:370
Definition: cs_param.h:252
Definition: cs_param.h:348
int n_max_iter
Definition: cs_param.h:413
Definition: cs_param.h:332
bool resid_normalized
Definition: cs_param.h:419
Definition: cs_param.h:184
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.c:164
Definition: cs_param.h:351
Definition: cs_param.h:250
cs_param_precond_type_t
Definition: cs_param.h:364
cs_param_time_scheme_t
Definition: cs_param.h:180
static int input(void)
Definition: cs_param.h:368
cs_param_dof_reduction_t
Definition: cs_param.h:148
Definition: cs_param.h:350
cs_param_itsol_type_t
Definition: cs_param.h:386
Definition: cs_param.h:353
Definition: cs_param.h:151
cs_param_bc_type_t
Definition: cs_param.h:285
Definition: cs_param.h:328
Definition: cs_param.h:292
Definition: cs_param.h:371
cs_param_amg_type_t
Definition: cs_param.h:346
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
Definition: cs_param.h:395
Definition: cs_param.h:394
const char * cs_param_get_solver_name(cs_param_itsol_type_t solver)
Get the name of the solver.
Definition: cs_param.c:202
#define END_C_DECLS
Definition: cs_defs.h:463
Definition: cs_param.h:128
Definition: cs_param.h:256
Definition: cs_param.h:253
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.c:308
Definition: cs_param.h:211
Definition: cs_param.h:330
Definition: cs_param.h:374
cs_param_space_scheme_t
Type of numerical scheme for the discretization in space.
Definition: cs_param.h:122
double eps
Definition: cs_param.h:414
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.c:126
Definition: cs_param.h:127
cs_param_bc_enforce_t
Definition: cs_param.h:325
Definition: cs_param.h:375
Definition: cs_param.h:214
Structure storing all metadata related to the resolution of a linear system with an iterative solver...
Definition: cs_param.h:408
Definition: cs_param.h:129
Definition: cs_param.h:290