Last change
on this file since 15396 was 15396, checked in by Mathieu Morlighem, 12 years ago |
merged trunk-jpl and trunk for revision 15394
|
File size:
1.3 KB
|
Rev | Line | |
---|
[13107] | 1 | from collections import OrderedDict
|
---|
[11790] | 2 | from pairoptions import *
|
---|
[12929] | 3 | from petscversion import *
|
---|
| 4 |
|
---|
[11790] | 5 | def mumpsoptions(*args):
|
---|
[12929] | 6 | """
|
---|
| 7 | MUMPSOPTIONS - return MUMPS direct solver petsc options
|
---|
| 8 |
|
---|
| 9 | Usage:
|
---|
| 10 | options=mumpsoptions;
|
---|
| 11 | """
|
---|
| 12 |
|
---|
[11790] | 13 | #retrieve options provided in varargin
|
---|
[12929] | 14 | options=pairoptions(*args)
|
---|
[13107] | 15 | mumps=OrderedDict()
|
---|
[11789] | 16 |
|
---|
[11790] | 17 | #default mumps options
|
---|
| 18 | PETSC_VERSION=petscversion()
|
---|
| 19 | if PETSC_VERSION==2:
|
---|
[15396] | 20 | mumps['toolkit']='petsc'
|
---|
[12929] | 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')
|
---|
[11790] | 26 | if PETSC_VERSION==3:
|
---|
[15396] | 27 | mumps['toolkit']='petsc'
|
---|
[12929] | 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')
|
---|
[11789] | 34 |
|
---|
[12929] | 35 | return mumps
|
---|
| 36 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.