Last change
on this file since 13395 was 13395, checked in by Mathieu Morlighem, 12 years ago |
merged trunk-jpl and trunk for revision 13393
|
File size:
1.2 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:
|
---|
[12929] | 20 | mumps['mat_type']=options.getfieldvalue('mat_type','aijmumps')
|
---|
| 21 | mumps['ksp_type']=options.getfieldvalue('ksp_type','preonly')
|
---|
| 22 | mumps['pc_type']=options.getfieldvalue('pc_type','lu')
|
---|
| 23 | mumps['mat_mumps_icntl_14']=options.getfieldvalue('mat_mumps_icntl_14',120)
|
---|
| 24 | mumps['pc_factor_shift_positive_definite']=options.getfieldvalue('pc_factor_shift_positive_definite','true')
|
---|
[11790] | 25 | if PETSC_VERSION==3:
|
---|
[12929] | 26 | mumps['mat_type']=options.getfieldvalue('mat_type','mpiaij')
|
---|
| 27 | mumps['ksp_type']=options.getfieldvalue('ksp_type','preonly')
|
---|
| 28 | mumps['pc_type']=options.getfieldvalue('pc_type','lu')
|
---|
| 29 | mumps['pc_factor_mat_solver_package']=options.getfieldvalue('pc_factor_mat_solver_package','mumps')
|
---|
| 30 | mumps['mat_mumps_icntl_14']=options.getfieldvalue('mat_mumps_icntl_14',120)
|
---|
| 31 | mumps['pc_factor_shift_positive_definite']=options.getfieldvalue('pc_factor_shift_positive_definite','true')
|
---|
[11789] | 32 |
|
---|
[12929] | 33 | return mumps
|
---|
| 34 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.