source: issm/trunk-jpl/src/m/solvers/asmoptions.py@ 15907

Last change on this file since 15907 was 15907, checked in by Mathieu Morlighem, 12 years ago

NEW: removed ismpi and other configuration tests

File size: 797 bytes
Line 
1from pairoptions import *
2def asmoptions(*args):
3 #ASMOPTIONS - return ASM petsc options
4 #
5 # Usage:
6 # options=asmoptions;
7
8 #retrieve options provided in varargin
9 arguments=pairoptions(*args)
10
11 options=[['toolkit','petsc'],['mat_type','aij'],['ksp_type','gmres'],['pc_type','asm'],['sub_pc_type','lu'],['pc_asm_overlap',3],['ksp_max_it',100],['ksp_rtol',1e-30]];
12
13 #now, go through our arguments, and write over default options.
14 for i in range(len(arguments.list)):
15 arg1=arguments.list[i][0]
16 arg2=arguments.list[i][1]
17 found=0;
18 for j in range(len(options)):
19 joption=options[j][0]
20 if joption==arg1:
21 joption[1]=arg2;
22 options[j]=joption;
23 found=1;
24 break
25 if not found:
26 #this option did not exist, add it:
27 options.append([arg1,arg2])
28 return options
Note: See TracBrowser for help on using the repository browser.