Index: /issm/trunk/test/NightlyRun/test1102.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1102.m	(revision 8154)
+++ /issm/trunk/test/NightlyRun/test1102.m	(revision 8155)
@@ -4,5 +4,4 @@
 
 L_list={5000,10000,20000,40000,80000,160000};
-L_list={80000};
 results={};
 minvx=[];
Index: /issm/trunk/test/NightlyRun/test1110.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1110.m	(revision 8154)
+++ /issm/trunk/test/NightlyRun/test1110.m	(revision 8155)
@@ -1,44 +1,120 @@
 %This test is a test from the ISMP-HOM Intercomparison project
 %TestF 
-L=100000; %in m
-nx=30; %numberof nodes in x direction
-ny=30;
-md=model;
-md=squaremesh(md,L,L,nx,ny);
-%md=mesh(md,'../Exp/SquareISMIP.exp',5500);
-md=geography(md,'',''); %ice sheet test
-md=parameterize(md,'../Par/ISMIPF.par');
-md=extrude(md,3,1);
+printingflag=false;
 
-md=setelementstype(md,'pattyn','all');
-%md=setelementstype(md,'pattyn','all','stokes','all'); 
+for i=1:4,
+	L=100000; %in m
+	nx=30; %numberof nodes in x direction
+	ny=30;
+	md=model;
+	md=squaremesh(md,L,L,nx,ny);
+	%md=mesh(md,'../Exp/SquareISMIP.exp',5500);
+	md=geography(md,'',''); %ice sheet test
+	md=parameterize(md,'../Par/ISMIPF.par');
+	md=extrude(md,4,1);
 
-md.spcvelocity(:,:)=0;
-%Create dirichlet on the bed if no slip
-pos=find(md.gridonbed);
-md.spcvelocity(pos,1:2)=1;
-md.spctemperature(:,2)=255;
-md.spctemperature(:,1)=255;
+	if (i==1 | i==2),
+		md=setelementstype(md,'pattyn','all');
+	else
+		md=setelementstype(md,'stokes','all');
+	end
 
-%Create MPCs to have periodic boundary conditions
-posx=find(md.x==0);
-posx2=find(md.x==max(md.x));
+	md.spcvelocity(:,:)=0;
+	if (i==1 | i==3),
+		%Create dirichlet on the bed if no slip
+		pos=find(md.gridonbed);
+		md.spcvelocity(pos,1:3)=1;
+	else
+		pos=find(md.gridonbed & (md.x==0 | md.x==max(md.x)) & (md.y==0 | md.y==max(md.y)));
+		md.spcvelocity(pos,1:3)=1;
+		md.spcvelocity(pos,4)=100; %because we need a dirichlet somewhere
 
-posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same grids two times
-posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));
+	end
+	pos=find(~md.gridonbed);
+	md.spctemperature(pos,2)=255;
+	md.spctemperature(pos,1)=1;
 
-md.penalties=[posx,posx2;posy,posy2];
+	%Create MPCs to have periodic boundary conditions
+	posx=find(md.x==0);
+	posx2=find(md.x==max(md.x));
 
-md.dt=5;
-md.ndt=50;
+	posy=find(md.y==0);
+	posy2=find(md.y==max(md.y));
 
-%Compute the diagnostic
-md=SetParallel(md,8);
-md.verbose=verbose('convergence',true,'solution',true);
-md=solve(md,'analysis_type',Transient3DSolutionEnum);
+	md.penalties=[posx,posx2;posy,posy2];
 
-%vx=PatchToVec(md.results.DiagnosticSolution.Vx);
-%vy=PatchToVec(md.results.DiagnosticSolution.Vy);
-%vz=PatchToVec(md.results.DiagnosticSolution.Vz);
+	md.dt=3;
+	md.ndt=300;
+	md.output_frequency=50;
+	md.prognostic_DG=0;
+	md.max_nonlinear_iterations=1;
 
-plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.numlayers)
+	%Compute the diagnostic
+	md=SetParallel(md,8);
+	md.verbose=verbose('convergence',true,'solution',true);
+	md=solve(md,'analysis_type',Transient3DSolutionEnum);
+
+	%save the results
+	results{i}=md.results.Transient3DSolution(end);
+	
+	%Now plot vx and delta surface 
+	plotmodel(md,'data',PatchToVec(md.results.Transient3DSolution(end).Vx),'layer',md.numlayers,'sectionvalue','../Exp/ISMIP100000.exp')
+	if printingflag, 
+		set(gcf,'Color','w')
+		if i==1,
+			printmodel('ismipfpattynvxfrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+			system(['mv ismipfpattynvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']);
+		elseif i==2,
+			printmodel('ismipfpattynvxsliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+			system(['mv ismipfpattynvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']);
+		elseif i==3,
+			printmodel('ismipfstokesvxfrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+			system(['mv ismipfstokesvxfrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']);
+		elseif i==4,
+			printmodel('ismipfstokesvxsliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+			system(['mv ismipfstokesvxsliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']);
+		end
+	end
+
+	plotmodel(md,'data',PatchToVec(md.results.Transient3DSolution(end).Surface)-md.surface,'layer',md.numlayers,'sectionvalue','../Exp/ISMIP100000.exp')
+	if printingflag, 
+		set(gcf,'Color','w')
+		if i==1,
+			printmodel('ismipfpattyndeltasurfacefrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+			system(['mv ismipfpattyndeltasurfacefrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']);
+		elseif i==2,
+			printmodel('ismipfpattyndeltasurfacesliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+			system(['mv ismipfpattyndeltasurfacesliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']);
+		elseif i==3,
+			printmodel('ismipfstokesdeltasurfacefrozen','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+			system(['mv ismipfstokesdeltasurfacefrozen.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']);
+		elseif i==4,
+			printmodel('ismipfstokesdeltasurfacesliding','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+			system(['mv ismipfstokesdeltasurfacesliding.png ' ISSM_DIR '/website/doc_pdf/validation/Images/ISMIP/TestF ']);
+		end
+	end
+end
+
+%Fields and tolerances to track changes
+field_names     ={ ...
+	'VxPattynFrozen','VyPattynFrozen','VzPattynFrozen','SurfacePattynFrozen',...
+	'VxPattynSliding','VyPattynSliding','VzPattynSliding','SurfacePattynSliding',...
+	'VxStokesFrozen','VyStokesFrozen','VzStokesFrozen','SurfaceStokesFrozen',...
+	'VxStokesSliding','VyStokesSliding','VzStokesSliding','SurfaceStokesSliding'
+};
+field_tolerances={...
+	1e-10,1e-09,1e-10,...
+	1e-10,1e-10,1e-10,...
+	1e-10,1e-09,1e-09,...
+	1e-09,1e-09,1e-09...
+};
+field_values={};
+for i=1:4,
+	result=results{i};
+	field_values={field_values{:},...
+		PatchToVec(result.Vx),...
+		PatchToVec(result.Vy),...
+		PatchToVec(result.Vz),...
+		PatchToVec(result.Surface)-md.surface,...
+		};
+end
