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 /*----------------------------------------------------------------------------*/
75 /*----------------------------------------------------------------------------*/
76 
77 void
79  short int f,
80  cs_flag_t face_flag,
81  const cs_cell_mesh_t *cm,
82  const cs_cdo_connect_t *connect,
83  const cs_cdo_quantities_t *quant,
84  const cs_time_step_t *time_step,
85  const cs_equation_param_t *eqp,
86  const cs_real_t dir_values[],
87  const short int neu_tags[],
88  cs_cell_sys_t *csys,
89  cs_cell_builder_t *cb);
90 
91 /*----------------------------------------------------------------------------*/
109 /*----------------------------------------------------------------------------*/
110 
111 void
113  short int f,
114  cs_flag_t face_flag,
115  const cs_cell_mesh_t *cm,
116  const cs_cdo_connect_t *connect,
117  const cs_cdo_quantities_t *quant,
118  const cs_time_step_t *time_step,
119  const cs_equation_param_t *eqp,
120  const cs_real_t dir_values[],
121  const short int neu_tags[],
122  cs_cell_sys_t *csys,
123  cs_cell_builder_t *cb);
124 
125 /*----------------------------------------------------------------------------*/
140 /*----------------------------------------------------------------------------*/
141 
142 cs_real_t *
144  const cs_cdo_quantities_t *quant,
145  const cs_cdo_connect_t *connect,
146  const cs_time_step_t *time_step,
147  const cs_equation_param_t *eqp,
148  const cs_cdo_bc_list_t *dir,
149  cs_cell_builder_t *cb);
150 
151 /*----------------------------------------------------------------------------*/
166 /*----------------------------------------------------------------------------*/
167 
168 cs_real_t *
170  const cs_cdo_quantities_t *quant,
171  const cs_cdo_connect_t *connect,
172  const cs_time_step_t *time_step,
173  const cs_equation_param_t *eqp,
174  const cs_cdo_bc_list_t *dir,
175  cs_cell_builder_t *cb);
176 
177 /*----------------------------------------------------------------------------*/
187 /*----------------------------------------------------------------------------*/
188 
189 short int *
191  const cs_equation_param_t *eqp);
192 
193 /*----------------------------------------------------------------------------*/
206 /*----------------------------------------------------------------------------*/
207 
208 void
209 cs_equation_compute_neumann_sv(short int def_id,
210  short int f,
211  const cs_cdo_quantities_t *quant,
212  const cs_time_step_t *time_step,
213  const cs_equation_param_t *eqp,
214  const cs_cell_mesh_t *cm,
215  double *neu_values);
216 
217 /*----------------------------------------------------------------------------*/
230 /*----------------------------------------------------------------------------*/
231 
232 void
233 cs_equation_compute_neumann_fb(short int def_id,
234  short int f,
235  const cs_cdo_quantities_t *quant,
236  const cs_time_step_t *time_step,
237  const cs_equation_param_t *eqp,
238  const cs_cell_mesh_t *cm,
239  double *neu_values);
240 
241 /*----------------------------------------------------------------------------*/
242 
244 
245 #endif /* __CS_EQUATION_BC_H__ */
cs_real_t * cs_equation_compute_dirichlet_vb(const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step, const cs_equation_param_t *eqp, const cs_cdo_bc_list_t *dir, cs_cell_builder_t *cb)
Compute the values of the Dirichlet BCs when DoFs are attached to vertices.
Definition: cs_equation_bc.c:257
time step descriptor
Definition: cs_time_step.h:51
Definition: cs_cdo_bc.h:78
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources...
Definition: cs_equation_param.h:150
void cs_equation_fb_set_cell_bc(cs_lnum_t bf_id, short int f, cs_flag_t face_flag, const cs_cell_mesh_t *cm, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, const cs_equation_param_t *eqp, const cs_real_t dir_values[], const short int neu_tags[], 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:184
#define BEGIN_C_DECLS
Definition: cs_defs.h:461
Definition: cs_cdo_local.h:133
void cs_equation_compute_neumann_sv(short int def_id, short int f, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, double *neu_values)
Compute the values of the Neumann BCs when DoFs are scalar-valued and attached to vertices...
Definition: cs_equation_bc.c:697
void cs_equation_vb_set_cell_bc(cs_lnum_t bf_id, short int f, cs_flag_t face_flag, const cs_cell_mesh_t *cm, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step, const cs_equation_param_t *eqp, const cs_real_t dir_values[], const short int neu_tags[], 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:99
Definition: cs_cdo_connect.h:69
double cs_real_t
Floating-point value.
Definition: cs_defs.h:297
Definition: cs_cdo_quantities.h:94
Definition: cs_cdo_local.h:94
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_time_step_t *time_step, const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, double *neu_values)
Compute the values of the Neumann BCs when DoFs are attached to faces.
Definition: cs_equation_bc.c:773
cs_real_t * cs_equation_compute_dirichlet_fb(const cs_mesh_t *mesh, const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step, const cs_equation_param_t *eqp, const cs_cdo_bc_list_t *dir, cs_cell_builder_t *cb)
Compute the values of the Dirichlet BCs when DoFs are attached to CDO face-based schemes.
Definition: cs_equation_bc.c:538
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:651
Definition: cs_cdo_local.h:71
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:293
#define END_C_DECLS
Definition: cs_defs.h:462
unsigned short int cs_flag_t
Definition: cs_defs.h:299
Structure and routines handling the specific settings related to a cs_equation_t structure.
Definition: mesh.f90:26