8.0
general documentation
cs_navsto_sles.h
Go to the documentation of this file.
1 #ifndef __CS_NAVSTO_SLES_H__
2 #define __CS_NAVSTO_SLES_H__
3 
4 /*============================================================================
5  * Functions to handle SLES structures used during the resolution of the
6  * Navier-Stokes system of equations
7  *============================================================================*/
8 
9 /*
10  This file is part of code_saturne, a general-purpose CFD tool.
11 
12  Copyright (C) 1998-2023 EDF S.A.
13 
14  This program is free software; you can redistribute it and/or modify it under
15  the terms of the GNU General Public License as published by the Free Software
16  Foundation; either version 2 of the License, or (at your option) any later
17  version.
18 
19  This program is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
22  details.
23 
24  You should have received a copy of the GNU General Public License along with
25  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
26  Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 */
28 
29 /*----------------------------------------------------------------------------
30  * Local headers
31  *----------------------------------------------------------------------------*/
32 
33 #if defined(HAVE_PETSC)
34 #include <petscksp.h>
35 #endif
36 
37 #include "cs_iter_algo.h"
38 #include "cs_navsto_param.h"
39 #include "cs_saddle_itsol.h"
40 
41 /*----------------------------------------------------------------------------*/
42 
44 
45 /*============================================================================
46  * Macro definitions
47  *============================================================================*/
48 
49 /*============================================================================
50  * Type definitions
51  *============================================================================*/
52 
53 /*============================================================================
54  * User function prototypes
55  *============================================================================*/
56 
57 /*----------------------------------------------------------------------------*/
70 /*----------------------------------------------------------------------------*/
71 
72 void
74  cs_saddle_system_t *ssys,
76  cs_real_t *x1,
77  cs_real_t *x2,
79 
80 /*============================================================================
81  * Public function prototypes
82  *============================================================================*/
83 
84 #if defined(HAVE_PETSC)
85 /*----------------------------------------------------------------------------
86  * \brief Function pointer: setup hook for setting PETSc solver and
87  * preconditioner.
88  * Case of multiplicative block preconditioner for a CG
89  *
90  * \param[in, out] context pointer to optional (untyped) value or structure
91  * \param[in, out] ksp_struct pointer to PETSc KSP context
92  *----------------------------------------------------------------------------*/
93 
94 void
95 cs_navsto_sles_amg_block_hook(void *context,
96  void *ksp_struct);
97 #endif
98 
99 /*----------------------------------------------------------------------------*/
100 
102 
103 #endif /* __CS_NAVSTO_SLES_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:509
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define END_C_DECLS
Definition: cs_defs.h:510
@ x2
Definition: cs_field_pointer.h:223
@ ia
Definition: cs_field_pointer.h:222
void cs_user_navsto_sles_solve(const cs_navsto_param_sles_t *nslesp, cs_saddle_system_t *ssys, cs_saddle_block_precond_t *sbp, cs_real_t *x1, cs_real_t *x2, cs_iter_algo_t *ia)
User-defined algorithm to solve a saddle point problem (the system is stored in a hybrid way)....
Definition: cs_navsto_sles.c:225
Structure to handle the convergence of an iterative algorithm.
Definition: cs_iter_algo.h:60
Structure storing the parameters for solving the Navier-Stokes system.
Definition: cs_navsto_param.h:476
Definition: cs_saddle_itsol.h:100
Definition: cs_saddle_itsol.h:60