Index: /issm/trunk-jpl/src/m/parameterization/setflowequation.m
===================================================================
--- /issm/trunk-jpl/src/m/parameterization/setflowequation.m	(revision 13027)
+++ /issm/trunk-jpl/src/m/parameterization/setflowequation.m	(revision 13028)
@@ -24,6 +24,9 @@
 end
 
+%Process options
+options=pairoptions(varargin{:});
+options=deleteduplicates(options,1);
+
 %Find_out what kind of coupling to use
-options=pairoptions(varargin{:});
 coupling_method=getfieldvalue(options,'coupling','tiling');
 if (~strcmpi(coupling_method,'tiling') & ~strcmpi(coupling_method,'penalties')),
@@ -31,5 +34,11 @@
 end
 
-[hutterflag macayealflag pattynflag stokesflag filltype]=recover_areas(md,varargin{:});
+%recover elements distribution
+hutterflag   = FlagElements(md,getfieldvalue(options,'hutter',''));
+macayealflag = FlagElements(md,getfieldvalue(options,'macayeal',''));
+pattynflag   = FlagElements(md,getfieldvalue(options,'pattyn',''));
+l1l2flag     = FlagElements(md,getfieldvalue(options,'l1l2',''));
+stokesflag   = FlagElements(md,getfieldvalue(options,'stokes',''));
+filltype     = getfieldvalue(options,'fill','none');
 
 %Flag the elements that have not been flagged as filltype
@@ -280,24 +289,2 @@
 	error('error coupling domain too irregular');
 end
-end 
-
-function [hutterflag macayealflag pattynflag stokesflag filltype]=recover_areas(md,varargin); % {{{
-%RECOVER_AREAS - flag the element depending on the physical model that is assigned to them
-%
-%   This routine is called by setelementstype, do not use
-%
-%   Usage:
-%      [hutterflag macayealflag pattynflag stokesflag filltype]=recover_areas(md,varargin);
-
-	%go through varargin, extract options and plug them into subtype options, by order of appearance
-	options=pairoptions(varargin{:});
-	options=deleteduplicates(options,1);
-
-	%recover elements distribution
-	hutterflag  =FlagElements(md,getfieldvalue(options,'hutter',''));
-	macayealflag=FlagElements(md,getfieldvalue(options,'macayeal',''));
-	pattynflag  =FlagElements(md,getfieldvalue(options,'pattyn',''));
-	stokesflag  =FlagElements(md,getfieldvalue(options,'stokes',''));
-	filltype    =getfieldvalue(options,'fill','none');
-
-end %end function }}}
Index: /issm/trunk-jpl/src/m/parameterization/setflowequation.py
===================================================================
--- /issm/trunk-jpl/src/m/parameterization/setflowequation.py	(revision 13027)
+++ /issm/trunk-jpl/src/m/parameterization/setflowequation.py	(revision 13028)
@@ -2,28 +2,10 @@
 from model import *
 from pairoptions import *
-from recover_areas import *
 from MatlabFuncs import *
 from FlagElements import *
 
-def recover_areas(md,*args): # {{{
-	"""
-	RECOVER_AREAS - flag the element depending on the physical model that is assigned to them
-
-		This routine is called by setelementstype, do not use
-
-		Usage:
-			[hutterflag macayealflag pattynflag stokesflag filltype]=recover_areas(md,varargin);
-	"""
-
-	#go through varargin, extract options and plug them into subtype options, by order of appearance
-	options=pairoptions(*args)
-#	options=deleteduplicates(options,1);
 
 	#recover elements distribution
-	hutterflag  =FlagElements(md,options.getfieldvalue('hutter',''))
-	macayealflag=FlagElements(md,options.getfieldvalue('macayeal',''))
-	pattynflag  =FlagElements(md,options.getfieldvalue('pattyn',''))
-	stokesflag  =FlagElements(md,options.getfieldvalue('stokes',''))
-	filltype    =options.getfieldvalue('fill','none')
+
 
 	return hutterflag,macayealflag,pattynflag,stokesflag,filltype
@@ -34,5 +16,5 @@
 
 	   This routine works like plotmodel: it works with an even number of inputs
-	   'hutter','macayeal','pattyn','stokes' and 'fill' are the possible options
+	   'hutter','macayeal','pattyn','l1l2','stokes' and 'fill' are the possible options
 	   that must be followed by the corresponding exp file or flags list
 	   It can either be a domain file (argus type, .exp extension), or an array of element flags. 
@@ -55,11 +37,20 @@
 		raise TypeError("setflowequation error message")
 
+	#process options
+	options=pairoptions(*args)
+#	options=deleteduplicates(options,1);
+
 	#Find_out what kind of coupling to use
-	options=pairoptions(*args)
 	coupling_method=options.getfieldvalue('coupling','tiling')
 	if not strcmpi(coupling_method,'tiling') and not strcmpi(coupling_method,'penalties'):
 		raise TypeError("coupling type can only be: tiling or penalties")
 
-	hutterflag,macayealflag,pattynflag,stokesflag,filltype=recover_areas(md,*args)
+	#recover elements distribution
+	hutterflag   = FlagElements(md,options.getfieldvalue('hutter',''))
+	macayealflag = FlagElements(md,options.getfieldvalue('macayeal',''))
+	pattynflag   = FlagElements(md,options.getfieldvalue('pattyn',''))
+	l1l2flag     = FlagElements(md,options.getfieldvalue('l1l2',''))
+	stokesflag   = FlagElements(md,options.getfieldvalue('stokes',''))
+	filltype     = options.getfieldvalue('fill','none')
 
 	#Flag the elements that have not been flagged as filltype
