Actual source code: matioall.c
1: /*$Id: matioall.c,v 1.23 2001/03/23 23:22:45 balay Exp $*/
3: #include petscmat.h
5: EXTERN_C_BEGIN
6: EXTERN int MatLoad_MPIRowbs(PetscViewer,MatType,Mat*);
7: EXTERN int MatLoad_SeqAIJ(PetscViewer,MatType,Mat*);
8: EXTERN int MatLoad_MPIAIJ(PetscViewer,MatType,Mat*);
9: EXTERN int MatLoad_SeqBDiag(PetscViewer,MatType,Mat*);
10: EXTERN int MatLoad_MPIBDiag(PetscViewer,MatType,Mat*);
11: EXTERN int MatLoad_SeqDense(PetscViewer,MatType,Mat*);
12: EXTERN int MatLoad_MPIDense(PetscViewer,MatType,Mat*);
13: EXTERN int MatLoad_SeqBAIJ(PetscViewer,MatType,Mat*);
14: EXTERN int MatLoad_SeqAdj(PetscViewer,MatType,Mat*);
15: EXTERN int MatLoad_MPIBAIJ(PetscViewer,MatType,Mat*);
16: EXTERN int MatLoad_SeqSBAIJ(PetscViewer,MatType,Mat*);
17: EXTERN int MatLoad_MPISBAIJ(PetscViewer,MatType,Mat*);
18: EXTERN int MatLoad_MPIRowbs(PetscViewer,MatType,Mat*);
19: EXTERN int MatLoad_ESI(PetscViewer,MatType,Mat*);
20: EXTERN_C_END
21: extern PetscTruth MatLoadRegisterAllCalled;
23: /*@C
24: MatLoadRegisterAll - Registers all standard matrix type routines to load
25: matrices from a binary file.
27: Not Collective
29: Level: developer
31: Notes: To prevent registering all matrix types; copy this routine to
32: your source code and comment out the versions below that you do not need.
34: .seealso: MatLoadRegister(), MatLoad()
36: @*/
37: int MatLoadRegisterAll(char *path)
38: {
42: MatLoadRegisterAllCalled = PETSC_TRUE;
43: MatLoadRegisterDynamic(MATSEQAIJ,path,"MatLoad_SeqAIJ",MatLoad_SeqAIJ);
44: MatLoadRegisterDynamic(MATMPIAIJ,path,"MatLoad_MPIAIJ",MatLoad_MPIAIJ);
45: MatLoadRegisterDynamic(MATSEQBDIAG,path,"MatLoad_SeqBDiag",MatLoad_SeqBDiag);
46: MatLoadRegisterDynamic(MATMPIBDIAG,path,"MatLoad_MPIBDiag",MatLoad_MPIBDiag);
47: MatLoadRegisterDynamic(MATSEQDENSE,path,"MatLoad_SeqDense",MatLoad_SeqDense);
48: MatLoadRegisterDynamic(MATMPIDENSE,path,"MatLoad_MPIDense",MatLoad_MPIDense);
49: MatLoadRegisterDynamic(MATSEQBAIJ,path,"MatLoad_SeqBAIJ",MatLoad_SeqBAIJ);
50: MatLoadRegisterDynamic(MATMPIBAIJ,path,"MatLoad_MPIBAIJ",MatLoad_MPIBAIJ);
51: MatLoadRegisterDynamic(MATSEQSBAIJ,path,"MatLoad_SeqSBAIJ",MatLoad_SeqSBAIJ);
52: MatLoadRegisterDynamic(MATMPISBAIJ,path,"MatLoad_MPISBAIJ",MatLoad_MPISBAIJ);
53: #if defined(__cplusplus) && !defined(PETSC_USE_COMPLEX) && !defined(PETSC_USE_MATSINGLE) && defined(PETSC_HAVE_CXX_NAMESPACE)
54: MatLoadRegisterDynamic(MATESI,path,"MatLoad_ESI",MatLoad_ESI);
55: MatLoadRegisterDynamic(MATPETSCESI,path,"MatLoad_ESI",MatLoad_ESI);
56: #endif
57: #if defined(PETSC_HAVE_BLOCKSOLVE) && !defined(PETSC_USE_COMPLEX)
58: MatLoadRegisterDynamic(MATMPIROWBS,path,"MatLoad_MPIRowbs",MatLoad_MPIRowbs);
59: #endif
60: return(0);
61: }
63: EXTERN_C_BEGIN
64: EXTERN int MatConvertTo_MPIAdj(Mat,MatType,Mat*);
65: EXTERN_C_END
67: /*@C
68: MatConvertRegisterAll - Registers all standard matrix type routines to convert to
70: Not Collective
72: Level: developer
74: Notes: To prevent registering all matrix types; copy this routine to
75: your source code and comment out the versions below that you do not need.
77: .seealso: MatLoadRegister(), MatLoad()
79: @*/
80: int MatConvertRegisterAll(char *path)
81: {
85: MatConvertRegisterAllCalled = PETSC_TRUE;
86: MatConvertRegisterDynamic(MATMPIADJ,path,"MatConvertTo_MPIAdj",MatConvertTo_MPIAdj);
87: return(0);
88: }