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: #undef __FUNCT__  
 25: /*@C
 26:     MatLoadRegisterAll - Registers all standard matrix type routines to load
 27:         matrices from a binary file.

 29:   Not Collective

 31:   Level: developer

 33:   Notes: To prevent registering all matrix types; copy this routine to 
 34:          your source code and comment out the versions below that you do not need.

 36: .seealso: MatLoadRegister(), MatLoad()

 38: @*/
 39: int MatLoadRegisterAll(char *path)
 40: {

 44:   MatLoadRegisterAllCalled = PETSC_TRUE;
 45:   MatLoadRegisterDynamic(MATSEQAIJ,path,"MatLoad_SeqAIJ",MatLoad_SeqAIJ);
 46:   MatLoadRegisterDynamic(MATMPIAIJ,path,"MatLoad_MPIAIJ",MatLoad_MPIAIJ);
 47:   MatLoadRegisterDynamic(MATSEQBDIAG,path,"MatLoad_SeqBDiag",MatLoad_SeqBDiag);
 48:   MatLoadRegisterDynamic(MATMPIBDIAG,path,"MatLoad_MPIBDiag",MatLoad_MPIBDiag);
 49:   MatLoadRegisterDynamic(MATSEQDENSE,path,"MatLoad_SeqDense",MatLoad_SeqDense);
 50:   MatLoadRegisterDynamic(MATMPIDENSE,path,"MatLoad_MPIDense",MatLoad_MPIDense);
 51:   MatLoadRegisterDynamic(MATSEQBAIJ,path,"MatLoad_SeqBAIJ",MatLoad_SeqBAIJ);
 52:   MatLoadRegisterDynamic(MATMPIBAIJ,path,"MatLoad_MPIBAIJ",MatLoad_MPIBAIJ);
 53:   MatLoadRegisterDynamic(MATSEQSBAIJ,path,"MatLoad_SeqSBAIJ",MatLoad_SeqSBAIJ);
 54:   MatLoadRegisterDynamic(MATMPISBAIJ,path,"MatLoad_MPISBAIJ",MatLoad_MPISBAIJ);
 55: #if defined(__cplusplus) && !defined(PETSC_USE_COMPLEX) && !defined(PETSC_USE_SINGLE) && defined(PETSC_HAVE_CXX_NAMESPACE)
 56:   MatLoadRegisterDynamic(MATESI,path,"MatLoad_ESI",MatLoad_ESI);
 57:   MatLoadRegisterDynamic(MATPETSCESI,path,"MatLoad_ESI",MatLoad_ESI);
 58: #endif
 59: #if defined(PETSC_HAVE_BLOCKSOLVE) && !defined(PETSC_USE_COMPLEX)
 60:   MatLoadRegisterDynamic(MATMPIROWBS,path,"MatLoad_MPIRowbs",MatLoad_MPIRowbs);
 61: #endif
 62:   return(0);
 63: }

 65: EXTERN_C_BEGIN
 66: EXTERN int MatConvertTo_MPIAdj(Mat,MatType,Mat*);
 67: EXTERN_C_END

 69: #undef __FUNCT__  
 71: /*@C
 72:     MatConvertRegisterAll - Registers all standard matrix type routines to convert to

 74:   Not Collective

 76:   Level: developer

 78:   Notes: To prevent registering all matrix types; copy this routine to 
 79:          your source code and comment out the versions below that you do not need.

 81: .seealso: MatLoadRegister(), MatLoad()

 83: @*/
 84: int MatConvertRegisterAll(char *path)
 85: {

 89:   MatConvertRegisterAllCalled = PETSC_TRUE;
 90:   MatConvertRegisterDynamic(MATMPIADJ,path,"MatConvertTo_MPIAdj",MatConvertTo_MPIAdj);
 91:   return(0);
 92: }