My Project
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-2019 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 /*----------------------------------------------------------------------------*/
119 /*----------------------------------------------------------------------------*/
120 
121 typedef void
123  const cs_equation_param_t *eqp,
124  cs_real_t t_eval,
126  cs_cell_builder_t *cb,
127  cs_cell_sys_t *csys);
128 
129 /*============================================================================
130  * Global variables
131  *============================================================================*/
132 
133 /*============================================================================
134  * Public function prototypes
135  *============================================================================*/
136 
137 /*----------------------------------------------------------------------------*/
143 /*----------------------------------------------------------------------------*/
144 
145 void
146 cs_cdo_advection_set_cip_coef(double new_value);
147 
148 /*----------------------------------------------------------------------------*/
154 /*----------------------------------------------------------------------------*/
155 
156 double
158 
159 /*----------------------------------------------------------------------------*/
170 /*----------------------------------------------------------------------------*/
171 
172 void
174  const cs_cell_mesh_t *cm,
175  cs_real_t t_eval,
176  cs_cdofb_advection_t *build_func,
177  cs_cell_builder_t *cb);
178 
179 /*----------------------------------------------------------------------------*/
189 /*----------------------------------------------------------------------------*/
190 
191 void
193  const cs_cell_mesh_t *cm,
194  cs_cell_builder_t *cb,
195  cs_cell_sys_t *csys);
196 
197 /*----------------------------------------------------------------------------*/
207 /*----------------------------------------------------------------------------*/
208 
209 void
211  const cs_cell_mesh_t *cm,
212  cs_cell_builder_t *cb,
213  cs_cell_sys_t *csys);
214 
215 /*----------------------------------------------------------------------------*/
225 /*----------------------------------------------------------------------------*/
226 
227 void
229  const cs_cell_mesh_t *cm,
230  cs_cell_builder_t *cb,
231  cs_cell_sys_t *csys);
232 
233 /*----------------------------------------------------------------------------*/
244 /*----------------------------------------------------------------------------*/
245 
246 void
248  const cs_cell_mesh_t *cm,
249  cs_cell_builder_t *cb,
250  cs_cell_sys_t *csys);
251 
252 /*----------------------------------------------------------------------------*/
267 /*----------------------------------------------------------------------------*/
268 
269 void
271  const cs_real_t fluxes[],
272  cs_sdm_t *adv);
273 
274 /*----------------------------------------------------------------------------*/
289 /*----------------------------------------------------------------------------*/
290 
291 void
293  const cs_real_t fluxes[],
294  cs_sdm_t *adv);
295 
296 /*----------------------------------------------------------------------------*/
311 /*----------------------------------------------------------------------------*/
312 
313 void
315  const cs_real_t fluxes[],
316  cs_sdm_t *adv);
317 
318 /*----------------------------------------------------------------------------*/
333 /*----------------------------------------------------------------------------*/
334 
335 void
337  const cs_real_t fluxes[],
338  cs_sdm_t *adv);
339 
340 /*----------------------------------------------------------------------------*/
353 /*----------------------------------------------------------------------------*/
354 
355 void
357  const cs_cell_mesh_t *cm,
358  cs_real_t t_eval,
360  cs_cell_builder_t *cb);
361 
362 /*----------------------------------------------------------------------------*/
375 /*----------------------------------------------------------------------------*/
376 
377 void
379  const cs_cell_mesh_t *cm,
380  cs_real_t t_eval,
382  cs_cell_builder_t *cb);
383 
384 /*----------------------------------------------------------------------------*/
397 /*----------------------------------------------------------------------------*/
398 
399 void
401  const cs_cell_mesh_t *cm,
402  cs_real_t t_eval,
404  cs_cell_builder_t *cb);
405 
406 /*----------------------------------------------------------------------------*/
419 /*----------------------------------------------------------------------------*/
420 
421 void
423  const cs_cell_mesh_t *cm,
424  cs_real_t t_eval,
426  cs_cell_builder_t *cb);
427 
428 /*----------------------------------------------------------------------------*/
441 /*----------------------------------------------------------------------------*/
442 
443 void
445  const cs_cell_mesh_t *cm,
446  cs_real_t t_eval,
448  cs_cell_builder_t *cb);
449 
450 /*----------------------------------------------------------------------------*/
463 /*----------------------------------------------------------------------------*/
464 
465 void
467  const cs_cell_mesh_t *cm,
468  cs_real_t t_eval,
470  cs_cell_builder_t *cb);
471 
472 /*----------------------------------------------------------------------------*/
485 /*----------------------------------------------------------------------------*/
486 
487 void
489  const cs_cell_mesh_t *cm,
490  cs_real_t t_eval,
492  cs_cell_builder_t *cb);
493 
494 /*----------------------------------------------------------------------------*/
506 /*----------------------------------------------------------------------------*/
507 
508 void
510  const cs_cell_mesh_t *cm,
511  cs_real_t t_eval,
513  cs_cell_builder_t *cb);
514 
515 /*----------------------------------------------------------------------------*/
526 /*----------------------------------------------------------------------------*/
527 
528 void
530  const cs_cell_mesh_t *cm,
531  cs_real_t t_eval,
533  cs_cell_builder_t *cb);
534 
535 /*----------------------------------------------------------------------------*/
546 /*----------------------------------------------------------------------------*/
547 
548 void
550  const cs_equation_param_t *eqp,
551  cs_real_t t_eval,
553  cs_cell_builder_t *cb,
554  cs_cell_sys_t *csys);
555 
556 /*----------------------------------------------------------------------------*/
568 /*----------------------------------------------------------------------------*/
569 
570 void
572  const cs_equation_param_t *eqp,
573  cs_real_t t_eval,
575  cs_cell_builder_t *cb,
576  cs_cell_sys_t *csys);
577 
578 /*----------------------------------------------------------------------------*/
589 /*----------------------------------------------------------------------------*/
590 
591 void
594  cs_real_t coefval[]);
595 
596 /*----------------------------------------------------------------------------*/
597 
599 
600 #endif /* __CS_CDO_ADVECTION_H__ */
cs_cdo_advection_vb_upwnoc_di
void cs_cdo_advection_vb_upwnoc_di(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:1913
cs_cdo_advection_fb_bc_wdi
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 the contribution of the boundary conditions to the local system in CDO-Fb schemes (with a diffusi...
Definition: cs_cdo_advection.c:1268
cs_cdo_advection_vb_mcucsv
void cs_cdo_advection_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:1866
fm
Definition: cs_field_pointer.h:134
cs_cdo_advection_fb_bc
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 the contribution of the boundary conditions to the local system in CDO-Fb schemes (without diffus...
Definition: cs_cdo_advection.c:1199
cs_cdo_advection_vcb
void cs_cdo_advection_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:2222
cs_cdo_advection_vb_cennoc
void cs_cdo_advection_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:2046
cs_face_mesh_t
Set of local quantities and connectivities related to a mesh face Structure used to get a better memo...
Definition: cs_cdo_local.h:212
cs_cdo_advection_vb_cencsv
void cs_cdo_advection_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:1819
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
cs_cdo_advection_set_cip_coef
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:1120
cs_cdo_advection_fb_bc_v
void cs_cdo_advection_fb_bc_v(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 (without diffus...
Definition: cs_cdo_advection.c:1316
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
cs_cdo_advection_vcb_bc
void cs_cdo_advection_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:2448
cs_cdo_advection_fb_upwnoc
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:1570
cs_cdofb_advection_bc_t
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
cs_cdo_quantities.h
cs_cdo_advection_cell_upwind_coef
void cs_cdo_advection_cell_upwind_coef(const cs_cdo_quantities_t *cdoq, cs_param_advection_scheme_t scheme, cs_real_t coefval[])
Compute the value of the upwinding coefficient in each cell knowing the related Peclet number.
Definition: cs_cdo_advection.c:2513
cs_param_advection_scheme_t
cs_param_advection_scheme_t
Definition: cs_param.h:255
cs_cdovb_advection_t
void() cs_cdovb_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....
Definition: cs_cdo_advection.h:101
cs_cdo_advection_vb_upwcsv
void cs_cdo_advection_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:1760
cs_equation_param_t
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:148
cs_cdovb_advection_bc_t
void() cs_cdovb_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 in CDO vertex-based (or vertex+cell-based) sch...
Definition: cs_cdo_advection.h:122
cs_cdo_advection_fb_upwcsv
void cs_cdo_advection_fb_upwcsv(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 conservative f...
Definition: cs_cdo_advection.c:1452
cs_property.h
cs_cdo_advection_vb_bc
void cs_cdo_advection_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:2343
cs_cdo_quantities_t
Definition: cs_cdo_quantities.h:94
cs_cdofb_advection_build
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:1153
cs_cdo_advection_fb_upwcsv_di
void cs_cdo_advection_fb_upwcsv_di(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 conservative f...
Definition: cs_cdo_advection.c:1516
cs_advection_field.h
cs_cell_builder_t
Set of local and temporary buffers useful for building the algebraic system with a cellwise process....
Definition: cs_cdo_local.h:56
cs_cdo_advection_fb_upwnoc_di
void cs_cdo_advection_fb_upwnoc_di(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:1633
cs_cdo_connect.h
cs_cdo_advection_vcb_cw_cst
void cs_cdo_advection_vcb_cw_cst(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:2092
cs_cdo_advection_fb_bc_wdi_v
void cs_cdo_advection_fb_bc_wdi_v(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 (with a diffusi...
Definition: cs_cdo_advection.c:1396
cs_cdo_advection_vb_upwnoc
void cs_cdo_advection_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:1987
cs_cdo_advection_vb_upwcsv_di
void cs_cdo_advection_vb_upwcsv_di(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:1684
cs_cdofb_advection_t
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
cs_equation_param.h
Structure and routines handling the specific settings related to a cs_equation_t structure.
cs_cell_sys_t
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:93
cs_cdo_advection_get_cip_coef
double cs_cdo_advection_get_cip_coef(void)
Get the value of the stabilization coefficient used in CIP scheme.
Definition: cs_cdo_advection.c:1134
cs_cell_mesh_t
Set of local quantities and connectivities related to a mesh cell This is a key structure for all cel...
Definition: cs_cdo_local.h:146
cs_cdo_local.h