- Timestamp:
- 08/14/12 10:08:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/m/parameterization/setflowequation.py ¶
r13027 r13028 2 2 from model import * 3 3 from pairoptions import * 4 from recover_areas import *5 4 from MatlabFuncs import * 6 5 from FlagElements import * 7 6 8 def recover_areas(md,*args): # {{{9 """10 RECOVER_AREAS - flag the element depending on the physical model that is assigned to them11 12 This routine is called by setelementstype, do not use13 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 appearance19 options=pairoptions(*args)20 # options=deleteduplicates(options,1);21 7 22 8 #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 28 10 29 11 return hutterflag,macayealflag,pattynflag,stokesflag,filltype … … 34 16 35 17 This routine works like plotmodel: it works with an even number of inputs 36 'hutter','macayeal','pattyn',' stokes' and 'fill' are the possible options18 'hutter','macayeal','pattyn','l1l2','stokes' and 'fill' are the possible options 37 19 that must be followed by the corresponding exp file or flags list 38 20 It can either be a domain file (argus type, .exp extension), or an array of element flags. … … 55 37 raise TypeError("setflowequation error message") 56 38 39 #process options 40 options=pairoptions(*args) 41 # options=deleteduplicates(options,1); 42 57 43 #Find_out what kind of coupling to use 58 options=pairoptions(*args)59 44 coupling_method=options.getfieldvalue('coupling','tiling') 60 45 if not strcmpi(coupling_method,'tiling') and not strcmpi(coupling_method,'penalties'): 61 46 raise TypeError("coupling type can only be: tiling or penalties") 62 47 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') 64 55 65 56 #Flag the elements that have not been flagged as filltype
Note:
See TracChangeset
for help on using the changeset viewer.