Index: /issm/trunk-jpl/src/m/parameterization/setflowequation.m
===================================================================
--- /issm/trunk-jpl/src/m/parameterization/setflowequation.m	(revision 13047)
+++ /issm/trunk-jpl/src/m/parameterization/setflowequation.m	(revision 13048)
@@ -11,4 +11,5 @@
 %   a string 'all' will be considered as the entire domain
 %   You can specify the type of coupling, 'penalties' or 'tiling', to use with the input 'coupling'
+%   NB: l1l2 cannot currently be coupled to any other ice flow model
 %
 %   Usage:
@@ -52,10 +53,10 @@
 
 %check that each element has at least one flag
-if any(hutterflag+ macayealflag+pattynflag+stokesflag==0),
-	error('setflowequation error message: elements type not assigned, must be specified')
+if any(hutterflag+macayealflag+pattynflag+l1l2flag+stokesflag==0),
+	error('elements type not assigned, must be specified')
 end
 
 %check that each element has only one flag
-if any(hutterflag+ macayealflag+pattynflag+stokesflag>1),
+if any(hutterflag+macayealflag+pattynflag+l1l2flag+stokesflag>1),
 	disp('setflowequation warning message: some elements have several types, higher order type is used for them')
 	hutterflag(find(hutterflag & macayealflag))=0;
@@ -64,8 +65,13 @@
 end
 
-%Check that no pattyn or stokes for 2d mesh
+%check that l1l2 is not coupled to any other model for now
+if any(l1l2flag) & any(hutterflag | macayealflag | pattynflag | stokesflag)
+	error('l1l2 cannot be coupled to any other model');
+end
+
+%Check that no l1l2 or pattyn or stokes for 2d mesh
 if (md.mesh.dimension==2),
-	if any(stokesflag | pattynflag)
-		error('setflowequation error message: stokes and pattyn elements not allowed in 2d mesh, extrude it first')
+	if any(l1l2flag | stokesflag | pattynflag)
+		error('stokes and pattyn elements not allowed in 2d mesh, extrude it first')
 	end
 end
@@ -73,5 +79,5 @@
 %Stokes can only be used alone for now:
 if any(stokesflag) &any(hutterflag),
-	error('setflowequation error message: stokes cannot be used with any other model for now, put stokes everywhere')
+	error('stokes cannot be used with any other model for now, put stokes everywhere')
 end
 
@@ -83,4 +89,6 @@
 nodeonpattyn=zeros(md.mesh.numberofvertices,1);
 nodeonpattyn(md.mesh.elements(find(pattynflag),:))=1;
+nodeonl1l2=zeros(md.mesh.numberofvertices,1);
+nodeonl1l2(md.mesh.elements(find(l1l2flag),:))=1;
 nodeonstokes=zeros(md.mesh.numberofvertices,1);
 noneflag=zeros(md.mesh.numberofelements,1);
@@ -236,4 +244,5 @@
 md.flowequation.element_equation(find(hutterflag))=1;
 md.flowequation.element_equation(find(macayealflag))=2;
+md.flowequation.element_equation(find(l1l2flag))=8;
 md.flowequation.element_equation(find(pattynflag))=3;
 md.flowequation.element_equation(find(stokesflag))=4;
@@ -253,8 +262,8 @@
 pos=find(nodeonmacayeal);
 md.flowequation.vertex_equation(pos)=2;
+pos=find(nodeonl1l2);
+md.flowequation.vertex_equation(pos)=8;
 pos=find(nodeonpattyn);
 md.flowequation.vertex_equation(pos)=3;
-pos=find(nodeonhutter);
-md.flowequation.vertex_equation(pos)=1;
 pos=find(nodeonmacayealpattyn);
 md.flowequation.vertex_equation(pos)=5;
@@ -276,4 +285,5 @@
 md.flowequation.ismacayealpattyn=double(any(md.flowequation.element_equation==2 | md.flowequation.element_equation==3));
 md.flowequation.isstokes=double(any(md.flowequation.element_equation==4));
+md.flowequation.isl1l2=double(any(md.flowequation.element_equation==8));
 
 return
