Index: /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
===================================================================
--- /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 9450)
+++ /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 9451)
@@ -194,5 +194,5 @@
 	DragPEnum,
 	DragQEnum,
-	DragTypeEnum,
+	Fake41Enum,
 	DtEnum,
 	TimeAdaptEnum,
@@ -342,5 +342,4 @@
 	Fake9Enum,
 	BasalMeltingRateCorrectionEnum,
-	BasalMeltingRateCorrectionApplyEnum,
 	MixedLayerCapacityEnum,
 	ThermalExchangeVelocityEnum,
@@ -395,5 +394,5 @@
 	Fake20Enum,
 	Fake21Enum,
-	PenaltyMeltingEnum,
+	Fake42Enum,
 	QmuAnalysisEnum,
 	QmuErrNameEnum,
@@ -404,5 +403,5 @@
 	QmuPartEnum,
 	QmuNumberOfResponsesEnum,
-	QmuSaveFemmodelEnum,
+	Fake43Enum,
 	IndexedEnum,
 	RegularEnum,
@@ -412,5 +411,5 @@
 	ResponsedescriptorsEnum,
 	PetscRcEnum,
-	SparsityEnum,
+	Fake40Enum,
 	Fake22Enum,
 	VariabledescriptorsEnum,
Index: /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp
===================================================================
--- /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 9450)
+++ /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 9451)
@@ -162,5 +162,5 @@
 		case DragPEnum : return "DragP";
 		case DragQEnum : return "DragQ";
-		case DragTypeEnum : return "DragType";
+		case Fake41Enum : return "Fake41";
 		case DtEnum : return "Dt";
 		case TimeAdaptEnum : return "TimeAdapt";
@@ -296,5 +296,4 @@
 		case Fake9Enum : return "Fake9";
 		case BasalMeltingRateCorrectionEnum : return "BasalMeltingRateCorrection";
-		case BasalMeltingRateCorrectionApplyEnum : return "BasalMeltingRateCorrectionApply";
 		case MixedLayerCapacityEnum : return "MixedLayerCapacity";
 		case ThermalExchangeVelocityEnum : return "ThermalExchangeVelocity";
@@ -345,5 +344,5 @@
 		case Fake20Enum : return "Fake20";
 		case Fake21Enum : return "Fake21";
-		case PenaltyMeltingEnum : return "PenaltyMelting";
+		case Fake42Enum : return "Fake42";
 		case QmuAnalysisEnum : return "QmuAnalysis";
 		case QmuErrNameEnum : return "QmuErrName";
@@ -354,5 +353,5 @@
 		case QmuPartEnum : return "QmuPart";
 		case QmuNumberOfResponsesEnum : return "QmuNumberOfResponses";
-		case QmuSaveFemmodelEnum : return "QmuSaveFemmodel";
+		case Fake43Enum : return "Fake43";
 		case IndexedEnum : return "Indexed";
 		case RegularEnum : return "Regular";
@@ -362,5 +361,5 @@
 		case ResponsedescriptorsEnum : return "Responsedescriptors";
 		case PetscRcEnum : return "PetscRc";
-		case SparsityEnum : return "Sparsity";
+		case Fake40Enum : return "Fake40";
 		case Fake22Enum : return "Fake22";
 		case VariabledescriptorsEnum : return "Variabledescriptors";
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp	(revision 9450)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp	(revision 9451)
@@ -55,5 +55,4 @@
 	iomodel->FetchDataToInput(elements,DragPEnum);
 	iomodel->FetchDataToInput(elements,DragQEnum);
-	iomodel->FetchDataToInput(elements,DragTypeEnum);
 	iomodel->FetchDataToInput(elements,ElementOnIceShelfEnum);
 	iomodel->FetchDataToInput(elements,ElementOnWaterEnum);
Index: /issm/trunk/src/c/modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp	(revision 9450)
+++ /issm/trunk/src/c/modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp	(revision 9451)
@@ -47,5 +47,4 @@
 	iomodel->FetchDataToInput(elements,DragPEnum);
 	iomodel->FetchDataToInput(elements,DragQEnum);
-	iomodel->FetchDataToInput(elements,DragTypeEnum);
 	iomodel->FetchDataToInput(elements,ElementOnIceShelfEnum);
 	iomodel->FetchDataToInput(elements,ElementOnBedEnum);
Index: /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp
===================================================================
--- /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 9450)
+++ /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 9451)
@@ -160,5 +160,5 @@
 	else if (strcmp(name,"DragP")==0) return DragPEnum;
 	else if (strcmp(name,"DragQ")==0) return DragQEnum;
-	else if (strcmp(name,"DragType")==0) return DragTypeEnum;
+	else if (strcmp(name,"Fake41")==0) return Fake41Enum;
 	else if (strcmp(name,"Dt")==0) return DtEnum;
 	else if (strcmp(name,"TimeAdapt")==0) return TimeAdaptEnum;
@@ -294,5 +294,4 @@
 	else if (strcmp(name,"Fake9")==0) return Fake9Enum;
 	else if (strcmp(name,"BasalMeltingRateCorrection")==0) return BasalMeltingRateCorrectionEnum;
-	else if (strcmp(name,"BasalMeltingRateCorrectionApply")==0) return BasalMeltingRateCorrectionApplyEnum;
 	else if (strcmp(name,"MixedLayerCapacity")==0) return MixedLayerCapacityEnum;
 	else if (strcmp(name,"ThermalExchangeVelocity")==0) return ThermalExchangeVelocityEnum;
@@ -343,5 +342,5 @@
 	else if (strcmp(name,"Fake20")==0) return Fake20Enum;
 	else if (strcmp(name,"Fake21")==0) return Fake21Enum;
-	else if (strcmp(name,"PenaltyMelting")==0) return PenaltyMeltingEnum;
+	else if (strcmp(name,"Fake42")==0) return Fake42Enum;
 	else if (strcmp(name,"QmuAnalysis")==0) return QmuAnalysisEnum;
 	else if (strcmp(name,"QmuErrName")==0) return QmuErrNameEnum;
@@ -352,5 +351,5 @@
 	else if (strcmp(name,"QmuPart")==0) return QmuPartEnum;
 	else if (strcmp(name,"QmuNumberOfResponses")==0) return QmuNumberOfResponsesEnum;
-	else if (strcmp(name,"QmuSaveFemmodel")==0) return QmuSaveFemmodelEnum;
+	else if (strcmp(name,"Fake43")==0) return Fake43Enum;
 	else if (strcmp(name,"Indexed")==0) return IndexedEnum;
 	else if (strcmp(name,"Regular")==0) return RegularEnum;
@@ -360,5 +359,5 @@
 	else if (strcmp(name,"Responsedescriptors")==0) return ResponsedescriptorsEnum;
 	else if (strcmp(name,"PetscRc")==0) return PetscRcEnum;
-	else if (strcmp(name,"Sparsity")==0) return SparsityEnum;
+	else if (strcmp(name,"Fake40")==0) return Fake40Enum;
 	else if (strcmp(name,"Fake22")==0) return Fake22Enum;
 	else if (strcmp(name,"Variabledescriptors")==0) return VariabledescriptorsEnum;
Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 9450)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 9451)
@@ -350,7 +350,6 @@
 
 	/*Intermediaries */
-	int        count,ig;
-	int        drag_type;
-	double     basalfriction[NUMVERTICES]={0,0,0,0,0,0};
+	int    count,ig;
+	double basalfriction[NUMVERTICES]={0,0,0,0,0,0};
 	double alpha2,vx,vy;
 	Friction*  friction=NULL;
@@ -372,6 +371,4 @@
 
 	/*Build friction element, needed later: */
-	inputs->GetParameterValue(&drag_type,DragTypeEnum);
-	if (drag_type!=2)_error_(" non-viscous friction not supported yet!");
 	friction=new Friction("3d",inputs,matpar,DiagnosticHorizAnalysisEnum);
 
@@ -812,5 +809,5 @@
 	
 	/*Intermediaries */
-	int       i,j,ig,analysis_type,drag_type;
+	int       i,j,ig,analysis_type;
 	double    Jdet2d,slope_magnitude,alpha2;
 	double    xyz_list[NUMVERTICES][3];
@@ -838,5 +835,4 @@
 	for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<2;j++) xyz_list_tria[i][j]=xyz_list[i][j];
 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
-	inputs->GetParameterValue(&drag_type,DragTypeEnum);
 	Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input);
 	Input* vx_input=inputs->GetInput(VxEnum);           _assert_(vx_input);
@@ -845,5 +841,4 @@
 
 	/*build friction object, used later on: */
-	if (drag_type!=2)_error_(" non-viscous friction not supported yet!");
 	friction=new Friction("2d",inputs,matpar,analysis_type);
 
@@ -1476,5 +1471,5 @@
 	/*Intermediaries */
 	int       i,j,ig;
-	int       analysis_type,drag_type;
+	int       analysis_type;
 	double    xyz_list[NUMVERTICES][3];
 	double    xyz_list_tria[NUMVERTICES2D][3]={0.0};
@@ -1498,5 +1493,4 @@
 	for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<2;j++) xyz_list_tria[i][j]=xyz_list[i][j];
 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
-	inputs->GetParameterValue(&drag_type,DragTypeEnum);
 	Input* surface_input=inputs->GetInput(SurfaceEnum); _assert_(surface_input);
 	Input* vx_input=inputs->GetInput(VxEnum);           _assert_(vx_input);
@@ -1505,5 +1499,4 @@
 
 	/*build friction object, used later on: */
-	if (drag_type!=2)_error_(" non-viscous friction not supported yet!");
 	friction=new Friction("2d",inputs,matpar,analysis_type);
 
@@ -3437,5 +3430,5 @@
 	/*Intermediaries */
 	int        i,j,ig;
-	int        analysis_type,drag_type;
+	int        analysis_type;
 	double     xyz_list[NUMVERTICES][3];
 	double     xyz_list_tria[NUMVERTICES2D][3]={0.0};
@@ -3467,6 +3460,4 @@
 
 	/*Build frictoin element, needed later: */
-	inputs->GetParameterValue(&drag_type,DragTypeEnum);
-	if (drag_type!=2)_error_(" non-viscous friction not supported yet!");
 	friction=new Friction("3d",inputs,matpar,analysis_type);
 
@@ -3706,5 +3697,5 @@
 	/*Intermediaries */
 	int        i,j,ig;
-	int        analysis_type,drag_type;
+	int        analysis_type;
 	double     xyz_list[NUMVERTICES][3];
 	double     xyz_list_tria[NUMVERTICES2D][3]={0.0};
@@ -3736,6 +3727,4 @@
 
 	/*Build frictoin element, needed later: */
-	inputs->GetParameterValue(&drag_type,DragTypeEnum);
-	if (drag_type!=2)_error_(" non-viscous friction not supported yet!");
 	friction=new Friction("3d",inputs,matpar,analysis_type);
 
@@ -4514,5 +4503,5 @@
 
 	int        i,j,ig;
-	int        drag_type,analysis_type;
+	int        analysis_type;
 	int        doflist1[NUMVERTICES];
 	double     vx,vy,lambda,mu,alpha_complement,Jdet;
@@ -4542,5 +4531,4 @@
 
 	/*Build frictoin element, needed later: */
-	inputs->GetParameterValue(&drag_type,DragTypeEnum);
 	friction=new Friction("2d",inputs,matpar,analysis_type);
 
@@ -4555,6 +4543,5 @@
 
 		/*Build alpha_complement_list: */
-		if (drag_type==2) friction->GetAlphaComplement(&alpha_complement, gauss,VxEnum,VyEnum,VzEnum);
-		else alpha_complement=0;
+		friction->GetAlphaComplement(&alpha_complement, gauss,VxEnum,VyEnum,VzEnum);
 
 		dragcoefficient_input->GetParameterValue(&drag, gauss);
@@ -4587,5 +4574,5 @@
 
 	int        i,j,ig;
-	int        drag_type,analysis_type;
+	int        analysis_type;
 	int        doflist1[NUMVERTICES];
 	double     bed,thickness,Neff;
@@ -4610,5 +4597,4 @@
 	for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<2;j++) xyz_list_tria[i][j]=xyz_list[i][j];
 	GetDofList1(&doflist1[0]);
-	inputs->GetParameterValue(&drag_type,DragTypeEnum);
 	Input* drag_input    =inputs->GetInput(DragCoefficientEnum); _assert_(drag_input);
 	Input* vx_input      =inputs->GetInput(VxEnum);              _assert_(vx_input);
@@ -4620,5 +4606,4 @@
 
 	/*Build frictoin element, needed later: */
-	inputs->GetParameterValue(&drag_type,DragTypeEnum);
 	friction=new Friction("3d",inputs,matpar,analysis_type);
 
@@ -4630,6 +4615,5 @@
 
 		/*Recover alpha_complement and drag: */
-		if (drag_type==2) friction->GetAlphaComplement(&alpha_complement, gauss,VxEnum,VyEnum,VzEnum);
-		else alpha_complement=0;
+		friction->GetAlphaComplement(&alpha_complement, gauss,VxEnum,VyEnum,VzEnum);
 		drag_input->GetParameterValue(&drag,gauss);
 
@@ -6616,5 +6600,4 @@
 				name==TemperatureEnum ||
 				name==DragCoefficientEnum ||
-				name==DragTypeEnum ||
 				name==GradientEnum ||
 				name==OldGradientEnum  ||
Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 9450)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 9451)
@@ -748,5 +748,5 @@
 	/*Intermediaries*/
 	int        i,j,ig;
-	int        analysis_type,drag_type;
+	int        analysis_type;
 	double     MAXSLOPE  = .06; // 6 %
 	double     MOUNTAINKEXPONENT = 10;
@@ -771,9 +771,7 @@
 	Input* vy_input=inputs->GetInput(VyEnum);           _assert_(vy_input);
 	Input* vz_input=inputs->GetInput(VzEnum);           _assert_(vz_input);
-	inputs->GetParameterValue(&drag_type,DragTypeEnum);
 	parameters->FindParam(&analysis_type,AnalysisTypeEnum);
 
 	/*build friction object, used later on: */
-	if (drag_type!=2) _error_(" non-viscous friction not supported yet!");
 	friction=new Friction("2d",inputs,matpar,analysis_type);
 
@@ -1380,6 +1378,6 @@
 
 	/*Intermediaries */
-	int            i,j,ig,drag_type;
-	double         plastic_stress,driving_stress_baseline,thickness;
+	int            i,j,ig;
+	double         driving_stress_baseline,thickness;
 	double         Jdet;
 	double         xyz_list[NUMVERTICES][3];
@@ -1394,5 +1392,4 @@
 	/*Retrieve all inputs and parameters*/
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
-	inputs->GetParameterValue(&drag_type,DragTypeEnum);
 	Input* thickness_input=inputs->GetInput(ThicknessEnum); _assert_(thickness_input); 
 	Input* surface_input=inputs->GetInput(SurfaceEnum);     _assert_(surface_input);
@@ -1410,24 +1407,10 @@
 		thickness_input->GetParameterValue(&thickness,gauss);
 		surface_input->GetParameterDerivativeValue(&slope[0],&xyz_list[0][0],gauss);
-		
-		/*In case we have plastic basal drag, compute plastic stress at gaussian point from k1, k2 and k3 fields in the 
-		 * element itself: */
-		if(drag_type==1) drag_input->GetParameterValue(&plastic_stress,gauss);
-
 		driving_stress_baseline=matpar->GetRhoIce()*matpar->GetG()*thickness;
 
 		/*Build pe_g_gaussian vector: */
-		if(drag_type==1){
-			for (i=0;i<NUMVERTICES;i++){
-				for (j=0;j<NDOF2;j++){
-					pe->values[i*NDOF2+j]+=(-driving_stress_baseline*slope[j]-plastic_stress)*Jdet*gauss->weight*basis[i]; 
-				}
-			}
-		}
-		else {
-			for (i=0;i<NUMVERTICES;i++){
-				for (j=0;j<NDOF2;j++){
-					pe->values[i*NDOF2+j]+=-driving_stress_baseline*slope[j]*Jdet*gauss->weight*basis[i];
-				}
+		for (i=0;i<NUMVERTICES;i++){
+			for (j=0;j<NDOF2;j++){
+				pe->values[i*NDOF2+j]+=-driving_stress_baseline*slope[j]*Jdet*gauss->weight*basis[i];
 			}
 		}
@@ -2847,5 +2830,5 @@
 
 	int        i,ig;
-	int        drag_type,analysis_type;
+	int        analysis_type;
 	int        doflist1[NUMVERTICES];
 	double     vx,vy,lambda,mu,alpha_complement,Jdet;
@@ -2868,5 +2851,4 @@
 
 	/*Build frictoin element, needed later: */
-	inputs->GetParameterValue(&drag_type,DragTypeEnum);
 	friction=new Friction("2d",inputs,matpar,analysis_type);
 
@@ -2888,6 +2870,5 @@
 
 		/*Build alpha_complement_list: */
-		if (drag_type==2) friction->GetAlphaComplement(&alpha_complement, gauss,VxEnum,VyEnum,VzEnum);
-		else alpha_complement=0;
+		friction->GetAlphaComplement(&alpha_complement, gauss,VxEnum,VyEnum,VzEnum);
 	
 		dragcoefficient_input->GetParameterValue(&drag, gauss);
@@ -3998,5 +3979,4 @@
 				name==DragCoefficientEnum ||
 				name==GradientEnum ||
-				name==DragTypeEnum ||
 				name==OldGradientEnum
 		){
Index: /issm/trunk/src/m/classes/@modellist/loadmultipleresultsfromcluster.m
===================================================================
--- /issm/trunk/src/m/classes/@modellist/loadmultipleresultsfromcluster.m	(revision 9450)
+++ /issm/trunk/src/m/classes/@modellist/loadmultipleresultsfromcluster.m	(revision 9451)
@@ -28,6 +28,4 @@
 	md_list.models{i}=loadresultsfromdisk(md_list.models{i},[name '-' num2str(i) 'vs' num2str(nummodels) '.outbin']);
 
-	%post solve phase
-	md_list.models{i}=postsolveparallel(md_list.models{i});
 	delete([name '-' num2str(i) 'vs' num2str(nummodels) '.outbin']);
 end
Index: /issm/trunk/src/m/classes/model.m
===================================================================
--- /issm/trunk/src/m/classes/model.m	(revision 9450)
+++ /issm/trunk/src/m/classes/model.m	(revision 9451)
@@ -28,8 +28,4 @@
 		 y                   = {NaN,true,'DoubleMat',1};
 		 z                   = {NaN,true,'DoubleMat',1};
-		 bed_slopex          = {NaN,false};
-		 bed_slopey          = {NaN,false};
-		 surface_slopex      = {NaN,false};
-		 surface_slopey      = {NaN,false};
 		 nodeconnectivity    = {NaN,false};
 		 elementconnectivity = {NaN,true,'DoubleMat',3};
@@ -47,5 +43,4 @@
 		 x2d                = {NaN,false};
 		 y2d                = {NaN,false};
-		 z2d                = {NaN,false};
 
 		 %latlon of the coorinates
@@ -79,5 +74,4 @@
 		 penalties            = {NaN,true,'DoubleMat',3};
 		 penalty_offset       = {0,true,'Double'};
-		 penalty_melting      = {0,true,'Double'};
 		 penalty_lock         = {0,true,'Integer'};
 		 segments             = {NaN,false};
@@ -96,5 +90,4 @@
 		 %Extrusion
 		 numlayers         = {0,true,'Integer'};
-		 extrusionexponent = {0,false};
 		 elementonbed      = {NaN,true,'BooleanMat',2};
 		 elementonsurface  = {NaN,true,'BooleanMat',2};
@@ -125,5 +118,4 @@
 		 g                = {0,true,'Double'};
 		 yts              = {0,true,'Double'};
-		 drag_type        = {0,true,'Integer'};
 		 drag_coefficient = {NaN,true,'DoubleMat',1};
 		 drag_p           = {NaN,true,'DoubleMat',2};
@@ -174,5 +166,4 @@
 		 max_nonlinear_iterations = {0,true,'Integer'};
 		 max_steadystate_iterations = {0,true,'Integer'};
-		 sparsity                 = {0,true,'Double'};
 		 connectivity             = {0,true,'Integer'};
 		 lowmem                   = {0,true,'Boolean'};
@@ -184,5 +175,4 @@
 		 time_adapt             = {0,true,'Boolean'};
 		 cfl_coefficient        = {0,true,'Double'};
-		 adaptative_cfl         = {0,false};
 		 artificial_diffusivity = {0,true,'Integer'};
 		 prognostic_DG          = {0,true,'Integer'};
@@ -230,5 +220,4 @@
 		 basal_melting_rate                  = {NaN,true,'DoubleMat',1};
 		 basal_melting_rate_correction       = {NaN,true,'DoubleMat',1};
-		 basal_melting_rate_correction_apply = {0,true,'Integer'};
 		 pressure                            = {NaN,true,'DoubleMat',1};
 		 %Hydrology
@@ -282,5 +271,4 @@
 		 qmu_mass_flux_segments          = {{},true,'MatArray'};
 		 qmu_relax                       = {0,false};
-		 qmu_save_femmodel               = {0,true,'Integer'};
 
 		 %flaim
@@ -536,5 +524,4 @@
 			 %basal melting rate correction: 
 			 md.groundingline_melting_rate=0; 
-			 md.basal_melting_rate_correction_apply=0; %do not apply
 
 			 %ice thermal conductivity lamda (W/m/K)
@@ -563,7 +550,4 @@
 			 %converstion from year to seconds
 			 md.yts=365*24*3600;
-
-			 %drag type (2=elastic)
-			 md.drag_type=2;
 
 			 %Solver parameters
@@ -583,7 +567,4 @@
 			 %maximum of steady state iterations
 			 md.max_steadystate_iterations=100;
-
-			 %sparsity
-			 md.sparsity=0.001;
 
 			 %the connectivity is the avergaded number of nodes linked to a
@@ -616,8 +597,4 @@
 			 %kappa=max(stiffness matrix)*10^penalty_offset
 			 md.penalty_offset=3;
-
-			 %penalty_melting is the penalty used to keep T<Tpmp
-			 %kappa=penalty_melting
-			 md.penalty_melting=10^7;
 
 			 %in some solutions, it might be needed to stop a run when only
Index: /issm/trunk/src/m/model/bamg.m
===================================================================
--- /issm/trunk/src/m/model/bamg.m	(revision 9450)
+++ /issm/trunk/src/m/model/bamg.m	(revision 9451)
@@ -335,5 +335,4 @@
 md.elementonsurface=ones(md.numberofelements,1);
 md.nodeonboundary=zeros(md.numberofnodes,1); md.nodeonboundary(md.segments(:,1:2))=1;
-md.counter=1;
 md.elementconnectivity=md.bamg.mesh.ElementConnectivity;
 md.elementconnectivity(find(isnan(md.elementconnectivity)))=0;
Index: /issm/trunk/src/m/model/bedslope.m
===================================================================
--- /issm/trunk/src/m/model/bedslope.m	(revision 9450)
+++ /issm/trunk/src/m/model/bedslope.m	(revision 9451)
@@ -10,10 +10,10 @@
 	numberofnodes=md.numberofnodes;
 	index=md.elements;
-	x=md.x; y=md.y; z=md.z;
+	x=md.x; y=md.y;
 else
 	numberofelements=md.numberofelements2d;
 	numberofnodes=md.numberofnodes2d;
 	index=md.elements2d;
-	x=md.x2d; y=md.y2d; z=md.z2d;
+	x=md.x2d; y=md.y2d;
 end
 
Index: /issm/trunk/src/m/model/collapse.m
===================================================================
--- /issm/trunk/src/m/model/collapse.m	(revision 9450)
+++ /issm/trunk/src/m/model/collapse.m	(revision 9451)
@@ -37,8 +37,4 @@
 if ~isnan(md.vz),md.vz=DepthAverage(md,md.vz);end;
 if ~isnan(md.vel),md.vel=DepthAverage(md,md.vel);end;
-if ~isnan(md.surface_slopex),md.surface_slopex=project2d(md,md.surface_slopex,md.numlayers);end;
-if ~isnan(md.surface_slopey),md.surface_slopey=project2d(md,md.surface_slopey,md.numlayers);end;
-if ~isnan(md.bed_slopex),md.bed_slopex=project2d(md,md.bed_slopex,1);end;
-if ~isnan(md.bed_slopey),md.bed_slopey=project2d(md,md.bed_slopey,1);end;
 
 %bedinfo and surface info
@@ -100,5 +96,5 @@
 md.x=md.x2d;
 md.y=md.y2d;
-md.z=md.z2d;
+md.z=zeros(size(md.x2d));
 md.numberofnodes=md.numberofnodes2d;
 md.numberofelements=md.numberofelements2d;
@@ -112,5 +108,4 @@
 md.x2d=NaN;
 md.y2d=NaN;
-md.z2d=NaN;
 md.elements2d=NaN;
 md.elements_type2d=md.elements_type;
Index: /issm/trunk/src/m/model/display/displaydiagnostic.m
===================================================================
--- /issm/trunk/src/m/model/display/displaydiagnostic.m	(revision 9450)
+++ /issm/trunk/src/m/model/display/displaydiagnostic.m	(revision 9451)
@@ -30,5 +30,4 @@
 disp(sprintf('\n      %s','Memory management:'));
 fielddisplay(md,'lowmem','Set to 1 if you are running low on cluster memory');
-fielddisplay(md,'sparsity','matrix sparsity. Set to .001 for < 1M dof, .0001 for 5M dof, and .00001 for > 10M dof');
 fielddisplay(md,'connectivity','element connectivity');
 
Index: /issm/trunk/src/m/model/display/displaymesh.m
===================================================================
--- /issm/trunk/src/m/model/display/displaymesh.m	(revision 9450)
+++ /issm/trunk/src/m/model/display/displaymesh.m	(revision 9451)
@@ -20,5 +20,4 @@
 	fielddisplay(md,'x2d','nodes x coordinate');
 	fielddisplay(md,'y2d','nodes y coordinate');
-	fielddisplay(md,'z2d','nodes z coordinate');
 
 	disp(sprintf('\n      Elements and nodes of the extruded 3d mesh:'));
@@ -38,5 +37,4 @@
 fielddisplay(md,'dim','mesh dimension (2d or 3d)');
 fielddisplay(md,'numlayers','number of extrusion layers');
-fielddisplay(md,'extrusionexponent','exponent for extrusion');
 fielddisplay(md,'bamg','Geometry and 2d mesh properties (if generated by Bamg)');
 fielddisplay(md,'penalties','penalties list');
Index: /issm/trunk/src/m/model/display/displayparameters.m
===================================================================
--- /issm/trunk/src/m/model/display/displayparameters.m	(revision 9450)
+++ /issm/trunk/src/m/model/display/displayparameters.m	(revision 9451)
@@ -26,5 +26,4 @@
 
 disp(sprintf('\n      Friction parameters (Sigma= drag^2 * Neff ^r * u ^s, with Neff=rho_ice*g*thickness+rho_ice*g*bed, r=q/p and s=1/p)'));
-fielddisplay(md,'drag_type','0: none, 1:plastic, 2:viscous');
 fielddisplay(md,'drag_coefficient','friction coefficient [IS]');
 fielddisplay(md,'drag_p','p exponent');
Index: /issm/trunk/src/m/model/divergence.m
===================================================================
--- /issm/trunk/src/m/model/divergence.m	(revision 9450)
+++ /issm/trunk/src/m/model/divergence.m	(revision 9451)
@@ -14,5 +14,5 @@
 	numberofnodes=md.numberofnodes2d;
 	index=md.elements2d;
-	x=md.x2d; y=md.y2d; z=md.z2d;
+	x=md.x2d; y=md.y2d;
 end
 
Index: /issm/trunk/src/m/model/extrude.m
===================================================================
--- /issm/trunk/src/m/model/extrude.m	(revision 9450)
+++ /issm/trunk/src/m/model/extrude.m	(revision 9451)
@@ -25,13 +25,4 @@
 	help extrude;
 	error('extrude error message');
-end
-
-if md.counter<3,
-	help extrude;
-	error('only fully parameterized 2d models can be extruded');
-end
-
-if md.counter>=4,
-	error('This model has already been extruded!','s');
 end
 
@@ -114,5 +105,4 @@
 md.x2d=md.x;
 md.y2d=md.y;
-md.z2d=md.z;
 md.elements2d=md.elements;
 md.elements_type2d=md.elements_type;
@@ -158,8 +148,4 @@
 if ~isnan(md.temperature),md.temperature=project3d(md,'vector',md.temperature,'type','node');end;
 if ~isnan(md.waterfraction),md.waterfraction=project3d(md,'vector',md.waterfraction,'type','node');end;
-if ~isnan(md.surface_slopex),md.surface_slopex=project3d(md,'vector',md.surface_slopex,'type','node');end;
-if ~isnan(md.surface_slopey),md.surface_slopey=project3d(md,'vector',md.surface_slopey,'type','node');end;
-if ~isnan(md.bed_slopex),md.bed_slopex=project3d(md,'vector',md.bed_slopex,'type','node');end;
-if ~isnan(md.bed_slopey),md.bed_slopey=project3d(md,'vector',md.bed_slopey,'type','node');end;
 
 %bedinfo and surface info
@@ -246,5 +232,2 @@
 	md.connectivity=100;
 end
-
-%augment counter  keeping track of what has been done to this model
-md.counter=4;
Index: /issm/trunk/src/m/model/geography.m
===================================================================
--- /issm/trunk/src/m/model/geography.m	(revision 9450)
+++ /issm/trunk/src/m/model/geography.m	(revision 9451)
@@ -18,11 +18,4 @@
 	help geography
 	error('geography error message');
-end
-
-if md.counter>=2,
-	choice=input('This model already has a geometry. Are you sure you want to go ahead? (y/n)','s');
-	if ~strcmp(choice,'y'), error('no geometry done ... exiting'); end
-else
-	if (md.counter~=1), error('geography error message: you need to run mesh.m first on this model'); end
 end
 
@@ -49,6 +42,4 @@
 
 %Return: 
-md.counter=2;
-
 md.elementoniceshelf=elementoniceshelf;
 md.nodeoniceshelf=nodeoniceshelf;
Index: /issm/trunk/src/m/model/geography2.m
===================================================================
--- /issm/trunk/src/m/model/geography2.m	(revision 9450)
+++ /issm/trunk/src/m/model/geography2.m	(revision 9451)
@@ -148,4 +148,3 @@
 md.elementonicesheet=elementonicesheet;
 
-md.counter=2;
 md.segmentmarkers(:)=1;
Index: /issm/trunk/src/m/model/ismodelselfconsistent.m
===================================================================
--- /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 9450)
+++ /issm/trunk/src/m/model/ismodelselfconsistent.m	(revision 9451)
@@ -42,9 +42,4 @@
 end
 %}}}
-%COUNTER {{{1
-if md.counter<3,
-	message(['model ' md.name ' is not correctly configured. You forgot one step in the following sequence (mesh, geography, parameterize,setelementstype)!']);
-end
-%}}}
 %NAME{{{1
 if isempty(md.name),
@@ -87,19 +82,18 @@
 %}}}
 %NO NAN {{{1
-fields={'numberofelements','numberofnodes','x','y','z','drag_coefficient','drag_type','drag_p','drag_q',...
-	'rho_ice','rho_water','rheology_B','elementoniceshelf','surface','thickness','bed','g','lowmem','sparsity','nsteps','maxiter',...
+fields={'numberofelements','numberofnodes','x','y','z','drag_coefficient','drag_p','drag_q',...
+	'rho_ice','rho_water','rheology_B','elementoniceshelf','surface','thickness','bed','g','lowmem','nsteps','maxiter',...
 	'tolx','eps_res','max_nonlinear_iterations','rheology_n','nodeonbed','nodeonsurface','elementonbed','elementonsurface','elementconnectivity'};
 checknan(md,fields);
 %}}}}
 %FIELDS >= 0 {{{1
-fields={'numberofelements','numberofnodes','elements','drag_coefficient','drag_type','drag_p','drag_q',...
+fields={'numberofelements','numberofnodes','elements','drag_coefficient','drag_p','drag_q',...
 	'rho_ice','rho_water','rheology_B','elementoniceshelf','thickness','g','eps_res','max_nonlinear_iterations','eps_rel','eps_abs','nsteps','maxiter','tolx',...
-	'sparsity','lowmem','rheology_n','nodeonbed','nodeonsurface','elementonbed','elementonsurface'};
+	'lowmem','rheology_n','nodeonbed','nodeonsurface','elementonbed','elementonsurface'};
 checkgreater(md,fields,0);
 %}}}
 %FIELDS > 0 {{{1
-fields={'numberofelements','numberofnodes','elements','drag_type','drag_p',...
-	'rho_ice','rho_water','rheology_B','thickness','g','max_nonlinear_iterations','eps_res','eps_rel','eps_abs','maxiter','tolx',...
-	'sparsity'};
+fields={'numberofelements','numberofnodes','elements','drag_p',...
+	'rho_ice','rho_water','rheology_B','thickness','g','max_nonlinear_iterations','eps_res','eps_rel','eps_abs','maxiter','tolx'};
 checkgreaterstrict(md,fields,0);
 %}}}
Index: /issm/trunk/src/m/model/isresultconsistent.m
===================================================================
--- /issm/trunk/src/m/model/isresultconsistent.m	(revision 9450)
+++ /issm/trunk/src/m/model/isresultconsistent.m	(revision 9451)
@@ -147,5 +147,5 @@
 		%check melting (<=0 via penalties)
 		if any(abs(md.results.ThermalAnalysis(iter).melting(md.numberofnodes2d+1:end))>tolerance)
-			disp(['''thermal'' result not consistent: increase penalty_melting (negative melting)']);
+			disp(['''thermal'' result not consistent: increase penalty_offset (negative melting)']);
 			bool=0; return; 
 		end
@@ -197,5 +197,5 @@
 		if (md.dim==3),
 			if any(abs(md.results.TransientAnalysis(iter).melting(md.numberofnodes2d+1:end))>tolerance)
-				disp(['''thermal'' result not consistent: increase penalty_melting (negative melting)']);
+				disp(['''thermal'' result not consistent: increase penalty_offset (negative melting)']);
 				bool=0; return; 
 			end
Index: /issm/trunk/src/m/model/loadmultipleresultsfromcluster.m
===================================================================
--- /issm/trunk/src/m/model/loadmultipleresultsfromcluster.m	(revision 9450)
+++ /issm/trunk/src/m/model/loadmultipleresultsfromcluster.m	(revision 9451)
@@ -28,6 +28,4 @@
 	md_list{i}=loadresultsfromdisk(md_list{i},[md_list{i}.name '.outbin']);
 
-	%post solve phase
-	md_list{i}=postsolveparallel(md_list{i});
 	delete([name '.outbin']);
 end
Index: /issm/trunk/src/m/model/loadresultsfromcluster.m
===================================================================
--- /issm/trunk/src/m/model/loadresultsfromcluster.m	(revision 9450)
+++ /issm/trunk/src/m/model/loadresultsfromcluster.m	(revision 9451)
@@ -58,5 +58,2 @@
 	end
 end
-
-%post solve phase
-md=postsolveparallel(md);
Index: /issm/trunk/src/m/model/mesh/mesh.m
===================================================================
--- /issm/trunk/src/m/model/mesh/mesh.m	(revision 9450)
+++ /issm/trunk/src/m/model/mesh/mesh.m	(revision 9451)
@@ -84,5 +84,2 @@
 %type of model
 md.dim=2;
-	
-%augment counter  keeping track of what has been done to this model
-md.counter=1;
Index: /issm/trunk/src/m/model/mesh/meshconvert.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshconvert.m	(revision 9450)
+++ /issm/trunk/src/m/model/mesh/meshconvert.m	(revision 9451)
@@ -46,3 +46,2 @@
 md.elementonsurface=ones(md.numberofelements,1);
 md.nodeonboundary=zeros(md.numberofnodes,1); md.nodeonboundary(md.segments(:,1:2))=1;
-md.counter=1;
Index: /issm/trunk/src/m/model/mesh/meshexprefine.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshexprefine.m	(revision 9450)
+++ /issm/trunk/src/m/model/mesh/meshexprefine.m	(revision 9451)
@@ -23,8 +23,4 @@
 	meshexprefineusage();
 	error('meshexprefine error message');
-end
-
-if (md.counter<1)
-	error('meshexprefine error message: you need to run mesh.m first on this model');
 end
 
Index: /issm/trunk/src/m/model/mesh/meshnodensity.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshnodensity.m	(revision 9450)
+++ /issm/trunk/src/m/model/mesh/meshnodensity.m	(revision 9451)
@@ -70,5 +70,2 @@
 %type of model
 md.dim=2;
-	
-%augment counter  keeping track of what has been done to this model
-md.counter=1;
Index: /issm/trunk/src/m/model/mesh/meshrefine.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshrefine.m	(revision 9450)
+++ /issm/trunk/src/m/model/mesh/meshrefine.m	(revision 9451)
@@ -35,7 +35,4 @@
 %type of model
 md.dim=2;
-	
-%augment counter  keeping track of what has been done to this model
-md.counter=1;
 end
 
Index: /issm/trunk/src/m/model/mesh/reorder.m
===================================================================
--- /issm/trunk/src/m/model/mesh/reorder.m	(revision 9450)
+++ /issm/trunk/src/m/model/mesh/reorder.m	(revision 9451)
@@ -6,7 +6,4 @@
 
 %some checks
-if md.counter<1,
-	error('reorder error message: no existing mesh, exiting...')
-end
 if md.dim==3,
 	error('reorder error message: 3d models not supported yet, exiting...')
Index: /issm/trunk/src/m/model/mesh/rifts/meshaddrifts.m
===================================================================
--- /issm/trunk/src/m/model/mesh/rifts/meshaddrifts.m	(revision 9450)
+++ /issm/trunk/src/m/model/mesh/rifts/meshaddrifts.m	(revision 9451)
@@ -92,5 +92,2 @@
 %type of model
 md.dim=2;
-	
-%augment counter  keeping track of what has been done to this model
-md.counter=1;
Index: /issm/trunk/src/m/model/modelextract.m
===================================================================
--- /issm/trunk/src/m/model/modelextract.m	(revision 9450)
+++ /issm/trunk/src/m/model/modelextract.m	(revision 9451)
@@ -142,5 +142,4 @@
 		md2.x2d=md1.x(pos_node_2d);
 		md2.y2d=md1.y(pos_node_2d);
-		md2.z2d=md1.z(pos_node_2d);
 	end
 
Index: /issm/trunk/src/m/model/parameterization/parameterize.m
===================================================================
--- /issm/trunk/src/m/model/parameterization/parameterize.m	(revision 9450)
+++ /issm/trunk/src/m/model/parameterization/parameterize.m	(revision 9451)
@@ -13,19 +13,4 @@
 
 %some checks
-if md.counter>=4,
-	%We need to take this out, as it gets too constraining. 
-	choice=input('This model already has parameters and has been extruded. Are you sure you want to go ahead? (y/n)','s');
-	if ~strcmp(choice,'y')
-		error('no parameters done ... exiting');
-	end
-elseif md.counter==3
-	disp('This model already has parameters, overwriting...')
-else
-	if (md.counter<2)
-		error('parameterize error message: you need to run geography.m first on this model');
-	else
-		md.counter=3;
-	end
-end
 if ~exist(parametername),
 	error(['parameterize error message: file ' parametername ' not found !']);
Index: /issm/trunk/src/m/model/plot/processmesh.m
===================================================================
--- /issm/trunk/src/m/model/plot/processmesh.m	(revision 9450)
+++ /issm/trunk/src/m/model/plot/processmesh.m	(revision 9451)
@@ -37,5 +37,4 @@
 
 
-	z2d=md.z2d;
 	elements2d=md.elements2d;
 	elements=md.elements;
@@ -63,5 +62,5 @@
 		x=x2d;
 		y=y2d;
-		z=z2d;
+		z=zeros(size(x2d));
 		elements=elements2d;
 		elements_type=elements_type2d;
Index: sm/trunk/src/m/model/postsolveparallel.m
===================================================================
--- /issm/trunk/src/m/model/postsolveparallel.m	(revision 9450)
+++ 	(revision )
@@ -1,37 +1,0 @@
-function md=postsolveparallel(md)
-%POSTSOLVEPARALLEL - postre-solve phase operations for parallel jobs.
-%
-%   Usage:
-%      md=postsolveparallel(md)
-
-
-%errlog: 
-if(md.mem_debug),
-
-	%dump file so we can apply the error_process.sh script to it, then reload onto md.errlog.
-	writefile([md.name '.errlog'],md.errlog);
-
-	%apply error_process.sh
-	system(['errlog_process.sh ' md.name '.errlog']);
-
-	%figure out memory used: 
-	[result,string]=system(['cat ' md.name '.errlog | grep  "definitely lost:"  | awk ''{printf("%s ",$4);}'' | sed ''s/,//g''']);
-	memoryleaks.definitely_lost=str2num(string);
-
-	[result,string]=system(['cat ' md.name '.errlog | grep  "indirectly lost:"  | awk ''{printf("%s",$4);}''| sed ''s/,//g''']);
-	memoryleaks.indirectly_lost=str2num(string);
-
-	[result,string]=system(['cat ' md.name '.errlog | grep  "possibly lost:"  | awk ''{printf("%s",$4);}''| sed ''s/,//g''']);
-	memoryleaks.possibly_lost=str2num(string);
-
-	%reread onto md.errlog
-	try,
-		md.errlog=char(textread([md.name '.errlog'],'%s','delimiter','\n','bufsize',1000000));
-	catch me,
-		disp('postsolveparallel: captured textread error, errlog is too large to read!');
-		md.errlog=''; %too big to read
-	end
-	md.memoryleaks=memoryleaks;
-
-end
-
Index: /issm/trunk/src/m/model/setelementstype.m
===================================================================
--- /issm/trunk/src/m/model/setelementstype.m	(revision 9450)
+++ /issm/trunk/src/m/model/setelementstype.m	(revision 9451)
@@ -22,8 +22,4 @@
 if ((nargin<2) | (nargout~=1)),
 	error('setelementstype error message');
-end
-
-if md.counter<3,
-	error('only fully parameterized 2d models can be setelementstyped');
 end
 
Index: /issm/trunk/src/m/model/slope.m
===================================================================
--- /issm/trunk/src/m/model/slope.m	(revision 9450)
+++ /issm/trunk/src/m/model/slope.m	(revision 9451)
@@ -10,10 +10,10 @@
 	numberofnodes=md.numberofnodes;
 	index=md.elements;
-	x=md.x; y=md.y; z=md.z;
+	x=md.x; y=md.y;
 else
 	numberofelements=md.numberofelements2d;
 	numberofnodes=md.numberofnodes2d;
 	index=md.elements2d;
-	x=md.x2d; y=md.y2d; z=md.z2d;
+	x=md.x2d; y=md.y2d;
 end
 
Index: /issm/trunk/src/m/qmu/qmumarshall.m
===================================================================
--- /issm/trunk/src/m/qmu/qmumarshall.m	(revision 9450)
+++ /issm/trunk/src/m/qmu/qmumarshall.m	(revision 9451)
@@ -64,6 +64,4 @@
 WriteData(fid,md.part,'Mat','part');
 
-WriteData(fid,md.qmu_save_femmodel,'Integer','qmu_save_femmodel');
-
 %close file
 st=fclose(fid);
Index: /issm/trunk/src/m/solutions/SpawnCore.m
===================================================================
--- /issm/trunk/src/m/solutions/SpawnCore.m	(revision 9450)
+++ /issm/trunk/src/m/solutions/SpawnCore.m	(revision 9451)
@@ -10,5 +10,4 @@
 solution_type=femmodel.parameters.SolutionType;
 control_analysis=femmodel.parameters.ControlAnalysis;
-qmu_save_femmodel=femmodel.parameters.QmuSaveFemmodel;
 
 issmprintf(VerboseQmu(),'%s%i',['   qmu iteration:'],counter);
@@ -24,8 +23,2 @@
 %now process the results to get response function values
 responses=DakotaResponses(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters,responsedescriptors);
-
-if qmu_save_femmodel
-    issmprintf(VerboseQmu(),'%s%i%s',['   writing femmodel to femmodel_spawncorem_'],counter,['.mat']);
-    save(sprintf('femmodel_spawncorem_%i',counter),'femmodel');
-end
-
Index: /issm/trunk/src/m/utils/Mesh/argusmesh.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/argusmesh.m	(revision 9450)
+++ /issm/trunk/src/m/utils/Mesh/argusmesh.m	(revision 9451)
@@ -87,5 +87,4 @@
 md.elementonbed=ones(md.numberofelements,1);
 md.elementonsurface=ones(md.numberofelements,1);
-md.counter=1;
 md.dim=2;
 md=addnote(md,notes);
Index: /issm/trunk/src/m/utils/Mesh/squaremesh.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/squaremesh.m	(revision 9450)
+++ /issm/trunk/src/m/utils/Mesh/squaremesh.m	(revision 9451)
@@ -78,3 +78,2 @@
 %plug other field
 md.dim=2;
-md.counter=1;
