1*3a7fca6bSBarry Smith /*$Id: matregis.c,v 1.9 2001/05/11 03:14:08 bsmith Exp bsmith $*/ 28a95e4e9SBarry Smith 3f7cf7585SBarry Smith #include "petscmat.h" /*I "petscmat.h" I*/ 48a95e4e9SBarry Smith 58a95e4e9SBarry Smith EXTERN_C_BEGIN 6f7cf7585SBarry Smith EXTERN int MatCreate_MAIJ(Mat); 7186905e3SBarry Smith EXTERN int MatCreate_IS(Mat); 8273d9f13SBarry Smith EXTERN int MatCreate_MPIRowbs(Mat); 9273d9f13SBarry Smith EXTERN int MatCreate_SeqAIJ(Mat); 10273d9f13SBarry Smith EXTERN int MatCreate_MPIAIJ(Mat); 11273d9f13SBarry Smith EXTERN int MatCreate_SeqBAIJ(Mat); 12273d9f13SBarry Smith EXTERN int MatCreate_MPIBAIJ(Mat); 13273d9f13SBarry Smith EXTERN int MatCreate_SeqSBAIJ(Mat); 14273d9f13SBarry Smith EXTERN int MatCreate_MPISBAIJ(Mat); 15273d9f13SBarry Smith EXTERN int MatCreate_SeqBDiag(Mat); 16273d9f13SBarry Smith EXTERN int MatCreate_MPIBDiag(Mat); 17273d9f13SBarry Smith EXTERN int MatCreate_SeqDense(Mat); 18273d9f13SBarry Smith EXTERN int MatCreate_MPIDense(Mat); 19273d9f13SBarry Smith EXTERN int MatCreate_MPIAdj(Mat); 20273d9f13SBarry Smith EXTERN int MatCreate_Shell(Mat); 218a95e4e9SBarry Smith EXTERN_C_END 228a95e4e9SBarry Smith 238a95e4e9SBarry Smith /* 24f7cf7585SBarry Smith This is used by MatSetType() to make sure that at least one 25f7cf7585SBarry Smith MatRegisterAll() is called. In general, if there is more than one 26f7cf7585SBarry Smith DLL, then MatRegisterAll() may be called several times. 278a95e4e9SBarry Smith */ 28f7cf7585SBarry Smith EXTERN PetscTruth MatRegisterAllCalled; 298a95e4e9SBarry Smith 304a2ae208SSatish Balay #undef __FUNCT__ 314a2ae208SSatish Balay #define __FUNCT__ "MatRegisterAll" 328a95e4e9SBarry Smith /*@C 33f7cf7585SBarry Smith MatRegisterAll - Registers all of the matrix types in PETSc 348a95e4e9SBarry Smith 358a95e4e9SBarry Smith Not Collective 368a95e4e9SBarry Smith 378a95e4e9SBarry Smith Level: advanced 388a95e4e9SBarry Smith 398a95e4e9SBarry Smith .keywords: KSP, register, all 408a95e4e9SBarry Smith 41f7cf7585SBarry Smith .seealso: MatRegisterDestroy() 428a95e4e9SBarry Smith @*/ 43f7cf7585SBarry Smith int MatRegisterAll(char *path) 448a95e4e9SBarry Smith { 458a95e4e9SBarry Smith int ierr; 468a95e4e9SBarry Smith 478a95e4e9SBarry Smith PetscFunctionBegin; 48f7cf7585SBarry Smith MatRegisterAllCalled = PETSC_TRUE; 498a95e4e9SBarry Smith 50f7cf7585SBarry Smith ierr = MatRegisterDynamic(MATMPIMAIJ, path,"MatCreate_MAIJ", MatCreate_MAIJ);CHKERRQ(ierr); 51b9b97703SBarry Smith ierr = MatRegisterDynamic(MATSEQMAIJ, path,"MatCreate_MAIJ", MatCreate_MAIJ);CHKERRQ(ierr); 52273d9f13SBarry Smith 53186905e3SBarry Smith ierr = MatRegisterDynamic(MATIS, path,"MatCreate_IS", MatCreate_IS);CHKERRQ(ierr); 54273d9f13SBarry Smith ierr = MatRegisterDynamic(MATSHELL, path,"MatCreate_Shell", MatCreate_Shell);CHKERRQ(ierr); 5510dfdf27SBarry Smith #if defined(PETSC_HAVE_BLOCKSOLVE) && !defined(__cplusplus) 56273d9f13SBarry Smith ierr = MatRegisterDynamic(MATMPIROWBS,path,"MatCreate_MPIRowbs",MatCreate_MPIRowbs);CHKERRQ(ierr); 57273d9f13SBarry Smith #endif 58273d9f13SBarry Smith 59273d9f13SBarry Smith ierr = MatRegisterDynamic(MATMPIAIJ, path,"MatCreate_MPIAIJ", MatCreate_MPIAIJ);CHKERRQ(ierr); 60273d9f13SBarry Smith ierr = MatRegisterDynamic(MATSEQAIJ, path,"MatCreate_SeqAIJ", MatCreate_SeqAIJ);CHKERRQ(ierr); 61273d9f13SBarry Smith 62273d9f13SBarry Smith ierr = MatRegisterDynamic(MATMPIBAIJ, path,"MatCreate_MPIBAIJ", MatCreate_MPIBAIJ);CHKERRQ(ierr); 63273d9f13SBarry Smith ierr = MatRegisterDynamic(MATSEQBAIJ, path,"MatCreate_SeqBAIJ", MatCreate_SeqBAIJ);CHKERRQ(ierr); 64273d9f13SBarry Smith 65273d9f13SBarry Smith ierr = MatRegisterDynamic(MATMPISBAIJ, path,"MatCreate_MPISBAIJ", MatCreate_MPISBAIJ);CHKERRQ(ierr); 66273d9f13SBarry Smith ierr = MatRegisterDynamic(MATSEQSBAIJ, path,"MatCreate_SeqSBAIJ", MatCreate_SeqSBAIJ);CHKERRQ(ierr); 67273d9f13SBarry Smith 68273d9f13SBarry Smith ierr = MatRegisterDynamic(MATMPIBDIAG, path,"MatCreate_MPIBDiag", MatCreate_MPIBDiag);CHKERRQ(ierr); 69273d9f13SBarry Smith ierr = MatRegisterDynamic(MATSEQBDIAG, path,"MatCreate_SeqBDiag", MatCreate_SeqBDiag);CHKERRQ(ierr); 70273d9f13SBarry Smith 71273d9f13SBarry Smith ierr = MatRegisterDynamic(MATMPIDENSE, path,"MatCreate_MPIDense", MatCreate_MPIDense);CHKERRQ(ierr); 72273d9f13SBarry Smith ierr = MatRegisterDynamic(MATSEQDENSE, path,"MatCreate_SeqDense", MatCreate_SeqDense);CHKERRQ(ierr); 73273d9f13SBarry Smith 74273d9f13SBarry Smith ierr = MatRegisterDynamic(MATMPIADJ, path,"MatCreate_MPIAdj", MatCreate_MPIAdj);CHKERRQ(ierr); 758a95e4e9SBarry Smith PetscFunctionReturn(0); 768a95e4e9SBarry Smith } 77f7cf7585SBarry Smith 78*3a7fca6bSBarry Smith 79