54 symbptr->
dof = graph->dof;
57 if ( symbptr->
dof < 1 ) {
69 for(ip=0; ip<n; ip++, dofs++) {
70 i = order->
peritab[ip] - ordebase;
73 d = graph->dofs[i+1] - graph->dofs[i];
75 dofs[1] = dofs[0] + d;
77 assert( (symbptr->
dofs[n] - symbbase) == (graph->dofs[n] - graph->dofs[0]) );
113 if ( (graph != NULL) && (order != NULL) ) {
139 if (symbptr->
dofs != NULL) {
140 memFree_null( symbptr->
dofs );
142 if (symbptr->
cblktab != NULL) {
143 memFree_null( symbptr->
cblktab );
145 if (symbptr->
bloktab != NULL) {
146 memFree_null( symbptr->
bloktab );
148 if (symbptr->
browtab != NULL) {
149 memFree_null( symbptr->
browtab );
246 if(startsearch < fbloknum )
247 startsearch = fbloknum;
249 assert( startsearch < lbloknum );
252 bsrc = (symbptr->
bloktab) + bloknum;
255 bdst = (symbptr->
bloktab) + startsearch;
259 for(i=startsearch; i<lbloknum; i++, bdst++ )
271 for(i=startsearch; i<lbloknum; i++, bdst++)
320 for(itercblk=0; itercblk<cblknbr; itercblk++, cblk++)
329 for( ; iterblok < lbloknum; iterblok++, blok++)
338 for(itercblk=0; itercblk<cblknbr; itercblk++, cblk++)
340 symbptr->
browmax = pastix_imax( symbptr->
browmax, innbr[ itercblk ] );
342 innbr[itercblk] = cblk[0].
brownum;
344 assert( cblk[0].brownum == edgenbr );
351 for(itercblk=0; itercblk<cblknbr; itercblk++, cblk++)
360 for( ; iterblok < lbloknum; iterblok++, blok++)
363 browtab[ *intmp ] = iterblok;
368 if (symbptr->
browtab == NULL) {
397 double cblkavg1, blokavg1;
398 double cblkavg2, blokavg2;
403 bloknbr = symbptr->
bloknbr - cblknbr;
404 cblkmin = PASTIX_INT_MAX;
408 blokmin = PASTIX_INT_MAX;
416 for(itercblk=0; itercblk<cblknbr; itercblk++, cblk++)
423 cblksel += cblk->selevtx;
424 cblkmin = pastix_imin( cblkmin, colnbr );
425 cblkmax = pastix_imax( cblkmax, colnbr );
427 cblkavg2 += colnbr * colnbr;
431 for( ; iterblok < lbloknum; iterblok++, blok++)
435 blokmin = pastix_imin( blokmin, rownbr );
436 blokmax = pastix_imax( blokmax, rownbr );
438 blokavg2 += rownbr * rownbr;
445 cblkavg1 = (cblkavg1 * (double)dof ) / (double)cblknbr;
446 cblkavg2 = sqrt( ((cblkavg2 * (
double)dof * (
double)dof) / (
double)cblknbr) - cblkavg1 * cblkavg1 );
452 blokavg1 = (blokavg1 * (double)dof ) / (double)bloknbr;
453 blokavg2 = sqrt( ((blokavg2 * (
double)dof * (
double)dof) / (
double)bloknbr) - blokavg1 * blokavg1 );
469 " Symbol Matrix statistics:\n"
470 " Number of cblk %10ld\n"
471 " Number of blok %10ld\n"
472 " Cblk width min %10ld\n"
473 " Cblk width max %10ld\n"
474 " Cblk width avg %11.2lf\n"
475 " Cblk width stdev %11.2lf\n"
476 " Blok height min %10ld\n"
477 " Blok height max %10ld\n"
478 " Blok height avg %11.2lf\n"
479 " Blok height stdev %11.2lf\n"
480 " Memory space %11.2lf %co\n",
481 (
long)cblknbr, (
long)bloknbr,
482 (
long)cblkmin, (
long)cblkmax, cblkavg1, cblkavg2,
483 (
long)blokmin, (
long)blokmax, blokavg1, blokavg2,
484 pastix_print_value( mem ),
485 pastix_print_unit( mem ) );
489 " Number of selected cblk %10ld\n",
BEGIN_C_DECLS typedef int pastix_int_t
void pastixSymbolRealloc(symbol_matrix_t *symbptr)
Reallocate the data structure to optimize the memory alignment.
void pastixSymbolInit(const pastix_graph_t *graph, const pastix_order_t *order, symbol_matrix_t *symbptr)
Initialize the symbol structure.
void pastixSymbolPrintStats(const symbol_matrix_t *symbptr)
Print statistical information about the symbolic matrix structure.
struct symbol_matrix_s symbol_matrix_t
Symbol matrix structure.
void pastixSymbolBuildRowtab(symbol_matrix_t *symbptr)
Construct the browtab array that stores the blocks in a CSR way.
pastix_int_t pastixSymbolGetFacingBloknum(const symbol_matrix_t *symbptr, pastix_int_t bloksrc, pastix_int_t bloknum, pastix_int_t startsearch, int ricar)
Search the targeted block C for a couple of blocks A and B.
struct symbol_blok_s symbol_blok_t
Symbol block structure.
struct symbol_cblk_s symbol_cblk_t
Symbol column block structure.
void pastixSymbolExit(symbol_matrix_t *symbptr)
Free the content of symbolic matrix.
Symbol column block structure.
static void symbol_init_adddofs(const pastix_graph_t *graph, const pastix_order_t *order, symbol_matrix_t *symbptr)
Add a dof array to the symbol matrix if any.