programmer's documentation
cs_navsto_coupling.h
Go to the documentation of this file.
1 #ifndef __CS_NAVSTO_COUPLING_H__
2 #define __CS_NAVSTO_COUPLING_H__
3 
4 /*============================================================================
5  * Routines to handle structures used as a context when solving the
6  * Navier-Stokes equations. Structures are cast on-the-fly according to the
7  * type of coupling.
8  *============================================================================*/
9 
10 /*
11  This file is part of Code_Saturne, a general-purpose CFD tool.
12 
13  Copyright (C) 1998-2018 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_equation.h"
35 #include "cs_field.h"
36 #include "cs_navsto_param.h"
37 #include "cs_param.h"
38 
39 /*----------------------------------------------------------------------------*/
40 
42 
56 /*============================================================================
57  * Macro definitions
58  *============================================================================*/
59 
60 /*============================================================================
61  * Type definitions
62  *============================================================================*/
63 
64 /* Predefined context structures depending on the settings */
65 /* ======================================================= */
66 
75 typedef struct {
76 
84 
92 typedef struct {
93 
100 
108 typedef struct {
109 
120 
128 typedef struct {
129 
136 
137 /*============================================================================
138  * Public function prototypes
139  *============================================================================*/
140 
141 /*----------------------------------------------------------------------------*/
151 /*----------------------------------------------------------------------------*/
152 
153 void *
155  cs_param_bc_type_t bc);
156 
157 /*----------------------------------------------------------------------------*/
167 /*----------------------------------------------------------------------------*/
168 
169 void *
171  void *context);
172 
173 /*----------------------------------------------------------------------------*/
182 /*----------------------------------------------------------------------------*/
183 
184 void
186  void *context);
187 
188 /*----------------------------------------------------------------------------*/
199 /*----------------------------------------------------------------------------*/
200 
201 void
203  const cs_cdo_quantities_t *quant,
204  const cs_navsto_param_t *nsp,
205  void *context);
206 
207 /*----------------------------------------------------------------------------*/
217 /*----------------------------------------------------------------------------*/
218 
219 void *
221  cs_param_bc_type_t bc);
222 
223 /*----------------------------------------------------------------------------*/
233 /*----------------------------------------------------------------------------*/
234 
235 void *
237  void *context);
238 
239 /*----------------------------------------------------------------------------*/
248 /*----------------------------------------------------------------------------*/
249 
250 void
252  void *context);
253 
254 /*----------------------------------------------------------------------------*/
265 /*----------------------------------------------------------------------------*/
266 
267 void
269  const cs_cdo_quantities_t *quant,
270  const cs_navsto_param_t *nsp,
271  void *context);
272 
273 /*----------------------------------------------------------------------------*/
283 /*----------------------------------------------------------------------------*/
284 
285 void *
287  cs_param_bc_type_t bc);
288 
289 /*----------------------------------------------------------------------------*/
299 /*----------------------------------------------------------------------------*/
300 
301 void *
303  void *context);
304 
305 /*----------------------------------------------------------------------------*/
314 /*----------------------------------------------------------------------------*/
315 
316 void
318  void *context);
319 
320 /*----------------------------------------------------------------------------*/
331 /*----------------------------------------------------------------------------*/
332 
333 void
335  const cs_cdo_quantities_t *quant,
336  const cs_navsto_param_t *nsp,
337  void *context);
338 
339 /*----------------------------------------------------------------------------*/
350 /*----------------------------------------------------------------------------*/
351 
352 void *
354  cs_param_bc_type_t bc);
355 
356 /*----------------------------------------------------------------------------*/
365 /*----------------------------------------------------------------------------*/
366 
367 void *
369  void *context);
370 
371 /*----------------------------------------------------------------------------*/
380 /*----------------------------------------------------------------------------*/
381 
382 void
384  void *context);
385 
386 /*----------------------------------------------------------------------------*/
397 /*----------------------------------------------------------------------------*/
398 
399 void
401  const cs_cdo_quantities_t *quant,
402  const cs_navsto_param_t *nsp,
403  void *context);
404 
405 /*----------------------------------------------------------------------------*/
406 
408 
409 #endif /* __CS_NAVSTO_COUPLING_H__ */
void cs_navsto_uzawa_last_setup(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_navsto_param_t *nsp, void *context)
Finalize the setup for the Navier-Stokes equations when an Uzawa Augmented Lagrangian algorithm is us...
Definition: cs_navsto_coupling.c:233
void cs_navsto_ac_vpp_last_setup(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_navsto_param_t *nsp, void *context)
Finalize the setup for the Navier-Stokes equations when an Artificial Compressibility algorithm is us...
Definition: cs_navsto_coupling.c:564
void cs_navsto_ac_init_setup(const cs_navsto_param_t *nsp, void *context)
Start setting-up the Navier-Stokes equations when an Artificial Compressibility algorithm is used to ...
Definition: cs_navsto_coupling.c:344
Set of parameters specific for solving the Navier-Stokes system with the "artificial compressibility"...
Definition: cs_navsto_coupling.h:108
#define BEGIN_C_DECLS
Definition: cs_defs.h:462
void * cs_navsto_uzawa_create_context(cs_navsto_param_t *nsp, cs_param_bc_type_t bc)
Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Uzawa-A...
Definition: cs_navsto_coupling.c:110
Definition: cs_cdo_connect.h:74
cs_property_t * zeta
Definition: cs_navsto_coupling.h:115
cs_equation_t * energy
Definition: cs_navsto_coupling.h:78
Structure storing the parameters related to the resolution of the Navier-Stokes system.
Definition: cs_navsto_param.h:141
void * cs_navsto_projection_free_context(const cs_navsto_param_t *nsp, void *context)
Free the context structure related to a Projection approach.
Definition: cs_navsto_coupling.c:661
Definition: cs_cdo_quantities.h:94
void cs_navsto_projection_last_setup(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_navsto_param_t *nsp, void *context)
Finalize the setup for the Navier-Stokes equations when a projection algorithm is used to coupled the...
Definition: cs_navsto_coupling.c:719
void * cs_navsto_ac_vpp_free_context(const cs_navsto_param_t *nsp, void *context)
Free the context structure related to an Artificial Compressibility with the VPP approach.
Definition: cs_navsto_coupling.c:488
void cs_navsto_uzawa_init_setup(const cs_navsto_param_t *nsp, void *context)
Start setting-up the Navier-Stokes equations when a Uzawa Augmented Lagrangian algorithm is used to c...
Definition: cs_navsto_coupling.c:181
void cs_navsto_projection_init_setup(const cs_navsto_param_t *nsp, void *context)
Start setting-up the Navier-Stokes equations when a projection algorithm is used to coupled the syste...
Definition: cs_navsto_coupling.c:686
void * cs_navsto_ac_create_context(cs_navsto_param_t *nsp, cs_param_bc_type_t bc)
Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Artific...
Definition: cs_navsto_coupling.c:276
cs_equation_t * correction
Definition: cs_navsto_coupling.h:132
void cs_navsto_ac_vpp_init_setup(const cs_navsto_param_t *nsp, void *context)
Start setting-up the Navier-Stokes equations when an Artificial Compressibility with VPP algorithm is...
Definition: cs_navsto_coupling.c:513
cs_equation_t * prediction
Definition: cs_navsto_coupling.h:130
void cs_navsto_ac_last_setup(const cs_cdo_connect_t *connect, const cs_cdo_quantities_t *quant, const cs_navsto_param_t *nsp, void *context)
Finalize the setup for the Navier-Stokes equations when an Artificial Compressibility algorithm is us...
Definition: cs_navsto_coupling.c:389
Set of parameters specific for solving the Navier-Stokes system with an incremental projection algori...
Definition: cs_navsto_coupling.h:128
cs_param_bc_type_t
Definition: cs_param.h:285
cs_equation_t * graddiv
Definition: cs_navsto_coupling.h:111
void * cs_navsto_projection_create_context(cs_navsto_param_t *nsp, cs_param_bc_type_t bc)
Allocate and initialize a context structure when the Navier-Stokes system is coupled using an increme...
Definition: cs_navsto_coupling.c:608
cs_equation_t * momentum
Definition: cs_navsto_coupling.h:94
void * cs_navsto_ac_vpp_create_context(cs_navsto_param_t *nsp, cs_param_bc_type_t bc)
Allocate and initialize a context structure when the Navier-Stokes system is coupled using an Artific...
Definition: cs_navsto_coupling.c:431
Set of parameters specific for solving the Navier-Stokes system with a fully coupled algorithm using ...
Definition: cs_navsto_coupling.h:75
#define END_C_DECLS
Definition: cs_defs.h:463
cs_equation_t * momentum
Definition: cs_navsto_coupling.h:110
cs_equation_t * momentum
Definition: cs_navsto_coupling.h:77
cs_property_t * zeta
Definition: cs_navsto_coupling.h:80
cs_property_t * zeta
Definition: cs_navsto_coupling.h:96
Main structure to handle the discretization and the resolution of an equation.
void * cs_navsto_ac_free_context(const cs_navsto_param_t *nsp, void *context)
Free the context structure related to an Artificial Compressibility approach.
Definition: cs_navsto_coupling.c:319
void * cs_navsto_uzawa_free_context(const cs_navsto_param_t *nsp, void *context)
Free the context structure related to an Uzawa-Augmented Lagrangian approach.
Definition: cs_navsto_coupling.c:156
Definition: cs_property.h:104
Set of parameters specific for solving the Navier-Stokes system with the "artificial compressibility"...
Definition: cs_navsto_coupling.h:92