csc_intern_build.h

Functions to build internal CSCd from user CSCd.

Function to free internal CSCd.

Summary
csc_intern_build.hFunctions to build internal CSCd from user CSCd.
CscOrdistribFill in thecsc CSC matrix in column block representation.
CscdOrdistribFill in thecsc CSC matrix in column block representation.
CscExitFree the internal CSCd structure.

CscOrdistrib

void CscOrdistrib(CscMatrix *thecsc,
char *Type,
FLOAT **transcsc,
const Order *ord,
INT Nrow,
INT Ncol,
INT Nnzero,
INT *colptr,
INT *rowind,
FLOAT *val,
INT forcetrans,
const SymbolMatrix *symbmtx,
INT procnum,
INT dof)

Fill in thecsc CSC matrix in column block representation.

Parameters

thecscMatrix in block column CSC format to fill in.
Type3 charactères for matrix type : only Type[1] is used to check if matrix is Symetric(S) or not(U).
transcscTranspose of the CSC in non symetric mode.
ordordering
NrowNumber of rows.
NcolNumber of columns.
NnzeroNumber of non zeros in the matrix.
colptrIndex in rowind and val of the start of each column.
rowindIndex of the elements.
valvalues of the elements.
forcetransIf matrix symetric, transcsc will be the copy of the CSC_VALTAB.
symbmtxSymbol matrix
procnumMPI process number.
dofNumber of degree of freedom

CscdOrdistrib

void CscdOrdistrib(CscMatrix *thecsc,
char *Type,
FLOAT **transcsc,
const Order *ord,
INT Ncol,
INT *colptr,
INT *rowind,
FLOAT *val,
INT *l2g,
INT gNcol,
INT *g2l,
INT forcetrans,
const SymbolMatrix *symbmtx,
INT procnum,
INT dof,
MPI_Comm comm)

Fill in thecsc CSC matrix in column block representation.

  • Construct cachetab (sizeof(INT)*globalNbCol) which will contain the column block wich will own each column (internal numerotation), or -1 if not local
  • Build newcoltab (sizeof(INT)*globalNbCol) which will contain the coltab corresponding to the local internal CSCd.  This CSCd correspond to the given CSCd adding upper part in Symmetric matrix.  Also count number of triples (i,j,v) to send to each other processors.
  • Send the information about how many triples will be sent
  • Fill-in the arrays containing triples to send and send them.
  • Receive those arrays and correct the newcoltab arrays with information from others processors.
  • Build CSC_COLNBR from symbolic matrix informations and CSC_COL from newcoltab.
  • Construct transpose matrix, in symmetric mode, transcsc == CSC_VALTAB; in unsymmetric mode, allocate trowtab (number of total local elements) , and build trscltb which contains number of elements, in each column of each column bloc.
  • fill-in internal CSC row and values from local given CSCd, also fill-in trowtab and transcsc in unsymmetric mode.  CSC_COL and trscltb are incremented for each element added.
  • fill-in internal CSC row and values from iniformation received, also fill in transposed CSCd in unsymmetric mode.  CSC_COL and trscltb are incremented for each element added.
  • restore CSC_COL.
  • sort internal CSCd.
  • sort intranal transposed CSCd.

Parameters

thecscMatrix in block column CSC format to fill in.
Type3 charactères for matrix type : only Type[1] is used to check if matrix is Symetric(S) or not(U).
transcscTranspose of the CSC in non symetric mode.
ordordering
NcolNumber of columns.
colptrIndex in rowind and val of the start of each column.
rowindIndex of the elements.
valvalues of the elements.
l2gglobal numbers of local nodes.
gNcolglobal number of columns.
g2llocal numbers of global nodes, if not local contains -owner
forcetransIf matrix symetric, transcsc will be the copy of the CSC_VALTAB.
symbmtxSymbol matrix
procnumMPI process number.
dofNumber of degree of freedom
commMPI communicator.

CscExit

void CscExit(CscMatrix *thecsc)

Free the internal CSCd structure.

Parameters

thecscInternal CSCd to free.
void CscOrdistrib(CscMatrix *thecsc,
char *Type,
FLOAT **transcsc,
const Order *ord,
INT Nrow,
INT Ncol,
INT Nnzero,
INT *colptr,
INT *rowind,
FLOAT *val,
INT forcetrans,
const SymbolMatrix *symbmtx,
INT procnum,
INT dof)
Fill in thecsc CSC matrix in column block representation.
void CscdOrdistrib(CscMatrix *thecsc,
char *Type,
FLOAT **transcsc,
const Order *ord,
INT Ncol,
INT *colptr,
INT *rowind,
FLOAT *val,
INT *l2g,
INT gNcol,
INT *g2l,
INT forcetrans,
const SymbolMatrix *symbmtx,
INT procnum,
INT dof,
MPI_Comm comm)
Fill in thecsc CSC matrix in column block representation.
void CscExit(CscMatrix *thecsc)
Free the internal CSCd structure.
Close