Actual source code: scolor.c

  1: #define PETSCMAT_DLL
  2: 
 3:  #include petscmat.h
 4:  #include src/mat/color/color.h

  7: EXTERN PetscErrorCode  MatColoring_Natural(Mat,const MatColoringType,ISColoring*);
  8: EXTERN PetscErrorCode  MatFDColoringSL_Minpack(Mat,const MatColoringType,ISColoring*);
  9: EXTERN PetscErrorCode  MatFDColoringLF_Minpack(Mat,const MatColoringType,ISColoring*);
 10: EXTERN PetscErrorCode  MatFDColoringID_Minpack(Mat,const MatColoringType,ISColoring*);

 15: /*@C
 16:   MatColoringRegisterAll - Registers all of the matrix coloring routines in PETSc.

 18:   Not Collective

 20:   Level: developer

 22:   Adding new methods:
 23:   To add a new method to the registry. Copy this routine and 
 24:   modify it to incorporate a call to MatColoringRegisterDynamic() for 
 25:   the new method, after the current list.

 27:   Restricting the choices: To prevent all of the methods from being
 28:   registered and thus save memory, copy this routine and modify it to
 29:   register a zero, instead of the function name, for those methods you
 30:   do not wish to register.  Make sure that the replacement routine is
 31:   linked before libpetscmat.a.

 33: .keywords: matrix, coloring, register, all

 35: .seealso: MatColoringRegisterDynamic(), MatColoringRegisterDestroy()
 36: @*/
 37: PetscErrorCode MatColoringRegisterAll(const char path[])
 38: {

 42:   MatColoringRegisterAllCalled = PETSC_TRUE;
 43:   MatColoringRegisterDynamic(MATCOLORING_NATURAL,path,"MatColoring_Natural",    MatColoring_Natural);
 44:   MatColoringRegisterDynamic(MATCOLORING_SL,     path,"MatFDColoringSL_Minpack",MatFDColoringSL_Minpack);
 45:   MatColoringRegisterDynamic(MATCOLORING_LF,     path,"MatFDColoringLF_Minpack",MatFDColoringLF_Minpack);
 46:   MatColoringRegisterDynamic(MATCOLORING_ID,     path,"MatFDColoringID_Minpack",MatFDColoringID_Minpack);

 48:   return(0);
 49: }