Actual source code: sregis.c

  1: #define PETSCMAT_DLL

 3:  #include include/private/matimpl.h

  6: EXTERN PetscErrorCode  MatOrdering_Natural(Mat,const MatOrderingType,IS*,IS*);
  7: EXTERN PetscErrorCode  MatOrdering_ND(Mat,const MatOrderingType,IS*,IS*);
  8: EXTERN PetscErrorCode  MatOrdering_1WD(Mat,const MatOrderingType,IS*,IS*);
  9: EXTERN PetscErrorCode  MatOrdering_QMD(Mat,const MatOrderingType,IS*,IS*);
 10: EXTERN PetscErrorCode  MatOrdering_RCM(Mat,const MatOrderingType,IS*,IS*);
 11: EXTERN PetscErrorCode  MatOrdering_RowLength(Mat,const MatOrderingType,IS*,IS*);
 12: EXTERN PetscErrorCode  MatOrdering_DSC(Mat,const MatOrderingType,IS*,IS*);

 17: /*@C
 18:   MatOrderingRegisterAll - Registers all of the matrix 
 19:   reordering routines in PETSc.

 21:   Not Collective

 23:   Level: developer

 25:   Adding new methods:
 26:   To add a new method to the registry. Copy this routine and 
 27:   modify it to incorporate a call to MatReorderRegister() for 
 28:   the new method, after the current list.

 30:   Restricting the choices: To prevent all of the methods from being
 31:   registered and thus save memory, copy this routine and comment out
 32:   those orderigs you do not wish to include.  Make sure that the
 33:   replacement routine is linked before libpetscmat.a.

 35: .keywords: matrix, reordering, register, all

 37: .seealso: MatOrderingRegisterDynamic(), MatOrderingRegisterDestroy()
 38: @*/
 39: PetscErrorCode  MatOrderingRegisterAll(const char path[])
 40: {

 44:   MatOrderingRegisterAllCalled = PETSC_TRUE;

 46:   MatOrderingRegisterDynamic(MATORDERING_NATURAL,  path,"MatOrdering_Natural"  ,MatOrdering_Natural);
 47:   MatOrderingRegisterDynamic(MATORDERING_ND,       path,"MatOrdering_ND"       ,MatOrdering_ND);
 48:   MatOrderingRegisterDynamic(MATORDERING_1WD,      path,"MatOrdering_1WD"      ,MatOrdering_1WD);
 49:   MatOrderingRegisterDynamic(MATORDERING_RCM,      path,"MatOrdering_RCM"      ,MatOrdering_RCM);
 50:   MatOrderingRegisterDynamic(MATORDERING_QMD,      path,"MatOrdering_QMD"      ,MatOrdering_QMD);
 51:   MatOrderingRegisterDynamic(MATORDERING_ROWLENGTH,path,"MatOrdering_RowLength",MatOrdering_RowLength);

 53:   return(0);
 54: }