Last change
on this file since 12929 was 12929, checked in by jschierm, 13 years ago |
New python versions of iluasmoptions and mumpsoptions (and others moved).
|
File size:
893 bytes
|
Line | |
---|
1 | #module imports {{{
|
---|
2 | from pairoptions import *
|
---|
3 | from petscversion import *
|
---|
4 | #}}}
|
---|
5 | def jacobiasmoptions(*args):
|
---|
6 | #ASMOPTIONS - return Additive Shwartz Method with Jacobi preconditioner petsc options
|
---|
7 | #
|
---|
8 | # Usage:
|
---|
9 | # options=jacobiasmoptions;
|
---|
10 |
|
---|
11 | #retrieve options provided in varargin
|
---|
12 | arguments=pairoptions(*args)
|
---|
13 |
|
---|
14 | options=[['mat_type','aij'],['ksp_type','gmres'],['pc_type','asm'],['sub_pc_type','jacobi'],['pc_asm_overlap',3],['ksp_max_it',100],['ksp_rtol',1e-15]];
|
---|
15 |
|
---|
16 | #now, go through our arguments, and write over default options.
|
---|
17 | for i in range(len(arguments.list)):
|
---|
18 | arg1=arguments.list[i][0]
|
---|
19 | arg2=arguments.list[i][1]
|
---|
20 | found=0;
|
---|
21 | for j in range(len(options)):
|
---|
22 | joption=options[j][0]
|
---|
23 | if joption==arg1:
|
---|
24 | joption[1]=arg2;
|
---|
25 | options[j]=joption;
|
---|
26 | found=1;
|
---|
27 | break
|
---|
28 | if not found:
|
---|
29 | #this option did not exist, add it:
|
---|
30 | options.append([arg1,arg2])
|
---|
31 | return options
|
---|
Note:
See
TracBrowser
for help on using the repository browser.