8.0
general documentation
cs_sles_pc_cuda.h
Go to the documentation of this file.
1 #ifndef __CS_SLES_PC_CUDA_H__
2 #define __CS_SLES_PC_CUDA_H__
3 
4 /*============================================================================
5  * Sparse Linear Equation Solver Preconditioners using CUDA
6  *============================================================================*/
7 
8 /*
9  This file is part of code_saturne, a general-purpose CFD tool.
10 
11  Copyright (C) 1998-2023 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 /*----------------------------------------------------------------------------
31  * Local headers
32  *----------------------------------------------------------------------------*/
33 
34 #include "cs_base.h"
35 #include "cs_matrix.h"
36 #include "cs_sles.h"
37 #include "cs_sles_pc.h"
38 
39 /*----------------------------------------------------------------------------*/
40 
42 
43 /*============================================================================
44  * Macro definitions
45  *============================================================================*/
46 
47 /*============================================================================
48  * Type definitions
49  *============================================================================*/
50 
51 /*============================================================================
52  * Global variables
53  *============================================================================*/
54 
55 /*=============================================================================
56  * User function prototypes
57  *============================================================================*/
58 
59 /*=============================================================================
60  * Public function prototypes
61  *============================================================================*/
62 
63 /*----------------------------------------------------------------------------
64  * Function for application of a null-preconditioner.
65  *
66  * In cases where it is desired that the preconditioner modify a vector
67  * "in place", x_in should be set to NULL, and x_out contain the vector to
68  * be modified (\f$x_{out} \leftarrow M^{-1}x_{out})\f$).
69  *
70  * parameters:
71  * context <-> pointer to preconditioner context
72  * x_in <-- input vector
73  * x_out <-> input/output vector
74  *
75  * returns:
76  * preconditioner application status
77  *----------------------------------------------------------------------------*/
78 
81  const cs_real_t *x_in,
82  cs_real_t *x_out);
83 
84 /*----------------------------------------------------------------------------
85  * Function for application of a Jacobi preconditioner.
86  *
87  * In cases where it is desired that the preconditioner modify a vector
88  * "in place", x_in should be set to NULL, and x_out contain the vector to
89  * be modified (\f$x_{out} \leftarrow M^{-1}x_{out})\f$).
90  *
91  * parameters:
92  * context <-> pointer to preconditioner context
93  * x_in <-- input vector
94  * x_out <-> input/output vector
95  *
96  * returns:
97  * preconditioner application status
98  *----------------------------------------------------------------------------*/
99 
102  const cs_real_t *x_in,
103  cs_real_t *x_out);
104 
105 /*----------------------------------------------------------------------------
106  * Function for application of a polynomial preconditioner.
107  *
108  * In cases where it is desired that the preconditioner modify a vector
109  * "in place", x_in should be set to NULL, and x_out contain the vector to
110  * be modified (\f$x_{out} \leftarrow M^{-1}x_{out})\f$).
111  *
112  * parameters:
113  * context <-> pointer to preconditioner context
114  * x_in <-- input vector
115  * x_out <-> input/output vector
116  *
117  * returns:
118  * preconditioner application status
119  *----------------------------------------------------------------------------*/
120 
123  const cs_real_t *x_in,
124  cs_real_t *x_out);
125 
126 /*----------------------------------------------------------------------------*/
127 
129 
130 #endif /* __CS_SLES_PC_CUDA_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
cs_sles_pc_state_t
Definition: cs_sles_pc.h:55
cs_sles_pc_state_t cs_sles_pc_cuda_apply_jacobi(void *context, const cs_real_t *x_in, cs_real_t *x_out)
cs_sles_pc_state_t cs_sles_pc_cuda_apply_none(void *context, const cs_real_t *x_in, cs_real_t *x_out)
cs_sles_pc_state_t cs_sles_pc_cuda_apply_poly(void *context, const cs_real_t *x_in, cs_real_t *x_out)