Index: /issm/trunk/test/NightlyRun/test1101.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1101.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1101.m	(revision 5606)
@@ -1,5 +1,5 @@
 %This test is a test from the ISMP-HOM Intercomparison project
 %Pattyn and Payne 2006
-printingflag=true;
+printingflag=false;
 
 L_list={5000,10000,20000,40000,80000,160000};
Index: /issm/trunk/test/NightlyRun/test1102.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1102.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1102.m	(revision 5606)
@@ -1,7 +1,11 @@
 %This test is a test from the ISMP-HOM Intercomparison project
 %Pattyn and Payne 2006
+printingflag=false;
 
 L_list={5000,10000,20000,40000,80000,160000};
+L_list={80000};
 results={};
+minvx=[];
+maxvx=[];
 
 for i=1:length(L_list),
@@ -12,24 +16,37 @@
 	md=squaremesh(md,L,L,nx,ny);
 	md=geography(md,'',''); %ice sheet test
+
+%	%Find elements at the corner and extract model
+%	posnodes=find((md.x==0 | md.x==max(md.x)) & (md.y==0 | md.y==max(md.y)));
+%	[a,b]=find(ismember(md.elements,posnodes));
+%	elements=ones(md.numberofelements,1);
+%	elements(a)=0;
+%	md=modelextract(md,elements);
+
 	md=parameterize(md,'../Par/ISMIPA.par');
-	md=extrude(md,9,1);
-
-	md=setelementstype(md,'pattyn','all','stokes','all');
+	md=extrude(md,10,1);
+	md=setelementstype(md,'stokes','all');
 
 	%Create dirichlet on the bed only
-	md.spcvelocity=zeros(md.numberofgrids,6);
+	%md.spcvelocity=zeros(md.numberofgrids,6);
 	pos=find(md.gridonbed);
-	md.spcvelocity(pos,1:2)=1;
+	md.spcvelocity(pos,1:3)=1;
 
 	%Create MPCs to have periodic boundary conditions
-	posx=find(md.x==0);
-	posx2=find(md.x==max(md.x));
+	%posx=find(md.x==0);
+	%posx2=find(md.x==max(md.x));
+	%posx=find(md.x==0 & md.y~=0 & md.y~=max(md.y) & ~md.gridonbed);
+	%posx2=find(md.x==max(md.x) &  md.y~=0 & md.y~=max(md.y) & ~md.gridonbed);
 
-	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));
+	%posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x) & ~md.gridonbed); %Don't take the same grids two times
+	%posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x) & ~md.gridonbed);
 
-	md.penalties=[posx,posx2;posy,posy2];
+	%md.penalties=[posx,posx2;posy,posy2];
 
 	%Compute the diagnostic
+	md.verbose=3;
+	md.eps_abs=NaN;
+	md.eps_rel=NaN;
+	md.eps_res=1;
 	md=solve(md,'analysis_type',DiagnosticSolutionEnum);
 
@@ -38,10 +55,68 @@
 	vy=PatchToVec(md.results.DiagnosticSolution.Vy);
 	vz=PatchToVec(md.results.DiagnosticSolution.Vz);
+	pressure=PatchToVec(md.results.DiagnosticSolution.Pressure);
 	results{i}=md.results.DiagnosticSolution;
+	minvx(i)=min(vx(end-md.numberofgrids2d+1:end));
+	maxvx(i)=max(vx(end-md.numberofgrids2d+1:end));
 
-	plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.numlayers)
+	%Now plot vx, vy, vz and vx on a cross section
+	plotmodel(md,'data',vx,'layer#all',md.numlayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',2)
+	if printingflag, 
+		set(gcf,'Color','w')
+		printmodel(['ismipastokesvx' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+		system(['mv ismipastokesvx' num2str(L) '.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestA ']);
+	end
+	plotmodel(md,'data',vy,'layer#all',md.numlayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',3)
+	if printingflag, 
+		set(gcf,'Color','w')
+		printmodel(['ismipastokesvy' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+		system(['mv ismipastokesvy' num2str(L) '.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestA ']);
+	end
+	plotmodel(md,'data',vz,'layer#all',md.numlayers,'xlim',[0 L/10^3],'ylim',[0 L/10^3],'unit','km','figure',4)
+	if printingflag, 
+		set(gcf,'Color','w')
+		printmodel(['ismipastokesvz' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+		system(['mv ismipastokesvz' num2str(L) '.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestA ']);
+	end
 
+	if(L==5000),
+		plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP5000.exp','layer',md.numlayers,...
+			'resolution',[10 10],'ylim',[10 18],'xlim',[0 5000],'title','','xlabel','')
+	elseif(L==10000),
+		plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP10000.exp','layer',md.numlayers,...
+			'resolution',[10 10],'ylim',[10 30],'xlim',[0 10000],'title','','xlabel','')
+	elseif(L==20000),
+		plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP20000.exp','layer',md.numlayers,...
+			'resolution',[10 10],'ylim',[0 50],'xlim',[0 20000],'title','','xlabel','')
+	elseif(L==40000),
+		plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP40000.exp','layer',md.numlayers,...
+			'resolution',[10 10],'ylim',[0 80],'xlim',[0 40000],'title','','xlabel','')
+	elseif(L==80000),
+		plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP80000.exp','layer',md.numlayers,...
+			'resolution',[10 10],'ylim',[0 100],'xlim',[0 80000],'title','','xlabel','')
+	elseif(L==160000),
+		plotmodel(md,'data',vx,'sectionvalue','../Exp/ISMIP160000.exp','layer',md.numlayers,...
+			'resolution',[10 10],'ylim',[0 120],'xlim',[0 160000],'title','','xlabel','')
+	end
+	if printingflag, 
+		set(gcf,'Color','w')
+		printmodel(['ismipastokesvxsec' num2str(L)],'png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+		system(['mv ismipastokesvxsec' num2str(L) '.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestA ']);
+	end
 end
 
+%Now plot the min and max values of vx for each size of the square
+plot([5 10 20 40 80 160],minvx);ylim([0 18])
+if printingflag, 
+	set(gcf,'Color','w')
+	printmodel('ismipastokesminvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+	system(['mv ismipastokesminvx.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestA ']);
+end
+plot([5 10 20 40 80 160],maxvx);ylim([0 120])
+if printingflag, 
+	set(gcf,'Color','w')
+	printmodel('ismipastokesmaxvx','png','margin','on','marginsize',25,'frame','off','resolution',1.5,'hardcopy','off');
+	system(['mv ismipastokesmaxvx.png ' ISSM_DIR '/../website/doc_pdf/validation/Images/ISMIP/TestA ']);
+end
 %Fields and tolerances to track changes
 field_names     ={...
Index: /issm/trunk/test/NightlyRun/test1103.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1103.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1103.m	(revision 5606)
@@ -1,5 +1,5 @@
 %This test is a test from the ISMP-HOM Intercomparison project
 %Pattyn and Payne 2006
-printingflag=true;
+printingflag=false;
 
 L_list={5000,10000,20000,40000,80000,160000};
Index: /issm/trunk/test/NightlyRun/test1105.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1105.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1105.m	(revision 5606)
@@ -1,5 +1,5 @@
 %This test is a test from the ISMP-HOM Intercomparison project
 %Pattyn and Payne 2006
-printingflag=true;
+printingflag=false;
 
 L_list={5000,10000,20000,40000,80000,160000};
Index: /issm/trunk/test/NightlyRun/test1107.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1107.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1107.m	(revision 5606)
@@ -1,5 +1,5 @@
 %This test is a test from the ISMP-HOM Intercomparison project
 %Pattyn and Payne 2006
-printingflag=true;
+printingflag=false;
 
 L_list={5000,10000,20000,40000,80000,160000};
Index: /issm/trunk/test/NightlyRun/test1109.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1109.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1109.m	(revision 5606)
@@ -5,5 +5,5 @@
 %                   - Pattyn with some sliding
 %                   - Stokes with some sliding
-printingflag=true;
+printingflag=false;
 results={};
 
Index: /issm/trunk/test/NightlyRun/test1201.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1201.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1201.m	(revision 5606)
@@ -1,4 +1,4 @@
 %This test is a test from the EISMINT for Ice shelves Vincent Rommelaere 1996
-printingflag=true;
+printingflag=false;
 
 results={};
Index: /issm/trunk/test/NightlyRun/test1202.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1202.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1202.m	(revision 5606)
@@ -1,4 +1,4 @@
 %Test on the diagnostic model and the prognostic in 2d
-printingflag=true;
+printingflag=false;
 
 %tests 3 and 4: using Glen's flow law
Index: /issm/trunk/test/NightlyRun/test1203.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1203.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1203.m	(revision 5606)
@@ -1,4 +1,4 @@
 %Test on the diagnostic model and the prognostic in 2d
-printingflag=true;
+printingflag=false;
 
 %test 5 and 6 : 
Index: /issm/trunk/test/NightlyRun/test1205.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1205.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1205.m	(revision 5606)
@@ -44,4 +44,5 @@
 %Plot of the velocity from the exact and calculated solutions
 figure(1)
+set(gcf,'Position',[1 1 1580 1150])
 subplot(2,2,1)
 p=patch('Faces',md.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
Index: /issm/trunk/test/NightlyRun/test1207.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1207.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1207.m	(revision 5606)
@@ -17,5 +17,5 @@
 %We extrude the model to have a 3d model
 md=extrude(md,numlayers,1);
-md=setelementstype(md,'pattyn','all','stokes','all');
+md=setelementstype(md,'stokes','all');
 
 %Spc the grids on the bed
Index: /issm/trunk/test/NightlyRun/test1208.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1208.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1208.m	(revision 5606)
@@ -1,5 +1,5 @@
 %EISMINT benchmark experiment A
 numlayers=10;
-resolution=30000;
+resolution=40000;
 
 %To begin with the numerical model
@@ -18,5 +18,6 @@
 
 %Adapt the time steps to the resolution
-md.dt=25;
+md.dt=20;
+md.verbose=10;
 md.output_frequency=20;
 
Index: /issm/trunk/test/NightlyRun/test1301.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1301.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1301.m	(revision 5606)
@@ -3,5 +3,5 @@
 % at upper surface and an impose flux at its base. The result must be a linear temperature from the upper to the lower
 % surface with an imposed slope (Geothermal flux). if it is not the case, something is thermal modeling has been changed...
-printingflag=true;
+printingflag=false;
 
 md=model;
Index: /issm/trunk/test/NightlyRun/test1302.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1302.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1302.m	(revision 5606)
@@ -2,5 +2,5 @@
 % There is u=v=0 and w=cst everywhere the only thermal boundary conditions are an imposed temperature
 % at upper surface and an impose flux at its base.
-printingflag=true;
+printingflag=false;
 
 md=model;
Index: /issm/trunk/test/NightlyRun/test1303.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1303.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1303.m	(revision 5606)
@@ -3,5 +3,5 @@
 % at the lower and upper surface. The result must be a linear temperature from the upper to the lower
 % surface. if it is not the case, something is thermal modeling has been changed...
-printingflag=true;
+printingflag=false;
 
 md=model;
Index: /issm/trunk/test/NightlyRun/test1304.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1304.m	(revision 5605)
+++ /issm/trunk/test/NightlyRun/test1304.m	(revision 5606)
@@ -3,5 +3,5 @@
 % at upper surface and an impose flux at its base. The result must be a linear temperature from the upper to the lower
 % surface with an imposed slope (Geothermal flux). if it is not the case, something is thermal modeling has been changed...
-printingflag=true;
+printingflag=false;
 
 md=model;
