9.2
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-2026 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 "base/cs_base.h"
38#include "base/cs_log.h"
39#include "base/cs_halo_perio.h"
40#include "alge/cs_matrix.h"
41
42/*============================================================================
43 * Macro definitions
44 *============================================================================*/
45
46/*============================================================================
47 * Type definitions
48 *============================================================================*/
49
50/* Structure for Jacobi or polynomial preconditioner */
51/*---------------------------------------------------*/
52
53typedef struct {
54
55#if defined(HAVE_ACCEL)
56 bool accelerated; /* Use accelerated version ? */
57#endif
58
59 int poly_degree; /* 0: Jacobi, > 0: polynomial */
60 cs_lnum_t n_rows; /* Number of associated rows */
61 cs_lnum_t n_cols; /* Number of associated columns */
62
63 cs_lnum_t n_aux; /* Size of auxiliary data */
64
65 const cs_matrix_t *a; /* Pointer to associated matrix */
66 const cs_real_t *ad_inv; /* pointer to diagonal inverse */
67 cs_real_t *_ad_inv; /* private pointer to
68 diagonal inverse */
69
70 cs_real_t *aux; /* Auxiliary data */
71
73
74/*============================================================================
75 * Global variables
76 *============================================================================*/
77
78/*=============================================================================
79 * Private function prototypes
80 *============================================================================*/
81
82/*----------------------------------------------------------------------------*/
83
84#endif /* CS_SLES_PC_PRIV_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
struct _cs_matrix_t cs_matrix_t
Definition: cs_matrix.h:108
Definition: cs_sles_pc_priv.h:53
cs_lnum_t n_rows
Definition: cs_sles_pc_priv.h:60
const cs_real_t * ad_inv
Definition: cs_sles_pc_priv.h:66
cs_real_t * aux
Definition: cs_sles_pc_priv.h:70
cs_real_t * _ad_inv
Definition: cs_sles_pc_priv.h:67
int poly_degree
Definition: cs_sles_pc_priv.h:59
const cs_matrix_t * a
Definition: cs_sles_pc_priv.h:65
cs_lnum_t n_aux
Definition: cs_sles_pc_priv.h:63
cs_lnum_t n_cols
Definition: cs_sles_pc_priv.h:61