bordi.c

This is the test module for incomplete block ordering strategies.

Authors

Francois PELLEGRINI.

Dates

Version 0.0from : 20 oct 1998 to 27 oct 1998
Version 0.1from : 01 jun 1999 to 01 jun 1999
Version 1.0from : 05 jul 2002 to 05 jul 2002
Version 1.2from : 28 aug 2002 to 15 sep 2003
Summary
bordi.cThis is the test module for incomplete block ordering strategies.
Defines
Macros
C_FLAGSMBOUTUNUSED define.
C_FLAGDRWOUTUNUSED define.
C_FLAGPLTOUTUNUSED define.
C_FLAGORDOUTUNUSED define.
C_FLAGSCALARUNUSED define.
C_FILENBRNumber of files in list
C_FILEARGNBRNumber of files which can be arguments
C_filenamesrcinpSource graph input file name.
C_filenamelogoutLog file name UNUSED
C_filenamesmboutSymbol matrix file name.
C_filenamedrwoutDrawing file name.
C_filenamepltoutPlot file name.
C_filenameordoutOrdering file name.
C_filepntrsrcinpSource graph input file.
C_filepntrlogoutLog file.
C_filepntrsmboutSymbol matrix file.
C_filepntrdrwoutDrawing file.
C_filepntrpltoutPlot file.
C_filepntrordoutOrdering file.
Functions
orderSplitSubdivide column blocks in column clocks of size blocksize.
orderSplit2Subdivide block columns in blocks of minimum size bsmin.
orderSplit3Splits column blocs such has there is one column block in front of each bloc.
symbolSplitSplits the symbol matrix.
symbolRustineDESCRIPTION TO FILL
KeepParam_TODO: Fill-in
levfmaxInclusive maximum level of fill
ctriminMinimum output contribution value
These are the selection functionsThis routine should return 1 if the given block is to be kept and 0 else.
keepFuncD1Test if kblkptr->levfval > kparptr->levfmax
keepFuncH1Test if kblkptr->levfval == kparptr->levfmax
keepFuncD2Test if kblkptr->levfval == kparptr->levfmax and kblkptr->ctrival <= kparptr->ctrimin
keepFuncH2
blokColor
These are the cost functions.This routine computes the factorization and solving cost of the given symbolic block matrix, whose nodes hold the number of DOFs given by the proper DOF structure.
symbolCostn2Function declaration.
symbolCostnTO FILL
symbolCostn2TO FILL
bordiThis is the main function TO FILL

Defines

Summary
Macros
C_FLAGSMBOUTUNUSED define.
C_FLAGDRWOUTUNUSED define.
C_FLAGPLTOUTUNUSED define.
C_FLAGORDOUTUNUSED define.
C_FLAGSCALARUNUSED define.
C_FILENBRNumber of files in list
C_FILEARGNBRNumber of files which can be arguments
C_filenamesrcinpSource graph input file name.
C_filenamelogoutLog file name UNUSED
C_filenamesmboutSymbol matrix file name.
C_filenamedrwoutDrawing file name.
C_filenamepltoutPlot file name.
C_filenameordoutOrdering file name.
C_filepntrsrcinpSource graph input file.
C_filepntrlogoutLog file.
C_filepntrsmboutSymbol matrix file.
C_filepntrdrwoutDrawing file.
C_filepntrpltoutPlot file.
C_filepntrordoutOrdering file.

Macros

C_FLAGSMBOUT

UNUSED define.

C_FLAGDRWOUT

UNUSED define.

C_FLAGPLTOUT

UNUSED define.

C_FLAGORDOUT

UNUSED define.

C_FLAGSCALAR

UNUSED define.

C_FILENBR

Number of files in list

C_FILEARGNBR

Number of files which can be arguments

C_filenamesrcinp

Source graph input file name.  UNUSED

C_filenamelogout

Log file name UNUSED

C_filenamesmbout

Symbol matrix file name.  UNUSED

C_filenamedrwout

Drawing file name.  UNUSED

C_filenamepltout

Plot file name.  UNUSED

C_filenameordout

Ordering file name.  UNUSED

C_filepntrsrcinp

Source graph input file.  UNUSED

C_filepntrlogout

Log file.  UNUSED

C_filepntrsmbout

Symbol matrix file.  UNUSED

C_filepntrdrwout

Drawing file.  UNUSED

C_filepntrpltout

Plot file.  UNUSED

C_filepntrordout

Ordering file.  UNUSED

Functions

orderSplit

void orderSplit (Order * const ordeptr,
INT blocksize)

Subdivide column blocks in column clocks of size blocksize.

WARNING: unused

Parameters

ordeptrOrdering.
blocksizesize of block wanted.

orderSplit2

void orderSplit2 (Order * const ordeptr,
SCOTCH_Graph * const grphptr,
double rho,
INT bsmin)

Subdivide block columns in blocks of minimum size bsmin.  Size depends on rho parameter too.

WARNING: unused

Parameters

ordeptrOrdering.
grphptrGraph corresponding to the matrix.
rhoParameter to compute new bloc size.
bsminMinimal bloc size.

orderSplit3

void orderSplit3 (Order * const ordeptr,
SCOTCH_Graph * const grphptr,
SymbolMatrix * const matrsymb)

Splits column blocs such has there is one column block in front of each bloc.

Parameters

ordeptrOrdering.
grphptrGraph associated to the matrix.
matrsymbSymbol matrix.

symbolSplit

void symbolSplit (SymbolMatrix *matrsymb)

Splits the symbol matrix.

Parameters

matrsymbsymbol matrix

symbolRustine

void symbolRustine (SymbolMatrix *matrsymb,
SymbolMatrix * const matrsymb2)

DESCRIPTION TO FILL

Parameters

matrsymbSymbol matrix
matrsymb2Symbol matrix

KeepParam_

TODO: Fill-in

Summary
levfmaxInclusive maximum level of fill
ctriminMinimum output contribution value
These are the selection functionsThis routine should return 1 if the given block is to be kept and 0 else.

levfmax

INT levfmax

Inclusive maximum level of fill

ctrimin

INT ctrimin

Minimum output contribution value

These are the selection functions

This routine should return 1 if the given block is to be kept and 0 else.

CAUTION: blocks with (levfval<1) should always be kept.

  • ********************************************

keepFuncD1

static int keepFuncD1 (const SymbolKeepBlok * const kblkptr,
void * const dataptr)

Test if kblkptr->levfval > kparptr->levfmax

Parameters

kblkptrBlock to test
dataptrData fields

Returns

API_YESif kblkptr->levfval > kparptr->levfmax
API_NOotherwise

keepFuncH1

static int keepFuncH1 (const SymbolKeepBlok * const kblkptr,
void * const dataptr)

Test if kblkptr->levfval == kparptr->levfmax

Parameters

kblkptrBlock to test
dataptrData fields

Returns

API_YESif kblkptr->levfval == kparptr->levfmax
API_NOotherwise

keepFuncD2

static int keepFuncD2 (const SymbolKeepBlok * const kblkptr,
/*+ Block to test +*/ void * const dataptr)

Test if kblkptr->levfval == kparptr->levfmax and kblkptr->ctrival <= kparptr->ctrimin

Parameters

kblkptrBlock to test
dataptrData fields

Returns

API_YESif kblkptr->levfval == kparptr->levfmax and kblkptr->ctrival <= kparptr->ctrimin
API_NOotherwise

keepFuncH2

static int keepFuncH2 (const SymbolKeepBlok * const kblkptr,
/*+ Block to test +*/ void * const dataptr)
Test if kparptr->keepptr->keeptab[kblkptrkparptr->keepptr->kblktab] != 0

Parameters

kblkptrBlock to test
dataptrData fields

Returns

API_YESif kparptr->keepptr->keeptab[kblkptr - kparptr->keepptr->kblktab] != 0
API_NOotherwise

blokColor

static int blokColor (const SymbolMatrix * const symbptr,
/*+ Symbol matrix +*/ const SymbolBlok * const blokptr,
/*+ Block to test +*/ void * const dataptr,
/*+ Data fields +*/ float * const colotab)
Summary
These are the cost functions.This routine computes the factorization and solving cost of the given symbolic block matrix, whose nodes hold the number of DOFs given by the proper DOF structure.

These are the cost functions.

This routine computes the factorization and solving cost of the given symbolic block matrix, whose nodes hold the number of DOFs given by the proper DOF structure.  To ensure maximum accuracy and minimum loss of precision, costs are summed-up recursively.  It returns:

  • 0 : on success.
  • !0 : on error.
  • ********************************************

symbolCostn2

static void symbolCostn2(const SymbolCblk * const cblktax,
const SymbolBlok * const bloktax,
const Dof * const deofptr,
const byte * const keeptab,
double * const nnzptr,
double * const opcptr,
const INT cblkmin,
const INT cblknbr)

Function declaration.  TO FILL

Parameters

cblktaxBased access to cblktab
bloktaxBased access to bloktab
deofptrDOF structure associated with the matrix
keeptabFlag array for blocks to keep
nnzptrSize of the structure, to be filled
opcptrOperation count, to be filled
cblkminMinimum column block index to consider
cblknbrNumber of column blocks to consider

symbolCostn

int symbolCostn (const SymbolMatrix * const symbptr,
const Dof * const deofptr,
const byte * const keeptab,
const SymbolCostType typeval,
double * const nnzptr,
double * const opcptr)

TO FILL

Parameters

symbptrSymbolic matrix to evaluate
deofptrDOF structure associated with the matrix
keeptabFlag array for blocks to keep
typevalType of cost computation
nnzptrSize of the structure, to be filled
opcptrOperation count, to be filled

symbolCostn2

static void symbolCostn2 (const SymbolCblk * restrict const cblktax,
const SymbolBlok * restrict const bloktax,
const Dof * restrict const deofptr,
const byte * const keeptax,
double * restrict const nnzptr,
double * restrict const opcptr,
const INT cblkmin,
const INT cblknbr)

TO FILL

Parameters

cblktaxBased access to cblktab
bloktaxBased access to bloktab
deofptrDOF structure associated with the matrix
keeptaxFlag array for blocks to keep
nnzptrSize of the structure, to be filled
opcptrOperation count, to be filled
cblkminMinimum column block index to consider
cblknbrNumber of column blocks to consider

bordi

void bordi(int alpha,
SymbolMatrix *symbptr,
SCOTCH_Graph *graphptr,
Order *orderptr)

This is the main function TO FILL

Parameters

alpha - symbptr - graphptr - orderptr -

void orderSplit (Order * const ordeptr,
INT blocksize)
Subdivide column blocks in column clocks of size blocksize.
void orderSplit2 (Order * const ordeptr,
SCOTCH_Graph * const grphptr,
double rho,
INT bsmin)
Subdivide block columns in blocks of minimum size bsmin.
void orderSplit3 (Order * const ordeptr,
SCOTCH_Graph * const grphptr,
SymbolMatrix * const matrsymb)
Splits column blocs such has there is one column block in front of each bloc.
void symbolSplit (SymbolMatrix *matrsymb)
Splits the symbol matrix.
void symbolRustine (SymbolMatrix *matrsymb,
SymbolMatrix * const matrsymb2)
DESCRIPTION TO FILL
INT levfmax
Inclusive maximum level of fill
INT ctrimin
Minimum output contribution value
static int keepFuncD1 (const SymbolKeepBlok * const kblkptr,
void * const dataptr)
Test if kblkptr->levfval > kparptr->levfmax
static int keepFuncH1 (const SymbolKeepBlok * const kblkptr,
void * const dataptr)
Test if kblkptr->levfval == kparptr->levfmax
static int keepFuncD2 (const SymbolKeepBlok * const kblkptr,
/*+ Block to test +*/ void * const dataptr)
Test if kblkptr->levfval == kparptr->levfmax and kblkptr->ctrival <= kparptr->ctrimin
static int keepFuncH2 (const SymbolKeepBlok * const kblkptr,
/*+ Block to test +*/ void * const dataptr)
static int blokColor (const SymbolMatrix * const symbptr,
/*+ Symbol matrix +*/ const SymbolBlok * const blokptr,
/*+ Block to test +*/ void * const dataptr,
/*+ Data fields +*/ float * const colotab)
static void symbolCostn2(const SymbolCblk * const cblktax,
const SymbolBlok * const bloktax,
const Dof * const deofptr,
const byte * const keeptab,
double * const nnzptr,
double * const opcptr,
const INT cblkmin,
const INT cblknbr)
Function declaration.
int symbolCostn (const SymbolMatrix * const symbptr,
const Dof * const deofptr,
const byte * const keeptab,
const SymbolCostType typeval,
double * const nnzptr,
double * const opcptr)
TO FILL
void bordi(int alpha,
SymbolMatrix *symbptr,
SCOTCH_Graph *graphptr,
Order *orderptr)
This is the main function TO FILL
Close