Changeset 2060


Ignore:
Timestamp:
09/01/09 14:11:25 (15 years ago)
Author:
Eric.Larour
Message:

Reverting to petsc 2

Location:
issm/trunk/src/c/Solverx
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/Solverx/Solverx.cpp

    r2042 r2060  
    2020        /*Solver*/
    2121        KSP ksp=NULL;
    22         PC  pc=NULL;
    2322        int iteration_number;
    2423        PetscTruth flag;
     
    4039        PetscOptionsDetermineSolverType(&solver_type,solver_string);
    4140
    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
    6462
    6563        /*Prepare solver*/
     
    6765        KSPSetOperators(ksp,Kff,Kff,DIFFERENT_NONZERO_PATTERN);
    6866        KSPSetFromOptions(ksp);
    69 
    70         /*specific solver?: */
    71         KSPGetPC(ksp,&pc);
    72         if (solver_type==MUMPSPACKAGE_LU){
    73                 PCFactorSetMatSolverPackage(pc,MAT_SOLVER_MUMPS);
    74         }
    7567
    7668        /*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.