9.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-2026 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 "base/cs_defs.h"
31
32/*----------------------------------------------------------------------------
33 * Standard C library headers
34 *----------------------------------------------------------------------------*/
35
36/*----------------------------------------------------------------------------
37 * Local headers
38 *----------------------------------------------------------------------------*/
39
40#include "cdo/cs_cdo_system.h"
41
42/*============================================================================
43 * Macro definitions
44 *============================================================================*/
45
46/*============================================================================
47 * Type definitions
48 *============================================================================*/
49
50/*============================================================================
51 * Public function prototypes
52 *============================================================================*/
53
54/*----------------------------------------------------------------------------*/
65/*----------------------------------------------------------------------------*/
66
70
71/*----------------------------------------------------------------------------*/
84/*----------------------------------------------------------------------------*/
85
86void
88 cs_real_t *vec,
89 cs_real_t *matvec);
90
91/*----------------------------------------------------------------------------*/
103/*----------------------------------------------------------------------------*/
104
105void
107 const cs_real_t *x2,
108 cs_real_t *res,
109 bool reset_res);
110
111/*----------------------------------------------------------------------------*/
121/*----------------------------------------------------------------------------*/
122
123void
125 const cs_real_t *x1,
126 cs_real_t *res);
127
128/*----------------------------------------------------------------------------*/
140/*----------------------------------------------------------------------------*/
141
142void
144 cs_real_t *x1,
145 cs_real_t *x2,
146 cs_real_t *r1,
147 cs_real_t *r2);
148
149/*----------------------------------------------------------------------------*/
161/*----------------------------------------------------------------------------*/
162
163void
165 cs_real_t *x1,
166 cs_real_t *x2,
167 cs_real_t *res1,
168 cs_real_t *res2);
169
170#endif /* CS_SADDLE_SYSTEM_H */
double cs_real_t
Floating-point value.
Definition: cs_defs.h:332
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:325
@ x2
Definition: cs_field_pointer.h:199
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.cpp:460
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.cpp:586
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.cpp:693
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.cpp:642
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.cpp:778
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.cpp:531
Definition: cs_cdo_system.h:373