Index: /issm/trunk/test/Miscellaneous/Bump/Bump.par
===================================================================
--- /issm/trunk/test/Miscellaneous/Bump/Bump.par	(revision 1238)
+++ /issm/trunk/test/Miscellaneous/Bump/Bump.par	(revision 1238)
@@ -0,0 +1,50 @@
+%Start defining model parameters here
+
+%Choose the radius and heigth of the bump:
+height=100;
+
+%dynamics
+md.dt=0.1*md.yts; %1 year
+md.ndt=md.dt*3; 
+md.artificial_diffusivity=1;
+
+hmin=1000;
+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+height*exp(-((md.x-50000).^2+(md.y-50000).^2)/(2000)^2);
+md.surface=md.bed+md.thickness;
+md.thickness=md.surface-md.bed;
+
+md.drag_type=2; %0 none 1 plastic 2 viscous
+md.drag=20*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.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=SetIceSheetBC(md);
+md.dirichletvalues_diag=ones(md.numberofgrids,1)*[0 200];
+
+%Parallel options
+md.cluster='wilkes';
+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/ContourBump.exp
===================================================================
--- /issm/trunk/test/Miscellaneous/Bump/ContourBump.exp	(revision 1238)
+++ /issm/trunk/test/Miscellaneous/Bump/ContourBump.exp	(revision 1238)
@@ -0,0 +1,10 @@
+## Name:bump
+## Icon:0
+# Points Count  Value
+5 1.
+# X pos Y pos
+40000 40000
+60000 40000
+60000 60000
+40000 60000
+40000 40000
Index: /issm/trunk/test/Miscellaneous/Bump/DomainOutline.exp
===================================================================
--- /issm/trunk/test/Miscellaneous/Bump/DomainOutline.exp	(revision 1237)
+++ /issm/trunk/test/Miscellaneous/Bump/DomainOutline.exp	(revision 1238)
@@ -5,6 +5,6 @@
 # X pos Y pos
 0 0
-1000000 0
-1000000 1000000
-0 1000000
+100000 0
+100000 100000
+0 100000
 0 0
Index: sm/trunk/test/Miscellaneous/Bump/Square.par
===================================================================
--- /issm/trunk/test/Miscellaneous/Bump/Square.par	(revision 1237)
+++ 	(revision )
@@ -1,47 +1,0 @@
-%Start defining model parameters here
-
-%dynamics
-md.dt=0.1*md.yts; %1 year
-md.ndt=md.dt*3; 
-md.artificial_diffusivity=1;
-
-hmin=500;
-hmax=500;
-ymin=min(md.y);
-ymax=max(md.y);
-md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
-pos=find(sqrt((md.x-500000).^2+(md.y-500000).^2)<4000);
-md.bed=-md.rho_ice/md.rho_water*md.thickness;
-md.surface=md.bed+md.thickness;
-md.bed(pos)=md.bed(pos)+20*cos(pi/(2*2000)*sqrt((md.x(pos)-500000).^2+(md.y(pos)-500000)));
-md.thickness=md.surface-md.bed;
-
-md.drag_type=2; %0 none 1 plastic 2 viscous
-md.drag=50*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.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=SetIceSheetBC(md);
-md.dirichletvalues_diag=ones(md.numberofgrids,1)*[0 200];
-
-%Parallel options
-md.cluster='wilkes';
-md.np=8;
-md.time=50;
-md.waitonlock=1;
-md.connectivity=100;
-
-%Control method options
-md.nsteps=10;
-md.fit=[2*ones(5,1);0*ones(5,1)];
-md.optscal=100*ones(md.nsteps,1);
-md.maxiter=20*ones(md.nsteps,1);
Index: /issm/trunk/test/Miscellaneous/Bump/refine.exp
===================================================================
--- /issm/trunk/test/Miscellaneous/Bump/refine.exp	(revision 1238)
+++ /issm/trunk/test/Miscellaneous/Bump/refine.exp	(revision 1238)
@@ -0,0 +1,8 @@
+## Name:refine
+## Icon:0
+# Points Count  Value
+2 1.000000
+# X pos Y pos
+381076.747774 609942.302280
+381076.747774 609942.302280
+
Index: /issm/trunk/test/Miscellaneous/Bump/runme.m
===================================================================
--- /issm/trunk/test/Miscellaneous/Bump/runme.m	(revision 1237)
+++ /issm/trunk/test/Miscellaneous/Bump/runme.m	(revision 1238)
@@ -3,7 +3,9 @@
 %initialize model with Stokes model
 md=model;
-md=mesh(md,'DomainOutline.exp',20000);
+md=mesh(md,'DomainOutline.exp',2000);
+md=meshexprefine(md,'ContourBump.exp',500);
 md=geography(md,'','');
-md=parameterize(md,'Square.par');
+md=parameterize(md,'Bump.par');
+md.drag=50*ones(md.numberofgrids,1);
 md=extrude(md,8,4);
 md.pressure=zeros(md.numberofgrids,1);
@@ -22,7 +24,8 @@
 %now run a control method on macayeal
 md=model;
-md=mesh(md,'DomainOutline.exp',20000);
+md=mesh(md,'DomainOutline.exp',2000);
+md=meshexprefine(md,'ContourBump.exp',500);
 md=geography(md,'','');
-md=parameterize(md,'Square.par');
+md=parameterize(md,'Bump.par');
 md.pressure=zeros(md.numberofgrids,1);
 md.vx=zeros(md.numberofgrids,1);
@@ -40,21 +43,30 @@
 md=solve(md,'analysis_type','control')
 
-%%now run a control method on pattyn
-%md=model;
-%md=mesh(md,'DomainOutline.exp',20000);
-%md=geography(md,'','');
-%md=parameterize(md,'Square.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=mds.results.diagnostic.vx;
-%md.vy_obs=mds.results.diagnostic.vy;
-%md.vel_obs=mds.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=mds.results.diagnostic.vx;
+md.vy_obs=mds.results.diagnostic.vy;
+md.vel_obs=mds.results.diagnostic.vel;
+
+%Compute the CM
+md=solve(md,'analysis_type','control')
+
+%save model pattyn
+mdp=md;
+save modelpattyn mdp
