Index: /issm/trunk/test/Validation/ThermalTests/Melting/Square.par
===================================================================
--- /issm/trunk/test/Validation/ThermalTests/Melting/Square.par	(revision 543)
+++ /issm/trunk/test/Validation/ThermalTests/Melting/Square.par	(revision 544)
@@ -1,64 +1,13 @@
-
 %Ok, start defining model parameters here
 
-%material parameters
-	md.g=9.8;
-	md.rho_ice=917;
-	md.rho_water=1023;
-	di=md.rho_ice/md.rho_water;
-	md.yts=365*24*3600;
-	md.heatcapacity=2009;
-	md.thermalconductivity=2.2; %W/mK
-	md.beta=9.8*10^-8;
-
-%Solution parameters
 	%parallelization 
 	md.cluster='none';
-	md.np=2;
-	md.time=1;
-	md.exclusive=0;
-
-	%statics
-	md.eps_rel=0.01;
-	md.eps_abs=10;
-	md.penalty_offset=5;
-	md.lowmem=1;
-	if md.numberofgrids<1000000,
-	md.sparsity=.001;
-	else
-	md.sparsity=.0001;
-	end
-
-	%dynamics
-	md.dt=1*md.yts; %1 year
-	md.ndt=md.dt*10; 
-	md.artificial_diffusivity=1;
-
-	%control
-	md.control_type={'drag'}; %'drag', 'B'
-	md.nsteps=5;
-	md.tolx=10^-4;
-	md.maxiter=20;
-	md.optscal=10;
-	md.fit='logarithmic'; %'absolute','relative','logarithmic'
-	md.meanvel=1000/md.yts; %1000 meters/year
-	md.epsvel=eps;
-
 
 	disp('      creating thickness');
-	hmax=1000;
-	md.thickness=hmax*ones(md.numberofgrids,1)
+	h=1000;
+	md.thickness=h*ones(md.numberofgrids,1);
 	md.firn_layer=10*ones(md.numberofgrids,1);
-	md.surface=zeros(md.numberofgrids,1);
-	md.bed=-md.thickness;
-
-%	hmin=700;
-%	hmax=1000;
-%	ymin=min(md.y);
-%	ymax=max(md.y);
-%	md.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
-%	md.firn_layer=10*ones(md.numberofgrids,1);
-%	md.surface=zeros(md.numberofgrids,1);
-%	md.bed=-md.thickness;
+	md.bed=-1000*ones(md.numberofgrids,1);
+	md.surface=md.bed+md.thickness;
 
 	disp('      creating velocities');
@@ -77,10 +26,10 @@
 
 	disp('      creating temperatures');
-	md.observed_temperature=(273.15)*ones(md.numberofgrids,1);
+	md.observed_temperature=273.15*ones(md.numberofgrids,1);
 
 	disp('      creating flow law paramter');
 	md.B=paterson(md.observed_temperature);
 	md.n=3*ones(md.numberofelements,1);
-
+	
 	disp('      creating accumulation rates');
 	md.accumulation=ones(md.numberofgrids,1)/md.yts; %1m/a
@@ -89,29 +38,6 @@
 	%Deal with boundary conditions:
 	
-	disp('      boundary conditions for diagnostic model: ');
-	%Build gridonicefront, array of boundary grids belonging to the icefront:
-	gridinsideicefront=ArgusContourToMesh(md.elements,md.x,md.y,expread('Front.exp',1),'node',2);
-	gridonicefront=double(md.gridonboundary & gridinsideicefront);
-
-	md.gridondirichlet_diag=zeros(md.numberofgrids,1);
-	pos=find(md.gridonboundary & ~gridonicefront);md.gridondirichlet_diag(pos)=1;
-	md.dirichletvalues_diag=zeros(md.numberofgrids,2);
-
-	pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
-	md.segmentonneumann_diag=md.segments(pos,:);
-	md.neumannvalues_diag=NaN*ones(length(md.segmentonneumann_diag),1); %dynamic boundary conditions (water pressure)
-
-	disp('      boundary conditions for prognostic model');
-	md.gridondirichlet_prog=zeros(md.numberofgrids,1);
-	md.dirichletvalues_prog=zeros(md.numberofgrids,1);
-	pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
-	md.segmentonneumann_prog=md.segments(pos,:);
-	md.neumannvalues_prog=zeros(size(md.segmentonneumann_prog,1),1);
-	md.neumannvalues_prog(:)=NaN; %free radiation
-	
-	pos=find(gridonicefront(md.segments(:,1)) | gridonicefront(md.segments(:,2)));
-	md.segmentonneumann_prog2=md.segments(pos,:);
-	md.neumannvalues_prog2=zeros(size(md.segmentonneumann_prog2,1),1);
-	md.neumannvalues_prog2(:)=NaN; %free radiation
+	disp('      boundary conditions for diagnostic model');
+	md=SetIceShelfBC(md,'Front.exp');
 	
 	disp('      boundary conditions for thermal model');
@@ -120,10 +46,2 @@
 	md.geothermalflux=zeros(md.numberofgrids,1); 
 	pos=find(md.elementonicesheet);md.geothermalflux(md.elements(pos,:))=1*10^-3; %1 mW/m^2
-
-
-	
-
-% Some Cielo code, ignore.
-if strcmp(md.cluster,'yes')
-	ServerDisconnect;
-end   
Index: /issm/trunk/test/Validation/ThermalTests/Melting/runme.m
===================================================================
--- /issm/trunk/test/Validation/ThermalTests/Melting/runme.m	(revision 543)
+++ /issm/trunk/test/Validation/ThermalTests/Melting/runme.m	(revision 544)
@@ -9,8 +9,8 @@
 
 md=model;
-md=mesh(md,'DomainOutline.exp',100000);
+md=mesh(md,'DomainOutline.exp',200000);
 md=geography(md,'','');
 md=parameterize(md,'Square.par');
-md=extrude(md,2,1);
+md=extrude(md,3,2);
 md=setelementstype(md,'Pattyn','all');
 thermalboundarycondition;
@@ -22,5 +22,6 @@
 
 %modeled  results
-md=solve(md,'thermalsteady');
+%md=solve(md,'analysis_type','thermal','sub_analysis_type','steady','package','ice');
+md=solve(md,'analysis_type','thermal','sub_analysis_type','steady','package','cielo');
 
 %plot results
