programmer's documentation
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_connect.h"
36 #include "cs_cdo_local.h"
37 #include "cs_cdo_quantities.h"
38 #include "cs_equation_param.h"
39 #include "cs_property.h"
40 
41 /*----------------------------------------------------------------------------*/
42 
44 
45 /*============================================================================
46  * Macro definitions
47  *============================================================================*/
48 
49 /*============================================================================
50  * Type definitions
51  *============================================================================*/
52 
53 /*----------------------------------------------------------------------------*/
61 /*----------------------------------------------------------------------------*/
62 
63 typedef void
65  const cs_real_t fluxes[],
66  cs_sdm_t *adv);
67 
68 /*----------------------------------------------------------------------------*/
78 /*----------------------------------------------------------------------------*/
79 
80 typedef void
82  const cs_cell_mesh_t *cm,
84  cs_cell_sys_t *csys);
85 
86 /*----------------------------------------------------------------------------*/
98 /*----------------------------------------------------------------------------*/
99 
100 typedef void
102  const cs_cell_mesh_t *cm,
103  cs_real_t t_eval,
105  cs_cell_builder_t *cb);
106 
107 /*----------------------------------------------------------------------------*/
118 /*----------------------------------------------------------------------------*/
119 
120 typedef void
122  const cs_equation_param_t *eqp,
123  cs_real_t t_eval,
125  cs_cell_builder_t *cb,
126  cs_cell_sys_t *csys);
127 
128 /*============================================================================
129  * Global variables
130  *============================================================================*/
131 
132 /*============================================================================
133  * Public function prototypes
134  *============================================================================*/
135 
136 /*----------------------------------------------------------------------------*/
142 /*----------------------------------------------------------------------------*/
143 
144 void
145 cs_cdo_advection_set_cip_coef(double new_value);
146 
147 /*----------------------------------------------------------------------------*/
153 /*----------------------------------------------------------------------------*/
154 
155 double
157 
158 /*----------------------------------------------------------------------------*/
169 /*----------------------------------------------------------------------------*/
170 
171 void
173  const cs_cell_mesh_t *cm,
174  cs_real_t t_eval,
175  cs_cdofb_advection_t *build_func,
176  cs_cell_builder_t *cb);
177 
178 /*----------------------------------------------------------------------------*/
188 /*----------------------------------------------------------------------------*/
189 
190 void
192  const cs_cell_mesh_t *cm,
193  cs_cell_builder_t *cb,
194  cs_cell_sys_t *csys);
195 
196 /*----------------------------------------------------------------------------*/
206 /*----------------------------------------------------------------------------*/
207 
208 void
210  const cs_cell_mesh_t *cm,
211  cs_cell_builder_t *cb,
212  cs_cell_sys_t *csys);
213 
214 /*----------------------------------------------------------------------------*/
231 /*----------------------------------------------------------------------------*/
232 
233 void
235  const cs_real_t fluxes[],
236  cs_sdm_t *adv);
237 
238 /*----------------------------------------------------------------------------*/
251 /*----------------------------------------------------------------------------*/
252 
253 void
255  const cs_cell_mesh_t *cm,
256  cs_real_t t_eval,
257  cs_face_mesh_t *fm,
258  cs_cell_builder_t *cb);
259 
260 /*----------------------------------------------------------------------------*/
273 /*----------------------------------------------------------------------------*/
274 
275 void
277  const cs_cell_mesh_t *cm,
278  cs_real_t t_eval,
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  cs_real_t t_eval,
301  cs_face_mesh_t *fm,
302  cs_cell_builder_t *cb);
303 
304 /*----------------------------------------------------------------------------*/
317 /*----------------------------------------------------------------------------*/
318 
319 void
321  const cs_cell_mesh_t *cm,
322  cs_real_t t_eval,
323  cs_face_mesh_t *fm,
324  cs_cell_builder_t *cb);
325 
326 /*----------------------------------------------------------------------------*/
339 /*----------------------------------------------------------------------------*/
340 
341 void
343  const cs_cell_mesh_t *cm,
344  cs_real_t t_eval,
345  cs_face_mesh_t *fm,
346  cs_cell_builder_t *cb);
347 
348 /*----------------------------------------------------------------------------*/
361 /*----------------------------------------------------------------------------*/
362 
363 void
365  const cs_cell_mesh_t *cm,
366  cs_real_t t_eval,
367  cs_face_mesh_t *fm,
368  cs_cell_builder_t *cb);
369 
370 /*----------------------------------------------------------------------------*/
383 /*----------------------------------------------------------------------------*/
384 
385 void
387  const cs_cell_mesh_t *cm,
388  cs_real_t t_eval,
389  cs_face_mesh_t *fm,
390  cs_cell_builder_t *cb);
391 
392 /*----------------------------------------------------------------------------*/
404 /*----------------------------------------------------------------------------*/
405 
406 void
408  const cs_cell_mesh_t *cm,
409  cs_real_t t_eval,
410  cs_face_mesh_t *fm,
411  cs_cell_builder_t *cb);
412 
413 /*----------------------------------------------------------------------------*/
424 /*----------------------------------------------------------------------------*/
425 
426 void
428  const cs_cell_mesh_t *cm,
429  cs_real_t t_eval,
430  cs_face_mesh_t *fm,
431  cs_cell_builder_t *cb);
432 
433 /*----------------------------------------------------------------------------*/
444 /*----------------------------------------------------------------------------*/
445 
446 void
448  const cs_equation_param_t *eqp,
449  cs_real_t t_eval,
450  cs_face_mesh_t *fm,
451  cs_cell_builder_t *cb,
452  cs_cell_sys_t *csys);
453 
454 /*----------------------------------------------------------------------------*/
466 /*----------------------------------------------------------------------------*/
467 
468 void
470  const cs_equation_param_t *eqp,
471  cs_real_t t_eval,
472  cs_face_mesh_t *fm,
473  cs_cell_builder_t *cb,
474  cs_cell_sys_t *csys);
475 
476 /*----------------------------------------------------------------------------*/
487 /*----------------------------------------------------------------------------*/
488 
489 void
492  cs_real_t coefval[]);
493 
494 /*----------------------------------------------------------------------------*/
495 
497 
498 #endif /* __CS_CDO_ADVECTION_H__ */
void cs_cdo_advection_fb_upwnoc(const cs_cell_mesh_t *cm, const cs_real_t fluxes[], cs_sdm_t *adv)
Compute the convection operator attached to a cell with a CDO face-based scheme in the non-conservati...
Definition: cs_cdo_advection.c:1311
void cs_cdo_advection_add_vb_bc(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Compute the BC contribution for the convection operator.
Definition: cs_cdo_advection.c:2030
void cs_cdo_advection_get_vb_cennoc(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, 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:1732
void() cs_cdo_advection_bc_t(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_real_t t_eval, 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:121
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources...
Definition: cs_equation_param.h:159
void cs_cdo_advection_get_vb_mcucsv(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, 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 mixed center...
Definition: cs_cdo_advection.c:1552
void cs_cdofb_advection_build(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, cs_cdofb_advection_t *build_func, cs_cell_builder_t *cb)
Build the cellwise advection operator for CDO-Fb schemes The local matrix related to this operator is...
Definition: cs_cdo_advection.c:1151
void cs_cdo_advection_get_vb_upwcsv(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, 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:1446
cs_param_advection_scheme_t
Definition: cs_param.h:247
#define BEGIN_C_DECLS
Definition: cs_defs.h:462
void cs_cdo_advection_get_vb_upwnocdi(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, 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:1599
Set of local quantities and connectivities related to a mesh cell This is a key structure for all cel...
Definition: cs_cdo_local.h:163
void() cs_cdofb_advection_t(const cs_cell_mesh_t *cm, const cs_real_t fluxes[], cs_sdm_t *adv)
Define the local convection operator in CDO-Fb schemes.
Definition: cs_cdo_advection.h:64
double cs_cdo_advection_get_cip_coef(void)
Get the value of the stabilization coefficient used in CIP scheme.
Definition: cs_cdo_advection.c:1132
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
Definition: cs_cdo_quantities.h:94
Set of arrays and local (small) dense matrices related to a mesh cell This is a key structure for bui...
Definition: cs_cdo_local.h:112
Definition: cs_field_pointer.h:123
void cs_cdo_advection_get_vb_upwnoc(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, 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:1673
void cs_cdo_advection_get_vcb(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, 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:1909
void cs_cdo_advection_add_vcb_bc(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_real_t t_eval, 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:2130
Set of local and temporary buffers useful for building the algebraic system with a cellwise process...
Definition: cs_cdo_local.h:75
void cs_cdo_advection_fb_bc_wdi(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Add thecontribution of the boundary conditions to the local system in CDO-Fb schemes (with a diffusio...
Definition: cs_cdo_advection.c:1256
void cs_cdo_advection_fb_bc(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Add thecontribution of the boundary conditions to the local system in CDO-Fb schemes (without diffusi...
Definition: cs_cdo_advection.c:1197
void() cs_cdo_advection_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, 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 to this operator is stored in cb->loc.
Definition: cs_cdo_advection.h:101
#define END_C_DECLS
Definition: cs_defs.h:463
void cs_cdo_advection_get_vb_upwcsvdi(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, 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:1370
void() cs_cdofb_advection_bc_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Add the contribution of the boundary conditions to the local system in CDO-Fb schemes.
Definition: cs_cdo_advection.h:81
Set of local quantities and connectivities related to a mesh face Structure used to get a better memo...
Definition: cs_cdo_local.h:224
void cs_cdo_advection_get_vcb_cw(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, 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:1778
void cs_cdo_advection_get_vb_cencsv(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, 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:1505
Structure and routines handling the specific settings related to a cs_equation_t structure.
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:1118
void cs_cdo_advection_get_upwind_coef_cell(const cs_cdo_quantities_t *cdoq, cs_param_advection_scheme_t scheme, cs_real_t coefval[])
Compute the value in each cell of the upwinding coefficient given a related Peclet number...
Definition: cs_cdo_advection.c:2188