1 /*$Id: matregis.c,v 1.3 2000/07/10 03:39:27 bsmith Exp bsmith $*/ 2 3 #include "petscmat.h" /*I "petscmat.h" I*/ 4 5 EXTERN_C_BEGIN 6 EXTERN int MatCreate_MAIJ(Mat); 7 EXTERN int MatCreate_IS(Mat); 8 EXTERN_C_END 9 10 /* 11 This is used by MatSetType() to make sure that at least one 12 MatRegisterAll() is called. In general, if there is more than one 13 DLL, then MatRegisterAll() may be called several times. 14 */ 15 EXTERN PetscTruth MatRegisterAllCalled; 16 17 #undef __FUNC__ 18 #define __FUNC__ /*<a name="MatRegisterAll"></a>*/"MatRegisterAll" 19 /*@C 20 MatRegisterAll - Registers all of the matrix types in PETSc 21 22 Not Collective 23 24 Level: advanced 25 26 .keywords: KSP, register, all 27 28 .seealso: MatRegisterDestroy() 29 @*/ 30 int MatRegisterAll(char *path) 31 { 32 int ierr; 33 34 PetscFunctionBegin; 35 MatRegisterAllCalled = PETSC_TRUE; 36 37 ierr = MatRegisterDynamic(MATMPIMAIJ, path,"MatCreate_MAIJ", MatCreate_MAIJ);CHKERRQ(ierr); 38 ierr = MatRegisterDynamic(MATSEQMAIJ, path,"MatCreate_MAIJ", MatCreate_MAIJ);CHKERRQ(ierr); 39 ierr = MatRegisterDynamic(MATIS, path,"MatCreate_IS", MatCreate_IS);CHKERRQ(ierr); 40 PetscFunctionReturn(0); 41 } 42 43