9.2
general documentation
cs_cdoeb_vecteq.h
Go to the documentation of this file.
1#ifndef CS_CDOEB_VECTEQ_H
2#define CS_CDOEB_VECTEQ_H
3
4/*============================================================================
5 * Build an algebraic CDO edge-based system. Degrees of freedom are defined as
6 * a circulation. Degrees of freedom are scalar-valued but the equation to
7 * solve is vector-valued
8 *============================================================================*/
9
10/*
11 This file is part of code_saturne, a general-purpose CFD tool.
12
13 Copyright (C) 1998-2026 EDF S.A.
14
15 This program is free software; you can redistribute it and/or modify it under
16 the terms of the GNU General Public License as published by the Free Software
17 Foundation; either version 2 of the License, or (at your option) any later
18 version.
19
20 This program is distributed in the hope that it will be useful, but WITHOUT
21 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
23 details.
24
25 You should have received a copy of the GNU General Public License along with
26 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
27 Street, Fifth Floor, Boston, MA 02110-1301, USA.
28*/
29
30/*----------------------------------------------------------------------------
31 * Local headers
32 *----------------------------------------------------------------------------*/
33
34#include "alge/cs_matrix.h"
35#include "base/cs_base.h"
36#include "base/cs_field.h"
37#include "base/cs_restart.h"
38#include "base/cs_time_step.h"
39#include "cdo/cs_cdo_connect.h"
40#include "cdo/cs_cdo_local.h"
42#include "cdo/cs_cdoeb_priv.h"
45#include "cdo/cs_source_term.h"
46#include "mesh/cs_mesh.h"
47
48/*============================================================================
49 * Macro definitions
50 *============================================================================*/
51
52/*============================================================================
53 * Type definitions
54 *============================================================================*/
55
56/* Algebraic system for CDO edge-based discretization */
57
58typedef struct _cs_cdoeb_t cs_cdoeb_vecteq_t;
59
60/*============================================================================
61 * Public function prototypes
62 *============================================================================*/
63
64/*----------------------------------------------------------------------------*/
71/*----------------------------------------------------------------------------*/
72
73bool
75
76/*----------------------------------------------------------------------------*/
85/*----------------------------------------------------------------------------*/
86
87void
89 const cs_cdo_connect_t *connect,
90 const cs_time_step_t *time_step);
91
92/*----------------------------------------------------------------------------*/
100/*----------------------------------------------------------------------------*/
101
102void
104 cs_cell_builder_t **cb);
105
106/*----------------------------------------------------------------------------*/
111/*----------------------------------------------------------------------------*/
112
113void
115
116/*----------------------------------------------------------------------------*/
128/*----------------------------------------------------------------------------*/
129
130void *
132 int var_id,
133 int bflux_id,
135
136/*----------------------------------------------------------------------------*/
144/*----------------------------------------------------------------------------*/
145
146void *
147cs_cdoeb_vecteq_free_context(void *builder);
148
149/*----------------------------------------------------------------------------*/
162/*----------------------------------------------------------------------------*/
163
164void
166 const int field_id,
167 const cs_mesh_t *mesh,
168 const cs_equation_param_t *eqp,
170 void *context);
171
172/*----------------------------------------------------------------------------*/
185/*----------------------------------------------------------------------------*/
186
187void
189 const cs_mesh_t *mesh,
190 const int field_id,
191 const cs_equation_param_t *eqp,
193 void *context);
194
195/*----------------------------------------------------------------------------*/
204/*----------------------------------------------------------------------------*/
205
206void
209 void *context);
210
211/*----------------------------------------------------------------------------*/
219/*----------------------------------------------------------------------------*/
220
221void
224 void *context);
225
226/*----------------------------------------------------------------------------*/
237/*----------------------------------------------------------------------------*/
238
239cs_real_t *
241 bool previous);
242
243/*----------------------------------------------------------------------------*/
254/*----------------------------------------------------------------------------*/
255
256cs_real_t *
258 bool previous);
259
260/*----------------------------------------------------------------------------*/
269/*----------------------------------------------------------------------------*/
270
271void
273 const char *eqname,
274 void *scheme_context);
275
276/*----------------------------------------------------------------------------*/
285/*----------------------------------------------------------------------------*/
286
287void
289 const char *eqname,
290 void *scheme_context);
291
292#endif /* CS_CDOEB_VECTEQ_H */
time step descriptor
Definition: cs_time_step.h:60
Structures for building an algebraic CDO edge-based system for unsteady diffusion-reaction equations ...
cs_real_t * cs_cdoeb_vecteq_get_edge_values(void *context, bool previous)
Get the values at mesh edges (the DoFs) The lifecycle of this array is managed by the code....
Definition: cs_cdoeb_vecteq.cpp:1198
void cs_cdoeb_vecteq_solve_steady_state(bool cur2prev, const cs_mesh_t *mesh, const int field_id, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context)
Build and solve the linear system arising from a scalar steady-state convection/diffusion/reaction eq...
Definition: cs_cdoeb_vecteq.cpp:926
void cs_cdoeb_vecteq_write_restart(cs_restart_t *restart, const char *eqname, void *scheme_context)
Write additional arrays (not defined as fields) but useful for the checkpoint/restart process.
Definition: cs_cdoeb_vecteq.cpp:1275
void cs_cdoeb_vecteq_init_values(cs_real_t t_eval, const int field_id, const cs_mesh_t *mesh, const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context)
Set the initial values of the variable field taking into account the boundary conditions....
Definition: cs_cdoeb_vecteq.cpp:832
void cs_cdoeb_vecteq_extra_post(const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context)
Predefined extra-operations related to this equation.
Definition: cs_cdoeb_vecteq.cpp:1175
cs_real_t * cs_cdoeb_vecteq_get_cell_values(void *context, bool previous)
Get the values at mesh cells from a reconstruction of edge values. The lifecycle of this array is man...
Definition: cs_cdoeb_vecteq.cpp:1226
void cs_cdoeb_vecteq_current_to_previous(const cs_equation_param_t *eqp, cs_equation_builder_t *eqb, void *context)
Operate a current to previous operation for the field associated to this equation and potentially for...
Definition: cs_cdoeb_vecteq.cpp:1144
void cs_cdoeb_vecteq_read_restart(cs_restart_t *restart, const char *eqname, void *scheme_context)
Read additional arrays (not defined as fields) but useful for the checkpoint/restart process.
Definition: cs_cdoeb_vecteq.cpp:1254
void * cs_cdoeb_vecteq_free_context(void *builder)
Destroy a cs_cdoeb_vecteq_t structure.
Definition: cs_cdoeb_vecteq.cpp:795
bool cs_cdoeb_vecteq_is_initialized(void)
Check if the generic structures for building a CDO-Eb scheme are allocated.
Definition: cs_cdoeb_vecteq.cpp:469
void * cs_cdoeb_vecteq_init_context(cs_equation_param_t *eqp, int var_id, int bflux_id, cs_equation_builder_t *eqb)
Initialize a cs_cdoeb_vecteq_t structure storing data useful for building and managing such a scheme.
Definition: cs_cdoeb_vecteq.cpp:598
void cs_cdoeb_vecteq_finalize_sharing(void)
Free work buffer and general structure related to CDO edge-based schemes.
Definition: cs_cdoeb_vecteq.cpp:562
void cs_cdoeb_vecteq_init_sharing(const cs_cdo_quantities_t *quant, const cs_cdo_connect_t *connect, const cs_time_step_t *time_step)
Allocate work buffers and general structures related to CDO edge-based schemes. Set shared pointers.
Definition: cs_cdoeb_vecteq.cpp:489
void cs_cdoeb_vecteq_get(cs_cell_sys_t **csys, cs_cell_builder_t **cb)
Retrieve work buffers used for building a CDO system cellwise in case of scalar-valued edge-based sch...
Definition: cs_cdoeb_vecteq.cpp:545
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
struct _cs_restart_t cs_restart_t
Definition: cs_restart.h:91
Definition: mesh.f90:26
Definition: cs_cdoeb_priv.h:57
Definition: cs_cdo_connect.h:57
Definition: cs_cdo_quantities.h:142
Set of local and temporary buffers.
Definition: cs_cdo_local.h:56
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
Definition: cs_mesh.h:85