PaStiX Handbook  6.3.2
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-2023 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
10  * Univ. Bordeaux. All rights reserved.
11  *
12  * @version 6.3.2
13  * @author Francois Pellegrini
14  * @author Mathieu Faverge
15  * @author Tony Delarue
16  * @date 2023-07-21
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] graphA
52  * TODO
53  *
54  * @param[in] ordeptr
55  * The ordering structure that contains the permutation and inverse
56  * permutation vector, as well as the list of supernodes and the
57  * associated tree.
58  *
59  *******************************************************************************
60  *
61  * @retval 0 on success.
62  * @retval !0 on failure.
63  *
64  *******************************************************************************/
65 int
67  const pastix_graph_t *graphA,
68  const pastix_order_t *ordeptr )
69 {
70 #ifndef DOXYGEN_SHOULD_SKIP_THIS
71  pastix_int_t vertnbr = graphA->n;
72  const pastix_int_t *verttab = graphA->colptr;
73  const pastix_int_t *edgetab = graphA->rowptr;
74  pastix_int_t baseval = verttab[0];
75  pastix_int_t edgenbr = verttab[vertnbr] - baseval;
76  const pastix_int_t *verttax;
77  pastix_int_t edgenum;
78  const pastix_int_t *edgetax;
79 
80  verttax = verttab - baseval;
81  edgetax = edgetab - baseval;
82 
83 #define SYMBOL_FAX_ITERATOR( ngbdptr, vertnum, vertend ) \
84  for ( edgenum = verttax[vertnum]; edgenum < verttax[vertnum + 1]; edgenum++ ) { \
85  vertend = edgetax[edgenum];
86 
87 #define SYMBOL_FAX_VERTEX_DEGREE( ngbdptr, vertnum ) \
88  ( verttax[( vertnum ) + 1] - verttax[( vertnum )] )
89 
90  {
91 #define SYMBOL_FAX_INCLUDED
92 #include "symbol_fax.c"
93  }
94 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
95 }
BEGIN_C_DECLS typedef int pastix_int_t
Definition: datatypes.h:51
Order structure.
Definition: order.h:47
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...
Symbol matrix structure.
Definition: symbol.h:77