Last change
on this file since 16137 was 16137, checked in by Mathieu Morlighem, 12 years ago |
merged trunk-jpl and trunk for revision 16135
|
File size:
1.3 KB
|
Line | |
---|
1 | from collections import OrderedDict
|
---|
2 | from pairoptions import *
|
---|
3 | from IssmConfig import *
|
---|
4 |
|
---|
5 | def mumpsoptions(*args):
|
---|
6 | """
|
---|
7 | MUMPSOPTIONS - return MUMPS direct solver petsc options
|
---|
8 |
|
---|
9 | Usage:
|
---|
10 | options=mumpsoptions;
|
---|
11 | """
|
---|
12 |
|
---|
13 | #retrieve options provided in varargin
|
---|
14 | options=pairoptions(*args)
|
---|
15 | mumps=OrderedDict()
|
---|
16 |
|
---|
17 | #default mumps options
|
---|
18 | PETSC_VERSION=IssmConfig('_PETSC_MAJOR_')[0]
|
---|
19 | if PETSC_VERSION==2.:
|
---|
20 | mumps['toolkit']='petsc'
|
---|
21 | mumps['mat_type']=options.getfieldvalue('mat_type','aijmumps')
|
---|
22 | mumps['ksp_type']=options.getfieldvalue('ksp_type','preonly')
|
---|
23 | mumps['pc_type']=options.getfieldvalue('pc_type','lu')
|
---|
24 | 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.:
|
---|
27 | mumps['toolkit']='petsc'
|
---|
28 | mumps['mat_type']=options.getfieldvalue('mat_type','mpiaij')
|
---|
29 | mumps['ksp_type']=options.getfieldvalue('ksp_type','preonly')
|
---|
30 | mumps['pc_type']=options.getfieldvalue('pc_type','lu')
|
---|
31 | mumps['pc_factor_mat_solver_package']=options.getfieldvalue('pc_factor_mat_solver_package','mumps')
|
---|
32 | 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 |
|
---|
35 | return mumps
|
---|
36 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.