Changeset 2060
- Timestamp:
- 09/01/09 14:11:25 (15 years ago)
- Location:
- issm/trunk/src/c/Solverx
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/Solverx/Solverx.cpp
r2042 r2060 20 20 /*Solver*/ 21 21 KSP ksp=NULL; 22 PC pc=NULL;23 22 int iteration_number; 24 23 PetscTruth flag; … … 40 39 PetscOptionsDetermineSolverType(&solver_type,solver_string); 41 40 42 /*obsolete? : */ 43 // if (solver_type==MUMPSPACKAGE_LU){ 44 // /*Convert Kff to MATTAIJMUMPS: */ 45 // MatConvert(Kff,MATAIJMUMPS,MAT_REUSE_MATRIX,&Kff); 46 // } 47 // if (solver_type==MUMPSPACKAGE_CHOL){ 48 // /*Convert Kff to MATTSBAIJMUMPS: */ 49 // MatConvert(Kff,MATSBAIJMUMPS,MAT_REUSE_MATRIX,&Kff); 50 // } 51 // if (solver_type==SPOOLESPACKAGE_LU){ 52 // /*Convert Kff to MATTSBAIJMUMPS: */ 53 // MatConvert(Kff,MATAIJSPOOLES,MAT_REUSE_MATRIX,&Kff); 54 // } 55 // if (solver_type==SPOOLESPACKAGE_CHOL){ 56 // /*Convert Kff to MATTSBAIJMUMPS: */ 57 // MatConvert(Kff,MATSBAIJSPOOLES,MAT_REUSE_MATRIX,&Kff); 58 // } 59 // if (solver_type==SUPERLUDISTPACKAGE){ 60 // /*Convert Kff to MATTSBAIJMUMPS: */ 61 // MatConvert(Kff,MATSUPERLU_DIST,MAT_REUSE_MATRIX,&Kff); 62 // } 63 // 41 if (solver_type==MUMPSPACKAGE_LU){ 42 /*Convert Kff to MATTAIJMUMPS: */ 43 MatConvert(Kff,MATAIJMUMPS,MAT_REUSE_MATRIX,&Kff); 44 } 45 if (solver_type==MUMPSPACKAGE_CHOL){ 46 /*Convert Kff to MATTSBAIJMUMPS: */ 47 MatConvert(Kff,MATSBAIJMUMPS,MAT_REUSE_MATRIX,&Kff); 48 } 49 if (solver_type==SPOOLESPACKAGE_LU){ 50 /*Convert Kff to MATTSBAIJMUMPS: */ 51 MatConvert(Kff,MATAIJSPOOLES,MAT_REUSE_MATRIX,&Kff); 52 } 53 if (solver_type==SPOOLESPACKAGE_CHOL){ 54 /*Convert Kff to MATTSBAIJMUMPS: */ 55 MatConvert(Kff,MATSBAIJSPOOLES,MAT_REUSE_MATRIX,&Kff); 56 } 57 if (solver_type==SUPERLUDISTPACKAGE){ 58 /*Convert Kff to MATTSBAIJMUMPS: */ 59 MatConvert(Kff,MATSUPERLU_DIST,MAT_REUSE_MATRIX,&Kff); 60 } 61 64 62 65 63 /*Prepare solver*/ … … 67 65 KSPSetOperators(ksp,Kff,Kff,DIFFERENT_NONZERO_PATTERN); 68 66 KSPSetFromOptions(ksp); 69 70 /*specific solver?: */71 KSPGetPC(ksp,&pc);72 if (solver_type==MUMPSPACKAGE_LU){73 PCFactorSetMatSolverPackage(pc,MAT_SOLVER_MUMPS);74 }75 67 76 68 /*If initial guess for solution, use it, except if we are using the MUMPS direct solver, where any initial
Note:
See TracChangeset
for help on using the changeset viewer.