My Project
programmer's documentation
cs_cdofb_priv.h
Go to the documentation of this file.
1 #ifndef __CS_CDOFB_PRIV_H__
2 #define __CS_CDOFB_PRIV_H__
3 
4 /*============================================================================
5  * Definition of cs_cdofb_scaleq_t and cs_cdofb_vecteq structures
6  *============================================================================*/
7 
8 /*
9  This file is part of Code_Saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2019 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  * Local headers
30  *----------------------------------------------------------------------------*/
31 
32 #include "cs_defs.h"
33 #include "cs_hodge.h"
34 #include "cs_cdo_advection.h"
35 #include "cs_equation_assemble.h"
36 #include "cs_equation_bc.h"
37 
38 /*----------------------------------------------------------------------------*/
39 
41 
42 /*============================================================================
43  * Macro definitions
44  *============================================================================*/
45 
46 /*============================================================================
47  * Type definitions
48  *============================================================================*/
49 
50 /* Algebraic system for CDO face-based discretization */
51 struct _cs_cdofb_t {
52 
53  /* Ids related to the variable field and to the boundary flux field */
56 
57  /* System size (n_faces + n_cells) */
59 
60  /* Solution of the algebraic system DoF unknowns (x) + BCs */
61  cs_real_t *face_values; /* At the last iteration */
62  cs_real_t *face_values_pre; /* At the previous iteration */
63 
64  /* Assembly process */
66 
67  /* Members related to the static condensation */
68  cs_real_t *rc_tilda; /* Acc^-1 * RHS_cell */
69  cs_real_t *acf_tilda; /* Acc^-1 * Acf
70  Cell-faces lower-left block of the full matrix
71  Access to the values thanks to the c2f
72  connectivity */
73 
74  /* Array storing the value arising from the contribution of all source
75  terms (only allocated to n_cells) */
77 
78  /* Pointer of function to build the diffusion term */
83 
84  /* Pointer of function to build the advection term */
87 
88  /* If one needs to build a local hodge op. for time and reaction */
91 };
92 
93 /*============================================================================
94  * Public function prototypes
95  *============================================================================*/
96 
97 /*----------------------------------------------------------------------------*/
98 
100 
101 #endif /* __CS_CDOFB_PRIV_H__ */
cs_equation_assembly_t
void() cs_equation_assembly_t(const cs_cell_sys_t *csys, const cs_range_set_t *rset, cs_equation_assemble_t *eqa, cs_matrix_assembler_values_t *mav)
Assemble a cellwise system into the global algebraic system Block or no block versions are handled.
Definition: cs_equation_assemble.h:71
cs_defs.h
cs_param_hodge_t
Definition: cs_param_cdo.h:129
_cs_cdofb_t::bflux_field_id
int bflux_field_id
Definition: cs_cdofb_priv.h:55
_cs_cdofb_t::rc_tilda
cs_real_t * rc_tilda
Definition: cs_cdofb_priv.h:68
_cs_cdofb_t::enforce_dirichlet
cs_cdo_enforce_bc_t * enforce_dirichlet
Definition: cs_cdofb_priv.h:81
END_C_DECLS
#define END_C_DECLS
Definition: cs_defs.h:468
cs_equation_bc.h
cs_real_t
double cs_real_t
Floating-point value.
Definition: cs_defs.h:302
_cs_cdofb_t::hdg_mass
cs_param_hodge_t hdg_mass
Definition: cs_cdofb_priv.h:89
BEGIN_C_DECLS
#define BEGIN_C_DECLS
Definition: cs_defs.h:467
cs_cdo_advection.h
cs_cdofb_advection_bc_t
void() cs_cdofb_advection_bc_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Add the contribution of the boundary conditions to the local system in CDO-Fb schemes.
Definition: cs_cdo_advection.h:81
_cs_cdofb_t::n_dofs
cs_lnum_t n_dofs
Definition: cs_cdofb_priv.h:58
cs_cdo_enforce_bc_t
void() cs_cdo_enforce_bc_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Enforcement of a boundary condition (Dirichlet, Robin, sliding...)
Definition: cs_equation_bc.h:86
_cs_cdofb_t::adv_func_bc
cs_cdofb_advection_bc_t * adv_func_bc
Definition: cs_cdofb_priv.h:86
_cs_cdofb_t::get_mass_matrix
cs_hodge_t * get_mass_matrix
Definition: cs_cdofb_priv.h:90
_cs_cdofb_t::face_values
cs_real_t * face_values
Definition: cs_cdofb_priv.h:61
_cs_cdofb_t::assemble
cs_equation_assembly_t * assemble
Definition: cs_cdofb_priv.h:65
cs_hodge.h
_cs_cdofb_t::get_diffusion_hodge
cs_hodge_t * get_diffusion_hodge
Definition: cs_cdofb_priv.h:80
cs_hodge_t
void() cs_hodge_t(const cs_param_hodge_t h_info, const cs_cell_mesh_t *cm, cs_cell_builder_t *cb)
Build a local operator for a given cell (stored in cb->hdg for a discrete Hodge operator or in cb->lo...
Definition: cs_hodge.h:63
_cs_cdofb_t::source_terms
cs_real_t * source_terms
Definition: cs_cdofb_priv.h:76
_cs_cdofb_t::acf_tilda
cs_real_t * acf_tilda
Definition: cs_cdofb_priv.h:69
_cs_cdofb_t::face_values_pre
cs_real_t * face_values_pre
Definition: cs_cdofb_priv.h:62
cs_lnum_t
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:298
cs_equation_assemble.h
_cs_cdofb_t::var_field_id
int var_field_id
Definition: cs_cdofb_priv.h:54
_cs_cdofb_t::adv_func
cs_cdofb_advection_t * adv_func
Definition: cs_cdofb_priv.h:85
_cs_cdofb_t::get_stiffness_matrix
cs_hodge_t * get_stiffness_matrix
Definition: cs_cdofb_priv.h:79
cs_cdofb_advection_t
void() cs_cdofb_advection_t(const cs_cell_mesh_t *cm, const cs_real_t fluxes[], cs_sdm_t *adv)
Define the local convection operator in CDO-Fb schemes.
Definition: cs_cdo_advection.h:64
_cs_cdofb_t
Definition: cs_cdofb_priv.h:51
_cs_cdofb_t::enforce_sliding
cs_cdo_enforce_bc_t * enforce_sliding
Definition: cs_cdofb_priv.h:82