8.3
general documentation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
cs_cdovb_priv.h
Go to the documentation of this file.
1#ifndef __CS_CDOVB_PRIV_H__
2#define __CS_CDOVB_PRIV_H__
3
4/*============================================================================
5 * Definition of cs_cdovb_scaleq_t and cs_cdovb_vecteq structures
6 *============================================================================*/
7
8/*
9 This file is part of code_saturne, a general-purpose CFD tool.
10
11 Copyright (C) 1998-2024 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_bc.h"
36#include "cs_equation_builder.h"
37
38/*----------------------------------------------------------------------------*/
39
41
49/*============================================================================
50 * Macro definitions
51 *============================================================================*/
52
53/*============================================================================
54 * Type definitions
55 *============================================================================*/
56
57/*----------------------------------------------------------------------------*/
68/*----------------------------------------------------------------------------*/
69
70typedef void
72 const cs_cell_mesh_t *cm,
73 const cs_hodge_t *mass_hodge,
74 const cs_equation_builder_t *eqb,
76 cs_cell_sys_t *csys);
77
78/*----------------------------------------------------------------------------*/
90/*----------------------------------------------------------------------------*/
91
92typedef void
94 const cs_cell_mesh_t *cm,
95 const cs_hodge_t *mass_hodge,
96 const double inv_dtcur,
99 cs_cell_sys_t *csys);
100
101/*=============================================================================
102 * Structure definitions
103 *============================================================================*/
104
105/* Algebraic system for CDO vertex-based discretization */
106
108
109 /* Ids related to the variable field and to the boundary flux field */
110
113
114 /* System size */
115
117
118 /* Array storing the value arising from the contribution of all source
119 terms */
120
122
123 /* Array for extra-operations */
124
125 cs_real_t *cell_values; /* null if not requested */
126
127 /* Boundary conditions */
128
132
133 /* Only for vector-valued variables */
134
136
137 /* Pointer of function to build the diffusion term */
138
141
142 /* Pointer of function to build the advection term */
143
146
147 /* Pointer of function to build the unsteady term */
148
150
151 /* Pointer of function to build the unsteady term */
152
154
155 /* If one needs to build a local Hodge operator for the unsteady and/or the
156 reaction term(s) */
157
161
162};
163
164/* Scalar-valued and vector-valued equations rely on the same pattern */
165
166typedef struct _cs_cdovb_t cs_cdovb_scaleq_t;
167typedef struct _cs_cdovb_t cs_cdovb_vecteq_t;
168
169/*============================================================================
170 * Public function prototypes
171 *============================================================================*/
172
173/*----------------------------------------------------------------------------*/
174
176
177#endif /* __CS_CDOVB_PRIV_H__ */
void() cs_cdovb_advection_bc_t(const cs_cell_mesh_t *cm, const cs_equation_param_t *eqp, cs_real_t t_eval, cs_face_mesh_t *fm, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Compute the BC contribution for the advection operator in CDO vertex-based (or vertex+cell-based) sch...
Definition: cs_cdo_advection.h:182
void() cs_cdovb_advection_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_property_data_t *diff_pty, cs_face_mesh_t *fm, cs_cell_builder_t *cb)
Compute the convection operator attached to a cell with a CDO vertex-based scheme....
Definition: cs_cdo_advection.h:161
void() cs_cdovb_reaction_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_hodge_t *mass_hodge, const cs_equation_builder_t *eqb, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Add the reaction term for a CDO vertex-based scheme.
Definition: cs_cdovb_priv.h:71
void() cs_cdovb_time_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, const cs_hodge_t *mass_hodge, const double inv_dtcur, cs_equation_builder_t *eqb, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Apply the time scheme for a CDO vertex-based scheme.
Definition: cs_cdovb_priv.h:93
#define BEGIN_C_DECLS
Definition: cs_defs.h:542
double cs_real_t
Floating-point value.
Definition: cs_defs.h:342
#define END_C_DECLS
Definition: cs_defs.h:543
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:335
unsigned short int cs_flag_t
Definition: cs_defs.h:344
void() cs_cdo_enforce_bc_t(const cs_equation_param_t *eqp, const cs_cell_mesh_t *cm, cs_face_mesh_t *fm, cs_hodge_t *hodge, cs_cell_builder_t *cb, cs_cell_sys_t *csys)
Enforcement of a boundary condition (Dirichlet, Robin, sliding...)
Definition: cs_equation_bc.h:90
bool() cs_hodge_compute_t(const cs_cell_mesh_t *cm, cs_hodge_t *hodge, cs_cell_builder_t *cb)
Build a discrete Hodge operator or a related operator (such as the stiffmess matrix) for a given cell...
Definition: cs_hodge.h:218
Definition: cs_cdovb_priv.h:107
cs_lnum_t n_dofs
Definition: cs_cdovb_priv.h:116
cs_cdo_enforce_bc_t * enforce_sliding
Definition: cs_cdovb_priv.h:135
cs_cdovb_reaction_t * add_reaction_term
Definition: cs_cdovb_priv.h:149
cs_hodge_param_t mass_hodgep
Definition: cs_cdovb_priv.h:158
cs_hodge_t ** diffusion_hodge
Definition: cs_cdovb_priv.h:139
cs_real_t * cell_values
Definition: cs_cdovb_priv.h:125
cs_cdo_enforce_bc_t * enforce_dirichlet
Definition: cs_cdovb_priv.h:130
cs_flag_t * vtx_bc_flag
Definition: cs_cdovb_priv.h:129
cs_hodge_compute_t * get_stiffness_matrix
Definition: cs_cdovb_priv.h:140
cs_cdovb_advection_t * get_advection_matrix
Definition: cs_cdovb_priv.h:144
cs_cdovb_advection_bc_t * add_advection_bc
Definition: cs_cdovb_priv.h:145
cs_cdovb_time_t * add_unsteady_term
Definition: cs_cdovb_priv.h:153
cs_hodge_compute_t * get_mass_matrix
Definition: cs_cdovb_priv.h:160
cs_real_t * source_terms
Definition: cs_cdovb_priv.h:121
int bflux_field_id
Definition: cs_cdovb_priv.h:112
cs_cdo_enforce_bc_t * enforce_robin_bc
Definition: cs_cdovb_priv.h:131
int var_field_id
Definition: cs_cdovb_priv.h:111
cs_hodge_t ** mass_hodge
Definition: cs_cdovb_priv.h:159
Set of local and temporary buffers.
Definition: cs_cdo_local.h:60
Set of local quantities and connectivities related to a mesh cell.
Definition: cs_cdo_local.h:203
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:147
Store common elements used when building an algebraic system related to an equation.
Set of parameters to handle an unsteady convection-diffusion-reaction equation with term sources.
Definition: cs_equation_param.h:192
Structure storing all metadata/parameters related to the usage of a discrete Hodge operator.
Definition: cs_hodge.h:151
Structure associated to a discrete Hodge operator *.
Definition: cs_hodge.h:183