9.2
general documentation
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-2026 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 "base/cs_defs.h"
34#include "cdo/cs_equation_bc.h"
36#include "cdo/cs_hodge.h"
37
45/*============================================================================
46 * Macro definitions
47 *============================================================================*/
48
49/*============================================================================
50 * Type definitions
51 *============================================================================*/
52
53/*----------------------------------------------------------------------------*/
64/*----------------------------------------------------------------------------*/
65
66typedef void
68 const cs_cell_mesh_t *cm,
69 const cs_hodge_t *mass_hodge,
70 const cs_equation_builder_t *eqb,
72 cs_cell_sys_t *csys);
73
74/*----------------------------------------------------------------------------*/
86/*----------------------------------------------------------------------------*/
87
88typedef void
90 const cs_cell_mesh_t *cm,
91 const cs_hodge_t *mass_hodge,
92 const double inv_dtcur,
95 cs_cell_sys_t *csys);
96
97/*=============================================================================
98 * Structure definitions
99 *============================================================================*/
100
101/* Algebraic system for CDO vertex-based discretization */
102
104
105 /* Ids related to the variable field and to the boundary flux field */
106
109
110 /* System size */
111
113
114 /* Array storing the value arising from the contribution of all source
115 terms */
116
118
119 /* Array for extra-operations */
120
121 cs_real_t *cell_values; /* null if not requested */
122
123 /* Boundary conditions */
124
128
129 /* Only for vector-valued variables */
130
132
133 /* Pointer of function to build the diffusion term */
134
137
138 /* Pointer of function to build the advection term */
139
142
143 /* Pointer of function to build the unsteady term */
144
146
147 /* Pointer of function to build the unsteady term */
148
150
151 /* If one needs to build a local Hodge operator for the unsteady and/or the
152 reaction term(s) */
153
157
158};
159
160/* Scalar-valued and vector-valued equations rely on the same pattern */
161
162typedef struct _cs_cdovb_t cs_cdovb_scaleq_t;
163typedef struct _cs_cdovb_t cs_cdovb_vecteq_t;
164
165/*============================================================================
166 * Public function prototypes
167 *============================================================================*/
168
169#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:179
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:158
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:67
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:89
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
unsigned short int cs_flag_t
Definition: cs_defs.h:334
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:86
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:214
Definition: cs_cdovb_priv.h:103
cs_lnum_t n_dofs
Definition: cs_cdovb_priv.h:112
cs_cdo_enforce_bc_t * enforce_sliding
Definition: cs_cdovb_priv.h:131
cs_cdovb_reaction_t * add_reaction_term
Definition: cs_cdovb_priv.h:145
cs_hodge_param_t mass_hodgep
Definition: cs_cdovb_priv.h:154
cs_hodge_t ** diffusion_hodge
Definition: cs_cdovb_priv.h:135
cs_real_t * cell_values
Definition: cs_cdovb_priv.h:121
cs_cdo_enforce_bc_t * enforce_dirichlet
Definition: cs_cdovb_priv.h:126
cs_flag_t * vtx_bc_flag
Definition: cs_cdovb_priv.h:125
cs_hodge_compute_t * get_stiffness_matrix
Definition: cs_cdovb_priv.h:136
cs_cdovb_advection_t * get_advection_matrix
Definition: cs_cdovb_priv.h:140
cs_cdovb_advection_bc_t * add_advection_bc
Definition: cs_cdovb_priv.h:141
cs_cdovb_time_t * add_unsteady_term
Definition: cs_cdovb_priv.h:149
cs_hodge_compute_t * get_mass_matrix
Definition: cs_cdovb_priv.h:156
cs_real_t * source_terms
Definition: cs_cdovb_priv.h:117
int bflux_field_id
Definition: cs_cdovb_priv.h:108
cs_cdo_enforce_bc_t * enforce_robin_bc
Definition: cs_cdovb_priv.h:127
int var_field_id
Definition: cs_cdovb_priv.h:107
cs_hodge_t ** mass_hodge
Definition: cs_cdovb_priv.h:155
Set of local and temporary buffers.
Definition: cs_cdo_local.h:56
Set of local quantities and connectivities related to a mesh cell.
Definition: cs_cdo_local.h:242
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:163
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:190
Structure storing all metadata/parameters related to the usage of a discrete Hodge operator.
Definition: cs_hodge.h:147
Structure associated to a discrete Hodge operator *.
Definition: cs_hodge.h:179