Actual source code: spartition.c
1: /*$Id: spartition.c,v 1.23 2001/03/23 23:22:49 balay Exp $*/
2:
3: #include petsc.h
4: #include petscmat.h
6: EXTERN_C_BEGIN
7: EXTERN int MatPartitioningCreate_Current(MatPartitioning);
8: EXTERN int MatPartitioningCreate_Square(MatPartitioning);
9: EXTERN int MatPartitioningCreate_Parmetis(MatPartitioning);
10: EXTERN_C_END
12: /*@C
13: MatPartitioningRegisterAll - Registers all of the matrix Partitioning routines in PETSc.
15: Not Collective
17: Level: developer
19: Adding new methods:
20: To add a new method to the registry. Copy this routine and
21: modify it to incorporate a call to MatPartitioningRegisterDynamic() for
22: the new method, after the current list.
24: Restricting the choices: To prevent all of the methods from being
25: registered and thus save memory, copy this routine and modify it to
26: register a zero, instead of the function name, for those methods you
27: do not wish to register. Make sure that the replacement routine is
28: linked before libpetscmat.a.
30: .keywords: matrix, Partitioning, register, all
32: .seealso: MatPartitioningRegisterDynamic(), MatPartitioningRegisterDestroy()
33: @*/
34: int MatPartitioningRegisterAll(char *path)
35: {
36: int ierr;
39: MatPartitioningRegisterDynamic(MAT_PARTITIONING_CURRENT,path,"MatPartitioningCreate_Current",MatPartitioningCreate_Current);
40: MatPartitioningRegisterDynamic("square",path,"MatPartitioningCreate_Square",MatPartitioningCreate_Square);
41: #if defined(PETSC_HAVE_PARMETIS)
42: MatPartitioningRegisterDynamic(MAT_PARTITIONING_PARMETIS,path,"MatPartitioningCreate_Parmetis",MatPartitioningCreate_Parmetis);
43: #endif
44: return(0);
45: }