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 
177 typedef enum {
178 
183 
185 
187 
205 typedef enum {
206 
209 
211 
213 
236 typedef enum {
237 
243 
245 
247 
273 typedef enum {
274 
281 
283 
310 typedef enum {
311 
316 
318 
320 
332 typedef enum {
333 
344 
346 
353 typedef enum {
354 
363 
365 
372 typedef struct {
373 
374  cs_param_precond_type_t precond;
375  cs_param_itsol_type_t solver;
378  double eps;
384 
386 
387 /*============================================================================
388  * Global variables
389  *============================================================================*/
390 
391 /*============================================================================
392  * Public function prototypes
393  *============================================================================*/
394 
395 /*----------------------------------------------------------------------------*/
403 /*----------------------------------------------------------------------------*/
404 
405 const char *
406 cs_param_get_space_scheme_name(cs_param_space_scheme_t scheme);
407 
408 /*----------------------------------------------------------------------------*/
416 /*----------------------------------------------------------------------------*/
417 
418 const char *
419 cs_param_get_time_scheme_name(cs_param_time_scheme_t scheme);
420 
421 /*----------------------------------------------------------------------------*/
429 /*----------------------------------------------------------------------------*/
430 
431 const char *
432 cs_param_get_solver_name(cs_param_itsol_type_t solver);
433 
434 /*----------------------------------------------------------------------------*/
442 /*----------------------------------------------------------------------------*/
443 
444 const char *
445 cs_param_get_precond_name(cs_param_precond_type_t precond);
446 
447 /*----------------------------------------------------------------------------*/
455 /*----------------------------------------------------------------------------*/
456 
457 const char *
458 cs_param_get_bc_name(cs_param_bc_type_t bc);
459 
460 /*----------------------------------------------------------------------------*/
468 /*----------------------------------------------------------------------------*/
469 
470 const char *
471 cs_param_get_bc_enforcement_name(cs_param_bc_enforce_t type);
472 
473 /*----------------------------------------------------------------------------*/
474 
476 
477 #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:144
cs_param_precond_type_t precond
Definition: cs_param.h:374
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:208
Definition: cs_param.h:337
Definition: cs_param.h:277
Definition: cs_param.h:124
Definition: cs_param.h:339
Definition: cs_param.h:356
Definition: cs_param.h:361
Definition: cs_param.h:240
Definition: cs_param.h:184
cs_param_itsol_type_t solver
Definition: cs_param.h:375
cs_param_advection_scheme_t
Definition: cs_param.h:236
Definition: cs_param.h:334
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:182
#define BEGIN_C_DECLS
Definition: cs_defs.h:461
Definition: cs_param.h:279
Definition: cs_param.h:314
Definition: cs_param.h:181
Definition: cs_param.h:335
Definition: cs_param.h:130
Definition: cs_param.h:275
Definition: cs_param.h:238
Definition: cs_param.h:355
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:245
Definition: cs_param.h:362
Definition: cs_param.h:358
Definition: cs_param.h:182
Definition: cs_param.h:340
Definition: cs_param.h:125
cs_param_advection_form_t
Definition: cs_param.h:205
Definition: cs_param.h:357
Definition: cs_param.h:132
Definition: cs_param.h:179
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:276
Definition: cs_param.h:343
Definition: cs_param.h:150
Definition: cs_param.h:241
int n_max_iter
Definition: cs_param.h:377
Definition: cs_param.h:317
bool resid_normalized
Definition: cs_param.h:383
Definition: cs_param.h:180
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:163
Definition: cs_param.h:239
cs_param_precond_type_t
Definition: cs_param.h:332
cs_param_time_scheme_t
Definition: cs_param.h:177
static int input(void)
Definition: cs_param.h:336
cs_param_dof_reduction_t
Definition: cs_param.h:148
cs_param_itsol_type_t
Definition: cs_param.h:353
Definition: cs_param.h:151
cs_param_bc_type_t
Definition: cs_param.h:273
Definition: cs_param.h:312
Definition: cs_param.h:280
Definition: cs_param.h:338
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
Definition: cs_param.h:360
Definition: cs_param.h:359
const char * cs_param_get_solver_name(cs_param_itsol_type_t solver)
Get the name of the solver.
Definition: cs_param.c:201
Definition: cs_param.h:313
#define END_C_DECLS
Definition: cs_defs.h:462
Definition: cs_param.h:128
Definition: cs_param.h:244
Definition: cs_param.h:242
Definition: cs_param.h:207
Definition: cs_param.h:315
Definition: cs_param.h:341
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:378
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:125
Definition: cs_param.h:127
cs_param_bc_enforce_t
Definition: cs_param.h:310
Definition: cs_param.h:342
Definition: cs_param.h:210
Structure storing all metadata related to the resolution of a linear system with an iterative solver...
Definition: cs_param.h:372
Definition: cs_param.h:129
Definition: cs_param.h:278