[16134] | 1 | Index: ../trunk-jpl/src/m/solvers/stokesoptions.m
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/m/solvers/stokesoptions.m (revision 15567)
|
---|
| 4 | +++ ../trunk-jpl/src/m/solvers/stokesoptions.m (revision 15568)
|
---|
| 5 | @@ -1,29 +1,29 @@
|
---|
| 6 | -function FS=FSoptions(varargin)
|
---|
| 7 | +function stokes=stokesoptions(varargin)
|
---|
| 8 | %STOKESOPTIONS - return STOKES multi-physics solver petsc options
|
---|
| 9 | %
|
---|
| 10 | % Usage:
|
---|
| 11 | -% options=FSoptions;
|
---|
| 12 | +% options=stokesoptions;
|
---|
| 13 |
|
---|
| 14 | %retrieve options provided in varargin
|
---|
| 15 | options=pairoptions(varargin{:});
|
---|
| 16 | -FS=struct();
|
---|
| 17 | +stokes=struct();
|
---|
| 18 |
|
---|
| 19 | -%default FS options
|
---|
| 20 | +%default stokes options
|
---|
| 21 | PETSC_VERSION=petscversion();
|
---|
| 22 | if PETSC_VERSION==2,
|
---|
| 23 | - error('FSoptions error message: multi-physics options not supported in Petsc 2');
|
---|
| 24 | + error('stokesoptions error message: multi-physics options not supported in Petsc 2');
|
---|
| 25 | end
|
---|
| 26 | if PETSC_VERSION==3,
|
---|
| 27 | - FS.toolkit='petsc';
|
---|
| 28 | - FS.mat_type=getfieldvalue(options,'mat_type','mpiaij');
|
---|
| 29 | - FS.ksp_max_it=getfieldvalue(options,'ksp_max_it',1000);
|
---|
| 30 | - FS.ksp_type=getfieldvalue(options,'ksp_type','gmres');
|
---|
| 31 | - FS.pc_type=getfieldvalue(options,'pc_type','fieldsplit');
|
---|
| 32 | - FS.pc_field_split_type=getfieldvalue(options,'pc_field_split_type','schur');
|
---|
| 33 | - FS.fieldsplit_0_pc_type=getfieldvalue(options,'fieldsplit_0_pc_type','hypre');
|
---|
| 34 | - FS.fieldsplit_0_ksp_type=getfieldvalue(options,'fieldsplit_0_ksp_type','gmres');
|
---|
| 35 | - FS.fieldsplit_0_pc_hypre_type=getfieldvalue(options,'fieldsplit_0_pc_hypre_type','boomerang');
|
---|
| 36 | - FS.fieldsplit_1_pc_type=getfieldvalue(options,'fieldsplit_1_pc_type','jacobi');
|
---|
| 37 | - FS.fieldsplit_1_ksp_type=getfieldvalue(options,'fieldsplit_1_ksp_type','preonly');
|
---|
| 38 | - FS.issm_option_solver=getfieldvalue(options,'issm_option_solver','FS');
|
---|
| 39 | + stokes.toolkit='petsc';
|
---|
| 40 | + stokes.mat_type=getfieldvalue(options,'mat_type','mpiaij');
|
---|
| 41 | + stokes.ksp_max_it=getfieldvalue(options,'ksp_max_it',1000);
|
---|
| 42 | + stokes.ksp_type=getfieldvalue(options,'ksp_type','gmres');
|
---|
| 43 | + stokes.pc_type=getfieldvalue(options,'pc_type','fieldsplit');
|
---|
| 44 | + stokes.pc_field_split_type=getfieldvalue(options,'pc_field_split_type','schur');
|
---|
| 45 | + stokes.fieldsplit_0_pc_type=getfieldvalue(options,'fieldsplit_0_pc_type','hypre');
|
---|
| 46 | + stokes.fieldsplit_0_ksp_type=getfieldvalue(options,'fieldsplit_0_ksp_type','gmres');
|
---|
| 47 | + stokes.fieldsplit_0_pc_hypre_type=getfieldvalue(options,'fieldsplit_0_pc_hypre_type','boomerang');
|
---|
| 48 | + stokes.fieldsplit_1_pc_type=getfieldvalue(options,'fieldsplit_1_pc_type','jacobi');
|
---|
| 49 | + stokes.fieldsplit_1_ksp_type=getfieldvalue(options,'fieldsplit_1_ksp_type','preonly');
|
---|
| 50 | + stokes.issm_option_solver=getfieldvalue(options,'issm_option_solver','stokes');
|
---|
| 51 | end
|
---|
| 52 | Index: ../trunk-jpl/src/m/solvers/stokesoptions.py
|
---|
| 53 | ===================================================================
|
---|
| 54 | --- ../trunk-jpl/src/m/solvers/stokesoptions.py (revision 15567)
|
---|
| 55 | +++ ../trunk-jpl/src/m/solvers/stokesoptions.py (revision 15568)
|
---|
| 56 | @@ -2,25 +2,25 @@
|
---|
| 57 | from pairoptions import *
|
---|
| 58 | from petscversion import *
|
---|
| 59 | #}}}
|
---|
| 60 | -def FSoptions(*args):
|
---|
| 61 | +def stokesoptions(*args):
|
---|
| 62 | #STOKESOPTIONS - return STOKES multi-physics solver petsc options
|
---|
| 63 | #
|
---|
| 64 | # Usage:
|
---|
| 65 | - # options=FSoptions;
|
---|
| 66 | + # options=stokesoptions;
|
---|
| 67 |
|
---|
| 68 | #retrieve options provided in varargin
|
---|
| 69 | arguments=pairoptions(*args)
|
---|
| 70 |
|
---|
| 71 |
|
---|
| 72 | - #default FS options
|
---|
| 73 | + #default stokes options
|
---|
| 74 | PETSC_VERSION=petscversion()
|
---|
| 75 |
|
---|
| 76 | if PETSC_VERSION==2:
|
---|
| 77 | - raise RuntimeError('FSoptions error message: multi-physics options not supported in Petsc 2')
|
---|
| 78 | + raise RuntimeError('stokesoptions error message: multi-physics options not supported in Petsc 2')
|
---|
| 79 | if PETSC_VERSION==3:
|
---|
| 80 | options=[['toolkit','petsc'],['mat_type','mpiaij'],['ksp_max_it',1000],['ksp_type','gmres'],['pc_type','fieldsplit'],['pc_field_split_type','schur'],\
|
---|
| 81 | ['fieldsplit_0_pc_type','hypre'],['fieldsplit_0_ksp_type','gmres'],['fieldsplit_0_pc_hypre_type','boomerang'],\
|
---|
| 82 | - ['fieldsplit_1_pc_type','jacobi'],['fieldsplit_1_ksp_type','preonly'],['issm_option_solver','FS']]
|
---|
| 83 | + ['fieldsplit_1_pc_type','jacobi'],['fieldsplit_1_ksp_type','preonly'],['issm_option_solver','stokes']]
|
---|
| 84 |
|
---|
| 85 | #now, go through our arguments, and write over default options.
|
---|
| 86 | for i in range(len(arguments.list)):
|
---|