Changeset 20553
- Timestamp:
- 04/25/16 16:39:30 (9 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Params/Parameters.cpp
r19254 r20553 560 560 PetscOptionsInsertMultipleString(options); //our patch 561 561 #else 562 #if (_PETSC_MINOR_>=7) 563 PetscOptionsSetFromOptions(NULL); 564 PetscOptionsClear(NULL); 565 #else 562 566 PetscOptionsSetFromOptions(); 563 567 PetscOptionsClear(); 568 #endif 564 569 //PetscOptionsSetFromOptions(); 565 570 PetscOptionsInsertMultipleString(options); //our patch -
issm/trunk-jpl/src/c/cores/controltao_core.cpp
r19345 r20553 36 36 int num_controls,solution_type; 37 37 int maxsteps,maxiter; 38 IssmDouble fatol,frtol,gatol,grtol,gttol;38 IssmDouble gatol,grtol,gttol; 39 39 AppCtx user; 40 40 #if defined (_HAVE_PETSC_) && (_PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 5) … … 64 64 femmodel->parameters->FindParam(&maxsteps,InversionMaxstepsEnum); 65 65 femmodel->parameters->FindParam(&maxiter,InversionMaxiterEnum); 66 femmodel->parameters->FindParam(&fatol,InversionFatolEnum);67 femmodel->parameters->FindParam(&frtol,InversionFrtolEnum);68 66 femmodel->parameters->FindParam(&gatol,InversionGatolEnum); 69 67 femmodel->parameters->FindParam(&grtol,InversionGrtolEnum); … … 85 83 TaoSetMaximumFunctionEvaluations(tao,maxiter); 86 84 TaoSetMaximumIterations(tao,maxsteps); 87 TaoSetTolerances(tao,fatol,frtol,gatol,grtol,gttol); 85 #if (_PETSC_MAJOR_==3) && (_PETSC_MINOR_<7) 86 TaoSetTolerances(tao,0,0,gatol,grtol,gttol); 87 #else 88 TaoSetTolerances(tao,gatol,grtol,gttol); 89 #endif 88 90 89 91 GetVectorFromControlInputsx(&X, femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,"value"); -
issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscSolver.cpp
r18223 r20553 64 64 if(VerboseSolver())PetscOptionsPrint(stdout); 65 65 #else 66 if(VerboseSolver())PetscOptionsView(PETSC_VIEWER_STDOUT_WORLD); 66 #if _PETSC_MINOR_<7 67 if(VerboseSolver())PetscOptionsView(PETSC_VIEWER_STDOUT_WORLD); 68 #else 69 if(VerboseSolver())PetscOptionsView(NULL,PETSC_VIEWER_STDOUT_WORLD); 70 #endif 67 71 #endif 68 72 … … 77 81 /*Now, check that we are not giving an initial guess to the solver, if we are running a direct solver: */ 78 82 #if _PETSC_MAJOR_ >= 3 79 PetscOptionsGetString(PETSC_NULL,"-ksp_type",ksp_type,49,&flg); 83 #if _PETSC_MINOR_<7 84 PetscOptionsGetString(PETSC_NULL,"-ksp_type",ksp_type,49,&flg); 85 #else 86 PetscOptionsGetString(NULL,PETSC_NULL,"-ksp_type",ksp_type,49,&flg); 87 #endif 80 88 if (strcmp(ksp_type,"preonly")==0)uf0=NULL; 81 89 #endif -
issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscOptionsDetermineSolverType.cpp
r15564 r20553 31 31 32 32 /*retrieve mat_type option: */ 33 #if (_PETSC_MAJOR_==3) && (_PETSC_MINOR_>=7) 34 PetscOptionsGetString(NULL,PETSC_NULL,"-mat_type",&option[0],100,&flag); 35 #else 33 36 PetscOptionsGetString(PETSC_NULL,"-mat_type",&option[0],100,&flag); 37 #endif 34 38 35 39 if (strcmp(option,"aijmumps")==0){ … … 53 57 54 58 #if _PETSC_MAJOR_ >= 3 55 PetscOptionsGetString(PETSC_NULL,"-pc_factor_mat_solver_package",&option[0],100,&flag); 59 #if (_PETSC_MINOR_>=7) 60 PetscOptionsGetString(NULL,PETSC_NULL,"-pc_factor_mat_solver_package",&option[0],100,&flag); 61 #else 62 PetscOptionsGetString(PETSC_NULL,"-pc_factor_mat_solver_package",&option[0],100,&flag); 63 #endif 56 64 if (strcmp(option,"mumps")==0){ 57 65 solver_type=MUMPSPACKAGE_LU; … … 59 67 #endif 60 68 69 #if (_PETSC_MAJOR_==3) && (_PETSC_MINOR_>=7) 70 PetscOptionsGetString(NULL,PETSC_NULL,"-issm_option_solver",&option[0],100,&flag); 71 #else 61 72 PetscOptionsGetString(PETSC_NULL,"-issm_option_solver",&option[0],100,&flag); 73 #endif 62 74 if (strcmp(option,"FS")==0){ 63 75 solver_type=FSSolverEnum; -
issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscOptionsInsertMultipleString.cpp
r14917 r20553 56 56 len--; first[len] = 0; 57 57 } 58 #if _PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 7 58 59 PetscOptionsSetValue(first,second); 60 #else 61 PetscOptionsSetValue(NULL,first,second); 62 #endif 59 63 break; 60 64 } … … 67 71 len--; first[len] = 0; 68 72 } 73 #if _PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 7 69 74 PetscOptionsSetValue(first,NULL); 75 #else 76 PetscOptionsSetValue(NULL,first,NULL); 77 #endif 70 78 /*Preparing next loop step*/ 71 79 first=second; … … 78 86 len--; second[len] = 0; 79 87 } 88 #if _PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 7 80 89 PetscOptionsSetValue(first,second); 90 #else 91 PetscOptionsSetValue(NULL,first,second); 92 #endif 81 93 first_token=1; 82 94 }
Note:
See TracChangeset
for help on using the changeset viewer.