programmer's documentation
cs_cdovb_diffusion.h
Go to the documentation of this file.
1 #ifndef __CS_CDOVB_DIFFUSION_H__
2 #define __CS_CDOVB_DIFFUSION_H__
3 
4 /*============================================================================
5  * Build discrete stiffness matrices and handled boundary conditions for the
6  * diffusion term in CDO vertex-based schemes
7  *============================================================================*/
8 
9 /*
10  This file is part of Code_Saturne, a general-purpose CFD tool.
11 
12  Copyright (C) 1998-2015 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.h"
34 #include "cs_param.h"
35 #include "cs_cdo_connect.h"
36 #include "cs_cdo_quantities.h"
37 
38 /*----------------------------------------------------------------------------*/
39 
41 
42 /*============================================================================
43  * Macro definitions
44  *============================================================================*/
45 
46 /*============================================================================
47  * Type definitions
48  *============================================================================*/
49 
50 typedef struct _cs_cdovb_diff_t cs_cdovb_diff_t;
51 
52 /*============================================================================
53  * Public function prototypes
54  *============================================================================*/
55 
56 /*----------------------------------------------------------------------------*/
67 /*----------------------------------------------------------------------------*/
68 
71  bool is_uniform,
72  const cs_param_hodge_t h_info,
73  const cs_param_bc_enforce_t bc_enforce);
74 
75 /*----------------------------------------------------------------------------*/
83 /*----------------------------------------------------------------------------*/
84 
87 
88 /*----------------------------------------------------------------------------*/
101 /*----------------------------------------------------------------------------*/
102 
103 cs_locmat_t *
105  const cs_cdo_connect_t *connect,
106  const cs_cdo_quantities_t *quant,
107  const cs_lnum_t *vtag,
108  const cs_real_3_t *tensor,
109  cs_cdovb_diff_t *diff);
110 
111 /*----------------------------------------------------------------------------*/
130 /*----------------------------------------------------------------------------*/
131 
132 cs_locmat_t *
134  cs_lnum_t f_id,
135  const cs_cdo_connect_t *connect,
136  const cs_cdo_quantities_t *quant,
137  const cs_real_t matpty[3][3],
138  cs_real_t eig_ratio,
139  cs_real_t eig_max,
140  cs_lnum_t *loc_v_ids,
141  cs_real_t *v_coef,
142  cs_cdovb_diff_t *diff);
143 
144 /*----------------------------------------------------------------------------*/
145 
147 
148 #endif /* __CS_CDOVB_DIFFUSION_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:429
Definition: cs_cdo_connect.h:67
cs_locmat_t * cs_cdovb_diffusion_ntrgrd_build(cs_lnum_t c_id, cs_lnum_t f_id, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_real_t matpty[3][3], cs_real_t eig_ratio, cs_real_t eig_max, cs_lnum_t *loc_v_ids, cs_real_t *v_coef, cs_cdovb_diff_t *diff)
Define the local (cellwise) "normal trace gradient" matrix This local matrix is used in Nitsche metho...
Definition: cs_cdovb_diffusion.c:755
Definition: cs_cdo_quantities.h:86
struct _cs_cdovb_diff_t cs_cdovb_diff_t
Definition: cs_cdovb_diffusion.h:50
cs_real_t cs_real_3_t[3]
vector of 3 floating-point values
Definition: cs_defs.h:307
cs_cdovb_diff_t * cs_cdovb_diffusion_builder_free(cs_cdovb_diff_t *diff)
Free a cs_cdovb_diff_t structure.
Definition: cs_cdovb_diffusion.c:585
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:292
cs_cdovb_diff_t * cs_cdovb_diffusion_builder_init(const cs_cdo_connect_t *connect, bool is_uniform, const cs_param_hodge_t h_info, const cs_param_bc_enforce_t bc_enforce)
Initialize a builder structure used to build the stiffness matrix.
Definition: cs_cdovb_diffusion.c:494
#define END_C_DECLS
Definition: cs_defs.h:430
double cs_real_t
Definition: cs_defs.h:296
cs_locmat_t * cs_cdovb_diffusion_build_local(cs_lnum_t c_id, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_lnum_t *vtag, const cs_real_3_t *tensor, cs_cdovb_diff_t *diff)
Define the local (cellwise) stiffness matrix.
Definition: cs_cdovb_diffusion.c:631
Definition: cs_param.h:130
cs_param_bc_enforce_t
Definition: cs_param.h:260
Definition: cs_cdo_toolbox.h:72