Actual source code: dlregismat.c

petsc-3.7.3 2016-08-01
Report Typos and Errors
  2: #include <petsc/private/matimpl.h>

  4: const char       *MatOptions[] = {"NEW_NONZERO_LOCATION_ERR",
  5:                                   "UNUSED_NONZERO_LOCATION_ERR",
  6:                                   "NEW_NONZERO_ALLOCATION_ERR",
  7:                                   "ROW_ORIENTED",
  8:                                   "NEW_NONZERO_LOCATIONS",
  9:                                   "SYMMETRIC",
 10:                                   "STRUCTURALLY_SYMMETRIC",
 11:                                   "NEW_DIAGONALS",
 12:                                   "IGNORE_OFF_PROC_ENTRIES",
 13:                                   "USE_HASH_TABLE",
 14:                                   "KEEP_NONZERO_PATTERN",
 15:                                   "IGNORE_ZERO_ENTRIES",
 16:                                   "USE_INODES",
 17:                                   "HERMITIAN",
 18:                                   "SYMMETRY_ETERNAL",
 19:                                   "DUMMY",
 20:                                   "IGNORE_LOWER_TRIANGULAR",
 21:                                   "ERROR_LOWER_TRIANGULAR",
 22:                                   "GETROW_UPPERTRIANGULAR",
 23:                                   "SPD",
 24:                                   "NO_OFF_PROC_ZERO_ROWS",
 25:                                   "NO_OFF_PROC_ENTRIES",
 26:                                   "NEW_NONZERO_LOCATIONS",
 27:                                   "MatOption","MAT_",0};
 28: const char *const MatFactorShiftTypes[] = {"NONE","NONZERO","POSITIVE_DEFINITE","INBLOCKS","MatFactorShiftType","PC_FACTOR_",0};
 29: const char *const MatFactorShiftTypesDetail[] = {NULL,"diagonal shift to prevent zero pivot","Manteuffel shift","diagonal shift on blocks to prevent zero pivot"};
 30: const char *const MPPTScotchStrategyTypes[] = {"QUALITY","SPEED","BALANCE","SAFETY","SCALABILITY","MPPTScotchStrategyType","MP_PTSCOTCH_",0};
 31: const char *const MPChacoGlobalTypes[] = {"","MULTILEVEL","SPECTRAL","","LINEAR","RANDOM","SCATTERED","MPChacoGlobalType","MP_CHACO_",0};
 32: const char *const MPChacoLocalTypes[] = {"","KERNIGHAN","NONE","MPChacoLocalType","MP_CHACO_",0};
 33: const char *const MPChacoEigenTypes[] = {"LANCZOS","RQI","MPChacoEigenType","MP_CHACO_",0};

 35: extern PetscErrorCode  MatMFFDInitializePackage(void);
 36: extern PetscErrorCode  MatSolverPackageDestroy(void);
 37: static PetscBool MatPackageInitialized = PETSC_FALSE;
 40: /*@C
 41:   MatFinalizePackage - This function destroys everything in the Petsc interface to the Mat package. It is
 42:   called from PetscFinalize().

 44:   Level: developer

 46: .keywords: Petsc, destroy, package, mathematica
 47: .seealso: PetscFinalize()
 48: @*/
 49: PetscErrorCode  MatFinalizePackage(void)
 50: {
 51:   MatBaseName    nnames,names = MatBaseNameList;

 55:   MatSolverPackageDestroy();
 56:   while (names) {
 57:     nnames = names->next;
 58:     PetscFree(names->bname);
 59:     PetscFree(names->sname);
 60:     PetscFree(names->mname);
 61:     PetscFree(names);
 62:     names  = nnames;
 63:   }
 64:   PetscFunctionListDestroy(&MatList);
 65:   PetscFunctionListDestroy(&MatOrderingList);
 66:   PetscFunctionListDestroy(&MatColoringList);
 67:   PetscFunctionListDestroy(&MatPartitioningList);
 68:   PetscFunctionListDestroy(&MatCoarsenList);
 69:   MatBaseNameList                  = NULL;
 70:   MatPackageInitialized            = PETSC_FALSE;
 71:   MatRegisterAllCalled             = PETSC_FALSE;
 72:   MatOrderingRegisterAllCalled     = PETSC_FALSE;
 73:   MatColoringRegisterAllCalled     = PETSC_FALSE;
 74:   MatPartitioningRegisterAllCalled = PETSC_FALSE;
 75:   MatCoarsenRegisterAllCalled      = PETSC_FALSE;
 76:   return(0);
 77: }

 79: #if defined(PETSC_HAVE_MUMPS)
 80: PETSC_EXTERN PetscErrorCode MatSolverPackageRegister_MUMPS(void);
 81: #endif
 82: #if defined(PETSC_HAVE_VECCUDA)
 83: PETSC_EXTERN PetscErrorCode MatSolverPackageRegister_CUSPARSE(void);
 84: #endif
 85: #if defined(PETSC_HAVE_ELEMENTAL)
 86: PETSC_EXTERN PetscErrorCode MatSolverPackageRegister_Elemental(void);
 87: #endif
 88: #if defined(PETSC_HAVE_MATLAB_ENGINE)
 89: PETSC_EXTERN PetscErrorCode MatSolverPackageRegister_Matlab(void);
 90: #endif
 91: #if defined(PETSC_HAVE_PETSC_HAVE_ESSL) && !defined(PETSC_USE_COMPLEX) && !defined(PETSC_USE_REAL_SINGLE) && !defined(PETSC_USE_REAL___FLOAT128)
 92: PETSC_EXTERN PetscErrorCode MatSolverPackageRegister_Essl(void);
 93: #endif
 94: #if defined(PETSC_HAVE_SUPERLU)
 95: PETSC_EXTERN PetscErrorCode MatSolverPackageRegister_SuperLU(void);
 96: #endif
 97: #if defined(PETSC_HAVE_PASTIX)
 98: PETSC_EXTERN PetscErrorCode MatSolverPackageRegister_Pastix(void);
 99: #endif
100: #if defined(PETSC_HAVE_SUPERLU_DIST)
101: PETSC_EXTERN PetscErrorCode MatSolverPackageRegister_SuperLU_DIST(void);
102: #endif
103: #if defined(PETSC_HAVE_CLIQUE)
104: PETSC_EXTERN PetscErrorCode MatSolverPackageRegister_Clique(void);
105: #endif
106: #if defined(PETSC_HAVE_MKL_PARDISO)
107: PETSC_EXTERN PetscErrorCode MatSolverPackageRegister_MKL_Pardiso(void);
108: #endif
109: #if defined(PETSC_HAVE_MKL_CPARDISO)
110: PETSC_EXTERN PetscErrorCode MatSolverPackageRegister_MKL_CPardiso(void);
111: #endif
112: #if defined(PETSC_HAVE_SUITESPARSE)
113: PETSC_EXTERN PetscErrorCode MatSolverPackageRegister_SuiteSparse(void);
114: #endif
115: #if defined(PETSC_HAVE_LUSOL)
116: PETSC_EXTERN PetscErrorCode MatSolverPackageRegister_Lusol(void);
117: #endif

119: PETSC_INTERN PetscErrorCode MatGetFactor_seqaij_petsc(Mat,MatFactorType,Mat*);
120: PETSC_INTERN PetscErrorCode MatGetFactor_seqbaij_petsc(Mat,MatFactorType,Mat*);
121: PETSC_INTERN PetscErrorCode MatGetFactor_seqsbaij_petsc(Mat,MatFactorType,Mat*);
122: PETSC_INTERN PetscErrorCode MatGetFactor_seqdense_petsc(Mat,MatFactorType,Mat*);
123: PETSC_INTERN PetscErrorCode MatGetFactor_seqaij_bas(Mat,MatFactorType,Mat*);
124: PETSC_INTERN PetscErrorCode MatGetFactor_seqbaij_bstrm(Mat,MatFactorType,Mat*);
125: PETSC_INTERN PetscErrorCode MatGetFactor_seqsbaij_sbstrm(Mat,MatFactorType,Mat*);

129: /*@C
130:   MatInitializePackage - This function initializes everything in the Mat package. It is called
131:   from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to MatCreate()
132:   when using static libraries.

134:   Level: developer

136: .keywords: Mat, initialize, package
137: .seealso: PetscInitialize()
138: @*/
139: PetscErrorCode  MatInitializePackage(void)
140: {
141:   char           logList[256];
142:   char           *className;
143:   PetscBool      opt;

147:   if (MatPackageInitialized) return(0);
148:   MatPackageInitialized = PETSC_TRUE;
149:   /* Inialize subpackage */
150:   MatMFFDInitializePackage();
151:   /* Register Classes */
152:   PetscClassIdRegister("Matrix",&MAT_CLASSID);
153:   PetscClassIdRegister("Matrix FD Coloring",&MAT_FDCOLORING_CLASSID);
154:   PetscClassIdRegister("Matrix Coloring",&MAT_COLORING_CLASSID);
155:   PetscClassIdRegister("Matrix MatTranspose Coloring",&MAT_TRANSPOSECOLORING_CLASSID);
156:   PetscClassIdRegister("Matrix Partitioning",&MAT_PARTITIONING_CLASSID);
157:   PetscClassIdRegister("Matrix Coarsen",&MAT_COARSEN_CLASSID);
158:   PetscClassIdRegister("Matrix Null Space",&MAT_NULLSPACE_CLASSID);
159:   /* Register Constructors */
160:   MatRegisterAll();
161:   MatOrderingRegisterAll();
162:   MatColoringRegisterAll();
163:   MatPartitioningRegisterAll();
164:   MatCoarsenRegisterAll();
165:   /* Register Events */
166:   PetscLogEventRegister("MatMult",          MAT_CLASSID,&MAT_Mult);
167:   PetscLogEventRegister("MatMults",         MAT_CLASSID,&MAT_Mults);
168:   PetscLogEventRegister("MatMultConstr",    MAT_CLASSID,&MAT_MultConstrained);
169:   PetscLogEventRegister("MatMultAdd",       MAT_CLASSID,&MAT_MultAdd);
170:   PetscLogEventRegister("MatMultTranspose", MAT_CLASSID,&MAT_MultTranspose);
171:   PetscLogEventRegister("MatMultTrConstr",  MAT_CLASSID,&MAT_MultTransposeConstrained);
172:   PetscLogEventRegister("MatMultTrAdd",     MAT_CLASSID,&MAT_MultTransposeAdd);
173:   PetscLogEventRegister("MatSolve",         MAT_CLASSID,&MAT_Solve);
174:   PetscLogEventRegister("MatSolves",        MAT_CLASSID,&MAT_Solves);
175:   PetscLogEventRegister("MatSolveAdd",      MAT_CLASSID,&MAT_SolveAdd);
176:   PetscLogEventRegister("MatSolveTranspos", MAT_CLASSID,&MAT_SolveTranspose);
177:   PetscLogEventRegister("MatSolveTrAdd",    MAT_CLASSID,&MAT_SolveTransposeAdd);
178:   PetscLogEventRegister("MatSOR",           MAT_CLASSID,&MAT_SOR);
179:   PetscLogEventRegister("MatForwardSolve",  MAT_CLASSID,&MAT_ForwardSolve);
180:   PetscLogEventRegister("MatBackwardSolve", MAT_CLASSID,&MAT_BackwardSolve);
181:   PetscLogEventRegister("MatLUFactor",      MAT_CLASSID,&MAT_LUFactor);
182:   PetscLogEventRegister("MatLUFactorSym",   MAT_CLASSID,&MAT_LUFactorSymbolic);
183:   PetscLogEventRegister("MatLUFactorNum",   MAT_CLASSID,&MAT_LUFactorNumeric);
184:   PetscLogEventRegister("MatCholeskyFctr",  MAT_CLASSID,&MAT_CholeskyFactor);
185:   PetscLogEventRegister("MatCholFctrSym",   MAT_CLASSID,&MAT_CholeskyFactorSymbolic);
186:   PetscLogEventRegister("MatCholFctrNum",   MAT_CLASSID,&MAT_CholeskyFactorNumeric);
187:   PetscLogEventRegister("MatILUFactor",     MAT_CLASSID,&MAT_ILUFactor);
188:   PetscLogEventRegister("MatILUFactorSym",  MAT_CLASSID,&MAT_ILUFactorSymbolic);
189:   PetscLogEventRegister("MatICCFactorSym",  MAT_CLASSID,&MAT_ICCFactorSymbolic);
190:   PetscLogEventRegister("MatCopy",          MAT_CLASSID,&MAT_Copy);
191:   PetscLogEventRegister("MatConvert",       MAT_CLASSID,&MAT_Convert);
192:   PetscLogEventRegister("MatScale",         MAT_CLASSID,&MAT_Scale);
193:   PetscLogEventRegister("MatResidual",      MAT_CLASSID,&MAT_Residual);
194:   PetscLogEventRegister("MatAssemblyBegin", MAT_CLASSID,&MAT_AssemblyBegin);
195:   PetscLogEventRegister("MatAssemblyEnd",   MAT_CLASSID,&MAT_AssemblyEnd);
196:   PetscLogEventRegister("MatSetValues",     MAT_CLASSID,&MAT_SetValues);
197:   PetscLogEventRegister("MatGetValues",     MAT_CLASSID,&MAT_GetValues);
198:   PetscLogEventRegister("MatGetRow",        MAT_CLASSID,&MAT_GetRow);
199:   PetscLogEventRegister("MatGetRowIJ",      MAT_CLASSID,&MAT_GetRowIJ);
200:   PetscLogEventRegister("MatGetSubMatrice", MAT_CLASSID,&MAT_GetSubMatrices);
201:   PetscLogEventRegister("MatGetSubMatrix",  MAT_CLASSID,&MAT_GetSubMatrix);
202:   PetscLogEventRegister("MatGetOrdering",   MAT_CLASSID,&MAT_GetOrdering);
203:   PetscLogEventRegister("MatIncreaseOvrlp", MAT_CLASSID,&MAT_IncreaseOverlap);
204:   PetscLogEventRegister("MatPartitioning",  MAT_PARTITIONING_CLASSID,&MAT_Partitioning);
205:   PetscLogEventRegister("MatCoarsen",  MAT_COARSEN_CLASSID,&MAT_Coarsen);
206:   PetscLogEventRegister("MatZeroEntries",   MAT_CLASSID,&MAT_ZeroEntries);
207:   PetscLogEventRegister("MatLoad",          MAT_CLASSID,&MAT_Load);
208:   PetscLogEventRegister("MatView",          MAT_CLASSID,&MAT_View);
209:   PetscLogEventRegister("MatAXPY",          MAT_CLASSID,&MAT_AXPY);
210:   PetscLogEventRegister("MatFDColorCreate", MAT_FDCOLORING_CLASSID,&MAT_FDColoringCreate);
211:   PetscLogEventRegister("MatFDColorSetUp",  MAT_FDCOLORING_CLASSID,&MAT_FDColoringSetUp);
212:   PetscLogEventRegister("MatFDColorApply",  MAT_FDCOLORING_CLASSID,&MAT_FDColoringApply);
213:   PetscLogEventRegister("MatFDColorFunc",   MAT_FDCOLORING_CLASSID,&MAT_FDColoringFunction);
214:   PetscLogEventRegister("MatTranspose",     MAT_CLASSID,&MAT_Transpose);
215:   PetscLogEventRegister("MatMatMult",       MAT_CLASSID,&MAT_MatMult);
216:   PetscLogEventRegister("MatMatSolve",      MAT_CLASSID,&MAT_MatSolve);
217:   PetscLogEventRegister("MatMatMultSym",    MAT_CLASSID,&MAT_MatMultSymbolic);
218:   PetscLogEventRegister("MatMatMultNum",    MAT_CLASSID,&MAT_MatMultNumeric);
219:   PetscLogEventRegister("MatMatMatMult",    MAT_CLASSID,&MAT_MatMatMult);
220:   PetscLogEventRegister("MatMatMatMultSym", MAT_CLASSID,&MAT_MatMatMultSymbolic);
221:   PetscLogEventRegister("MatMatMatMultNum", MAT_CLASSID,&MAT_MatMatMultNumeric);
222:   PetscLogEventRegister("MatPtAP",          MAT_CLASSID,&MAT_PtAP);
223:   PetscLogEventRegister("MatPtAPSymbolic",  MAT_CLASSID,&MAT_PtAPSymbolic);
224:   PetscLogEventRegister("MatPtAPNumeric",   MAT_CLASSID,&MAT_PtAPNumeric);
225:   PetscLogEventRegister("MatRARt",          MAT_CLASSID,&MAT_RARt);
226:   PetscLogEventRegister("MatRARtSym",       MAT_CLASSID,&MAT_RARtSymbolic);
227:   PetscLogEventRegister("MatRARtNum",       MAT_CLASSID,&MAT_RARtNumeric);
228:   PetscLogEventRegister("MatMatTransMult",  MAT_CLASSID,&MAT_MatTransposeMult);
229:   PetscLogEventRegister("MatMatTrnMultSym", MAT_CLASSID,&MAT_MatTransposeMultSymbolic);
230:   PetscLogEventRegister("MatMatTrnMultNum", MAT_CLASSID,&MAT_MatTransposeMultNumeric);
231:   PetscLogEventRegister("MatTrnMatMult",    MAT_CLASSID,&MAT_TransposeMatMult);
232:   PetscLogEventRegister("MatTrnMatMultSym", MAT_CLASSID,&MAT_TransposeMatMultSymbolic);
233:   PetscLogEventRegister("MatTrnMatMultNum", MAT_CLASSID,&MAT_TransposeMatMultNumeric);
234:   PetscLogEventRegister("MatTrnColorCreate", MAT_CLASSID,&MAT_TransposeColoringCreate);
235:   PetscLogEventRegister("MatRedundantMat",  MAT_CLASSID,&MAT_RedundantMat);
236:   PetscLogEventRegister("MatGetSeqNZStrct", MAT_CLASSID,&MAT_GetSequentialNonzeroStructure);
237:   PetscLogEventRegister("MatGetMultiProcBlock", MAT_CLASSID,&MAT_GetMultiProcBlock);

239:   /* these may be specific to MPIAIJ matrices */
240:   PetscLogEventRegister("MatMPISumSeqNumeric",MAT_CLASSID,&MAT_Seqstompinum);
241:   PetscLogEventRegister("MatMPISumSeqSymbolic",MAT_CLASSID,&MAT_Seqstompisym);
242:   PetscLogEventRegister("MatMPISumSeq",MAT_CLASSID,&MAT_Seqstompi);
243:   PetscLogEventRegister("MatMPIConcateSeq",MAT_CLASSID,&MAT_Merge);
244:   PetscLogEventRegister("MatGetLocalMat",MAT_CLASSID,&MAT_Getlocalmat);
245:   PetscLogEventRegister("MatGetLocalMatCondensed",MAT_CLASSID,&MAT_Getlocalmatcondensed);
246:   PetscLogEventRegister("MatGetBrowsOfAcols",MAT_CLASSID,&MAT_GetBrowsOfAcols);
247:   PetscLogEventRegister("MatGetBrAoCol",MAT_CLASSID,&MAT_GetBrowsOfAocols);

249:   PetscLogEventRegister("MatApplyPAPt_Symbolic",MAT_CLASSID,&MAT_Applypapt_symbolic);
250:   PetscLogEventRegister("MatApplyPAPt_Numeric",MAT_CLASSID,&MAT_Applypapt_numeric);
251:   PetscLogEventRegister("MatApplyPAPt",MAT_CLASSID,&MAT_Applypapt);

253:   PetscLogEventRegister("MatGetSymTrans",MAT_CLASSID,&MAT_Getsymtranspose);
254:   PetscLogEventRegister("MatGetSymTransR",MAT_CLASSID,&MAT_Getsymtransreduced);
255:   PetscLogEventRegister("MatTranspose_SeqAIJ_FAST",MAT_CLASSID,&MAT_Transpose_SeqAIJ);
256:   PetscLogEventRegister("MatCUSPCopyTo",MAT_CLASSID,&MAT_CUSPCopyToGPU);
257:   PetscLogEventRegister("MatCUSPARSECopyTo",MAT_CLASSID,&MAT_CUSPARSECopyToGPU);
258:   PetscLogEventRegister("MatViennaCLCopyTo",MAT_CLASSID,&MAT_ViennaCLCopyToGPU);
259:   PetscLogEventRegister("MatSetValBatch",MAT_CLASSID,&MAT_SetValuesBatch);
260:   PetscLogEventRegister("MatSetValBatch1",MAT_CLASSID,&MAT_SetValuesBatchI);
261:   PetscLogEventRegister("MatSetValBatch2",MAT_CLASSID,&MAT_SetValuesBatchII);
262:   PetscLogEventRegister("MatSetValBatch3",MAT_CLASSID,&MAT_SetValuesBatchIII);
263:   PetscLogEventRegister("MatSetValBatch4",MAT_CLASSID,&MAT_SetValuesBatchIV);

265:   PetscLogEventRegister("MatColoringApply",MAT_COLORING_CLASSID,&Mat_Coloring_Apply);
266:   PetscLogEventRegister("MatColoringComm",MAT_COLORING_CLASSID,&Mat_Coloring_Comm);
267:   PetscLogEventRegister("MatColoringLocal",MAT_COLORING_CLASSID,&Mat_Coloring_Local);
268:   PetscLogEventRegister("MatColoringIS",MAT_COLORING_CLASSID,&Mat_Coloring_ISCreate);
269:   PetscLogEventRegister("MatColoringSetUp",MAT_COLORING_CLASSID,&Mat_Coloring_SetUp);
270:   PetscLogEventRegister("MatColoringWeights",MAT_COLORING_CLASSID,&Mat_Coloring_Weights);

272:   /* Turn off high traffic events by default */
273:   PetscLogEventSetActiveAll(MAT_SetValues, PETSC_FALSE);
274:   /* Process info exclusions */
275:   PetscOptionsGetString(NULL,NULL, "-info_exclude", logList, 256, &opt);
276:   if (opt) {
277:     PetscStrstr(logList, "mat", &className);
278:     if (className) {
279:       PetscInfoDeactivateClass(MAT_CLASSID);
280:     }
281:   }
282:   /* Process summary exclusions */
283:   PetscOptionsGetString(NULL,NULL, "-log_exclude", logList, 256, &opt);
284:   if (opt) {
285:     PetscStrstr(logList, "mat", &className);
286:     if (className) {
287:       PetscLogEventDeactivateClass(MAT_CLASSID);
288:     }
289:   }

291:   /* Register the PETSc built in factorization based solvers */
292:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQAIJ,        MAT_FACTOR_LU,MatGetFactor_seqaij_petsc);
293:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQAIJ,        MAT_FACTOR_CHOLESKY,MatGetFactor_seqaij_petsc);
294:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQAIJ,        MAT_FACTOR_ILU,MatGetFactor_seqaij_petsc);
295:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQAIJ,        MAT_FACTOR_ICC,MatGetFactor_seqaij_petsc);

297:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQAIJPERM,    MAT_FACTOR_LU,MatGetFactor_seqaij_petsc);
298:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQAIJPERM,    MAT_FACTOR_CHOLESKY,MatGetFactor_seqaij_petsc);
299:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQAIJPERM,    MAT_FACTOR_ILU,MatGetFactor_seqaij_petsc);
300:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQAIJPERM,    MAT_FACTOR_ICC,MatGetFactor_seqaij_petsc);

302:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQAIJCRL,     MAT_FACTOR_LU,MatGetFactor_seqaij_petsc);
303:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQAIJCRL,     MAT_FACTOR_CHOLESKY,MatGetFactor_seqaij_petsc);
304:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQAIJCRL,     MAT_FACTOR_ILU,MatGetFactor_seqaij_petsc);
305:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQAIJCRL,     MAT_FACTOR_ICC,MatGetFactor_seqaij_petsc);

307:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQBAIJ,       MAT_FACTOR_LU,MatGetFactor_seqbaij_petsc);
308:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQBAIJ,       MAT_FACTOR_CHOLESKY,MatGetFactor_seqbaij_petsc);
309:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQBAIJ,       MAT_FACTOR_ILU,MatGetFactor_seqbaij_petsc);
310:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQBAIJ,       MAT_FACTOR_ICC,MatGetFactor_seqbaij_petsc);

312:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQSBAIJ,      MAT_FACTOR_CHOLESKY,MatGetFactor_seqsbaij_petsc);
313:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQSBAIJ,      MAT_FACTOR_ICC,MatGetFactor_seqsbaij_petsc);

315:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQDENSE,      MAT_FACTOR_LU,MatGetFactor_seqdense_petsc);
316:   MatSolverPackageRegister(MATSOLVERPETSC, MATSEQDENSE,      MAT_FACTOR_CHOLESKY,MatGetFactor_seqdense_petsc);

318:   MatSolverPackageRegister(MATSOLVERBAS,   MATSEQAIJ,        MAT_FACTOR_ICC,MatGetFactor_seqaij_bas);
319:   MatSolverPackageRegister(MATSOLVERBSTRM, MATSEQBAIJ,       MAT_FACTOR_LU,MatGetFactor_seqbaij_bstrm);
320:   MatSolverPackageRegister(MATSOLVERBSTRM, MATSEQBAIJ,       MAT_FACTOR_ILU,MatGetFactor_seqbaij_bstrm);
321:   MatSolverPackageRegister(MATSOLVERSBSTRM,MATSEQSBAIJ,      MAT_FACTOR_CHOLESKY,MatGetFactor_seqsbaij_sbstrm);
322:   MatSolverPackageRegister(MATSOLVERSBSTRM,MATSEQSBAIJ,      MAT_FACTOR_ICC,MatGetFactor_seqsbaij_sbstrm);

324:   /*
325:      Register the external package factorization based solvers
326:         Eventually we don't want to have these hardwired here at compile time of PETSc
327:   */
328: #if defined(PETSC_HAVE_MUMPS)
329:   MatSolverPackageRegister_MUMPS();
330: #endif
331: #if defined(PETSC_HAVE_VECCUDA)
332:   MatSolverPackageRegister_CUSPARSE();
333: #endif
334: #if defined(PETSC_HAVE_ELEMENTAL)
335:   MatSolverPackageRegister_Elemental();
336: #endif
337: #if defined(PETSC_HAVE_MATLAB_ENGINE)
338:   MatSolverPackageRegister_Matlab();
339: #endif
340: #if defined(PETSC_HAVE_PETSC_HAVE_ESSL) && !defined(PETSC_USE_COMPLEX) && !defined(PETSC_USE_REAL_SINGLE) && !defined(PETSC_USE_REAL___FLOAT128)
341:   MatSolverPackageRegister_Essl();
342: #endif
343: #if defined(PETSC_HAVE_SUPERLU)
344:   MatSolverPackageRegister_SuperLU();
345: #endif
346: #if defined(PETSC_HAVE_PASTIX)
347:   MatSolverPackageRegister_Pastix();
348: #endif
349: #if defined(PETSC_HAVE_SUPERLU_DIST)
350:   MatSolverPackageRegister_SuperLU_DIST();
351: #endif
352: #if defined(PETSC_HAVE_CLIQUE)
353:   MatSolverPackageRegister_Clique();
354: #endif
355: #if defined(PETSC_HAVE_MKL_PARDISO)
356:   MatSolverPackageRegister_MKL_Pardiso();
357: #endif
358: #if defined(PETSC_HAVE_MKL_CPARDISO)
359:   MatSolverPackageRegister_MKL_CPardiso();
360: #endif
361: #if defined(PETSC_HAVE_SUITESPARSE)
362:   MatSolverPackageRegister_SuiteSparse();
363: #endif
364: #if defined(PETSC_HAVE_LUSOL)
365:   MatSolverPackageRegister_Lusol();
366: #endif
367: #if defined(PETSC_HAVE_CLIQUE)
368:   MatSolverPackageRegister_Clique();
369: #endif

371:   PetscRegisterFinalize(MatFinalizePackage);
372:   return(0);
373: }

375: #if defined(PETSC_HAVE_DYNAMIC_LIBRARIES)
378: /*
379:   PetscDLLibraryRegister - This function is called when the dynamic library it is in is opened.

381:   This one registers all the matrix methods that are in the basic PETSc Matrix library.

383:  */
384: PETSC_EXTERN PetscErrorCode PetscDLLibraryRegister_petscmat(void)
385: {

389:   MatInitializePackage();
390:   return(0);
391: }


394: #endif /* PETSC_HAVE_DYNAMIC_LIBRARIES */