Changeset 13027


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

CHG: recover_areas is now a subfunction of setflowequations

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

Legend:

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

    r13006 r13027  
    33%
    44%   This routine works like plotmodel: it works with an even number of inputs
    5 %   'hutter','macayeal','pattyn','stokes' and 'fill' are the possible options
     5%   'hutter','macayeal','l1l2','pattyn','stokes' and 'fill' are the possible options
    66%   that must be followed by the corresponding exp file or flags list
    77%   It can either be a domain file (argus type, .exp extension), or an array of element flags.
     
    280280        error('error coupling domain too irregular');
    281281end
     282end
     283
     284function [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
     303end %end function }}}
  • issm/trunk-jpl/src/m/parameterization/setflowequation.py

    r13006 r13027  
    44from recover_areas import *
    55from MatlabFuncs import *
    6 
     6from FlagElements import *
     7
     8def 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);
     21
     22        #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')
     28
     29        return hutterflag,macayealflag,pattynflag,stokesflag,filltype
     30#}}}
    731def setflowequation(md,*args):
    832        """
Note: See TracChangeset for help on using the changeset viewer.