Index: /issm/trunk/src/m/classes/model.m
===================================================================
--- /issm/trunk/src/m/classes/model.m	(revision 9531)
+++ /issm/trunk/src/m/classes/model.m	(revision 9532)
@@ -23,6 +23,6 @@
 		 numberofnodes       = modelfield('default',0,'marshall',true,'format','Integer');
 		 elements            = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
-		 elements_type       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
-		 vertices_type       = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		 elements_type       = modelfield('default',NaN,'marshall',true,'preprocess','marshallapproximations','format','DoubleMat','mattype',2);
+		 vertices_type       = modelfield('default',NaN,'marshall',true,'preprocess','marshallapproximations','format','DoubleMat','mattype',1);
 		 x                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
 		 y                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
@@ -39,6 +39,4 @@
 		 numberofnodes2d    = modelfield('default',0,'marshall',true,'format','Integer');
 		 elements2d         = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
-		 elements_type2d    = modelfield('default',NaN,'marshall',false);
-		 vertices_type2d    = modelfield('default',NaN,'marshall',false);
 		 x2d                = modelfield('default',NaN,'marshall',false);
 		 y2d                = modelfield('default',NaN,'marshall',false);
Index: /issm/trunk/src/m/model/collapse.m
===================================================================
--- /issm/trunk/src/m/model/collapse.m	(revision 9531)
+++ /issm/trunk/src/m/model/collapse.m	(revision 9532)
@@ -45,7 +45,5 @@
 
 %elementstype
-if ~isnan(md.elements_type2d)
-	md.elements_type=md.elements_type2d; 
-elseif ~isnan(md.elements_type)
+if ~isnan(md.elements_type)
 	md.elements_type=project2d(md,md.elements_type,1);
 end	
@@ -109,5 +107,4 @@
 md.y2d=NaN;
 md.elements2d=NaN;
-md.elements_type2d=md.elements_type;
 md.numberofelements2d=md.numberofelements;
 md.numberofnodes2d=md.numberofnodes;
Index: /issm/trunk/src/m/model/display/displaymesh.m
===================================================================
--- /issm/trunk/src/m/model/display/displaymesh.m	(revision 9531)
+++ /issm/trunk/src/m/model/display/displaymesh.m	(revision 9532)
@@ -17,5 +17,4 @@
 	fielddisplay(md,'numberofnodes2d','number of nodes');
 	fielddisplay(md,'elements2d','index into (x,y,z), coordinates of the nodes');
-	fielddisplay(md,'elements_type2d','element types');
 	fielddisplay(md,'x2d','nodes x coordinate');
 	fielddisplay(md,'y2d','nodes y coordinate');
Index: /issm/trunk/src/m/model/extrude.m
===================================================================
--- /issm/trunk/src/m/model/extrude.m	(revision 9531)
+++ /issm/trunk/src/m/model/extrude.m	(revision 9532)
@@ -106,6 +106,4 @@
 md.y2d=md.y;
 md.elements2d=md.elements;
-md.elements_type2d=md.elements_type;
-md.vertices_type2d=md.vertices_type;
 md.numberofelements2d=md.numberofelements;
 md.numberofnodes2d=md.numberofnodes;
@@ -157,5 +155,5 @@
 %elementstype
 if ~isnan(md.elements_type)
-	oldelements_type=md.elements_type2d;
+	oldelements_type=md.elements_type;
 	md.elements_type=zeros(number_el3d,1);
 	md.elements_type=project3d(md,'vector',oldelements_type,'type','element');
@@ -168,5 +166,4 @@
 %verticestype
 if ~isnan(md.vertices_type)
-	oldvertices_type=md.vertices_type2d;
 	md.vertices_type=zeros(number_nodes3d,1);
 	md.vertices_type=project3d(md,'vector',oldvertices_type,'type','node');
Index: /issm/trunk/src/m/model/ismodelselfconsistent.m
===================================================================
--- /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 9531)
+++ /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 9532)
@@ -404,8 +404,7 @@
 			checksize(md,fields,[md.numberofelements 1]);
 			%Check the values of elements_type
-			checkvalues(md,{'elements_type'},[MacAyealApproximationEnum() HutterApproximationEnum() PattynApproximationEnum()...
-				MacAyealPattynApproximationEnum() MacAyealStokesApproximationEnum() PattynStokesApproximationEnum() StokesApproximationEnum() NoneApproximationEnum()]);
+			checkvalues(md,{'elements_type'},[0:7]);
 			if (md.dim==2),
-				checkvalues(md,{'elements_type'},[MacAyealApproximationEnum() HutterApproximationEnum()]);
+				checkvalues(md,{'elements_type'},[1 2]);
 			end
 			if (md.ismacayealpattyn==0 && md.ishutter==0 && md.isstokes==0),
@@ -418,8 +417,7 @@
 			checksize(md,fields,[md.numberofnodes 1]);
 			%Check the values of vertices_type
-			checkvalues(md,{'vertices_type'},[MacAyealApproximationEnum() HutterApproximationEnum() PattynApproximationEnum()...
-				MacAyealPattynApproximationEnum() StokesApproximationEnum() MacAyealStokesApproximationEnum() PattynStokesApproximationEnum() NoneApproximationEnum()]);
+			checkvalues(md,{'vertices_type'},[0:7]);
 			if (md.dim==2),
-				checkvalues(md,{'vertices_type'},[MacAyealApproximationEnum() HutterApproximationEnum()]);
+				checkvalues(md,{'vertices_type'},[1 2]);
 			end
 			if (md.ismacayealpattyn==0 && md.ishutter==0 && md.isstokes==0),
@@ -436,5 +434,5 @@
 			% {{{2
 			%HUTTER ON ICESHELF WARNING
-			if any(md.elements_type==HutterApproximationEnum & md.elementoniceshelf),
+			if any(md.elements_type==1 & md.elementoniceshelf),
 				disp(sprintf('\n !!! Warning: Hutter''s model is not consistent on ice shelves !!!\n'));
 			end
Index: /issm/trunk/src/m/model/marshall.m
===================================================================
--- /issm/trunk/src/m/model/marshall.m	(revision 9531)
+++ /issm/trunk/src/m/model/marshall.m	(revision 9532)
@@ -370,3 +370,13 @@
 		count=count+numpairsforthisrift;
 	end
-
+function out=marshallapproximations(in),
+	out=in;
+	pos=find(in==0); out(pos,end)=NoneApproximationEnum;
+	pos=find(in==1); out(pos,end)=HutterApproximationEnum;
+	pos=find(in==2); out(pos,end)=MacAyealApproximationEnum;
+	pos=find(in==3); out(pos,end)=PattynApproximationEnum;
+	pos=find(in==4); out(pos,end)=StokesApproximationEnum;
+	pos=find(in==5); out(pos,end)=MacAyealPattynApproximationEnum;
+	pos=find(in==6); out(pos,end)=MacAyealStokesApproximationEnum;
+	pos=find(in==7); out(pos,end)=PattynStokesApproximationEnum;
+
Index: /issm/trunk/src/m/model/mechanicalproperties.m
===================================================================
--- /issm/trunk/src/m/model/mechanicalproperties.m	(revision 9531)
+++ /issm/trunk/src/m/model/mechanicalproperties.m	(revision 9532)
@@ -20,5 +20,5 @@
 	error('only 2d model supported yet');
 end
-if any(md.elements_type~=MacAyealApproximationEnum),
+if any(md.elements_type~=2),
 	disp('Warning: the model has some non macayeal elements. These will be treated like MacAyeal''s elements');
 end
Index: /issm/trunk/src/m/model/modelextract.m
===================================================================
--- /issm/trunk/src/m/model/modelextract.m	(revision 9531)
+++ /issm/trunk/src/m/model/modelextract.m	(revision 9532)
@@ -139,5 +139,4 @@
 		md2.elements2d(:,3)=Pnode(md2.elements2d(:,3));
 
-		if ~isnan(md2.elements_type2d), md2.elements_type2d=md1.elements_type2d(pos_elem_2d); end;
 		md2.x2d=md1.x(pos_node_2d);
 		md2.y2d=md1.y(pos_node_2d);
Index: /issm/trunk/src/m/model/plot/plot_elementstype.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_elementstype.m	(revision 9531)
+++ /issm/trunk/src/m/model/plot/plot_elementstype.m	(revision 9532)
@@ -19,35 +19,35 @@
 if is2d
 	%Hutter elements
-	posH=find(data==HutterApproximationEnum);
+	posH=find(data==1);
 	A=elements(posH,1); B=elements(posH,2); C=elements(posH,3); 
-	p1=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',HutterApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p1=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',1,'FaceColor','flat','EdgeColor',edgecolor);
 	%MacAyeal element
-	posM=find(data==MacAyealApproximationEnum);
+	posM=find(data==2);
 	A=elements(posM,1); B=elements(posM,2); C=elements(posM,3); 
-	p2=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',MacAyealApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p2=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',2,'FaceColor','flat','EdgeColor',edgecolor);
 	%Pattyn element
-	posP=find(data==PattynApproximationEnum);
+	posP=find(data==3);
 	A=elements(posP,1); B=elements(posP,2); C=elements(posP,3); 
-	p3=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',PattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p3=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',3,'FaceColor','flat','EdgeColor',edgecolor);
 	%MacAyealPattyn element
-	posMP=find(data==MacAyealPattynApproximationEnum);
+	posMP=find(data==5);
 	A=elements(posMP,1); B=elements(posMP,2); C=elements(posMP,3); 
-	p5=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',MacAyealPattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p5=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',5,'FaceColor','flat','EdgeColor',edgecolor);
 	%Stokes elements
-	posS=find(data==StokesApproximationEnum);
+	posS=find(data==4);
 	A=elements(posS,1); B=elements(posS,2); C=elements(posS,3); 
-	p6=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',StokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p6=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',4,'FaceColor','flat','EdgeColor',edgecolor);
 	%MacAyealStokes elements
-	posMS=find(data==MacAyealStokesApproximationEnum);
+	posMS=find(data==6);
 	A=elements(posMS,1); B=elements(posMS,2); C=elements(posMS,3); 
-	p7=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',MacAyealStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p7=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',6,'FaceColor','flat','EdgeColor',edgecolor);
 	%PattynStokes elements
-	posPS=find(data==PattynStokesApproximationEnum);
+	posPS=find(data==7);
 	A=elements(posPS,1); B=elements(posPS,2); C=elements(posPS,3); 
-	p8=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',PattynStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p8=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',7,'FaceColor','flat','EdgeColor',edgecolor);
 	%None elements
-	posNONE=find(data==NoneApproximationEnum);
+	posNONE=find(data==0);
 	A=elements(posNONE,1); B=elements(posNONE,2); C=elements(posNONE,3); 
-	p9=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',NoneApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p9=patch( 'Faces', [A B C], 'Vertices', [x y z],'CData',0,'FaceColor','flat','EdgeColor',edgecolor);
 
 	legend([p1 p2 p3 p5 p6 p7 p8 p9],...
@@ -57,67 +57,67 @@
 else
 	%Hutter elements
-	posH=find(data==HutterApproximationEnum);
+	posH=find(data==1);
 	A=elements(posH,1); B=elements(posH,2); C=elements(posH,3); D=elements(posH,4); E=elements(posH,5); F=elements(posH,6);
-	p1=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', HutterApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', HutterApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', HutterApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', HutterApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', HutterApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p1=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', 1,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', 1,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', 1,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 1,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 1,'FaceColor','flat','EdgeColor',edgecolor);
 	%MacAyeal elements
-	posM=find(data==MacAyealApproximationEnum);
+	posM=find(data==2);
 	A=elements(posM,1); B=elements(posM,2); C=elements(posM,3); D=elements(posM,4); E=elements(posM,5); F=elements(posM,6);
-	p2=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', MacAyealApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', MacAyealApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', MacAyealApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', MacAyealApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', MacAyealApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p2=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', 2,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', 2,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', 2,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 2,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 2,'FaceColor','flat','EdgeColor',edgecolor);
 	%Pattyn elements
-	posP=find(data==PattynApproximationEnum);
+	posP=find(data==3);
 	A=elements(posP,1); B=elements(posP,2); C=elements(posP,3); D=elements(posP,4); E=elements(posP,5); F=elements(posP,6);
-	p3=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', PattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', PattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', PattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', PattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', PattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p3=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', 3,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', 3,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', 3,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 3,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 3,'FaceColor','flat','EdgeColor',edgecolor);
 	%Stokes elements
-	posS=find(data==StokesApproximationEnum);
+	posS=find(data==4);
 	A=elements(posS,1); B=elements(posS,2); C=elements(posS,3); D=elements(posS,4); E=elements(posS,5); F=elements(posS,6);
-	p4=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', StokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', StokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', StokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', StokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', StokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p4=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', 4,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', 4,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', 4,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 4,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 4,'FaceColor','flat','EdgeColor',edgecolor);
 	%MacAyealPattyn elements
-	posP=find(data==MacAyealPattynApproximationEnum);
+	posP=find(data==5);
 	A=elements(posP,1); B=elements(posP,2); C=elements(posP,3); D=elements(posP,4); E=elements(posP,5); F=elements(posP,6);
-	p5=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', MacAyealPattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', MacAyealPattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', MacAyealPattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', MacAyealPattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', MacAyealPattynApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p5=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', 5,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', 5,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', 5,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 5,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 5,'FaceColor','flat','EdgeColor',edgecolor);
 	%PattynStokes elements
-	PosPS=find(data==PattynStokesApproximationEnum);
+	PosPS=find(data==7);
 	A=elements(PosPS,1); B=elements(PosPS,2); C=elements(PosPS,3); D=elements(PosPS,4); E=elements(PosPS,5); F=elements(PosPS,6);
-	p6=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', PattynStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', PattynStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', PattynStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', PattynStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', PattynStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p6=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', 7,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', 7,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', 7,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 7,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 7,'FaceColor','flat','EdgeColor',edgecolor);
 	%MacAyealStokes elements
-	PosMS=find(data==MacAyealStokesApproximationEnum);
+	PosMS=find(data==6);
 	A=elements(PosMS,1); B=elements(PosMS,2); C=elements(PosMS,3); D=elements(PosMS,4); E=elements(PosMS,5); F=elements(PosMS,6);
-	p7=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', MacAyealStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', MacAyealStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', MacAyealStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', MacAyealStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', MacAyealStokesApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p7=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', 6,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', 6,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', 6,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 6,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 6,'FaceColor','flat','EdgeColor',edgecolor);
 	%None elements
-	PosNONE=find(data==NoneApproximationEnum);
+	PosNONE=find(data==0);
 	A=elements(PosNONE,1); B=elements(PosNONE,2); C=elements(PosNONE,3); D=elements(PosNONE,4); E=elements(PosNONE,5); F=elements(PosNONE,6);
-	p8=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', NoneApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', NoneApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', NoneApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', NoneApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
-	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', NoneApproximationEnum,'FaceColor','flat','EdgeColor',edgecolor);
+	p8=patch( 'Faces', [A B C],'Vertices', [x y z],'CData', 0,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [D E F],  'Vertices', [x y z],'CData', 0,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [A B E D],'Vertices', [x y z],'CData', 0,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [B E F C],'Vertices', [x y z],'CData', 0,'FaceColor','flat','EdgeColor',edgecolor);
+	patch( 'Faces', [C A D F],'Vertices', [x y z],'CData', 0,'FaceColor','flat','EdgeColor',edgecolor);
 
 	legend([p1 p2 p3 p4 p5 p6 p7 p8],...
Index: /issm/trunk/src/m/model/plot/processmesh.m
===================================================================
--- /issm/trunk/src/m/model/plot/processmesh.m	(revision 9531)
+++ /issm/trunk/src/m/model/plot/processmesh.m	(revision 9532)
@@ -39,5 +39,4 @@
 	elements2d=md.elements2d;
 	elements=md.elements;
-	elements_type2d=md.elements_type2d;
 
 	%is it a 2d plot?
@@ -64,5 +63,4 @@
 		z=zeros(size(x2d));
 		elements=elements2d;
-		elements_type=elements_type2d;
 	end
 else
Index: /issm/trunk/src/m/model/setelementstype.m
===================================================================
--- /issm/trunk/src/m/model/setelementstype.m	(revision 9531)
+++ /issm/trunk/src/m/model/setelementstype.m	(revision 9532)
@@ -74,5 +74,5 @@
 nodeonhutter(md.elements(find(hutterflag),:))=1;
 md.nodeonhutter=nodeonhutter;
-md.elements_type(find(hutterflag))=HutterApproximationEnum();
+md.elements_type(find(hutterflag))=1;
 
 %2: MacAyeal elements
@@ -80,5 +80,5 @@
 nodeonmacayeal(md.elements(find(macayealflag),:))=1;
 md.nodeonmacayeal=nodeonmacayeal;
-md.elements_type(find(macayealflag))=MacAyealApproximationEnum();
+md.elements_type(find(macayealflag))=2;
 
 %3: Pattyn elements
@@ -86,5 +86,5 @@
 nodeonpattyn(md.elements(find(pattynflag),:))=1;
 md.nodeonpattyn=nodeonpattyn;
-md.elements_type(find(pattynflag))=PattynApproximationEnum();
+md.elements_type(find(pattynflag))=3;
 
 %4: Stokes elements
@@ -100,5 +100,5 @@
 nodeonstokes(md.elements(find(stokesflag),:))=1;
 md.nodeonstokes=nodeonstokes;
-md.elements_type(find(stokesflag))=StokesApproximationEnum();
+md.elements_type(find(stokesflag))=4;
 
 %Then complete with NoneApproximation or the other model used if there is no stokes
@@ -108,13 +108,13 @@
 		nodeonpattyn(md.elements(find(pattynflag),:))=1;
 		md.nodeonpattyn=nodeonpattyn;
-		md.elements_type(find(~stokesflag))=PattynApproximationEnum();
+		md.elements_type(find(~stokesflag))=3;
 	elseif any(macayealflag), %fill with macayeal
 		macayealflag(~stokesflag)=1;
 		nodeonmacayeal(md.elements(find(macayealflag),:))=1;
 		md.nodeonmacayeal=nodeonmacayeal;
-		md.elements_type(find(~stokesflag))=MacAyealApproximationEnum();
+		md.elements_type(find(~stokesflag))=2;
 	else %fill with none 
 	%5: None elements (non Stokes)
-		md.elements_type(find(~stokesflag))=NoneApproximationEnum();
+		md.elements_type(find(~stokesflag))=0;
 	end
 end
@@ -155,5 +155,5 @@
 
 		%Create MacaAyealPattynApproximation where needed
-		md.elements_type(find(macayealpattynflag))=MacAyealPattynApproximationEnum();
+		md.elements_type(find(macayealpattynflag))=5;
 
 		%Now recreate nodeonmacayeal and nodeonmacayealpattyn
@@ -174,5 +174,5 @@
 
 		%Create MacaAyealPattynApproximation where needed
-		md.elements_type(find(pattynstokesflag))=PattynStokesApproximationEnum();
+		md.elements_type(find(pattynstokesflag))=7;
 
 		%Now recreate nodeonpattynstokes
@@ -193,6 +193,6 @@
 		md.nodeonstokes=nodeonstokes;
 
-		%Create MacaAyealMacAyealApproximation where needed
-		md.elements_type(find(macayealstokesflag))=MacAyealStokesApproximationEnum();
+		%Create MacaAyeal Approximation where needed
+		md.elements_type(find(macayealstokesflag))=6;
 
 		%Now recreate nodeonmacayealstokes
@@ -207,32 +207,32 @@
 md.vertices_type=zeros(md.numberofnodes,1);
 pos=find(nodeonhutter);
-md.vertices_type(pos)=HutterApproximationEnum();
+md.vertices_type(pos)=1;
 pos=find(nodeonmacayeal);
-md.vertices_type(pos)=MacAyealApproximationEnum();
+md.vertices_type(pos)=2;
 pos=find(nodeonpattyn);
-md.vertices_type(pos)=PattynApproximationEnum();
+md.vertices_type(pos)=3;
 pos=find(nodeonhutter);
-md.vertices_type(pos)=HutterApproximationEnum();
+md.vertices_type(pos)=1;
 pos=find(nodeonpattyn & nodeonmacayeal);
-md.vertices_type(pos)=PattynApproximationEnum();
+md.vertices_type(pos)=3;
 pos=find(nodeonmacayealpattyn);
-md.vertices_type(pos)=MacAyealPattynApproximationEnum();
+md.vertices_type(pos)=5;
 pos=find(nodeonstokes);
-md.vertices_type(pos)=StokesApproximationEnum();
+md.vertices_type(pos)=4;
 if any(stokesflag),
 	pos=find(~nodeonstokes);
 	if(~any(pattynflag) & ~any(macayealflag)),
-		md.vertices_type(pos)=NoneApproximationEnum();
+		md.vertices_type(pos)=0;
 	end
 end
 pos=find(nodeonpattynstokes);
-md.vertices_type(pos)=PattynStokesApproximationEnum();
+md.vertices_type(pos)=7;
 pos=find(nodeonmacayealstokes);
-md.vertices_type(pos)=MacAyealStokesApproximationEnum();
+md.vertices_type(pos)=6;
 
 %figure out solution types
-md.ishutter=double(any(md.elements_type==HutterApproximationEnum));
-md.ismacayealpattyn=double(any(md.elements_type==MacAyealApproximationEnum | md.elements_type==PattynApproximationEnum));
-md.isstokes=double(any(md.elements_type==StokesApproximationEnum));
-
-end
+md.ishutter=double(any(md.elements_type==1));
+md.ismacayealpattyn=double(any(md.elements_type==2 | md.elements_type==3));
+md.isstokes=double(any(md.elements_type==4));
+
+end
