Changeset 22560


Ignore:
Timestamp:
03/18/18 20:55:21 (7 years ago)
Author:
Mathieu Morlighem
Message:

CHG: cleanup, forget about PETSc 2 now

Location:
issm/trunk-jpl/src/c
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Params/Parameters.cpp

    r22558 r22560  
    658658                /*In case we are using PETSC, we do not rely on issmoptions. Instead, we dump issmoptions into the Petsc
    659659                 * options database: */
    660 
    661                 #if _PETSC_MAJOR_ == 2
    662                 PetscOptionsDestroy();
    663                 PetscOptionsCreate();
    664                 //PetscOptionsCheckInitial_Private();
    665                 //PetscOptionsCheckInitial_Components();
    666                 PetscOptionsSetFromOptions();
    667                 PetscOptionsInsertMultipleString(options); //our patch
    668                 #else
    669660                #if (_PETSC_MINOR_>=7)
    670661                PetscOptionsSetFromOptions(NULL);
     
    674665                PetscOptionsClear();
    675666                #endif
    676                 //PetscOptionsSetFromOptions();
    677                 PetscOptionsInsertMultipleString(options); //our patch
    678                 #endif
     667                int ierr = PetscOptionsInsertString(NULL,options);
     668                //int ierr = PetscOptionsInsertString(NULL,"-mat_type mpiaij -ksp_type preonly -pc_type lu -pc_factor_mat_solver_package mumps -mat_mumps_icntl_14 120 -mat_mumps_icntl_28 2 -mat_mumps_icntl_29 2");
     669                //int ierr = PetscOptionsInsertString(NULL,"-mat_type mpiaij -ksp_type preonly -pc_type lu -pc_factor_mat_solver_package mumps -mat_mumps_icntl_14 120");
     670                if(ierr) _error_("Could not enter PETSc options");
    679671
    680672        #endif
  • issm/trunk-jpl/src/c/toolkits/petsc/patches/NewMat.cpp

    r15839 r22560  
    2525
    2626        /*parameters: */
    27         double sparsity=.001; //default
     27        double sparsity=0.001; //default
    2828        int    m,n;
    2929        int    d_nz,o_nz,nnz;
     
    114114        MatGetType(outmatrix,&type);
    115115
    116         #if _PETSC_MAJOR_ == 2
    117         if((strcmp(type,"mpiaij")==0) || (strcmp(type,"aijmumps")==0)){
    118                 MatMPIAIJSetPreallocation(outmatrix,d_nz,NULL,o_nz,NULL);
    119         }
    120         #else
    121116        if((strcmp(type,"mpiaij")==0) || (strcmp(type,"mpidense")==0)){
    122117                MatMPIAIJSetPreallocation(outmatrix,d_nz,NULL,o_nz,NULL);
    123118        }
    124         #endif
    125119
    126120        return outmatrix;
Note: See TracChangeset for help on using the changeset viewer.