programmer's documentation
cs_equation_bc.h
Go to the documentation of this file.
1 #ifndef __CS_EQUATION_BC_H__
2 #define __CS_EQUATION_BC_H__
3 
4 /*============================================================================
5  * Routines to handle the evaluation of boundary conditions when building the
6  * algebraic system in CDO/HHO schemes
7  *============================================================================*/
8 
9 /*
10  This file is part of Code_Saturne, a general-purpose CFD tool.
11 
12  Copyright (C) 1998-2018 EDF S.A.
13 
14  This program is free software; you can redistribute it and/or modify it under
15  the terms of the GNU General Public License as published by the Free Software
16  Foundation; either version 2 of the License, or (at your option) any later
17  version.
18 
19  This program is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
22  details.
23 
24  You should have received a copy of the GNU General Public License along with
25  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
26  Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 */
28 
29 /*----------------------------------------------------------------------------
30  * Local headers
31  *----------------------------------------------------------------------------*/
32 
33 #include "cs_cdo_bc.h"
34 #include "cs_cdo_connect.h"
35 #include "cs_xdef_eval.h"
36 #include "cs_cdo_quantities.h"
37 #include "cs_cdo_local.h"
38 #include "cs_equation_param.h"
39 #include "cs_time_step.h"
40 
41 /*----------------------------------------------------------------------------*/
42 
44 
45 /*============================================================================
46  * Macro definitions
47  *============================================================================*/
48 
49 /*============================================================================
50  * Type definitions
51  *============================================================================*/
52 
53 /*============================================================================
54  * Public function prototypes
55  *============================================================================*/
56 
57 /*----------------------------------------------------------------------------*/
68 /*----------------------------------------------------------------------------*/
69 
70 void
72  const cs_cdo_quantities_t *cdoq,
73  const cs_equation_param_t *eqp,
74  cs_real_t *values);
75 
76 /*----------------------------------------------------------------------------*/
91 /*----------------------------------------------------------------------------*/
92 
93 void
95  const cs_cdo_connect_t *connect,
96  const cs_cdo_quantities_t *quant,
97  const cs_equation_param_t *eqp,
98  const cs_real_t dir_values[],
99  const short int neu_tags[],
100  cs_real_t t_eval,
101  cs_cell_sys_t *csys,
102  cs_cell_builder_t *cb);
103 
104 /*----------------------------------------------------------------------------*/
119 /*----------------------------------------------------------------------------*/
120 
121 void
123  const cs_cdo_connect_t *connect,
124  const cs_cdo_quantities_t *quant,
125  const cs_equation_param_t *eqp,
126  const cs_real_t dir_values[],
127  const short int neu_tags[],
128  cs_real_t t_eval,
129  cs_cell_sys_t *csys,
130  cs_cell_builder_t *cb);
131 
132 /*----------------------------------------------------------------------------*/
146 /*----------------------------------------------------------------------------*/
147 
148 void
150  const cs_cdo_quantities_t *quant,
151  const cs_cdo_connect_t *connect,
152  const cs_equation_param_t *eqp,
153  const cs_cdo_bc_t *face_bc,
154  cs_real_t t_eval,
155  cs_cell_builder_t *cb,
156  cs_real_t *values);
157 
158 /*----------------------------------------------------------------------------*/
172 /*----------------------------------------------------------------------------*/
173 
174 void
176  const cs_cdo_quantities_t *quant,
177  const cs_cdo_connect_t *connect,
178  const cs_equation_param_t *eqp,
179  const cs_cdo_bc_t *face_bc,
180  cs_real_t t_eval,
181  cs_cell_builder_t *cb,
182  cs_real_t *values);
183 
184 /*----------------------------------------------------------------------------*/
195 /*----------------------------------------------------------------------------*/
196 
197 cs_flag_t *
199  const cs_cdo_bc_t *face_bc);
200 
201 /*----------------------------------------------------------------------------*/
211 /*----------------------------------------------------------------------------*/
212 
213 short int *
215  const cs_equation_param_t *eqp);
216 
217 /*----------------------------------------------------------------------------*/
231 /*----------------------------------------------------------------------------*/
232 
233 void
234 cs_equation_compute_neumann_sv(short int def_id,
235  short int f,
236  const cs_cdo_quantities_t *quant,
237  const cs_equation_param_t *eqp,
238  const cs_cell_mesh_t *cm,
239  const short int *f2v_ids,
240  cs_real_t t_eval,
241  double *neu_values);
242 
243 /*----------------------------------------------------------------------------*/
256 /*----------------------------------------------------------------------------*/
257 
258 void
259 cs_equation_compute_neumann_fb(short int def_id,
260  short int f,
261  const cs_cdo_quantities_t *quant,
262  const cs_equation_param_t *eqp,
263  const cs_cell_mesh_t *cm,
264  cs_real_t t_eval,
265  double *neu_values);
266 
267 /*----------------------------------------------------------------------------*/
268 
270 
271 #endif /* __CS_EQUATION_BC_H__ */
void cs_equation_compute_dirichlet_fb(const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_equation_param_t *eqp, const cs_cdo_bc_t *face_bc, cs_real_t t_eval, cs_cell_builder_t *cb, cs_real_t *values)
Compute the values of the Dirichlet BCs when DoFs are attached to CDO face-based schemes.
Definition: cs_equation_bc.c:636
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources...
Definition: cs_equation_param.h:159
#define BEGIN_C_DECLS
Definition: cs_defs.h:462
cs_flag_t * cs_equation_set_vertex_bc_flag(const cs_cdo_connect_t *connect, const cs_cdo_bc_t *face_bc)
Define an array of flags for each vertex collecting the flags of associated boundary faces...
Definition: cs_equation_bc.c:782
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
Definition: cs_cdo_bc.h:95
Definition: cs_cdo_connect.h:74
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_mesh.h:63
void cs_equation_compute_neumann_fb(short int def_id, short int f, const cs_cdo_quantities_t *quant, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_real_t t_eval, double *neu_values)
Compute the values of the Neumann BCs when DoFs are attached to faces.
Definition: cs_equation_bc.c:961
short int * cs_equation_tag_neumann_face(const cs_cdo_quantities_t *quant, const cs_equation_param_t *eqp)
Tag each face related to a Neumann BC with its definition id. Default tag is -1 (not a Neumann face) ...
Definition: cs_equation_bc.c:821
void cs_equation_vb_set_cell_bc(const cs_cell_mesh_t *cm, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_equation_param_t *eqp, const cs_real_t dir_values[], const short int neu_tags[], cs_real_t t_eval, cs_cell_sys_t *csys, cs_cell_builder_t *cb)
Set the BC into a cellwise view of the current system. Case of vertex-based schemes.
Definition: cs_equation_bc.c:241
void cs_equation_fb_set_cell_bc(const cs_cell_mesh_t *cm, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_equation_param_t *eqp, const cs_real_t dir_values[], const short int neu_tags[], cs_real_t t_eval, cs_cell_sys_t *csys, cs_cell_builder_t *cb)
Set the BC into a cellwise view of the current system. Case of Face-based schemes.
Definition: cs_equation_bc.c:332
Set of local and temporary buffers useful for building the algebraic system with a cellwise process...
Definition: cs_cdo_local.h:75
void cs_equation_compute_neumann_sv(short int def_id, short int f, const cs_cdo_quantities_t *quant, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const short int *f2v_ids, cs_real_t t_eval, double *neu_values)
Compute the values of the Neumann BCs when DoFs are scalar-valued and attached to vertices...
Definition: cs_equation_bc.c:868
#define END_C_DECLS
Definition: cs_defs.h:463
unsigned short int cs_flag_t
Definition: cs_defs.h:299
void cs_equation_init_boundary_flux_from_bc(cs_real_t t_eval, const cs_cdo_quantities_t *cdoq, const cs_equation_param_t *eqp, cs_real_t *values)
Set the values for the normal boundary flux stemming from the Neumann boundary conditions (zero is le...
Definition: cs_equation_bc.c:152
void cs_equation_compute_dirichlet_vb(const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_equation_param_t *eqp, const cs_cdo_bc_t *face_bc, cs_real_t t_eval, cs_cell_builder_t *cb, cs_real_t *values)
Compute the values of the Dirichlet BCs when DoFs are attached to vertices.
Definition: cs_equation_bc.c:409
Structure and routines handling the specific settings related to a cs_equation_t structure.
Definition: mesh.f90:26