Actual source code: spartition.c

  1: 
 2:  #include petsc.h
 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:   MatPartitioningRegisterDynamic(MAT_PARTITIONING_CURRENT,path,"MatPartitioningCreate_Current",MatPartitioningCreate_Current);
 45:   MatPartitioningRegisterDynamic("square",path,"MatPartitioningCreate_Square",MatPartitioningCreate_Square);
 46: #if defined(PETSC_HAVE_PARMETIS)
 47:   MatPartitioningRegisterDynamic(MAT_PARTITIONING_PARMETIS,path,"MatPartitioningCreate_Parmetis",MatPartitioningCreate_Parmetis);
 48: #endif
 49: #if defined(PETSC_HAVE_CHACO)
 50:   MatPartitioningRegisterDynamic(MAT_PARTITIONING_CHACO,path,"MatPartitioningCreate_Chaco",MatPartitioningCreate_Chaco);
 51: #endif
 52: #if defined(PETSC_HAVE_JOSTLE)
 53:   MatPartitioningRegisterDynamic(MAT_PARTITIONING_JOSTLE,path,"MatPartitioningCreate_Jostle",MatPartitioningCreate_Jostle);
 54: #endif
 55: #if defined(PETSC_HAVE_PARTY)
 56:   MatPartitioningRegisterDynamic(MAT_PARTITIONING_PARTY,path,"MatPartitioningCreate_Party",MatPartitioningCreate_Party);
 57: #endif
 58: #if defined(PETSC_HAVE_SCOTCH)
 59:   MatPartitioningRegisterDynamic(MAT_PARTITIONING_SCOTCH,path,"MatPartitioningCreate_Scotch",MatPartitioningCreate_Scotch);
 60: #endif
 61:   return(0);
 62: }