Actual source code: matregis.c

  1: #define PETSCMAT_DLL

 3:  #include petscmat.h

  6: EXTERN PetscErrorCode  MatCreate_MAIJ(Mat);
  7: EXTERN PetscErrorCode  MatCreate_IS(Mat);
  8: EXTERN PetscErrorCode  MatCreate_MPIRowbs(Mat);

 10: EXTERN PetscErrorCode  MatCreate_AIJ(Mat);
 11: EXTERN PetscErrorCode  MatCreate_SeqAIJ(Mat);
 12: EXTERN PetscErrorCode  MatCreate_MPIAIJ(Mat);

 14: EXTERN PetscErrorCode  MatCreate_BAIJ(Mat);
 15: EXTERN PetscErrorCode  MatCreate_SeqBAIJ(Mat);
 16: EXTERN PetscErrorCode  MatCreate_MPIBAIJ(Mat);

 18: EXTERN PetscErrorCode  MatCreate_SBAIJ(Mat);
 19: EXTERN PetscErrorCode  MatCreate_SeqSBAIJ(Mat);
 20: EXTERN PetscErrorCode  MatCreate_MPISBAIJ(Mat);

 22: EXTERN PetscErrorCode  MatCreate_BDiag(Mat);
 23: EXTERN PetscErrorCode  MatCreate_SeqBDiag(Mat);
 24: EXTERN PetscErrorCode  MatCreate_MPIBDiag(Mat);

 26: EXTERN PetscErrorCode  MatCreate_Dense(Mat);
 27: EXTERN PetscErrorCode  MatCreate_SeqDense(Mat);
 28: EXTERN PetscErrorCode  MatCreate_MPIDense(Mat);

 30: EXTERN PetscErrorCode  MatCreate_MPIAdj(Mat);
 31: EXTERN PetscErrorCode  MatCreate_Shell(Mat);
 32: EXTERN PetscErrorCode  MatCreate_Composite(Mat);

 34: EXTERN PetscErrorCode  MatCreate_CSRPERM(Mat);
 35: EXTERN PetscErrorCode  MatCreate_SeqCSRPERM(Mat);
 36: EXTERN PetscErrorCode  MatCreate_MPICSRPERM(Mat);

 38: EXTERN PetscErrorCode  MatCreate_CRL(Mat);
 39: EXTERN PetscErrorCode  MatCreate_SeqCRL(Mat);
 40: EXTERN PetscErrorCode  MatCreate_MPICRL(Mat);

 42: EXTERN PetscErrorCode  MatCreate_Scatter(Mat);
 43: EXTERN PetscErrorCode  MatCreate_BlockMat(Mat);
 44: #if defined(PETSC_HAVE_SPOOLES)
 45: EXTERN PetscErrorCode  MatCreate_AIJSpooles(Mat);
 46: EXTERN PetscErrorCode  MatCreate_SeqAIJSpooles(Mat);
 47: EXTERN PetscErrorCode  MatCreate_MPIAIJSpooles(Mat);

 49: EXTERN PetscErrorCode  MatCreate_SBAIJSpooles(Mat);
 50: EXTERN PetscErrorCode  MatCreate_SeqSBAIJSpooles(Mat);
 51: EXTERN PetscErrorCode  MatCreate_MPISBAIJSpooles(Mat);
 52: #endif
 53: #if defined(PETSC_HAVE_SUPERLU)
 54: EXTERN PetscErrorCode  MatCreate_SuperLU(Mat);
 55: #endif
 56: #if defined(PETSC_HAVE_SUPERLU_DIST)
 57: EXTERN PetscErrorCode  MatCreate_SuperLU_DIST(Mat);
 58: #endif
 59: #if defined(PETSC_HAVE_UMFPACK)
 60: EXTERN PetscErrorCode  MatCreate_UMFPACK(Mat);
 61: #endif
 62: #if defined(PETSC_HAVE_ESSL) && !defined(PETSC_USE_COMPLEX) && !defined(PETSC_USE_SINGLE) && !defined(PETSC_USE_MAT_SINGLE)
 63: EXTERN PetscErrorCode  MatCreate_Essl(Mat);
 64: #endif
 65: #if defined(PETSC_HAVE_LUSOL)
 66: EXTERN PetscErrorCode  MatCreate_LUSOL(Mat);
 67: #endif
 68: #if defined(PETSC_HAVE_MUMPS)
 69: EXTERN PetscErrorCode  MatCreate_AIJMUMPS(Mat);
 70: EXTERN PetscErrorCode  MatCreate_SBAIJMUMPS(Mat);
 71: #endif
 72: #if defined(PETSC_HAVE_DSCPACK)
 73: EXTERN PetscErrorCode  MatCreate_DSCPACK(Mat);
 74: #endif
 75: #if defined(PETSC_HAVE_MATLAB_ENGINE)
 76: EXTERN PetscErrorCode  MatCreate_Matlab(Mat);
 77: #endif
 78: #if defined(PETSC_HAVE_PLAPACK)
 79: EXTERN PetscErrorCode  MatCreate_Plapack(Mat);
 80: #endif
 82: 
 83: /*
 84:     This is used by MatSetType() to make sure that at least one 
 85:     MatRegisterAll() is called. In general, if there is more than one
 86:     DLL, then MatRegisterAll() may be called several times.
 87: */
 88: EXTERN PetscTruth MatRegisterAllCalled;

 92: /*@C
 93:   MatRegisterAll - Registers all of the matrix types in PETSc

 95:   Not Collective

 97:   Level: advanced

 99: .keywords: KSP, register, all

101: .seealso:  MatRegisterDestroy()
102: @*/
103: PetscErrorCode  MatRegisterAll(const char path[])
104: {

108:   MatRegisterAllCalled = PETSC_TRUE;

110:   MatRegisterDynamic(MATMPIMAIJ,        path,"MatCreate_MAIJ",    MatCreate_MAIJ);
111:   MatRegisterDynamic(MATSEQMAIJ,        path,"MatCreate_MAIJ",    MatCreate_MAIJ);
112:   MatRegisterDynamic(MATMAIJ,           path,"MatCreate_MAIJ",    MatCreate_MAIJ);

114:   MatRegisterDynamic(MATIS,             path,"MatCreate_IS",      MatCreate_IS);
115:   MatRegisterDynamic(MATSHELL,          path,"MatCreate_Shell",   MatCreate_Shell);
116:   MatRegisterDynamic(MATCOMPOSITE,      path,"MatCreate_Composite",   MatCreate_Composite);
117: #if defined(PETSC_HAVE_BLOCKSOLVE95)
118:   MatRegisterDynamic(MATMPIROWBS,       path,"MatCreate_MPIRowbs",MatCreate_MPIRowbs);
119: #endif
120:   MatRegisterDynamic(MATAIJ,            path,"MatCreate_AIJ",         MatCreate_AIJ);
121:   MatRegisterDynamic(MATMPIAIJ,         path,"MatCreate_MPIAIJ",      MatCreate_MPIAIJ);
122:   MatRegisterDynamic(MATSEQAIJ,         path,"MatCreate_SeqAIJ",      MatCreate_SeqAIJ);

124:   MatRegisterDynamic(MATCSRPERM,        path,"MatCreate_CSRPERM",  MatCreate_CSRPERM);
125:   MatRegisterDynamic(MATMPICSRPERM,     path,"MatCreate_MPICSRPERM",  MatCreate_MPICSRPERM);
126:   MatRegisterDynamic(MATSEQCSRPERM,     path,"MatCreate_SeqCSRPERM",  MatCreate_SeqCSRPERM);

128:   MatRegisterDynamic(MATCRL,            path,"MatCreate_CRL",         MatCreate_CRL);
129:   MatRegisterDynamic(MATSEQCRL,         path,"MatCreate_SeqCRL",      MatCreate_SeqCRL);
130:   MatRegisterDynamic(MATMPICRL,         path,"MatCreate_MPICRL",      MatCreate_MPICRL);

132:   MatRegisterDynamic(MATBAIJ,           path,"MatCreate_BAIJ",       MatCreate_BAIJ);
133:   MatRegisterDynamic(MATMPIBAIJ,        path,"MatCreate_MPIBAIJ",    MatCreate_MPIBAIJ);
134:   MatRegisterDynamic(MATSEQBAIJ,        path,"MatCreate_SeqBAIJ",    MatCreate_SeqBAIJ);

136:   MatRegisterDynamic(MATSBAIJ,          path,"MatCreate_SBAIJ",     MatCreate_SBAIJ);
137:   MatRegisterDynamic(MATMPISBAIJ,       path,"MatCreate_MPISBAIJ",  MatCreate_MPISBAIJ);
138:   MatRegisterDynamic(MATSEQSBAIJ,       path,"MatCreate_SeqSBAIJ",  MatCreate_SeqSBAIJ);

140:   MatRegisterDynamic(MATBDIAG,          path,"MatCreate_BDiag",     MatCreate_BDiag);
141:   MatRegisterDynamic(MATMPIBDIAG,       path,"MatCreate_MPIBDiag",  MatCreate_MPIBDiag);
142:   MatRegisterDynamic(MATSEQBDIAG,       path,"MatCreate_SeqBDiag",  MatCreate_SeqBDiag);

144:   MatRegisterDynamic(MATDENSE,          path,"MatCreate_Dense",     MatCreate_Dense);
145:   MatRegisterDynamic(MATMPIDENSE,       path,"MatCreate_MPIDense",  MatCreate_MPIDense);
146:   MatRegisterDynamic(MATSEQDENSE,       path,"MatCreate_SeqDense",  MatCreate_SeqDense);

148:   MatRegisterDynamic(MATMPIADJ,         path,"MatCreate_MPIAdj",    MatCreate_MPIAdj);
149:   MatRegisterDynamic(MATSCATTER,        path,"MatCreate_Scatter",   MatCreate_Scatter);
150:   MatRegisterDynamic(MATBLOCKMAT,       path,"MatCreate_BlockMat",   MatCreate_BlockMat);
151: #if defined(PETSC_HAVE_SPOOLES)
152:   MatRegisterDynamic(MATAIJSPOOLES,     path,"MatCreate_AIJSpooles",     MatCreate_AIJSpooles);
153:   MatRegisterDynamic(MATSEQAIJSPOOLES,  path,"MatCreate_SeqAIJSpooles",  MatCreate_SeqAIJSpooles);
154:   MatRegisterDynamic(MATMPIAIJSPOOLES,  path,"MatCreate_MPIAIJSpooles",  MatCreate_MPIAIJSpooles);

156:   MatRegisterDynamic(MATSBAIJSPOOLES,   path,"MatCreate_SBAIJSpooles",   MatCreate_SBAIJSpooles);
157:   MatRegisterDynamic(MATMPISBAIJSPOOLES,path,"MatCreate_MPISBAIJSpooles",MatCreate_MPISBAIJSpooles);
158:   MatRegisterDynamic(MATSEQSBAIJSPOOLES,path,"MatCreate_SeqSBAIJSpooles",MatCreate_SeqSBAIJSpooles);
159: #endif
160: #if defined(PETSC_HAVE_SUPERLU)
161:   MatRegisterDynamic(MATSUPERLU,        path,"MatCreate_SuperLU",MatCreate_SuperLU);
162: #endif
163: #if defined(PETSC_HAVE_SUPERLU_DIST)
164:   MatRegisterDynamic(MATSUPERLU_DIST,   path,"MatCreate_SuperLU_DIST",MatCreate_SuperLU_DIST);
165: #endif
166: #if defined(PETSC_HAVE_UMFPACK)
167:   MatRegisterDynamic(MATUMFPACK,        path,"MatCreate_UMFPACK",MatCreate_UMFPACK);
168: #endif
169: #if defined(PETSC_HAVE_ESSL) && !defined(PETSC_USE_COMPLEX) && !defined(PETSC_USE_SINGLE) && !defined(PETSC_USE_MAT_SINGLE)
170:   MatRegisterDynamic(MATESSL,           path,"MatCreate_Essl",MatCreate_Essl);
171: #endif
172: #if defined(PETSC_HAVE_LUSOL)
173:   MatRegisterDynamic(MATLUSOL,          path,"MatCreate_LUSOL",MatCreate_LUSOL);
174: #endif
175: #if defined(PETSC_HAVE_MUMPS)
176:   MatRegisterDynamic(MATAIJMUMPS,       path,"MatCreate_AIJMUMPS",MatCreate_AIJMUMPS);
177:   MatRegisterDynamic(MATSBAIJMUMPS,     path,"MatCreate_SBAIJMUMPS",MatCreate_SBAIJMUMPS);
178: #endif
179: #if defined(PETSC_HAVE_DSCPACK)
180:   MatRegisterDynamic(MATDSCPACK,        path,"MatCreate_DSCPACK",MatCreate_DSCPACK);
181: #endif
182: #if defined(PETSC_HAVE_MATLAB_ENGINE)
183:   MatRegisterDynamic(MATMATLAB,         path,"MatCreate_Matlab",MatCreate_Matlab);
184: #endif
185: #if defined(PETSC_HAVE_PLAPACK)
186:   MatRegisterDynamic(MATPLAPACK,        path,"MatCreate_Plapack",MatCreate_Plapack);
187: #endif
188:   return(0);
189: }