programmer's documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
cs_cdo_advection.h
Go to the documentation of this file.
1 #ifndef __CS_CDO_ADVECTION_H__
2 #define __CS_CDO_ADVECTION_H__
3 
4 /*============================================================================
5  * Build discrete convection operators for CDO schemes
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_advection_field.h"
35 #include "cs_cdo.h"
36 #include "cs_cdo_connect.h"
37 #include "cs_cdo_local.h"
38 #include "cs_cdo_quantities.h"
39 #include "cs_equation_param.h"
40 #include "cs_param.h"
41 #include "cs_property.h"
42 
43 /*----------------------------------------------------------------------------*/
44 
46 
47 /*============================================================================
48  * Macro definitions
49  *============================================================================*/
50 
51 /*============================================================================
52  * Type definitions
53  *============================================================================*/
54 
55 /*----------------------------------------------------------------------------*/
66 /*----------------------------------------------------------------------------*/
67 
68 typedef void
70  const cs_cell_mesh_t *cm,
72  cs_cell_builder_t *cb);
73 
74 /*----------------------------------------------------------------------------*/
85 /*----------------------------------------------------------------------------*/
86 
87 typedef void
89  const cs_cell_mesh_t *cm,
90  const cs_equation_param_t *eqp,
93  cs_cell_sys_t *csys);
94 
95 /*============================================================================
96  * Global variables
97  *============================================================================*/
98 
99 /*============================================================================
100  * Public function prototypes
101  *============================================================================*/
102 
103 /*----------------------------------------------------------------------------*/
109 /*----------------------------------------------------------------------------*/
110 
111 void
112 cs_cdo_advection_set_cip_coef(double new_value);
113 
114 /*----------------------------------------------------------------------------*/
120 /*----------------------------------------------------------------------------*/
121 
122 double
124 
125 /*----------------------------------------------------------------------------*/
137 /*----------------------------------------------------------------------------*/
138 
139 void
141  const cs_cell_mesh_t *cm,
142  cs_face_mesh_t *fm,
143  cs_cell_builder_t *cb);
144 
145 /*----------------------------------------------------------------------------*/
157 /*----------------------------------------------------------------------------*/
158 
159 void
161  const cs_cell_mesh_t *cm,
162  cs_face_mesh_t *fm,
163  cs_cell_builder_t *cb);
164 
165 /*----------------------------------------------------------------------------*/
177 /*----------------------------------------------------------------------------*/
178 
179 void
181  const cs_cell_mesh_t *cm,
182  cs_face_mesh_t *fm,
183  cs_cell_builder_t *cb);
184 
185 /*----------------------------------------------------------------------------*/
197 /*----------------------------------------------------------------------------*/
198 
199 void
201  const cs_cell_mesh_t *cm,
202  cs_face_mesh_t *fm,
203  cs_cell_builder_t *cb);
204 
205 /*----------------------------------------------------------------------------*/
217 /*----------------------------------------------------------------------------*/
218 
219 void
221  const cs_cell_mesh_t *cm,
222  cs_face_mesh_t *fm,
223  cs_cell_builder_t *cb);
224 
225 /*----------------------------------------------------------------------------*/
237 /*----------------------------------------------------------------------------*/
238 
239 void
241  const cs_cell_mesh_t *cm,
242  cs_face_mesh_t *fm,
243  cs_cell_builder_t *cb);
244 
245 /*----------------------------------------------------------------------------*/
256 /*----------------------------------------------------------------------------*/
257 
258 void
260  const cs_cell_mesh_t *cm,
261  cs_face_mesh_t *fm,
262  cs_cell_builder_t *cb);
263 
264 /*----------------------------------------------------------------------------*/
274 /*----------------------------------------------------------------------------*/
275 
276 void
278  const cs_cell_mesh_t *cm,
279  cs_face_mesh_t *fm,
280  cs_cell_builder_t *cb);
281 
282 /*----------------------------------------------------------------------------*/
295 /*----------------------------------------------------------------------------*/
296 
297 void
299  const cs_cell_mesh_t *cm,
300  const cs_equation_param_t *eqp,
301  cs_face_mesh_t *fm,
302  cs_cell_builder_t *cb,
303  cs_cell_sys_t *csys);
304 
305 /*----------------------------------------------------------------------------*/
317 /*----------------------------------------------------------------------------*/
318 
319 void
321  const cs_cell_mesh_t *cm,
322  const cs_equation_param_t *eqp,
323  cs_face_mesh_t *fm,
324  cs_cell_builder_t *cb,
325  cs_cell_sys_t *csys);
326 
327 /*----------------------------------------------------------------------------*/
339 /*----------------------------------------------------------------------------*/
340 
341 void
343  const cs_cell_mesh_t *cm,
344  const cs_equation_param_t *eqp,
345  cs_face_mesh_t *fm,
346  cs_cell_builder_t *cb,
347  cs_cell_sys_t *csys);
348 
349 /*----------------------------------------------------------------------------*/
361 /*----------------------------------------------------------------------------*/
362 
363 void
365  const cs_cell_mesh_t *cm,
366  const cs_equation_param_t *eqp,
367  cs_face_mesh_t *fm,
368  cs_cell_builder_t *cb,
369  cs_cell_sys_t *csys);
370 
371 /*----------------------------------------------------------------------------*/
383 /*----------------------------------------------------------------------------*/
384 
385 void
387  const cs_cell_mesh_t *cm,
388  const cs_equation_param_t *eqp,
389  cs_face_mesh_t *fm,
390  cs_cell_builder_t *cb,
391  cs_cell_sys_t *csys);
392 
393 /*----------------------------------------------------------------------------*/
403 /*----------------------------------------------------------------------------*/
404 
405 void
407  const cs_param_advection_t a_info,
408  cs_real_t coefval[]);
409 
410 /*----------------------------------------------------------------------------*/
411 
413 
414 #endif /* __CS_CDO_ADVECTION_H__ */
void cs_cdo_advection_get_vb_upwnoc(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme without diffusion w...
Definition: cs_cdo_advection.c:1396
void cs_cdo_advection_get_vcb(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex+cell-based scheme.
Definition: cs_cdo_advection.c:1623
Definition: cs_equation_param.h:101
#define BEGIN_C_DECLS
Definition: cs_defs.h:453
void cs_cdo_advection_get_vb_upwcsv(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme without diffusion a...
Definition: cs_cdo_advection.c:1221
Definition: cs_cdo_local.h:138
void( cs_cdo_advection_bc_t)(const cs_cell_bc_t *cbc, const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Compute the BC contribution for the advection operator.
Definition: cs_cdo_advection.h:88
double cs_cdo_advection_get_cip_coef(void)
Get the value of the stabilization coefficient used in CIP scheme.
Definition: cs_cdo_advection.c:1129
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
Definition: cs_cdo_quantities.h:89
void cs_cdo_advection_get_vb_cennoc(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme when a centered sch...
Definition: cs_cdo_advection.c:1452
void cs_cdo_advection_get_upwind_coef_cell(const cs_cdo_quantities_t *cdoq, const cs_param_advection_t a_info, cs_real_t coefval[])
Compute the value in each cell of the upwinding coefficient given a related Peclet number...
Definition: cs_cdo_advection.c:2130
Definition: cs_cdo_local.h:94
Definition: cs_param.h:138
Definition: cs_field_pointer.h:123
void cs_cdo_advection_get_vb_upwnocdi(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme when diffusion is a...
Definition: cs_cdo_advection.c:1324
void( cs_cdo_advection_t)(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme. The local matrix related ti this operator is stored in cb->loc.
Definition: cs_cdo_advection.h:69
void cs_cdo_advection_add_vcb_bc(const cs_cell_bc_t *cbc, const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Compute the BC contribution for the convection operator with CDO V+C schemes.
Definition: cs_cdo_advection.c:1957
Definition: cs_cdo_local.h:108
void cs_cdo_advection_get_vb_cencsv(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme when a centered sch...
Definition: cs_cdo_advection.c:1278
void cs_cdo_advection_add_vb_bc_cw(const cs_cell_bc_t *cbc, const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Compute the BC contribution for the convection operator when the advection field is approximated in e...
Definition: cs_cdo_advection.c:1743
Definition: cs_cdo_local.h:71
void cs_cdo_advection_add_vcb_bc_analytic(const cs_cell_bc_t *cbc, const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Compute the BC contribution for the convection operator with CDO V+C schemes when the advection is de...
Definition: cs_cdo_advection.c:2017
void cs_cdo_advection_add_vb_bc(const cs_cell_bc_t *cbc, const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Compute the BC contribution for the convection operator when the convection field is not uniform insi...
Definition: cs_cdo_advection.c:1822
void cs_cdo_advection_add_vcb_bc_cw(const cs_cell_bc_t *cbc, const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Compute the BC contribution for the convection operator with CDO V+C schemes when the advection field...
Definition: cs_cdo_advection.c:1897
void cs_cdo_advection_get_vcb_cw(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex+cell-based scheme when the advec...
Definition: cs_cdo_advection.c:1496
#define END_C_DECLS
Definition: cs_defs.h:454
Definition: cs_cdo_local.h:196
void cs_cdo_advection_set_cip_coef(double new_value)
Set the value of the stabilization coefficient used in CIP scheme.
Definition: cs_cdo_advection.c:1115
void cs_cdo_advection_get_vb_upwcsvdi(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme when diffusion is a...
Definition: cs_cdo_advection.c:1149