Index: /issm/branches/trunk-jpl-damage/test/NightlyRun/test137.m
===================================================================
--- /issm/branches/trunk-jpl-damage/test/NightlyRun/test137.m	(revision 12256)
+++ /issm/branches/trunk-jpl-damage/test/NightlyRun/test137.m	(revision 12256)
@@ -0,0 +1,25 @@
+
+%Simple mesh
+md=bamg(model,'domain','../Exp/Square.exp','hmax',100000);
+x1=md.mesh.x;
+y1=md.mesh.y;
+
+%hVertices
+md=bamg(model,'domain','../Exp/Square.exp','hmax',300000,'hvertices',[10000 100000 400000 100000]');
+x2=md.mesh.x;
+y2=md.mesh.y;
+
+%big mesh
+t0=clock;
+md=bamg(model,'domain','../Exp/Square.exp','hmax',3000);
+nbelements=md.mesh.numberofelements;
+elapsedtime=etime(clock,t0);
+
+%Fields and tolerances to track changes
+field_names     ={'x1' 'y1' 'x2' 'y2' 'nbelements' 'elapsed time'};
+field_tolerances={1e-13 1e-13 1e-13 1e-13 1e-13 0.5};
+field_values={...
+	x1, y1,...
+	x2, y2,...
+	nbelements,elapsedtime...
+	};
Index: /issm/branches/trunk-jpl-damage/test/NightlyRun/test260.m
===================================================================
--- /issm/branches/trunk-jpl-damage/test/NightlyRun/test260.m	(revision 12255)
+++ /issm/branches/trunk-jpl-damage/test/NightlyRun/test260.m	(revision 12256)
@@ -1,13 +1,33 @@
-md=triangle(model,'../Exp/Square.exp',150000);
+md=triangle(model,'../Exp/Square.exp',350000);
 md=setmask(md,'all','');
 md=parameterize(md,'../Par/SquareShelf.par');
-md.materials.rheology_Z=0.5*ones(md.mesh.numberofvertices,1);
+md=extrude(md,3,1);
 md=setflowequation(md,'macayeal','all');
 md.cluster=generic('name',oshostname(),'np',3);
-md=solve(md,DiagnosticSolutionEnum);
+
+md.timestepping.time_step=1;
+md.settings.output_frequency=1;
+md.timestepping.final_time=4;
+
+%Set up transient
+smb = ones(md.mesh.numberofvertices,1)*3.6;
+smb=[ smb smb*-1 ];
+
+md.surfaceforcings.mass_balance= smb;
+md.surfaceforcings.mass_balance(end+1,:)=[1.5 3];
+md.transient.isthermal=0;
+
+md=solve(md,TransientSolutionEnum);
 
 %Fields and tolerances to track changes
-field_names     ={'Vx','Vy','Vel','Pressure','Damage'};
-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13};
+field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SurfaceforcingsMassBalance1', ...
+	'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SurfaceforcingsMassBalance2', ...
+	'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SurfaceforcingsMassBalance3',...
+	'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SurfaceMassbalance4'};
+field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+
 field_values={...
 	(md.results.DiagnosticSolution.Vx),...
@@ -15,4 +35,39 @@
 	(md.results.DiagnosticSolution.Vel),...
 	(md.results.DiagnosticSolution.Pressure),...
-	(md.results.DiagnosticSolution.MaterialsRheologyZbar),...
+	(md.results.TransientSolution(1).Vx),...
+	(md.results.TransientSolution(1).Vy),...
+	(md.results.TransientSolution(1).Vz),...
+	(md.results.TransientSolution(1).Vel),...
+	(md.results.TransientSolution(1).Pressure),...
+	(md.results.TransientSolution(1).Bed),...
+	(md.results.TransientSolution(1).Surface),...
+	(md.results.TransientSolution(1).Thickness),...
+	(md.results.TransientSolution(1).SurfaceforcingsMassBalance),...
+	(md.results.TransientSolution(2).Vx),...
+	(md.results.TransientSolution(2).Vy),...
+	(md.results.TransientSolution(2).Vz),...
+	(md.results.TransientSolution(2).Vel),...
+	(md.results.TransientSolution(2).Pressure),...
+	(md.results.TransientSolution(2).Bed),...
+	(md.results.TransientSolution(2).Surface),...
+	(md.results.TransientSolution(2).Thickness),...
+	(md.results.TransientSolution(2).SurfaceforcingsMassBalance),...
+	(md.results.TransientSolution(3).Vx),...
+	(md.results.TransientSolution(3).Vy),...
+	(md.results.TransientSolution(3).Vz),...
+	(md.results.TransientSolution(3).Vel),...
+	(md.results.TransientSolution(3).Pressure),...
+	(md.results.TransientSolution(3).Bed),...
+	(md.results.TransientSolution(3).Surface),...
+	(md.results.TransientSolution(3).Thickness),...
+	(md.results.TransientSolution(3).SurfaceforcingsMassBalance),...
+	(md.results.TransientSolution(4).Vx),...
+	(md.results.TransientSolution(4).Vy),...
+	(md.results.TransientSolution(4).Vz),...
+	(md.results.TransientSolution(4).Vel),...
+	(md.results.TransientSolution(4).Pressure),...
+	(md.results.TransientSolution(4).Bed),...
+	(md.results.TransientSolution(4).Surface),...
+	(md.results.TransientSolution(4).Thickness),...
+	(md.results.TransientSolution(4).SurfaceforcingsMassBalance),...
 	};
Index: /issm/branches/trunk-jpl-damage/test/NightlyRun/test527.m
===================================================================
--- /issm/branches/trunk-jpl-damage/test/NightlyRun/test527.m	(revision 12256)
+++ /issm/branches/trunk-jpl-damage/test/NightlyRun/test527.m	(revision 12256)
@@ -0,0 +1,56 @@
+%Simple mesh 1
+hVertices=10000*ones(27,1);
+hVertices(1:5)=1000;
+md=bamg(model,'domain','../Exp/Pig.exp','hmax',20000,'hVertices',hVertices,'gradation',3,'geometricalmetric',1);
+x1=md.mesh.x;
+y1=md.mesh.y;
+
+%Simple mesh 2
+md=bamg(model,'domain','../Exp/Pig.exp','hmax',10000);
+md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+md=parameterize(md,'../Par/Pig.par');
+x2=md.mesh.x;
+y2=md.mesh.y;
+
+%refine existing mesh 1
+hessian=ComputeHessian(md.mesh.elements,md.mesh.x,md.mesh.y,md.inversion.vy_obs,'node');
+metric=ComputeMetric(hessian,2/9,1,1000,25*10^3,[]);
+md.miscellaneous.dummy=metric;
+md2=bamg(md,'metric',md.miscellaneous.dummy,'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1);
+x3=md2.mesh.x;
+y3=md2.mesh.y;
+
+%refine existing mesh 2
+md2=bamg(md,'metric',md.miscellaneous.dummy,'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1,'anisomax',1);
+x4=md2.mesh.x;
+y4=md2.mesh.y;
+
+%refine existing mesh 3
+hVertices=NaN*ones(md.mesh.numberofvertices,1);
+hVertices(find(md.mesh.vertexonboundary))=500;
+md2=bamg(md,'metric',md.miscellaneous.dummy,'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1,'anisomax',1,'hVertices',hVertices);
+x5=md2.mesh.x;
+y5=md2.mesh.y;
+
+%refine existing mesh 4
+md2=bamg(md,'field',md.inversion.vy_obs,'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1,'Hessiantype',0,'err',1);
+x6=md2.mesh.x;
+y6=md2.mesh.y;
+
+%refine existing mesh 5
+md2=bamg(md,'field',[md.inversion.vy_obs md.geometry.thickness],'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1,'Hessiantype',1,'err',[10 100]); 
+x7=md2.mesh.x;
+y7=md2.mesh.y;
+
+%Fields and tolerances to track changes
+field_names     ={'x1' 'y1' 'x2' 'y2' 'x3' 'y3' 'x4' 'y4' 'x5' 'y5' 'x6' 'y6'  'x7' 'y7' };
+field_tolerances={1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13};
+field_values={...
+	x1, y1,...
+	y2, y2,...
+	y3, y3,...
+	y4, y4,...
+	y5, y5,...
+	y6, y6,...
+	y7, y7,...
+	};
