8.1
general documentation
cs_cdovb_scalsys.h
Go to the documentation of this file.
1 #ifndef __CS_CDOVB_SCALSYS_H__
2 #define __CS_CDOVB_SCALSYS_H__
3 
4 /*============================================================================
5  * Build an algebraic CDO vertex-based system of equations. These equations
6  * corresponds to scalar-valued unsteady convection diffusion reaction
7  * equations
8  *============================================================================*/
9 
10 /*
11  This file is part of code_saturne, a general-purpose CFD tool.
12 
13  Copyright (C) 1998-2023 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_quantities.h"
37 #include "cs_equation.h"
38 #include "cs_equation_param.h"
40 #include "cs_mesh.h"
41 #include "cs_time_step.h"
42 
43 /*----------------------------------------------------------------------------*/
44 
46 
47 /*============================================================================
48  * Macro definitions
49  *============================================================================*/
50 
51 /*============================================================================
52  * Type definitions
53  *============================================================================*/
54 
55 typedef struct _cs_cdovb_scalsys_t cs_cdovb_scalsys_t;
56 
57 /*============================================================================
58  * Public function prototypes
59  *============================================================================*/
60 
61 /*----------------------------------------------------------------------------*/
70 /*----------------------------------------------------------------------------*/
71 
72 void
74  const cs_cdo_connect_t *connect,
75  const cs_cdo_quantities_t *quant,
76  const cs_time_step_t *time_step);
77 
78 /*----------------------------------------------------------------------------*/
96 /*----------------------------------------------------------------------------*/
97 
98 void *
99 cs_cdovb_scalsys_define(int n_eqs,
100  const cs_equation_system_param_t *sysp,
101  cs_equation_core_t **block_factories,
102  cs_cdo_system_helper_t **p_sh);
103 
104 /*----------------------------------------------------------------------------*/
118 /*----------------------------------------------------------------------------*/
119 
120 void *
121 cs_cdovb_scalsys_free(int n_eqs,
122  cs_equation_core_t **blocks,
123  void *sys_context);
124 
125 /*----------------------------------------------------------------------------*/
140 /*----------------------------------------------------------------------------*/
141 
142 void
143 cs_cdovb_scalsys_solve_implicit(bool cur2prev,
144  int n_equations,
146  cs_equation_core_t **blocks,
147  void *sys_context,
149 
150 /*----------------------------------------------------------------------------*/
151 
153 
154 #endif /* __CS_CDOVB_SCALSYS_H__ */
void cs_cdovb_scalsys_init_sharing(const cs_mesh_t *mesh, const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_time_step_t *time_step)
Set pointers to the main shared structures.
Definition: cs_cdovb_scalsys.c:670
void * cs_cdovb_scalsys_free(int n_eqs, cs_equation_core_t **blocks, void *sys_context)
Free an array of structures (equation parameters, equation builders or scheme context) for each equat...
Definition: cs_cdovb_scalsys.c:835
void * cs_cdovb_scalsys_define(int n_eqs, const cs_equation_system_param_t *sysp, cs_equation_core_t **block_factories, cs_cdo_system_helper_t **p_sh)
Create and initialize factories for extra-diagonal blocks Build equation builders and scheme context ...
Definition: cs_cdovb_scalsys.c:704
void cs_cdovb_scalsys_solve_implicit(bool cur2prev, int n_equations, cs_equation_system_param_t *sysp, cs_equation_core_t **blocks, void *sys_context, cs_cdo_system_helper_t *sh)
Build and solve the linear system of equations. The number of rows in the system is equal to the numb...
Definition: cs_cdovb_scalsys.c:897
#define BEGIN_C_DECLS
Definition: cs_defs.h:514
#define END_C_DECLS
Definition: cs_defs.h:515
Definition: mesh.f90:26
Definition: cs_cdo_connect.h:61
Definition: cs_cdo_quantities.h:137
Definition: cs_cdo_system.h:377
Main structures on which an equation structure relies.
Definition: cs_equation.h:82
Main structure storing the parameter settings.
Definition: cs_equation_system_param.h:72
Definition: cs_mesh.h:85
time step descriptor
Definition: cs_time_step.h:64