programmer's documentation
cs_cdovb_advection.h
Go to the documentation of this file.
1 #ifndef __CS_CDOVB_ADVECTION_H__
2 #define __CS_CDOVB_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-2015 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_time_step.h"
35 #include "cs_cdo.h"
36 #include "cs_param.h"
37 #include "cs_cdo_toolbox.h"
38 #include "cs_cdo_connect.h"
39 #include "cs_cdo_quantities.h"
40 #include "cs_property.h"
41 #include "cs_advection_field.h"
42 
43 /*----------------------------------------------------------------------------*/
44 
46 
47 /*============================================================================
48  * Macro definitions
49  *============================================================================*/
50 
51 /*============================================================================
52  * Type definitions
53  *============================================================================*/
54 
55 typedef struct _cs_cdovb_adv_t cs_cdovb_adv_t;
56 
57 /*============================================================================
58  * Global variables
59  *============================================================================*/
60 
61 /*============================================================================
62  * Public function prototypes
63  *============================================================================*/
64 
65 /*----------------------------------------------------------------------------*/
76 /*----------------------------------------------------------------------------*/
77 
80  const cs_adv_field_t *adv,
81  const cs_param_advection_t a_info,
82  bool do_diffusion);
83 
84 /*----------------------------------------------------------------------------*/
92 /*----------------------------------------------------------------------------*/
93 
96 
97 /*----------------------------------------------------------------------------*/
110 /*----------------------------------------------------------------------------*/
111 
112 cs_locmat_t *
114  const cs_cdo_connect_t *connect,
115  const cs_cdo_quantities_t *quant,
116  const cs_lnum_t *loc_ids,
117  const cs_real_33_t diffmat,
118  cs_cdovb_adv_t *builder);
119 
120 /*----------------------------------------------------------------------------*/
131 /*----------------------------------------------------------------------------*/
132 
133 void
135  const cs_cdo_quantities_t *quant,
136  const cs_real_t *dir_vals,
137  cs_cdovb_adv_t *builder,
138  cs_real_t rhs_contrib[],
139  cs_real_t diag_contrib[]);
140 
141 /*----------------------------------------------------------------------------*/
151 /*----------------------------------------------------------------------------*/
152 
153 void
155  const cs_adv_field_t *adv,
156  const cs_property_t *diff_property,
157  const cs_real_3_t dir_vect,
158  cs_real_t *p_peclet[]);
159 
160 /*----------------------------------------------------------------------------*/
170 /*----------------------------------------------------------------------------*/
171 
172 void
174  const cs_param_advection_t a_info,
175  cs_real_t coefval[]);
176 
177 /*----------------------------------------------------------------------------*/
178 
180 
181 #endif /* __CS_CDOVB_ADVECTION_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:429
cs_cdovb_adv_t * cs_cdovb_advection_builder_free(cs_cdovb_adv_t *b)
Destroy a builder structure for the convection operator.
Definition: cs_cdovb_advection.c:462
Definition: cs_cdo_connect.h:67
void cs_cdovb_advection_add_bc(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_real_t *dir_vals, cs_cdovb_adv_t *builder, cs_real_t rhs_contrib[], cs_real_t diag_contrib[])
Compute the convection operator for pure convection.
Definition: cs_cdovb_advection.c:556
cs_locmat_t * cs_cdovb_advection_build_local(cs_lnum_t c_id, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_lnum_t *loc_ids, const cs_real_33_t diffmat, cs_cdovb_adv_t *builder)
Compute the convection operator for pure convection.
Definition: cs_cdovb_advection.c:493
Definition: cs_cdo_quantities.h:86
Definition: cs_param.h:204
cs_cdovb_adv_t * cs_cdovb_advection_builder_init(const cs_cdo_connect_t *connect, const cs_adv_field_t *adv, const cs_param_advection_t a_info, bool do_diffusion)
Initialize a builder structure for the convection operator.
Definition: cs_cdovb_advection.c:418
void cs_cdovb_advection_get_peclet_cell(const cs_cdo_quantities_t *cdoq, const cs_adv_field_t *adv, const cs_property_t *diff_property, const cs_real_3_t dir_vect, cs_real_t *p_peclet[])
Compute the Peclet number in each cell in a given direction.
Definition: cs_cdovb_advection.c:694
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:307
struct _cs_cdovb_adv_t cs_cdovb_adv_t
Definition: cs_cdovb_advection.h:55
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:292
#define END_C_DECLS
Definition: cs_defs.h:430
double cs_real_t
Definition: cs_defs.h:296
cs_real_t cs_real_33_t[3][3]
3x3 matrix of floating-point values
Definition: cs_defs.h:311
void cs_cdovb_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_cdovb_advection.c:747
Definition: cs_cdo_toolbox.h:72
double precision, save b
Definition: cs_fuel_incl.f90:146