8.3
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-2024 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 "cs_base.h"
35#include "cs_cdo_connect.h"
36#include "cs_cdo_local.h"
37#include "cs_cdo_quantities.h"
38#include "cs_cdoeb_priv.h"
39#include "cs_equation_builder.h"
40#include "cs_equation_param.h"
41#include "cs_field.h"
42#include "cs_matrix.h"
43#include "cs_mesh.h"
44#include "cs_restart.h"
45#include "cs_source_term.h"
46#include "cs_time_step.h"
47
48/*----------------------------------------------------------------------------*/
49
51
52/*============================================================================
53 * Macro definitions
54 *============================================================================*/
55
56/*============================================================================
57 * Type definitions
58 *============================================================================*/
59
60/* Algebraic system for CDO edge-based discretization */
61
62typedef struct _cs_cdoeb_t cs_cdoeb_vecteq_t;
63
64/*============================================================================
65 * Public function prototypes
66 *============================================================================*/
67
68/*----------------------------------------------------------------------------*/
75/*----------------------------------------------------------------------------*/
76
77bool
79
80/*----------------------------------------------------------------------------*/
89/*----------------------------------------------------------------------------*/
90
91void
93 const cs_cdo_connect_t *connect,
94 const cs_time_step_t *time_step);
95
96/*----------------------------------------------------------------------------*/
104/*----------------------------------------------------------------------------*/
105
106void
108 cs_cell_builder_t **cb);
109
110/*----------------------------------------------------------------------------*/
115/*----------------------------------------------------------------------------*/
116
117void
119
120/*----------------------------------------------------------------------------*/
132/*----------------------------------------------------------------------------*/
133
134void *
136 int var_id,
137 int bflux_id,
139
140/*----------------------------------------------------------------------------*/
148/*----------------------------------------------------------------------------*/
149
150void *
151cs_cdoeb_vecteq_free_context(void *builder);
152
153/*----------------------------------------------------------------------------*/
166/*----------------------------------------------------------------------------*/
167
168void
170 const int field_id,
171 const cs_mesh_t *mesh,
172 const cs_equation_param_t *eqp,
174 void *context);
175
176/*----------------------------------------------------------------------------*/
189/*----------------------------------------------------------------------------*/
190
191void
193 const cs_mesh_t *mesh,
194 const int field_id,
195 const cs_equation_param_t *eqp,
197 void *context);
198
199/*----------------------------------------------------------------------------*/
208/*----------------------------------------------------------------------------*/
209
210void
213 void *context);
214
215/*----------------------------------------------------------------------------*/
223/*----------------------------------------------------------------------------*/
224
225void
228 void *context);
229
230/*----------------------------------------------------------------------------*/
241/*----------------------------------------------------------------------------*/
242
243cs_real_t *
245 bool previous);
246
247/*----------------------------------------------------------------------------*/
258/*----------------------------------------------------------------------------*/
259
260cs_real_t *
262 bool previous);
263
264/*----------------------------------------------------------------------------*/
273/*----------------------------------------------------------------------------*/
274
275void
277 const char *eqname,
278 void *scheme_context);
279
280/*----------------------------------------------------------------------------*/
289/*----------------------------------------------------------------------------*/
290
291void
293 const char *eqname,
294 void *scheme_context);
295
296/*----------------------------------------------------------------------------*/
297
299
300#endif /* __CS_CDOEB_VECTEQ_H__ */
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:1205
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:933
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:1282
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:839
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:1182
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:1233
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:1151
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:1261
void * cs_cdoeb_vecteq_free_context(void *builder)
Destroy a cs_cdoeb_vecteq_t structure.
Definition: cs_cdoeb_vecteq.cpp:802
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:475
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:604
void cs_cdoeb_vecteq_finalize_sharing(void)
Free work buffer and general structure related to CDO edge-based schemes.
Definition: cs_cdoeb_vecteq.cpp:568
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:495
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:551
#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
struct _cs_restart_t cs_restart_t
Definition: cs_restart.h:95
Definition: mesh.f90:26
Definition: cs_cdoeb_priv.h:61
Definition: cs_cdo_connect.h:61
Definition: cs_cdo_quantities.h:139
Set of local and temporary buffers.
Definition: cs_cdo_local.h:60
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
Definition: cs_mesh.h:85
time step descriptor
Definition: cs_time_step.h:64