Actual source code: spartition.c
1: #define PETSCMAT_DLL
3: #include petsc.h
4: #include petscmat.h
7: EXTERN PetscErrorCode MatPartitioningCreate_Current(MatPartitioning);
8: EXTERN PetscErrorCode MatPartitioningCreate_Square(MatPartitioning);
9: EXTERN PetscErrorCode MatPartitioningCreate_Parmetis(MatPartitioning);
10: EXTERN PetscErrorCode MatPartitioningCreate_Chaco(MatPartitioning);
11: EXTERN PetscErrorCode MatPartitioningCreate_Jostle(MatPartitioning);
12: EXTERN PetscErrorCode MatPartitioningCreate_Party(MatPartitioning);
13: EXTERN PetscErrorCode MatPartitioningCreate_Scotch(MatPartitioning);
18: /*@C
19: MatPartitioningRegisterAll - Registers all of the matrix Partitioning 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 MatPartitioningRegisterDynamic() 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 modify it to
32: register a zero, instead of the function name, for those methods you
33: do not wish to register. Make sure that the replacement routine is
34: linked before libpetscmat.a.
36: .keywords: matrix, Partitioning, register, all
38: .seealso: MatPartitioningRegisterDynamic(), MatPartitioningRegisterDestroy()
39: @*/
40: PetscErrorCode MatPartitioningRegisterAll(const char path[])
41: {
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: }