60 if ( graphA == NULL ) {
63 if ( order == NULL ) {
66 if ( graphL == NULL ) {
74 if ( ( cblknbr < 0 ) || ( cblknbr > graphA->n ) ) {
79 if ( graphA->n == 0 ) {
89 for ( k = 0; k < cblknbr; k++, treetab++ ) {
93 if ( ( father != k ) && ( father > 0 ) ) {
98 while ( ( i < graphL->nnz[k] ) && ( ja[i] < rangtab[k+1] ) ) {
102 nnznbr = pastix_intset_union( graphL->nnz[k] - i,
105 graphL->rows[father],
108 memFree( graphL->rows[father] );
109 MALLOC_INTERN( graphL->rows[father], nnznbr,
pastix_int_t );
110 memcpy( graphL->rows[father], tmp,
sizeof(
pastix_int_t ) * nnznbr );
111 graphL->nnz[father] = nnznbr;
115 #if defined( PASTIX_DEBUG_SYMBOL )
120 for ( k = 0; k < cblknbr; k++ ) {
122 for ( i = rangtab[k]; i < rangtab[k + 1]; i++ ) {
124 while ( ( j < graphA->nnz[i] ) && ( graphA->rows[i][j] < i ) ) {
128 for ( ind = j; ind < graphA->nnz[i]; ind++ ) {
129 assert( graphA->rows[i][ind] >= i );
131 for ( ind = j + 1; ind < graphA->nnz[i]; ind++ ) {
132 assert( graphA->rows[i][ind] > graphA->rows[i][ind - 1] );
135 ind = pastix_intset_union(
136 graphL->nnz[k], graphL->rows[k], graphA->nnz[i] - j, graphA->rows[i] + j, tmp );
138 assert( ind <= graphL->nnz[k] );
150 for ( i = 0; i < cblknbr; i++ ) {
152 ncol = rangtab[i + 1] - rangtab[i];
153 nrow = graphL->nnz[i];
155 assert( nrow >= ncol );
156 assert( nrow <= graphA->n );
158 nnz += ( ncol * ( ncol + 1 ) ) / 2;
159 nnz += ( ncol * ( nrow - ncol ) );
162 graphL->total_nnz = nnz;
BEGIN_C_DECLS typedef int pastix_int_t
void faxCSRCblkCompress(const fax_csr_t *graphA, const pastix_order_t *order, fax_csr_t *graphL, pastix_int_t *work)
Compact a element wise graph of a matrix A, according to the associated partition.
pastix_int_t faxCSRFactDirect(const fax_csr_t *graphA, const pastix_order_t *order, fax_csr_t *graphL)
Compute the non zero pattern of the direct factorization of a matrix A, given the supernode partition...
Fax blocked csr structure.