Index: /issm/trunk/test/Miscellaneous/Bump/Bump.par
===================================================================
--- /issm/trunk/test/Miscellaneous/Bump/Bump.par	(revision 8010)
+++ /issm/trunk/test/Miscellaneous/Bump/Bump.par	(revision 8011)
@@ -1,13 +1,6 @@
-%Start defining model parameters here
-
 %Choose the radius and heigth of the bump:
 height=100;
 
 %dynamics
-md.debug=2;
-md.dt=0.1*md.yts; %1 year
-md.ndt=md.dt*3; 
-md.artificial_diffusivity=1;
-
 hmin=1000;
 hmax=1000;
@@ -17,5 +10,5 @@
 md.bed=-md.rho_ice/md.rho_water*md.thickness+10;
 md.surface=md.bed+md.thickness;
-md.bed=-md.rho_ice/md.rho_water*md.thickness+height*exp(-((md.x-50000).^2+(md.y-50000).^2)/(2000)^2)+10;
+md.bed=-md.rho_ice/md.rho_water*md.thickness+height*exp(-((md.x-50000).^2+(md.y-50000).^2)/(4000)^2)+10;
 md.thickness=md.surface-md.bed;
 
@@ -39,15 +32,4 @@
 
 %Parallel options
-md.cluster='larsen';
-md.np=8;
-md.time=50;
 md.waitonlock=1;
 md.connectivity=100;
-
-%Control method options
-md.nsteps=15;
-md.fit=[2*ones(10,1);0*ones(5,1)];
-md.optscal=1000*ones(md.nsteps,1);
-md.maxiter=20*ones(md.nsteps,1);
-md.maxcontrolconstraint=500;
-md=solversettomumps(md);
Index: /issm/trunk/test/Miscellaneous/Bump/runme.m
===================================================================
--- /issm/trunk/test/Miscellaneous/Bump/runme.m	(revision 8010)
+++ /issm/trunk/test/Miscellaneous/Bump/runme.m	(revision 8011)
@@ -1,93 +1,17 @@
-%Test of a bump
-
-loadmodel diagstokes
-mdc=mds;
-
-%initialize model with Stokes model
-md=model;
-md=mesh(md,'DomainOutline.exp',2000);
-md=meshexprefine(md,'ContourBump.exp',500);
+md=mesh(model,'DomainOutline.exp',1000);
 md=geography(md,'','');
 md=parameterize(md,'Bump.par');
-md=extrude(md,8,4);
-md.pressure=zeros(md.numberofgrids,1);
-md.vx=zeros(md.numberofgrids,1);
-md.vy=zeros(md.numberofgrids,1);
-md.vz=zeros(md.numberofgrids,1);
-md=setelementstype(md,'pattyn','all','stokes','all');
+md=setelementstype(md,'macayeal','all');
+md.cluster=astrid;
+md.cluster.np=13;
+md=solve(md,'analysis_type',DiagnosticSolutionEnum);
 
-%Initialize the CM with average value of vx and vy
-md.vx_obs=mdc.results.diagnostic.vx;
-md.vy_obs=mdc.results.diagnostic.vy;
-md.vel_obs=mdc.results.diagnostic.vel;
-
-md.nsteps=5;
-md.fit=2*ones(5,1);
-md.optscal=1000*ones(5,1);
-md.maxiter=20*ones(5,1);
-%compute solution
-md=solve(md,'analysis_type','control');
-
-save step1 md
-md.drag=md.results.control.parameter;
-
-md=solve(md,'analysis_type','control');
-save step2 md
-
-md.drag=md.results.control.parameter;
-md.fit=0*md.fit;
-save step3 md
-
-%save model stokes
-mds=md;
-save modelstokes mds
-error
-
-%now run a control method on macayeal
-md=model;
-md=mesh(md,'DomainOutline.exp',2000);
-md=meshexprefine(md,'ContourBump.exp',500);
-md=geography(md,'','');
-md=parameterize(md,'Bump.par');
-md.pressure=zeros(md.numberofgrids,1);
-md.vx=zeros(md.numberofgrids,1);
-md.vy=zeros(md.numberofgrids,1);
-md.vz=zeros(md.numberofgrids,1);
-md=setelementstype(md,'macayeal','all');
-
-%Initialize the CM with average value of vx and vy
-md.vx_obs=DepthAverage(mdc,mdc.results.diagnostic.vx);
-md.vy_obs=DepthAverage(mdc,mdc.results.diagnostic.vy);
-md.vel_obs=DepthAverage(mdc,mdc.results.diagnostic.vel);
-
-%Compute the CM
-md=solve(md,'analysis_type','control')
-
-%save model macayeal
-mdm=md;
-save modelmacayeal mdm
-
-%now run a control method on pattyn
-md=model;
-md=mesh(md,'DomainOutline.exp',2000);
-md=meshexprefine(md,'ContourBump.exp',500);
-md=geography(md,'','');
-md=parameterize(md,'Bump.par');
-md=extrude(md,8,4);
-md.pressure=zeros(md.numberofgrids,1);
-md.vx=zeros(md.numberofgrids,1);
-md.vy=zeros(md.numberofgrids,1);
-md.vz=zeros(md.numberofgrids,1);
-md=setelementstype(md,'pattyn','all');
-
-%Initialize the CM
-md.vx_obs=mdc.results.diagnostic.vx;
-md.vy_obs=mdc.results.diagnostic.vy;
-md.vel_obs=mdc.results.diagnostic.vel;
-
-%Compute the CM
-md=solve(md,'analysis_type','control')
-
-%save model pattyn
-mdp=md;
-save modelpattyn mdp
+%Fields and tolerances to track changes
+field_names     ={'Vx','Vy','Vel','Pressure'};
+field_tolerances={1e-13,1e-13,1e-13,1e-13};
+field_values={...
+	PatchToVec(md.results.DiagnosticSolution.Vx),...
+	PatchToVec(md.results.DiagnosticSolution.Vy),...
+	PatchToVec(md.results.DiagnosticSolution.Vel),...
+	PatchToVec(md.results.DiagnosticSolution.Pressure),...
+	};
Index: /issm/trunk/test/Miscellaneous/GJM_test1/Square.exp
===================================================================
--- /issm/trunk/test/Miscellaneous/GJM_test1/Square.exp	(revision 8011)
+++ /issm/trunk/test/Miscellaneous/GJM_test1/Square.exp	(revision 8011)
@@ -0,0 +1,10 @@
+## Name:domainoutline
+## Icon:0
+# Points Count  Value
+5 1.
+# X pos Y pos
+0 0
+1000000 0
+1000000 1000000
+0 1000000
+0 0
Index: /issm/trunk/test/Miscellaneous/GJM_test1/SquareFront.exp
===================================================================
--- /issm/trunk/test/Miscellaneous/GJM_test1/SquareFront.exp	(revision 8011)
+++ /issm/trunk/test/Miscellaneous/GJM_test1/SquareFront.exp	(revision 8011)
@@ -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/Miscellaneous/GJM_test1/SquareShelf.par
===================================================================
--- /issm/trunk/test/Miscellaneous/GJM_test1/SquareShelf.par	(revision 8011)
+++ /issm/trunk/test/Miscellaneous/GJM_test1/SquareShelf.par	(revision 8011)
@@ -0,0 +1,42 @@
+%Start defining model parameters here
+
+%Geometry
+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;
+
+%Materials
+md.observed_temperature=(273-20)*ones(md.numberofgrids,1);
+md.rheology_B=paterson(md.observed_temperature);
+md.rheology_n=3*ones(md.numberofelements,1);
+md.temperature=md.observed_temperature;
+
+%Friction
+pos=find(md.elementoniceshelf);
+md.drag_type=2;
+md.drag_coefficient=20*ones(md.numberofgrids,1);
+md.drag_coefficient(md.elements(pos,:))=0;
+md.drag_p=ones(md.numberofelements,1);
+md.drag_q=ones(md.numberofelements,1);
+
+%Numerical parameters
+md.viscosity_overshoot=0.3;
+md.artificial_diffusivity=1;
+md.waitonlock=30;
+md.verbose=verbose(0);
+md.eps_res=0.10;
+md.eps_rel=0.02;
+md.eps_abs=NaN;
+md.dt=1;
+md.ndt=3;
+
+%Boundary conditions:
+md=SetIceShelfBC(md,'SquareFront.exp');
+
+%Change name so that no test have the same name
+A=dbstack;
+if (length(A)>2), md.name=A(3).file(1:end-2); end
Index: /issm/trunk/test/Miscellaneous/GJM_test1/test1.m
===================================================================
--- /issm/trunk/test/Miscellaneous/GJM_test1/test1.m	(revision 8011)
+++ /issm/trunk/test/Miscellaneous/GJM_test1/test1.m	(revision 8011)
@@ -0,0 +1,6 @@
+md=mesh(model,'Square.exp',150000);
+md=geography(md,'all','');
+md=parameterize(md,'SquareShelf.par');
+md=setelementstype(md,'macayeal','all');
+md.cluster=none;
+md=solve(md,'analysis_type',DiagnosticSolutionEnum);
