Changeset 23670 for issm/trunk-jpl/src/py3/solvers/mumpsoptions.py
- Timestamp:
- 01/31/19 07:34:11 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/py3/solvers/mumpsoptions.py
r19895 r23670 3 3 from IssmConfig import IssmConfig 4 4 5 def mumpsoptions(* *kwargs):5 def mumpsoptions(*args): 6 6 """ 7 7 MUMPSOPTIONS - return MUMPS direct solver petsc options … … 12 12 13 13 #retrieve options provided in varargin 14 options=pairoptions.pairoptions(* *kwargs)14 options=pairoptions.pairoptions(*args) 15 15 mumps=OrderedDict() 16 16 17 17 #default mumps options 18 PETSC_VERSION=IssmConfig('_PETSC_MAJOR_')[0] 19 if PETSC_VERSION==2.: 18 PETSC_MAJOR=IssmConfig('_PETSC_MAJOR_')[0] 19 PETSC_MINOR=IssmConfig('_PETSC_MINOR_')[0] 20 if PETSC_MAJOR==2.: 20 21 mumps['toolkit']='petsc' 21 22 mumps['mat_type']=options.getfieldvalue('mat_type','aijmumps') … … 23 24 mumps['pc_type']=options.getfieldvalue('pc_type','lu') 24 25 mumps['mat_mumps_icntl_14']=options.getfieldvalue('mat_mumps_icntl_14',120) 25 mumps['pc_factor_shift_positive_definite']=options.getfieldvalue('pc_factor_shift_positive_definite','true') 26 if PETSC_VERSION==3.: 26 if PETSC_MAJOR==3.: 27 27 mumps['toolkit']='petsc' 28 28 mumps['mat_type']=options.getfieldvalue('mat_type','mpiaij') 29 29 mumps['ksp_type']=options.getfieldvalue('ksp_type','preonly') 30 30 mumps['pc_type']=options.getfieldvalue('pc_type','lu') 31 mumps['pc_factor_mat_solver_package']=options.getfieldvalue('pc_factor_mat_solver_package','mumps') 31 if PETSC_MINOR>8.: 32 mumps['pc_factor_mat_solver_type']=options.getfieldvalue('pc_factor_mat_solver_type','mumps') 33 else: 34 mumps['pc_factor_mat_solver_package']=options.getfieldvalue('pc_factor_mat_solver_package','mumps') 32 35 mumps['mat_mumps_icntl_14']=options.getfieldvalue('mat_mumps_icntl_14',120) 33 mumps['pc_factor_shift_positive_definite']=options.getfieldvalue('pc_factor_shift_positive_definite','true')34 36 35 37 return mumps 36
Note:
See TracChangeset
for help on using the changeset viewer.