173f4d377SMatthew Knepley /*$Id: matregis.c,v 1.10 2001/06/21 21:16:17 bsmith Exp $*/ 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); 21064f8208SBarry Smith #if defined(__cplusplus) 226d88219bSBarry Smith EXTERN int MatCreate_ESI(Mat); 236d88219bSBarry Smith EXTERN int MatCreate_PetscESI(Mat); 246d88219bSBarry Smith #endif 25b3a1e11cSKris Buschelman #if defined(PETSC_HAVE_SPOOLES) && !defined(PETSC_USE_SINGLE) 26b3a1e11cSKris Buschelman EXTERN int MatCreate_SeqAIJ_Spooles(Mat); 279abb65ffSKris Buschelman EXTERN int MatCreate_SeqSBAIJ_Spooles(Mat); 28d10c748bSKris Buschelman EXTERN int MatCreate_MPIAIJ_Spooles(Mat); 2922191285SKris Buschelman EXTERN int MatCreate_MPISBAIJ_Spooles(Mat); 30b3a1e11cSKris Buschelman #endif 3114b396bbSKris Buschelman #if defined(PETSC_HAVE_SUPERLU) && !defined(PETSC_USE_SINGLE) 32*e740cb95SKris Buschelman EXTERN int MatCreate_SeqAIJ_SuperLU(Mat); 3314b396bbSKris Buschelman #endif 348a95e4e9SBarry Smith EXTERN_C_END 358a95e4e9SBarry Smith 368a95e4e9SBarry Smith /* 37f7cf7585SBarry Smith This is used by MatSetType() to make sure that at least one 38f7cf7585SBarry Smith MatRegisterAll() is called. In general, if there is more than one 39f7cf7585SBarry Smith DLL, then MatRegisterAll() may be called several times. 408a95e4e9SBarry Smith */ 41f7cf7585SBarry Smith EXTERN PetscTruth MatRegisterAllCalled; 428a95e4e9SBarry Smith 434a2ae208SSatish Balay #undef __FUNCT__ 444a2ae208SSatish Balay #define __FUNCT__ "MatRegisterAll" 458a95e4e9SBarry Smith /*@C 46f7cf7585SBarry Smith MatRegisterAll - Registers all of the matrix types in PETSc 478a95e4e9SBarry Smith 488a95e4e9SBarry Smith Not Collective 498a95e4e9SBarry Smith 508a95e4e9SBarry Smith Level: advanced 518a95e4e9SBarry Smith 528a95e4e9SBarry Smith .keywords: KSP, register, all 538a95e4e9SBarry Smith 54f7cf7585SBarry Smith .seealso: MatRegisterDestroy() 558a95e4e9SBarry Smith @*/ 56f7cf7585SBarry Smith int MatRegisterAll(char *path) 578a95e4e9SBarry Smith { 588a95e4e9SBarry Smith int ierr; 598a95e4e9SBarry Smith 608a95e4e9SBarry Smith PetscFunctionBegin; 61f7cf7585SBarry Smith MatRegisterAllCalled = PETSC_TRUE; 628a95e4e9SBarry Smith 63f7cf7585SBarry Smith ierr = MatRegisterDynamic(MATMPIMAIJ, path,"MatCreate_MAIJ", MatCreate_MAIJ);CHKERRQ(ierr); 64b9b97703SBarry Smith ierr = MatRegisterDynamic(MATSEQMAIJ, path,"MatCreate_MAIJ", MatCreate_MAIJ);CHKERRQ(ierr); 65273d9f13SBarry Smith 66186905e3SBarry Smith ierr = MatRegisterDynamic(MATIS, path,"MatCreate_IS", MatCreate_IS);CHKERRQ(ierr); 67273d9f13SBarry Smith ierr = MatRegisterDynamic(MATSHELL, path,"MatCreate_Shell", MatCreate_Shell);CHKERRQ(ierr); 685d10bc3aSBarry Smith #if defined(PETSC_HAVE_BLOCKSOLVE) && !defined(PETSC_USE_COMPLEX) 69273d9f13SBarry Smith ierr = MatRegisterDynamic(MATMPIROWBS,path,"MatCreate_MPIRowbs",MatCreate_MPIRowbs);CHKERRQ(ierr); 70273d9f13SBarry Smith #endif 71273d9f13SBarry Smith 72273d9f13SBarry Smith ierr = MatRegisterDynamic(MATMPIAIJ, path,"MatCreate_MPIAIJ", MatCreate_MPIAIJ);CHKERRQ(ierr); 73273d9f13SBarry Smith ierr = MatRegisterDynamic(MATSEQAIJ, path,"MatCreate_SeqAIJ", MatCreate_SeqAIJ);CHKERRQ(ierr); 74273d9f13SBarry Smith 75273d9f13SBarry Smith ierr = MatRegisterDynamic(MATMPIBAIJ, path,"MatCreate_MPIBAIJ", MatCreate_MPIBAIJ);CHKERRQ(ierr); 76273d9f13SBarry Smith ierr = MatRegisterDynamic(MATSEQBAIJ, path,"MatCreate_SeqBAIJ", MatCreate_SeqBAIJ);CHKERRQ(ierr); 77273d9f13SBarry Smith 78273d9f13SBarry Smith ierr = MatRegisterDynamic(MATMPISBAIJ, path,"MatCreate_MPISBAIJ", MatCreate_MPISBAIJ);CHKERRQ(ierr); 79273d9f13SBarry Smith ierr = MatRegisterDynamic(MATSEQSBAIJ, path,"MatCreate_SeqSBAIJ", MatCreate_SeqSBAIJ);CHKERRQ(ierr); 80273d9f13SBarry Smith 81273d9f13SBarry Smith ierr = MatRegisterDynamic(MATMPIBDIAG, path,"MatCreate_MPIBDiag", MatCreate_MPIBDiag);CHKERRQ(ierr); 82273d9f13SBarry Smith ierr = MatRegisterDynamic(MATSEQBDIAG, path,"MatCreate_SeqBDiag", MatCreate_SeqBDiag);CHKERRQ(ierr); 83273d9f13SBarry Smith 84273d9f13SBarry Smith ierr = MatRegisterDynamic(MATMPIDENSE, path,"MatCreate_MPIDense", MatCreate_MPIDense);CHKERRQ(ierr); 85273d9f13SBarry Smith ierr = MatRegisterDynamic(MATSEQDENSE, path,"MatCreate_SeqDense", MatCreate_SeqDense);CHKERRQ(ierr); 86273d9f13SBarry Smith 87273d9f13SBarry Smith ierr = MatRegisterDynamic(MATMPIADJ, path,"MatCreate_MPIAdj", MatCreate_MPIAdj);CHKERRQ(ierr); 88c7cd70f7SSatish Balay #if defined(__cplusplus) && !defined(PETSC_USE_COMPLEX) && !defined(PETSC_USE_SINGLE) && defined(PETSC_HAVE_CXX_NAMESPACE) 896d88219bSBarry Smith ierr = MatRegisterDynamic(MATESI, path,"MatCreate_ESI", MatCreate_ESI);CHKERRQ(ierr); 906d88219bSBarry Smith ierr = MatRegisterDynamic(MATPETSCESI, path,"MatCreate_PetscESI", MatCreate_PetscESI);CHKERRQ(ierr); 916d88219bSBarry Smith #endif 92b3a1e11cSKris Buschelman #if defined(PETSC_HAVE_SPOOLES) && !defined(PETSC_USE_SINGLE) 93b3a1e11cSKris Buschelman ierr = MatRegisterDynamic(MATSEQAIJSPOOLES, path,"MatCreate_SeqAIJ_Spooles", MatCreate_SeqAIJ_Spooles);CHKERRQ(ierr); 949abb65ffSKris Buschelman ierr = MatRegisterDynamic(MATSEQSBAIJSPOOLES,path,"MatCreate_SeqSBAIJ_Spooles",MatCreate_SeqSBAIJ_Spooles);CHKERRQ(ierr); 95d10c748bSKris Buschelman ierr = MatRegisterDynamic(MATMPIAIJSPOOLES, path,"MatCreate_MPIAIJ_Spooles", MatCreate_MPIAIJ_Spooles);CHKERRQ(ierr); 9622191285SKris Buschelman ierr = MatRegisterDynamic(MATMPISBAIJSPOOLES,path,"MatCreate_MPISBAIJ_Spooles",MatCreate_MPISBAIJ_Spooles);CHKERRQ(ierr); 97b3a1e11cSKris Buschelman #endif 9814b396bbSKris Buschelman #if defined(PETSC_HAVE_SUPERLU) && !defined(PETSC_USE_SINGLE) 9914b396bbSKris Buschelman ierr = MatRegisterDynamic(MATSUPERLU,path,"MatCreate_SeqAIJ_SuperLU",MatCreate_SeqAIJ_SuperLU);CHKERRQ(ierr); 10014b396bbSKris Buschelman #endif 1018a95e4e9SBarry Smith PetscFunctionReturn(0); 1028a95e4e9SBarry Smith } 103f7cf7585SBarry Smith 1043a7fca6bSBarry Smith 105