Changeset 15568


Ignore:
Timestamp:
07/23/13 14:32:29 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: stokesoptions remains stokesoptions for now

Location:
issm/trunk-jpl/src/m/solvers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/solvers/stokesoptions.m

    r15564 r15568  
    1 function FS=FSoptions(varargin)
     1function stokes=stokesoptions(varargin)
    22%STOKESOPTIONS - return STOKES multi-physics solver petsc options
    33%
    44%   Usage:
    5 %      options=FSoptions;
     5%      options=stokesoptions;
    66
    77%retrieve options provided in varargin
    88options=pairoptions(varargin{:});
    9 FS=struct();
     9stokes=struct();
    1010
    11 %default FS options
     11%default stokes options
    1212PETSC_VERSION=petscversion();
    1313if PETSC_VERSION==2,
    14         error('FSoptions error message: multi-physics options not supported in Petsc 2');
     14        error('stokesoptions error message: multi-physics options not supported in Petsc 2');
    1515end
    1616if PETSC_VERSION==3,
    17         FS.toolkit='petsc';
    18         FS.mat_type=getfieldvalue(options,'mat_type','mpiaij');
    19         FS.ksp_max_it=getfieldvalue(options,'ksp_max_it',1000);
    20         FS.ksp_type=getfieldvalue(options,'ksp_type','gmres');
    21         FS.pc_type=getfieldvalue(options,'pc_type','fieldsplit');
    22         FS.pc_field_split_type=getfieldvalue(options,'pc_field_split_type','schur');
    23         FS.fieldsplit_0_pc_type=getfieldvalue(options,'fieldsplit_0_pc_type','hypre');
    24         FS.fieldsplit_0_ksp_type=getfieldvalue(options,'fieldsplit_0_ksp_type','gmres');
    25         FS.fieldsplit_0_pc_hypre_type=getfieldvalue(options,'fieldsplit_0_pc_hypre_type','boomerang');
    26         FS.fieldsplit_1_pc_type=getfieldvalue(options,'fieldsplit_1_pc_type','jacobi');
    27         FS.fieldsplit_1_ksp_type=getfieldvalue(options,'fieldsplit_1_ksp_type','preonly');
    28         FS.issm_option_solver=getfieldvalue(options,'issm_option_solver','FS');
     17        stokes.toolkit='petsc';
     18        stokes.mat_type=getfieldvalue(options,'mat_type','mpiaij');
     19        stokes.ksp_max_it=getfieldvalue(options,'ksp_max_it',1000);
     20        stokes.ksp_type=getfieldvalue(options,'ksp_type','gmres');
     21        stokes.pc_type=getfieldvalue(options,'pc_type','fieldsplit');
     22        stokes.pc_field_split_type=getfieldvalue(options,'pc_field_split_type','schur');
     23        stokes.fieldsplit_0_pc_type=getfieldvalue(options,'fieldsplit_0_pc_type','hypre');
     24        stokes.fieldsplit_0_ksp_type=getfieldvalue(options,'fieldsplit_0_ksp_type','gmres');
     25        stokes.fieldsplit_0_pc_hypre_type=getfieldvalue(options,'fieldsplit_0_pc_hypre_type','boomerang');
     26        stokes.fieldsplit_1_pc_type=getfieldvalue(options,'fieldsplit_1_pc_type','jacobi');
     27        stokes.fieldsplit_1_ksp_type=getfieldvalue(options,'fieldsplit_1_ksp_type','preonly');
     28        stokes.issm_option_solver=getfieldvalue(options,'issm_option_solver','stokes');
    2929end
  • issm/trunk-jpl/src/m/solvers/stokesoptions.py

    r15564 r15568  
    33from petscversion  import *
    44#}}}
    5 def FSoptions(*args):
     5def stokesoptions(*args):
    66        #STOKESOPTIONS - return STOKES multi-physics solver petsc options
    77        #
    88        #   Usage:
    9         #      options=FSoptions;
     9        #      options=stokesoptions;
    1010       
    1111        #retrieve options provided in varargin
     
    1313
    1414
    15         #default FS options
     15        #default stokes options
    1616        PETSC_VERSION=petscversion()
    1717
    1818        if PETSC_VERSION==2:
    19                 raise RuntimeError('FSoptions error message: multi-physics options not supported in Petsc 2')
     19                raise RuntimeError('stokesoptions error message: multi-physics options not supported in Petsc 2')
    2020        if PETSC_VERSION==3:
    2121                options=[['toolkit','petsc'],['mat_type','mpiaij'],['ksp_max_it',1000],['ksp_type','gmres'],['pc_type','fieldsplit'],['pc_field_split_type','schur'],\
    2222        ['fieldsplit_0_pc_type','hypre'],['fieldsplit_0_ksp_type','gmres'],['fieldsplit_0_pc_hypre_type','boomerang'],\
    23         ['fieldsplit_1_pc_type','jacobi'],['fieldsplit_1_ksp_type','preonly'],['issm_option_solver','FS']]
     23        ['fieldsplit_1_pc_type','jacobi'],['fieldsplit_1_ksp_type','preonly'],['issm_option_solver','stokes']]
    2424
    2525        #now, go through our arguments, and write over default options.
Note: See TracChangeset for help on using the changeset viewer.