Code_Saturne
CFD tool
cs_matrix_util.h
Go to the documentation of this file.
1 #ifndef __CS_MATRIX_UTIL_H__
2 #define __CS_MATRIX_UTIL_H__
3 
4 /*============================================================================
5  * Utilitary functions for sparse matrixes.
6  *============================================================================*/
7 
8 /*----------------------------------------------------------------------------
9  * Local headers
10  *----------------------------------------------------------------------------*/
11 
12 #include "cs_defs.h"
13 
14 #include "cs_halo.h"
15 #include "cs_numbering.h"
16 
17 #include "cs_matrix.h"
18 
19 /*----------------------------------------------------------------------------*/
20 
22 
23 /*============================================================================
24  * Macro definitions
25  *============================================================================*/
26 
27 /*============================================================================
28  * Type definitions
29  *============================================================================*/
30 
31 /*============================================================================
32  * Global variables
33  *============================================================================*/
34 
35 /*=============================================================================
36  * Public function prototypes
37  *============================================================================*/
38 
39 /*----------------------------------------------------------------------------
40  * Compute diagonal dominance metric.
41  *
42  * parameters:
43  * matrix <-- pointer to matrix structure
44  * dd --> diagonal dominance (normalized)
45  *----------------------------------------------------------------------------*/
46 
47 void
49  cs_real_t dd[]);
50 
51 /*----------------------------------------------------------------------------
52  * Dump a linear system matrix and right-hand side to file.
53  *
54  * parameters:
55  * matrix <-- pointer to matrix structure
56  * rhs <-- right hand side vector
57  * name <-- identifier string used in file name
58  *----------------------------------------------------------------------------*/
59 
60 void
62  const cs_real_t rhs[],
63  const char *name);
64 
65 /*----------------------------------------------------------------------------
66  * Test matrix dump operations.
67  *
68  * parameters:
69  * n_cells <-- number of local cells
70  * n_cells_ext <-- number of cells including ghost cells (array size)
71  * n_faces <-- local number of internal faces
72  * cell_num <-- global cell numbers (1 to n)
73  * face_cell <-- face -> cells connectivity (1 to n)
74  * halo <-- cell halo structure
75  * numbering <-- vectorization or thread-related numbering info, or NULL
76  *----------------------------------------------------------------------------*/
77 
78 void
80  cs_lnum_t n_cells_ext,
81  cs_lnum_t n_faces,
82  const cs_gnum_t *cell_num,
83  const cs_lnum_t *face_cell,
84  const cs_halo_t *halo,
85  const cs_numbering_t *numbering);
86 
87 /*----------------------------------------------------------------------------*/
88 
90 
91 #endif /* __CS_MATRIX_UTIL_H__ */
void cs_matrix_dump_test(cs_lnum_t n_cells, cs_lnum_t n_cells_ext, cs_lnum_t n_faces, const cs_gnum_t *cell_num, const cs_lnum_t *face_cell, const cs_halo_t *halo, const cs_numbering_t *numbering)
Definition: cs_matrix_util.c:1749
#define BEGIN_C_DECLS
Definition: cs_defs.h:365
Definition: cs_halo.h:75
Definition: cs_matrix_priv.h:268
void cs_matrix_dump_linear_system(const cs_matrix_t *matrix, const cs_real_t rhs[], const char *name)
Definition: cs_matrix_util.c:1693
subroutine matrix(ncelet, ncel, nfac, nfabor, iconvp, idiffp, ndircp, isym, nfecra, thetap, imucpp, ifacel, ifabor, coefbp, cofbfp, rovsdt, flumas, flumab, viscf, viscb, xcpp, da, xa)
Definition: matrix.f90:94
int cs_lnum_t
Definition: cs_defs.h:260
unsigned cs_gnum_t
Definition: cs_defs.h:255
#define END_C_DECLS
Definition: cs_defs.h:366
double cs_real_t
Definition: cs_defs.h:264
BEGIN_C_DECLS void cs_matrix_diag_dominance(const cs_matrix_t *matrix, cs_real_t dd[])
Definition: cs_matrix_util.c:1632
Definition: cs_numbering.h:66