Last change
on this file since 6098 was 6098, checked in by Eric.Larour, 14 years ago |
new asm solvers using jacobi preconditioner
|
File size:
844 bytes
|
Line | |
---|
1 | function options=jacobiasmoptions(varargin)
|
---|
2 | %ASMOPTIONS - return Additive Shwartz Method with Jacobi preconditioner petsc options
|
---|
3 | %
|
---|
4 | % Usage:
|
---|
5 | % options=jacobiasmoptions;
|
---|
6 |
|
---|
7 | %retrieve options provided in varargin
|
---|
8 | arguments=pairoptions(varargin{:});
|
---|
9 |
|
---|
10 | %default jacobiasm options
|
---|
11 | 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'}};
|
---|
12 |
|
---|
13 | %now, go through our arguments, and write over default options.
|
---|
14 | for i=1:size(arguments.list,1),
|
---|
15 | arg1=arguments.list{i,1};
|
---|
16 | arg2=arguments.list{i,2};
|
---|
17 | found=0;
|
---|
18 | for j=1:size(options,2),
|
---|
19 | joption=options{j};
|
---|
20 | if strcmpi(joption{1},arg1),
|
---|
21 | joption{2}=arg2;
|
---|
22 | options{j}=joption;
|
---|
23 | found=1;
|
---|
24 | break;
|
---|
25 | end
|
---|
26 | end
|
---|
27 | if ~found,
|
---|
28 | %this option did not exist, add it:
|
---|
29 | options{end+1}={arg1,arg2};
|
---|
30 | end
|
---|
31 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.