PaStiX Handbook  6.2.1
symbol_fax_direct.c
Go to the documentation of this file.
1 /**
2  *
3  * @file symbol_fax_direct.c
4  *
5  * PaStiX fax symbolic factorization routines fro Scotch esmumps library Part of
6  * a parallel direct block solver. This is the block symbolic factorization
7  * routine for graphs.
8  *
9  * @copyright 2004-2021 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
11  *
12  * @version 6.2.0
13  * @author Francois Pellegrini
14  * @author Mathieu Faverge
15  * @author Tony Delarue
16  * @date 2021-01-25
17  *
18  *
19  * Dates:
20  * Version 0.0 - from 22 jul 1998 to 29 sep 1998
21  * Version 0.2 - from 08 may 2000 to 09 may 2000
22  * Version 1.0 - from 01 jun 2002 to 03 jun 2002
23  * Version 1.1 - from 26 jun 2002 to 26 jun 2002
24  * Version 2.0 - from 21 mar 2003 to 21 mar 2003
25  * Version 3.0 - from 02 mar 2004 to 02 mar 2004
26  *
27  **/
28 #include "common.h"
29 #include "graph/graph.h"
30 #include "symbol/symbol.h"
31 #include "pastix/order.h"
32 #include "symbol_fax.h"
33
34 /**
35  *******************************************************************************
36  *
37  * @ingroup pastix_symbol
38  *
39  * @brief Compute the block symbolic factorization of
40  * the given matrix graph according to the given vertex ordering.
41  *
42  * pastixSymbolFaxGraph() could have called pastixSymbolFax() in the regular way, as do all
43  * of the grid-like factorization routines. However, for efficiency reasons, we
44  * have decided to inline pastixSymbolFax(), to avoid a function call for every arc.
45  *
46  *******************************************************************************
47  *
48  * @param[inout] symbptr
49  * The symbolic matrix structure to fill in.
50  *
51  * @param[in] vertnbr
52  * The number of vertices.
53  *
54  * @param[in] verttab
55  * Array of size vertnbr+1
56  * The array of indirection to the edgetab for each vertex.
57  * edgetab[ verttab[i] ] to edgetab[ verttab[i+1] are the edges of the
58  * ith vertex.
59  *
60  * @param[in] edgetab
61  * Array of size edgenbr = verttab[vertnbr] - verttab[0]. The array of edges.
62  * edgetab[ verttab[i] - verttab[0] ] to
63  * edgetab[ verttab[i+1] - verttab[0] ] are the edges of the ith vertex.
64  *
65  * @param[in] ordeptr
66  * The ordering structure that contains the permutation and inverse
67  * permutation vector, as well as the list of supernodes and the
68  * associated tree.
69  *
70  *******************************************************************************
71  *
72  * @retval 0 on success.
73  * @retval !0 on failure.
74  *
75  *******************************************************************************/
76 int
78  const pastix_graph_t *graphA,
79  const pastix_order_t *ordeptr )
80 {
81 #ifndef DOXYGEN_SHOULD_SKIP_THIS
82  pastix_int_t vertnbr = graphA->n;
83  const pastix_int_t *verttab = graphA->colptr;
84  const pastix_int_t *edgetab = graphA->rowptr;
85  pastix_int_t baseval = verttab[0];
86  pastix_int_t edgenbr = verttab[vertnbr] - baseval;
87  const pastix_int_t *verttax;
88  pastix_int_t edgenum;
89  const pastix_int_t *edgetax;
90
91  verttax = verttab - baseval;
92  edgetax = edgetab - baseval;
93
94 #define SYMBOL_FAX_ITERATOR( ngbdptr, vertnum, vertend ) \
95  for ( edgenum = verttax[vertnum]; edgenum < verttax[vertnum + 1]; edgenum++ ) { \
96  vertend = edgetax[edgenum];
97
98 #define SYMBOL_FAX_VERTEX_DEGREE( ngbdptr, vertnum ) \
99  ( verttax[( vertnum ) + 1] - verttax[( vertnum )] )
100
101  {
102 #define SYMBOL_FAX_INCLUDED
103 #include "symbol_fax.c"
104  }
105 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
106 }
symbol_matrix_s
Symbol matrix structure.
Definition: symbol.h:75
pastix_order_s
Order structure.
Definition: order.h:45
symbol.h
graph.h
order.h
pastixSymbolFaxDirect
int pastixSymbolFaxDirect(symbol_matrix_t *symbptr, const pastix_graph_t *graphA, const pastix_order_t *ordeptr)
Compute the block symbolic factorization of the given matrix graph according to the given vertex orde...
Definition: symbol_fax_direct.c:77
symbol_fax.h