Index: /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/DomainOutline.exp
===================================================================
--- /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/DomainOutline.exp	(revision 1733)
+++ /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/DomainOutline.exp	(revision 1733)
@@ -0,0 +1,21 @@
+## Name:domainoutline
+## Icon:0
+# Points Count  Value
+5 1.
+# X pos Y pos
+0 0
+1000000 0
+1000000 1000000
+0 1000000
+0 0
+
+## Name:domainoutline
+## Icon:1
+# Points Count  Value
+5 1.
+# X pos Y pos
+400000 400000 
+600000 400000
+600000 600000
+400000 600000
+400000 400000 
Index: /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/Front.exp
===================================================================
--- /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/Front.exp	(revision 1733)
+++ /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/Front.exp	(revision 1733)
@@ -0,0 +1,10 @@
+## Name:icefront
+## Icon:0
+# Points Count  Value
+5 1.
+# X pos Y pos
+-1000 900000
+-1000 1100000
+1100000 1100000
+1100000 900000
+-1000 900000
Index: /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/Rifts.exp
===================================================================
--- /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/Rifts.exp	(revision 1733)
+++ /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/Rifts.exp	(revision 1733)
@@ -0,0 +1,126 @@
+## Name:Rifts
+## Icon:0
+# Points Count  Value
+120 1.000000
+# X pos Y pos
+240000.0000000000 210000.0000000000
+243333.3333333333 213763.4408602151
+246666.6666666667 217526.8817204301
+250000.0000000000 221290.3225806452
+253333.3333333333 225053.7634408602
+256666.6666666667 228817.2043010753
+260000.0000000000 232580.6451612903
+263333.3333333334 236344.0860215054
+266666.6666666667 240107.5268817204
+270000.0000000000 243870.9677419355
+273333.3333333333 247634.4086021505
+276666.6666666666 251397.8494623656
+280000.0000000000 255161.2903225806
+283333.3333333334 258924.7311827957
+286666.6666666667 262688.1720430108
+290000.0000000000 266451.6129032259
+293333.3333333333 270215.0537634409
+296666.6666666666 273978.4946236560
+300000.0000000000 277741.9354838710
+304733.3333333334 280394.7772657451
+309466.6666666667 283047.6190476191
+314133.3333333334 284952.3809523809
+318800.0000000000 286857.1428571428
+323466.6666666666 288761.9047619047
+328133.3333333333 290666.6666666667
+332800.0000000000 292571.4285714286
+337466.6666666667 294476.1904761905
+342133.3333333334 296380.9523809524
+346800.0000000000 298285.7142857143
+351466.6666666666 300190.4761904762
+356133.3333333333 302095.2380952381
+360800.0000000000 304000.0000000000
+365466.6666666667 305904.7619047619
+370133.3333333334 307809.5238095238
+374800.0000000000 309714.2857142857
+379466.6666666666 311619.0476190476
+384133.3333333333 313523.8095238095
+388800.0000000000 315428.5714285714
+393466.6666666667 317333.3333333333
+398733.3333333334 318666.6666666666
+404000.0000000000 320000.0000000000
+409000.0000000000 320000.0000000000
+414000.0000000000 320000.0000000000
+419000.0000000000 320000.0000000000
+424000.0000000000 320000.0000000000
+429000.0000000000 320000.0000000000
+434000.0000000000 320000.0000000000
+439000.0000000000 320000.0000000000
+444000.0000000000 320000.0000000000
+449000.0000000000 320000.0000000000
+454000.0000000000 320000.0000000000
+459000.0000000000 320000.0000000000
+464000.0000000000 320000.0000000000
+469000.0000000000 320000.0000000000
+474000.0000000000 320000.0000000000
+479000.0000000000 320000.0000000000
+484000.0000000000 320000.0000000000
+489000.0000000000 320000.0000000000
+494000.0000000000 320000.0000000000
+499000.0000000000 320000.0000000000
+504000.0000000000 320000.0000000000
+509000.0000000000 320000.0000000000
+514000.0000000000 320000.0000000000
+519000.0000000000 320000.0000000000
+524000.0000000000 320000.0000000000
+529000.0000000000 320000.0000000000
+534000.0000000000 320000.0000000000
+539000.0000000000 320000.0000000000
+544000.0000000000 320000.0000000000
+549000.0000000000 320000.0000000000
+554000.0000000000 320000.0000000000
+559000.0000000000 320000.0000000000
+564000.0000000000 320000.0000000000
+569000.0000000000 320000.0000000000
+574000.0000000000 320000.0000000000
+579000.0000000000 320000.0000000000
+584000.0000000000 320000.0000000000
+589000.0000000000 320000.0000000000
+594000.0000000000 320000.0000000000
+599333.3333333333 319047.6190476191
+604666.6666666666 318095.2380952381
+609333.3333333333 316190.4761904762
+614000.0000000000 314285.7142857143
+618666.6666666667 312380.9523809524
+623333.3333333334 310476.1904761905
+628000.0000000000 308571.4285714286
+632666.6666666666 306666.6666666667
+637333.3333333333 304761.9047619047
+642000.0000000000 302857.1428571428
+646666.6666666667 300952.3809523809
+651333.3333333334 299047.6190476191
+656000.0000000000 297142.8571428572
+660666.6666666666 295238.0952380953
+665333.3333333333 293333.3333333334
+670000.0000000000 291428.5714285714
+674666.6666666667 289523.8095238095
+679333.3333333334 287619.0476190476
+684000.0000000000 285714.2857142857
+688666.6666666666 283809.5238095238
+693333.3333333333 281904.7619047619
+698000.0000000000 280000.0000000000
+701333.3333333333 276236.5591397849
+704666.6666666666 272473.1182795699
+708000.0000000000 268709.6774193548
+711333.3333333334 264946.2365591398
+714666.6666666667 261182.7956989247
+718000.0000000000 257419.3548387097
+721333.3333333333 253655.9139784946
+724666.6666666666 249892.4731182796
+728000.0000000000 246129.0322580645
+731333.3333333334 242365.5913978495
+734666.6666666667 238602.1505376344
+738000.0000000000 234838.7096774194
+741333.3333333333 231075.2688172043
+744666.6666666666 227311.8279569892
+748000.0000000000 223548.3870967742
+751333.3333333334 219784.9462365591
+754666.6666666667 216021.5053763441
+758000.0000000000 212258.0645161290
+760000.0000000000 210000.0000000000
+
Index: /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/RiftsLateral.exp
===================================================================
--- /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/RiftsLateral.exp	(revision 1733)
+++ /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/RiftsLateral.exp	(revision 1733)
@@ -0,0 +1,11 @@
+## Name:RiftsLateral
+## Icon:0
+# Points Count  Value
+5 1.000000
+# X pos Y pos
+162237.7622377622 351796.4071856287
+204195.8041958041 474550.8982035927
+226573.4265734265 594311.3772455089
+201398.6013986013 645209.5808383233
+128671.3286713285 696107.7844311377
+
Index: /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/Square.par
===================================================================
--- /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/Square.par	(revision 1733)
+++ /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/Square.par	(revision 1733)
@@ -0,0 +1,40 @@
+%Start defining model parameters here
+
+%dynamics
+md.debug=0;
+md.dt=1*md.yts; %1 year
+md.ndt=md.dt*10; 
+md.artificial_diffusivity=1;
+
+hmin=300;
+hmax=1000;
+ymin=min(md.y);
+ymax=max(md.y);
+md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+md.bed=-md.rho_ice/md.rho_water*md.thickness;
+md.surface=md.bed+md.thickness;
+
+md.drag_type=2; %0 none 1 plastic 2 viscous
+md.drag=200*ones(md.numberofgrids,1); %q=1.
+%Take care of iceshelves: no basal drag
+pos=find(md.elementoniceshelf);
+md.drag(md.elements(pos,:))=0;
+md.p=ones(md.numberofelements,1);
+md.q=ones(md.numberofelements,1);
+md.viscosity_overshoot=0.3;
+
+md.observed_temperature=(273-20)*ones(md.numberofgrids,1);
+
+md.B=paterson(md.observed_temperature);
+md.n=3*ones(md.numberofelements,1);
+
+%Deal with boundary conditions:
+md=SetIceShelfBC(md,'Front.exp');
+
+%Parallel options
+md.np=3;
+md.time=50;
+md.waitonlock=1;
+		
+		
+md=solversettoasm(md);
Index: /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/buildme.m
===================================================================
--- /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/buildme.m	(revision 1733)
+++ /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/buildme.m	(revision 1733)
@@ -0,0 +1,15 @@
+%mesh resolution
+resolution=50000;
+riftres=1000;
+
+md=model;
+
+%refine mesh for rift
+expcoarsen('Rifts2.exp','Rifts.exp',riftres);
+
+%md=mesh(md,'DomainOutline.exp',50000);
+md=mesh(md,'DomainOutline.exp','Rifts2.exp',resolution);
+md=meshprocessrifts(md);
+md=geography(md,'all','');
+md=parameterize(md,'Square.par');
+md=setelementstype(md,'macayeal','all');
Index: /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/runme.m
===================================================================
--- /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/runme.m	(revision 1733)
+++ /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/runme.m	(revision 1733)
@@ -0,0 +1,110 @@
+function varargout=runme(varargin)
+%RUNME - test deck for ISSM nightly runs
+%
+%   Usage:
+%      varargout=runme(varargin);
+%
+%   Examples:
+%      runme;
+%      runme({'ice'});
+%      runme({'ice','cielo_serial'},{'diagnostic'});
+%      md=runme({'cielo_parallel'});
+%
+%   See Also: UPDATEARCHIVE
+
+% This file can be run to check that the current version of issm is giving 
+% coherent results. This test deals with an icesheet without icefront, with an ice rise (square) and 
+% a fault (full of water) for a 2d model. The geometry % is square. 
+% Just run this file in Matlab, with a properly setup ISSM code. 
+% The results of this test will indicate if there is a difference between current computations 
+% and archived results.
+
+% Errors  between archived results and the current version will get flagged if they are not within 
+% a certain tolerance. The current tolerance is 10^-12. If you have good reasons to believe this 
+% tolerance should be lowered (for example, if you are running single precision compilers?), feel 
+% free to tweak the tolerance variable.
+
+%check arguments
+if (nargin>2 | nargout>1)
+	help runme
+	error('runme error message: bad usage');
+end
+
+%packages and analysis_types to be tested
+if nargin==2,
+	solutions=varargin{2};
+else
+	solutions={'diagnostic'};
+end
+if nargin,
+	packages=varargin{1};
+else
+	packages={'cielo_serial','cielo_parallel'};
+end
+
+%Initialize log message for nightly runs.
+testname='IceShelfNoIceFrontM2dRifts_24';
+
+%go through the solutions requested
+for i=1:length(packages),
+	package=packages{i};
+
+	for j=1:length(solutions),
+		solution=solutions{j};
+
+		%check solution requested
+		if	(strcmpi(package,'macayeal')  | strcmpi(package,'ice') & ~strcmpi(solution,'diagnostic')),
+			disp(sprintf(['\nsolution: ' solution  ', with package: ' package  ', in test: ' testname  ', not supported yet.\n']));
+			continue
+		end
+
+		%initialize model
+		md=model;
+		md=mesh(md,'DomainOutline.exp','Rifts.exp',50000);
+		md=meshprocessrifts(md);
+		md=geography(md,'all','');
+		md=parameterize(md,'Square.par');
+		md=setelementstype(md,'macayeal','all');
+		
+		%compute solution
+		[analysis_type sub_analysis_type]=testsgetanalysis(solution);
+		[md packagefinal]=testsgetpackage(md,package);
+		if ~testschecksolution(md.type,solution), continue; end
+
+		if strcmpi(md.cluster,'none'),
+			md=solversettoasm(md);
+		else
+			md=solversettomumps(md);
+		end
+
+		md=solve(md,'analysis_type',analysis_type,'sub_analysis_type',sub_analysis_type,'package',packagefinal);
+
+		%compute fields to be checked
+		fields=testsgetfields(md.type,solution);
+
+		%load archive
+		eval(['load Archive' package solution ]);
+
+		for k=1:length(fields),
+			
+			%Get field and tolerance
+			field=fields{k};
+			tolerance=testsgettolerance(md,package,solution,field);
+
+			%compare to archive
+			eval(['Archive=Archive' package solution '_field' num2str(k) ';']);
+			eval(['error_diff=full(max(abs(Archive-md.results.' field '))/(max(abs(Archive))+eps));']);
+
+			%disp test result
+			if (error_diff>tolerance);
+				disp(sprintf(['\n\nERROR   difference: %-7.2g > %7.2g test: %-25s solution: %-16s package: %-14s field: ' field  '.\n\n'],error_diff,tolerance,testname,solution,package));
+			else
+				disp(sprintf(['\n\nSUCCESS difference: %-7.2g < %7.2g test: %-25s solution: %-16s package: %-14s field: ' field  '.\n\n'],error_diff,tolerance,testname,solution,package));
+			end
+
+		end
+	end
+end
+if nargout==1, 
+	varargout{1}=md; 
+end
Index: /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/updatearchive.m
===================================================================
--- /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/updatearchive.m	(revision 1733)
+++ /issm/trunk/test/Verification/IceShelfIceFrontM2dRifts_24/updatearchive.m	(revision 1733)
@@ -0,0 +1,88 @@
+function varargout=updatearchive(varargin)
+%updatearchive - test deck for ISSM nightly runs
+%
+%   Usage:
+%      varargout=updatearchive(varargin);
+%
+%   Examples:
+%      updatearchive;
+%      updatearchive({'ice'});
+%      updatearchive({'ice','cielo_serial'},{'diagnostic'});
+%      md=updatearchive({'cielo_parallel'});
+%
+%   See also: RUNME
+
+% This file can be run to update the velocity archives  of the test1.
+% This test deals with an icesheet without icefront for a 2d model. The geometry 
+% is square. Just run this file in Matlab, with a properly setup Ice code. 
+
+% The archive files will be saved in this directory but will not commited to ice1. 
+% Just commit the result if you want to.
+
+%check arguments
+if (nargin>2 | nargout>1)
+	help updatearchive
+	error('updatearchive error message: bad usage');
+end
+
+%packages and analysis_types to be tested
+if nargin==2,
+	solutions=varargin{2};
+else
+	solutions={'diagnostic'};
+end
+if nargin,
+	packages=varargin{1};
+else
+	packages={'cielo_serial','cielo_parallel'};
+end
+
+%go through the solutions requested
+testname='IceShelfNoIceFrontM2dRifts_24';
+for i=1:length(packages),
+	package=packages{i};
+
+	for j=1:length(solutions),
+		solution=solutions{j};
+
+		%check solution requested
+		if (strcmpi(package,'macayeal') & ~strcmpi(solution,'diagnostic')),
+			disp(sprintf(['\nsolution: ' solution  ', with package: ' package  ', in test: ' testname  ', not supported yet.\n']));
+			continue
+		end
+
+		%initialize model
+		md=model;
+		md=mesh(md,'DomainOutline.exp','Rifts.exp',50000);
+		md=meshprocessrifts(md);
+		md=geography(md,'all','');
+		md=parameterize(md,'Square.par');
+		md=setelementstype(md,'macayeal','all');
+
+		%compute solution
+		[analysis_type sub_analysis_type]=testsgetanalysis(solution);
+		[md packagefinal]=testsgetpackage(md,package);
+		if ~testschecksolution(md.type,solution), continue; end
+
+
+		if strcmpi(md.cluster,'none'),
+			md=solversettoasm(md);
+		else
+			md=solversettomumps(md);
+		end
+		md=solve(md,'analysis_type',analysis_type,'sub_analysis_type',sub_analysis_type,'package',packagefinal);
+
+		%compute fields to be checked
+		fields=testsgetfields(md.type,solution);
+
+		%save new archive
+		for k=1:length(fields),
+			field=fields{k};
+			eval(['Archive' package solution '_field' num2str(k) '=md.results. ' field  ';']);
+		end
+		eval(['save Archive' package solution ' Archive' package solution '_field*']);
+	end
+end
+if nargout==1, 
+	varargout{1}=md; 
+end
