1*b9b97703SBarry Smith /*$Id: matregis.c,v 1.2 2000/07/08 16:33:24 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); 7f7cf7585SBarry Smith EXTERN int MatCreate_NN(Mat); 88a95e4e9SBarry Smith EXTERN_C_END 98a95e4e9SBarry Smith 108a95e4e9SBarry Smith /* 11f7cf7585SBarry Smith This is used by MatSetType() to make sure that at least one 12f7cf7585SBarry Smith MatRegisterAll() is called. In general, if there is more than one 13f7cf7585SBarry Smith DLL, then MatRegisterAll() may be called several times. 148a95e4e9SBarry Smith */ 15f7cf7585SBarry Smith EXTERN PetscTruth MatRegisterAllCalled; 168a95e4e9SBarry Smith 178a95e4e9SBarry Smith #undef __FUNC__ 18f7cf7585SBarry Smith #define __FUNC__ /*<a name="MatRegisterAll"></a>*/"MatRegisterAll" 198a95e4e9SBarry Smith /*@C 20f7cf7585SBarry Smith MatRegisterAll - Registers all of the matrix types in PETSc 218a95e4e9SBarry Smith 228a95e4e9SBarry Smith Not Collective 238a95e4e9SBarry Smith 248a95e4e9SBarry Smith Level: advanced 258a95e4e9SBarry Smith 268a95e4e9SBarry Smith .keywords: KSP, register, all 278a95e4e9SBarry Smith 28f7cf7585SBarry Smith .seealso: MatRegisterDestroy() 298a95e4e9SBarry Smith @*/ 30f7cf7585SBarry Smith int MatRegisterAll(char *path) 318a95e4e9SBarry Smith { 328a95e4e9SBarry Smith int ierr; 338a95e4e9SBarry Smith 348a95e4e9SBarry Smith PetscFunctionBegin; 35f7cf7585SBarry Smith MatRegisterAllCalled = PETSC_TRUE; 368a95e4e9SBarry Smith 37f7cf7585SBarry Smith ierr = MatRegisterDynamic(MATMPIMAIJ, path,"MatCreate_MAIJ", MatCreate_MAIJ);CHKERRQ(ierr); 38*b9b97703SBarry Smith ierr = MatRegisterDynamic(MATSEQMAIJ, path,"MatCreate_MAIJ", MatCreate_MAIJ);CHKERRQ(ierr); 39f7cf7585SBarry Smith ierr = MatRegisterDynamic(MATNN, path,"MatCreate_NN", MatCreate_NN);CHKERRQ(ierr); 408a95e4e9SBarry Smith PetscFunctionReturn(0); 418a95e4e9SBarry Smith } 42f7cf7585SBarry Smith 43