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 /*----------------------------------------------------------------------------*/
64 /*----------------------------------------------------------------------------*/
65 
66 typedef void
68  const cs_cell_mesh_t *cm,
70  cs_cell_builder_t *cb);
71 
72 /*----------------------------------------------------------------------------*/
83 /*----------------------------------------------------------------------------*/
84 
85 typedef void
87  const cs_equation_param_t *eqp,
90  cs_cell_sys_t *csys);
91 
92 /*============================================================================
93  * Global variables
94  *============================================================================*/
95 
96 /*============================================================================
97  * Public function prototypes
98  *============================================================================*/
99 
100 /*----------------------------------------------------------------------------*/
106 /*----------------------------------------------------------------------------*/
107 
108 void
109 cs_cdo_advection_set_cip_coef(double new_value);
110 
111 /*----------------------------------------------------------------------------*/
117 /*----------------------------------------------------------------------------*/
118 
119 double
121 
122 /*----------------------------------------------------------------------------*/
134 /*----------------------------------------------------------------------------*/
135 
136 void
138  const cs_cell_mesh_t *cm,
139  cs_face_mesh_t *fm,
140  cs_cell_builder_t *cb);
141 
142 /*----------------------------------------------------------------------------*/
154 /*----------------------------------------------------------------------------*/
155 
156 void
158  const cs_cell_mesh_t *cm,
159  cs_face_mesh_t *fm,
160  cs_cell_builder_t *cb);
161 
162 /*----------------------------------------------------------------------------*/
174 /*----------------------------------------------------------------------------*/
175 
176 void
178  const cs_cell_mesh_t *cm,
179  cs_face_mesh_t *fm,
180  cs_cell_builder_t *cb);
181 
182 /*----------------------------------------------------------------------------*/
194 /*----------------------------------------------------------------------------*/
195 
196 void
198  const cs_cell_mesh_t *cm,
199  cs_face_mesh_t *fm,
200  cs_cell_builder_t *cb);
201 
202 /*----------------------------------------------------------------------------*/
214 /*----------------------------------------------------------------------------*/
215 
216 void
218  const cs_cell_mesh_t *cm,
219  cs_face_mesh_t *fm,
220  cs_cell_builder_t *cb);
221 
222 /*----------------------------------------------------------------------------*/
234 /*----------------------------------------------------------------------------*/
235 
236 void
238  const cs_cell_mesh_t *cm,
239  cs_face_mesh_t *fm,
240  cs_cell_builder_t *cb);
241 
242 /*----------------------------------------------------------------------------*/
253 /*----------------------------------------------------------------------------*/
254 
255 void
257  const cs_cell_mesh_t *cm,
258  cs_face_mesh_t *fm,
259  cs_cell_builder_t *cb);
260 
261 /*----------------------------------------------------------------------------*/
271 /*----------------------------------------------------------------------------*/
272 
273 void
275  const cs_cell_mesh_t *cm,
276  cs_face_mesh_t *fm,
277  cs_cell_builder_t *cb);
278 
279 /*----------------------------------------------------------------------------*/
291 /*----------------------------------------------------------------------------*/
292 
293 void
295  const cs_equation_param_t *eqp,
296  cs_face_mesh_t *fm,
297  cs_cell_builder_t *cb,
298  cs_cell_sys_t *csys);
299 
300 /*----------------------------------------------------------------------------*/
311 /*----------------------------------------------------------------------------*/
312 
313 void
315  const cs_equation_param_t *eqp,
316  cs_face_mesh_t *fm,
317  cs_cell_builder_t *cb,
318  cs_cell_sys_t *csys);
319 
320 /*----------------------------------------------------------------------------*/
331 /*----------------------------------------------------------------------------*/
332 
333 void
335  const cs_equation_param_t *eqp,
336  cs_face_mesh_t *fm,
337  cs_cell_builder_t *cb,
338  cs_cell_sys_t *csys);
339 
340 /*----------------------------------------------------------------------------*/
351 /*----------------------------------------------------------------------------*/
352 
353 void
355  const cs_equation_param_t *eqp,
356  cs_face_mesh_t *fm,
357  cs_cell_builder_t *cb,
358  cs_cell_sys_t *csys);
359 
360 /*----------------------------------------------------------------------------*/
371 /*----------------------------------------------------------------------------*/
372 
373 void
375  const cs_equation_param_t *eqp,
376  cs_face_mesh_t *fm,
377  cs_cell_builder_t *cb,
378  cs_cell_sys_t *csys);
379 
380 /*----------------------------------------------------------------------------*/
391 /*----------------------------------------------------------------------------*/
392 
393 void
396  cs_real_t coefval[]);
397 
398 /*----------------------------------------------------------------------------*/
399 
401 
402 #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:1395
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:1622
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources...
Definition: cs_equation_param.h:150
void cs_cdo_advection_add_vcb_bc(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:1947
cs_param_advection_scheme_t
Definition: cs_param.h:236
#define BEGIN_C_DECLS
Definition: cs_defs.h:461
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:1220
Definition: cs_cdo_local.h:133
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:67
double cs_cdo_advection_get_cip_coef(void)
Get the value of the stabilization coefficient used in CIP scheme.
Definition: cs_cdo_advection.c:1128
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
Definition: cs_cdo_quantities.h:94
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:1451
Definition: cs_cdo_local.h:94
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:1323
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:1277
void cs_cdo_advection_add_vb_bc(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:1817
void cs_cdo_advection_add_vcb_bc_analytic(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:2005
void cs_cdo_advection_add_vcb_bc_cw(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:1889
Definition: cs_cdo_local.h:71
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:1495
#define END_C_DECLS
Definition: cs_defs.h:462
Definition: cs_cdo_local.h:191
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:1114
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:2117
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:1148
void() cs_cdo_advection_bc_t(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:86
void cs_cdo_advection_add_vb_bc_cw(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:1741