8.1
general documentation
cs_sles_pc_priv.h
Go to the documentation of this file.
1 #ifndef __CS_SLES_PC_PRIV_H__
2 #define __CS_SLES_PC_PRIV_H__
3 
4 /*============================================================================
5  * Sparse Linear Equation Solver preconditioner, private elements
6  *
7  * These elements are shared between host and device implementations,
8  * but are not accessible to calling code.
9  *============================================================================*/
10 
11 /*
12  This file is part of code_saturne, a general-purpose CFD tool.
13 
14  Copyright (C) 1998-2023 EDF S.A.
15 
16  This program is free software; you can redistribute it and/or modify it under
17  the terms of the GNU General Public License as published by the Free Software
18  Foundation; either version 2 of the License, or (at your option) any later
19  version.
20 
21  This program is distributed in the hope that it will be useful, but WITHOUT
22  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
23  FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
24  details.
25 
26  You should have received a copy of the GNU General Public License along with
27  this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
28  Street, Fifth Floor, Boston, MA 02110-1301, USA.
29 */
30 
31 /*----------------------------------------------------------------------------*/
32 
33 /*----------------------------------------------------------------------------
34  * Local headers
35  *----------------------------------------------------------------------------*/
36 
37 #include "cs_base.h"
38 #include "cs_log.h"
39 #include "cs_halo_perio.h"
40 #include "cs_matrix.h"
41 
42 /*----------------------------------------------------------------------------*/
43 
45 
46 /*============================================================================
47  * Macro definitions
48  *============================================================================*/
49 
50 /*============================================================================
51  * Type definitions
52  *============================================================================*/
53 
54 /* Structure for Jacobi or polynomial preconditioner */
55 /*---------------------------------------------------*/
56 
57 typedef struct {
58 
59 #if defined(HAVE_ACCEL)
60  bool accelerated; /* Use accelerated version ? */
61 #endif
62 
63  int poly_degree; /* 0: Jacobi, > 0: polynomial */
64  cs_lnum_t n_rows; /* Number of associated rows */
65  cs_lnum_t n_cols; /* Number of associated columns */
66 
67  cs_lnum_t n_aux; /* Size of auxiliary data */
68 
69  const cs_matrix_t *a; /* Pointer to associated matrix */
70  const cs_real_t *ad_inv; /* pointer to diagonal inverse */
71  cs_real_t *_ad_inv; /* private pointer to
72  diagonal inverse */
73 
74  cs_real_t *aux; /* Auxiliary data */
75 
77 
78 /*============================================================================
79  * Global variables
80  *============================================================================*/
81 
82 /*=============================================================================
83  * Private function prototypes
84  *============================================================================*/
85 
86 /*----------------------------------------------------------------------------*/
87 
89 
90 #endif /* __CS_SLES_PC_PRIV_H__ */
#define BEGIN_C_DECLS
Definition: cs_defs.h:514
double cs_real_t
Floating-point value.
Definition: cs_defs.h:319
#define END_C_DECLS
Definition: cs_defs.h:515
int cs_lnum_t
local mesh entity id
Definition: cs_defs.h:313
struct _cs_matrix_t cs_matrix_t
Definition: cs_matrix.h:110
Definition: cs_sles_pc_priv.h:57
cs_lnum_t n_rows
Definition: cs_sles_pc_priv.h:64
const cs_real_t * ad_inv
Definition: cs_sles_pc_priv.h:70
cs_real_t * aux
Definition: cs_sles_pc_priv.h:74
cs_real_t * _ad_inv
Definition: cs_sles_pc_priv.h:71
int poly_degree
Definition: cs_sles_pc_priv.h:63
const cs_matrix_t * a
Definition: cs_sles_pc_priv.h:69
cs_lnum_t n_aux
Definition: cs_sles_pc_priv.h:67
cs_lnum_t n_cols
Definition: cs_sles_pc_priv.h:65