8.2
general documentation
cs_saddle_system.h
Go to the documentation of this file.
1 #ifndef __CS_SADDLE_SYSTEM_H__
2 #define __CS_SADDLE_SYSTEM_H__
3 
4 /*============================================================================
5  * Operations on cs_cdo_system_t structures: matrix/vector multiplications
6  *============================================================================*/
7 
8 /*
9  This file is part of code_saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2024 EDF S.A.
12 
13  This program is free software; you can redistribute it and/or modify it under
14  the terms of the GNU General Public License as published by the Free Software
15  Foundation; either version 2 of the License, or (at your option) any later
16  version.
17 
18  This program is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
20  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
21  details.
22 
23  You should have received a copy of the GNU General Public License along with
24  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
25  Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 */
27 
28 /*----------------------------------------------------------------------------*/
29 
30 #include "cs_defs.h"
31 
32 /*----------------------------------------------------------------------------
33  * Standard C library headers
34  *----------------------------------------------------------------------------*/
35 
36 /*----------------------------------------------------------------------------
37  * Local headers
38  *----------------------------------------------------------------------------*/
39 
40 #include "cs_cdo_system.h"
41 
42 /*----------------------------------------------------------------------------*/
43 
45 
46 /*============================================================================
47  * Macro definitions
48  *============================================================================*/
49 
50 /*============================================================================
51  * Type definitions
52  *============================================================================*/
53 
54 /*============================================================================
55  * Public function prototypes
56  *============================================================================*/
57 
58 /*----------------------------------------------------------------------------*/
69 /*----------------------------------------------------------------------------*/
70 
71 cs_real_t *
74 
75 /*----------------------------------------------------------------------------*/
88 /*----------------------------------------------------------------------------*/
89 
90 void
92  cs_real_t *vec,
93  cs_real_t *matvec);
94 
95 /*----------------------------------------------------------------------------*/
107 /*----------------------------------------------------------------------------*/
108 
109 void
111  const cs_real_t *x2,
112  cs_real_t *res,
113  bool reset_res);
114 
115 /*----------------------------------------------------------------------------*/
125 /*----------------------------------------------------------------------------*/
126 
127 void
129  const cs_real_t *x1,
130  cs_real_t *res);
131 
132 /*----------------------------------------------------------------------------*/
144 /*----------------------------------------------------------------------------*/
145 
146 void
148  cs_real_t *x1,
149  cs_real_t *x2,
150  cs_real_t *r1,
151  cs_real_t *r2);
152 
153 /*----------------------------------------------------------------------------*/
165 /*----------------------------------------------------------------------------*/
166 
167 void
169  cs_real_t *x1,
170  cs_real_t *x2,
171  cs_real_t *res1,
172  cs_real_t *res2);
173 
174 /*----------------------------------------------------------------------------*/
175 
177 
178 #endif /* __CS_SADDLE_SYSTEM_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:528
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
#define END_C_DECLS
Definition: cs_defs.h:529
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
@ x2
Definition: cs_field_pointer.h:224
void cs_saddle_system_b12_matvec(const cs_cdo_system_helper_t *sh, const cs_real_t *x2, cs_real_t *res, bool reset_res)
Compute the resulting vector of the operation m12*x2 The block (1,2) is stored in an unassembled way ...
Definition: cs_saddle_system.c:597
cs_real_t * cs_saddle_system_b11_inv_diag(cs_lnum_t b11_max_size, cs_cdo_system_helper_t *sh)
Retrieve the inverse of the diagonal of the (1,1)-block matrix The storage of a matrix is in a gather...
Definition: cs_saddle_system.c:471
void cs_saddle_system_matvec(const cs_cdo_system_helper_t *sh, cs_real_t *x1, cs_real_t *x2, cs_real_t *r1, cs_real_t *r2)
Compute the matrix-vector operation for a saddle-point system r1 = M11.x1 + M12.x2 (result for the fi...
Definition: cs_saddle_system.c:704
void cs_saddle_system_b21_matvec(const cs_cdo_system_helper_t *sh, const cs_real_t *x1, cs_real_t *res)
Compute the resulting vector of the operation m21*x1 The block (2,1) is stored in an unassembled way....
Definition: cs_saddle_system.c:654
void cs_saddle_system_residual(const cs_cdo_system_helper_t *sh, cs_real_t *x1, cs_real_t *x2, cs_real_t *res1, cs_real_t *res2)
Compute the residual of the saddle-point system res1 = rhs1 - M11.x1 - M12.x2 (residual for the first...
Definition: cs_saddle_system.c:788
void cs_saddle_system_b11_matvec(const cs_cdo_system_helper_t *sh, cs_real_t *vec, cs_real_t *matvec)
Perform a matrix-vector multiplication for the (1,1) block when the input vector is in a scatter stat...
Definition: cs_saddle_system.c:542
Definition: cs_cdo_system.h:377