source: issm/trunk-jpl/src/m/solvers/stcgasmoptions.m@ 16901

Last change on this file since 16901 was 16901, checked in by habbalf, 11 years ago

PETSc Itererative solver combinations (i.e. preconditioner and iterative methods). Stick with default solver (i.e. MUMPS) for stability. Try one of the highlighted solvers (from the paper) for a larger model or faster solution. CAUTION: iterative methods are sensitive to boundary conditions (i.e. multipoint constraints can cause convergence problems). Feel free to customize these templates with specific PETSc options.

File size: 442 bytes
Line 
1function solverOptions=stcgasmoptions(varargin)
2
3%retrieve options provided in varargin
4options=pairoptions(varargin{:});
5solverOptions=struct();
6solverOptions.toolkit='petsc';
7
8
9PETSC_VERSION=petscversion();
10if PETSC_VERSION==3,
11 solverOptions.mat_type=getfieldvalue(options, 'mat_type','mpiaij');
12 solverOptions.ksp_type=getfieldvalue(options, 'ksp_type','stcg');
13 solverOptions.pc_type=getfieldvalue(options, 'pc_type', 'asm');
14end
Note: See TracBrowser for help on using the repository browser.