1*f7cf7585SBarry Smith /*$Id: matregis.c,v 1.1 2000/05/17 19:37:32 bsmith Exp bsmith $*/ 28a95e4e9SBarry Smith 3*f7cf7585SBarry Smith #include "petscmat.h" /*I "petscmat.h" I*/ 48a95e4e9SBarry Smith 58a95e4e9SBarry Smith EXTERN_C_BEGIN 6*f7cf7585SBarry Smith EXTERN int MatCreate_MAIJ(Mat); 7*f7cf7585SBarry Smith EXTERN int MatCreate_NN(Mat); 88a95e4e9SBarry Smith EXTERN_C_END 98a95e4e9SBarry Smith 108a95e4e9SBarry Smith /* 11*f7cf7585SBarry Smith This is used by MatSetType() to make sure that at least one 12*f7cf7585SBarry Smith MatRegisterAll() is called. In general, if there is more than one 13*f7cf7585SBarry Smith DLL, then MatRegisterAll() may be called several times. 148a95e4e9SBarry Smith */ 15*f7cf7585SBarry Smith EXTERN PetscTruth MatRegisterAllCalled; 168a95e4e9SBarry Smith 178a95e4e9SBarry Smith #undef __FUNC__ 18*f7cf7585SBarry Smith #define __FUNC__ /*<a name="MatRegisterAll"></a>*/"MatRegisterAll" 198a95e4e9SBarry Smith /*@C 20*f7cf7585SBarry 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 28*f7cf7585SBarry Smith .seealso: MatRegisterDestroy() 298a95e4e9SBarry Smith @*/ 30*f7cf7585SBarry Smith int MatRegisterAll(char *path) 318a95e4e9SBarry Smith { 328a95e4e9SBarry Smith int ierr; 338a95e4e9SBarry Smith 348a95e4e9SBarry Smith PetscFunctionBegin; 35*f7cf7585SBarry Smith MatRegisterAllCalled = PETSC_TRUE; 368a95e4e9SBarry Smith 37*f7cf7585SBarry Smith ierr = MatRegisterDynamic(MATMPIMAIJ, path,"MatCreate_MAIJ", MatCreate_MAIJ);CHKERRQ(ierr); 38*f7cf7585SBarry Smith ierr = MatRegisterDynamic(MATNN, path,"MatCreate_NN", MatCreate_NN);CHKERRQ(ierr); 398a95e4e9SBarry Smith PetscFunctionReturn(0); 408a95e4e9SBarry Smith } 41*f7cf7585SBarry Smith 42