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-2016 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 typedef struct _cs_cdo_adv_t cs_cdo_adv_t;
56 
57 /*============================================================================
58  * Global variables
59  *============================================================================*/
60 
61 /*============================================================================
62  * Public function prototypes
63  *============================================================================*/
64 
65 /*----------------------------------------------------------------------------*/
71 /*----------------------------------------------------------------------------*/
72 
73 void
74 cs_cdo_advection_set_cip_coef(double new_value);
75 
76 /*----------------------------------------------------------------------------*/
82 /*----------------------------------------------------------------------------*/
83 
84 double
86 
87 /*----------------------------------------------------------------------------*/
97 /*----------------------------------------------------------------------------*/
98 
101  const cs_equation_param_t *eqp,
102  bool do_diffusion);
103 
104 /*----------------------------------------------------------------------------*/
112 /*----------------------------------------------------------------------------*/
113 
114 cs_cdo_adv_t *
116 
117 /*----------------------------------------------------------------------------*/
129 /*----------------------------------------------------------------------------*/
130 
131 cs_locmat_t *
133  const cs_equation_param_t *eqp,
134  const cs_real_33_t diffmat,
135  cs_cdo_adv_t *b);
136 
137 /*----------------------------------------------------------------------------*/
148 /*----------------------------------------------------------------------------*/
149 
150 cs_locmat_t *
152  const cs_equation_param_t *eqp,
153  cs_cdo_adv_t *b);
154 
155 /*----------------------------------------------------------------------------*/
164 /*----------------------------------------------------------------------------*/
165 
166 void
168  const cs_equation_param_t *eqp,
169  cs_cdo_adv_t *b,
170  cs_cdo_locsys_t *ls);
171 
172 /*----------------------------------------------------------------------------*/
182 /*----------------------------------------------------------------------------*/
183 
184 void
186  const cs_equation_param_t *eqp,
187  cs_cdo_adv_t *b,
188  cs_cdo_locsys_t *ls);
189 
190 /*----------------------------------------------------------------------------*/
200 /*----------------------------------------------------------------------------*/
201 
202 void
204  const cs_param_advection_t a_info,
205  cs_real_t coefval[]);
206 
207 /*----------------------------------------------------------------------------*/
208 
210 
211 #endif /* __CS_CDO_ADVECTION_H__ */
void cs_cdovcb_advection_add_bc(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_cdo_adv_t *b, cs_cdo_locsys_t *ls)
Compute the BC contribution for the convection operator with CDO V+C schemes.
Definition: cs_cdo_advection.c:1336
Definition: cs_equation_param.h:102
cs_cdo_adv_t * cs_cdo_advection_builder_init(const cs_cdo_connect_t *connect, const cs_equation_param_t *eqp, bool do_diffusion)
Initialize a builder structure for the convection operator.
Definition: cs_cdo_advection.c:889
#define BEGIN_C_DECLS
Definition: cs_defs.h:448
Definition: cs_cdo_local.h:73
Definition: cs_cdo_connect.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:871
double cs_real_t
Floating-point value.
Definition: cs_defs.h:296
Definition: cs_cdo_quantities.h:100
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:1623
Definition: cs_param.h:218
Definition: cs_cdo_local.h:59
void cs_cdovb_advection_add_bc(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_cdo_adv_t *b, cs_cdo_locsys_t *ls)
Compute the BC contribution for the convection operator.
Definition: cs_cdo_advection.c:1189
cs_locmat_t * cs_cdovcb_advection_build(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_cdo_adv_t *b)
Compute the convection operator attached to a cell with a CDO vertex+cell-based scheme.
Definition: cs_cdo_advection.c:1081
cs_cdo_adv_t * cs_cdo_advection_builder_free(cs_cdo_adv_t *b)
Destroy a builder structure for the convection operator.
Definition: cs_cdo_advection.c:959
#define END_C_DECLS
Definition: cs_defs.h:449
struct _cs_cdo_adv_t cs_cdo_adv_t
Definition: cs_cdo_advection.h:55
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:314
cs_locmat_t * cs_cdovb_advection_build(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, const cs_real_33_t diffmat, cs_cdo_adv_t *b)
Compute the convection operator attached to a cell with a CDO vertex-based scheme.
Definition: cs_cdo_advection.c:990
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:857
Definition: cs_cdo_toolbox.h:71
double precision, save b
Definition: cs_fuel_incl.f90:146