Actual source code: spartition.c

  1: #define PETSCMAT_DLL

 3:  #include petscmat.h

  6: EXTERN PetscErrorCode  MatPartitioningCreate_Current(MatPartitioning);
  7: EXTERN PetscErrorCode  MatPartitioningCreate_Square(MatPartitioning);
  8: EXTERN PetscErrorCode  MatPartitioningCreate_Parmetis(MatPartitioning);
  9: EXTERN PetscErrorCode  MatPartitioningCreate_Chaco(MatPartitioning);
 10: EXTERN PetscErrorCode  MatPartitioningCreate_Jostle(MatPartitioning);
 11: EXTERN PetscErrorCode  MatPartitioningCreate_Party(MatPartitioning);
 12: EXTERN PetscErrorCode  MatPartitioningCreate_Scotch(MatPartitioning);

 17: /*@C
 18:   MatPartitioningRegisterAll - Registers all of the matrix Partitioning routines in PETSc.

 20:   Not Collective

 22:   Level: developer

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

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

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

 37: .seealso: MatPartitioningRegisterDynamic(), MatPartitioningRegisterDestroy()
 38: @*/
 39: PetscErrorCode  MatPartitioningRegisterAll(const char path[])
 40: {

 44:   MatPartitioningRegisterAllCalled = PETSC_TRUE;
 45:   MatPartitioningRegisterDynamic(MAT_PARTITIONING_CURRENT,path,"MatPartitioningCreate_Current",MatPartitioningCreate_Current);
 46:   MatPartitioningRegisterDynamic("square",path,"MatPartitioningCreate_Square",MatPartitioningCreate_Square);
 47: #if defined(PETSC_HAVE_PARMETIS)
 48:   MatPartitioningRegisterDynamic(MAT_PARTITIONING_PARMETIS,path,"MatPartitioningCreate_Parmetis",MatPartitioningCreate_Parmetis);
 49: #endif
 50: #if defined(PETSC_HAVE_CHACO)
 51:   MatPartitioningRegisterDynamic(MAT_PARTITIONING_CHACO,path,"MatPartitioningCreate_Chaco",MatPartitioningCreate_Chaco);
 52: #endif
 53: #if defined(PETSC_HAVE_JOSTLE)
 54:   MatPartitioningRegisterDynamic(MAT_PARTITIONING_JOSTLE,path,"MatPartitioningCreate_Jostle",MatPartitioningCreate_Jostle);
 55: #endif
 56: #if defined(PETSC_HAVE_PARTY)
 57:   MatPartitioningRegisterDynamic(MAT_PARTITIONING_PARTY,path,"MatPartitioningCreate_Party",MatPartitioningCreate_Party);
 58: #endif
 59: #if defined(PETSC_HAVE_SCOTCH)
 60:   MatPartitioningRegisterDynamic(MAT_PARTITIONING_SCOTCH,path,"MatPartitioningCreate_Scotch",MatPartitioningCreate_Scotch);
 61: #endif
 62:   return(0);
 63: }