Changeset 22560
- Timestamp:
- 03/18/18 20:55:21 (7 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Params/Parameters.cpp
r22558 r22560 658 658 /*In case we are using PETSC, we do not rely on issmoptions. Instead, we dump issmoptions into the Petsc 659 659 * options database: */ 660 661 #if _PETSC_MAJOR_ == 2662 PetscOptionsDestroy();663 PetscOptionsCreate();664 //PetscOptionsCheckInitial_Private();665 //PetscOptionsCheckInitial_Components();666 PetscOptionsSetFromOptions();667 PetscOptionsInsertMultipleString(options); //our patch668 #else669 660 #if (_PETSC_MINOR_>=7) 670 661 PetscOptionsSetFromOptions(NULL); … … 674 665 PetscOptionsClear(); 675 666 #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"); 679 671 680 672 #endif -
issm/trunk-jpl/src/c/toolkits/petsc/patches/NewMat.cpp
r15839 r22560 25 25 26 26 /*parameters: */ 27 double sparsity= .001; //default27 double sparsity=0.001; //default 28 28 int m,n; 29 29 int d_nz,o_nz,nnz; … … 114 114 MatGetType(outmatrix,&type); 115 115 116 #if _PETSC_MAJOR_ == 2117 if((strcmp(type,"mpiaij")==0) || (strcmp(type,"aijmumps")==0)){118 MatMPIAIJSetPreallocation(outmatrix,d_nz,NULL,o_nz,NULL);119 }120 #else121 116 if((strcmp(type,"mpiaij")==0) || (strcmp(type,"mpidense")==0)){ 122 117 MatMPIAIJSetPreallocation(outmatrix,d_nz,NULL,o_nz,NULL); 123 118 } 124 #endif125 119 126 120 return outmatrix;
Note:
See TracChangeset
for help on using the changeset viewer.