Changeset 13028


Ignore:
Timestamp:
08/14/12 10:08:33 (13 years ago)
Author:
Mathieu Morlighem
Message:

CHG: removed recover_area, totally useless actually

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/parameterization/setflowequation.m

    r13027 r13028  
    2424end
    2525
     26%Process options
     27options=pairoptions(varargin{:});
     28options=deleteduplicates(options,1);
     29
    2630%Find_out what kind of coupling to use
    27 options=pairoptions(varargin{:});
    2831coupling_method=getfieldvalue(options,'coupling','tiling');
    2932if (~strcmpi(coupling_method,'tiling') & ~strcmpi(coupling_method,'penalties')),
     
    3134end
    3235
    33 [hutterflag macayealflag pattynflag stokesflag filltype]=recover_areas(md,varargin{:});
     36%recover elements distribution
     37hutterflag   = FlagElements(md,getfieldvalue(options,'hutter',''));
     38macayealflag = FlagElements(md,getfieldvalue(options,'macayeal',''));
     39pattynflag   = FlagElements(md,getfieldvalue(options,'pattyn',''));
     40l1l2flag     = FlagElements(md,getfieldvalue(options,'l1l2',''));
     41stokesflag   = FlagElements(md,getfieldvalue(options,'stokes',''));
     42filltype     = getfieldvalue(options,'fill','none');
    3443
    3544%Flag the elements that have not been flagged as filltype
     
    280289        error('error coupling domain too irregular');
    281290end
    282 end
    283 
    284 function [hutterflag macayealflag pattynflag stokesflag filltype]=recover_areas(md,varargin); % {{{
    285 %RECOVER_AREAS - flag the element depending on the physical model that is assigned to them
    286 %
    287 %   This routine is called by setelementstype, do not use
    288 %
    289 %   Usage:
    290 %      [hutterflag macayealflag pattynflag stokesflag filltype]=recover_areas(md,varargin);
    291 
    292         %go through varargin, extract options and plug them into subtype options, by order of appearance
    293         options=pairoptions(varargin{:});
    294         options=deleteduplicates(options,1);
    295 
    296         %recover elements distribution
    297         hutterflag  =FlagElements(md,getfieldvalue(options,'hutter',''));
    298         macayealflag=FlagElements(md,getfieldvalue(options,'macayeal',''));
    299         pattynflag  =FlagElements(md,getfieldvalue(options,'pattyn',''));
    300         stokesflag  =FlagElements(md,getfieldvalue(options,'stokes',''));
    301         filltype    =getfieldvalue(options,'fill','none');
    302 
    303 end %end function }}}
  • issm/trunk-jpl/src/m/parameterization/setflowequation.py

    r13027 r13028  
    22from model import *
    33from pairoptions import *
    4 from recover_areas import *
    54from MatlabFuncs import *
    65from FlagElements import *
    76
    8 def recover_areas(md,*args): # {{{
    9         """
    10         RECOVER_AREAS - flag the element depending on the physical model that is assigned to them
    11 
    12                 This routine is called by setelementstype, do not use
    13 
    14                 Usage:
    15                         [hutterflag macayealflag pattynflag stokesflag filltype]=recover_areas(md,varargin);
    16         """
    17 
    18         #go through varargin, extract options and plug them into subtype options, by order of appearance
    19         options=pairoptions(*args)
    20 #       options=deleteduplicates(options,1);
    217
    228        #recover elements distribution
    23         hutterflag  =FlagElements(md,options.getfieldvalue('hutter',''))
    24         macayealflag=FlagElements(md,options.getfieldvalue('macayeal',''))
    25         pattynflag  =FlagElements(md,options.getfieldvalue('pattyn',''))
    26         stokesflag  =FlagElements(md,options.getfieldvalue('stokes',''))
    27         filltype    =options.getfieldvalue('fill','none')
     9
    2810
    2911        return hutterflag,macayealflag,pattynflag,stokesflag,filltype
     
    3416
    3517           This routine works like plotmodel: it works with an even number of inputs
    36            'hutter','macayeal','pattyn','stokes' and 'fill' are the possible options
     18           'hutter','macayeal','pattyn','l1l2','stokes' and 'fill' are the possible options
    3719           that must be followed by the corresponding exp file or flags list
    3820           It can either be a domain file (argus type, .exp extension), or an array of element flags.
     
    5537                raise TypeError("setflowequation error message")
    5638
     39        #process options
     40        options=pairoptions(*args)
     41#       options=deleteduplicates(options,1);
     42
    5743        #Find_out what kind of coupling to use
    58         options=pairoptions(*args)
    5944        coupling_method=options.getfieldvalue('coupling','tiling')
    6045        if not strcmpi(coupling_method,'tiling') and not strcmpi(coupling_method,'penalties'):
    6146                raise TypeError("coupling type can only be: tiling or penalties")
    6247
    63         hutterflag,macayealflag,pattynflag,stokesflag,filltype=recover_areas(md,*args)
     48        #recover elements distribution
     49        hutterflag   = FlagElements(md,options.getfieldvalue('hutter',''))
     50        macayealflag = FlagElements(md,options.getfieldvalue('macayeal',''))
     51        pattynflag   = FlagElements(md,options.getfieldvalue('pattyn',''))
     52        l1l2flag     = FlagElements(md,options.getfieldvalue('l1l2',''))
     53        stokesflag   = FlagElements(md,options.getfieldvalue('stokes',''))
     54        filltype     = options.getfieldvalue('fill','none')
    6455
    6556        #Flag the elements that have not been flagged as filltype
Note: See TracChangeset for help on using the changeset viewer.