Actual source code: sregis.c

petsc-3.4.5 2014-06-29
  2: #include <petsc-private/matimpl.h>     /*I       "petscmat.h"   I*/

  4: PETSC_EXTERN PetscErrorCode MatGetOrdering_Natural(Mat,MatOrderingType,IS*,IS*);
  5: PETSC_EXTERN PetscErrorCode MatGetOrdering_ND(Mat,MatOrderingType,IS*,IS*);
  6: PETSC_EXTERN PetscErrorCode MatGetOrdering_1WD(Mat,MatOrderingType,IS*,IS*);
  7: PETSC_EXTERN PetscErrorCode MatGetOrdering_QMD(Mat,MatOrderingType,IS*,IS*);
  8: PETSC_EXTERN PetscErrorCode MatGetOrdering_RCM(Mat,MatOrderingType,IS*,IS*);
  9: PETSC_EXTERN PetscErrorCode MatGetOrdering_RowLength(Mat,MatOrderingType,IS*,IS*);
 10: PETSC_EXTERN PetscErrorCode MatGetOrdering_DSC(Mat,MatOrderingType,IS*,IS*);
 11: #if defined(PETSC_HAVE_UMFPACK)
 12: PETSC_EXTERN PetscErrorCode MatGetOrdering_AMD(Mat,MatOrderingType,IS*,IS*);
 13: #endif

 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: MatOrderingRegister(), MatOrderingRegisterDestroy()
 38: @*/
 39: PetscErrorCode  MatOrderingRegisterAll(void)
 40: {

 44:   MatOrderingRegisterAllCalled = PETSC_TRUE;

 46:   MatOrderingRegister(MATORDERINGNATURAL,  MatGetOrdering_Natural);
 47:   MatOrderingRegister(MATORDERINGND,       MatGetOrdering_ND);
 48:   MatOrderingRegister(MATORDERING1WD,      MatGetOrdering_1WD);
 49:   MatOrderingRegister(MATORDERINGRCM,      MatGetOrdering_RCM);
 50:   MatOrderingRegister(MATORDERINGQMD,      MatGetOrdering_QMD);
 51:   MatOrderingRegister(MATORDERINGROWLENGTH,MatGetOrdering_RowLength);
 52: #if defined(PETSC_HAVE_UMFPACK)
 53:   MatOrderingRegister(MATORDERINGAMD,      MatGetOrdering_AMD);
 54: #endif
 55:   return(0);
 56: }