Index: /issm/trunk-jpl/src/c/classes/Elements/Element.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Element.h	(revision 16816)
+++ /issm/trunk-jpl/src/c/classes/Elements/Element.h	(revision 16817)
@@ -202,5 +202,4 @@
 		virtual void HydrologyEPLGetActive(Vector<IssmDouble>* active)=0;
 		virtual void ComputeEPLThickness(void)=0;
-		virtual void UpdateConstraintsL2ProjectionEPL(void)=0;
 		#endif
 
Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 16816)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 16817)
@@ -9728,26 +9728,4 @@
 }
 /*}}}*/
-/*FUNCTION Penta::UpdateConstraintsL2ProjectionEPL{{{*/
-void  Penta::UpdateConstraintsL2ProjectionEPL(void){
-
-	IssmDouble activeEpl[NUMVERTICES];
-
-
-	if(!IsOnBed()){
-		for(int i=0;i<this->NumberofNodes();i++)this->nodes[i]->Deactivate();
-	}
-	else{
-		GetInputListOnVertices(&activeEpl[0],HydrologydcMaskEplactiveEnum);
-		for(int i=0;i<3;i++){
-			if(!reCast<bool>(activeEpl[i])){
-				this->nodes[i]->Deactivate();
-			}
-			else{
-				this->nodes[i]->Activate();
-			}
-		}
-	}
-}
-/*}}}*/
 #endif
 
Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.h	(revision 16816)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.h	(revision 16817)
@@ -354,5 +354,4 @@
 		void           HydrologyEPLGetMask(Vector<IssmDouble>* vec_mask);
 		void           ComputeEPLThickness(void);
-		void           UpdateConstraintsL2ProjectionEPL(void);
 		#endif
 
Index: /issm/trunk-jpl/src/c/classes/Elements/Seg.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Seg.h	(revision 16816)
+++ /issm/trunk-jpl/src/c/classes/Elements/Seg.h	(revision 16817)
@@ -180,5 +180,4 @@
 		void UpdateConstraintsExtrudeFromBase(){_error_("not implemented");};
 		void UpdateConstraintsExtrudeFromTop(){_error_("not implemented");};
-		void UpdateConstraintsL2ProjectionEPL(){_error_("not implemented");};
 
 #ifdef _HAVE_RESPONSES_
Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 16816)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 16817)
@@ -2884,20 +2884,5 @@
 }
 /*}}}*/
-/*FUNCTION Tria::UpdateConstraintsL2ProjectionEPL{{{*/
-void  Tria::UpdateConstraintsL2ProjectionEPL(void){
-
-	IssmDouble activeEpl[NUMVERTICES];
- 
-	GetInputListOnVertices(&activeEpl[0],HydrologydcMaskEplactiveEnum);
-	for(int i=0;i<NUMVERTICES;i++){
-		if(!reCast<bool>(activeEpl[i])){
-			this->nodes[i]->Deactivate();
-		}
-		else{
-			this->nodes[i]->Activate();
-		}
-	}
-}
-/*}}}*/
+
 #ifdef _HAVE_RESPONSES_
 /*FUNCTION Tria::AverageOntoPartition {{{*/
@@ -7033,19 +7018,21 @@
 		GetInputListOnVertices(&bed[0],BedEnum);
 		
-		for(int i=0;i<numdof;i++){
+		if(!this->AnyActive()){
 			/*Keeping thickness to initial value if EPL is not active*/
-			/* if(activeEpl[i]==0.0){ */
-			/* 	thickness[i]=init_thick; */
-			/* } */
-			/* else{ */
-				/*Compute first the effective pressure in the EPL*/
-				EPL_N=gravity*((rho_ice*ice_thickness[i])-(rho_water*(eplhead[i]-bed[i])));
-				if(EPL_N<0.0)EPL_N=0.0;
-				/*Get then the gradient of EPL heads*/
-				EPLgrad = epl_slopeX[i]+epl_slopeY[i];
-				
-				/*And proceed to the real thing*/
-				thickness[i] = old_thickness[i]*(1+((rho_water*gravity*dt)/(rho_ice*latentheat))*epl_conductivity*pow(EPLgrad,2.0)-2.0*(A*dt/(pow(n,n)))*(pow(EPL_N,n)));
-				//}
+			for(int i=0;i<numdof;i++){ 
+				thickness[i]=init_thick;
+			}
+		}
+		else{
+			for(int i=0;i<numdof;i++){ 
+					/*Compute first the effective pressure in the EPL*/
+					EPL_N=gravity*((rho_ice*ice_thickness[i])-(rho_water*(eplhead[i]-bed[i])));
+					if(EPL_N<0.0)EPL_N=0.0;
+					/*Get then the gradient of EPL heads*/
+					EPLgrad = epl_slopeX[i]+epl_slopeY[i];
+					
+					/*And proceed to the real thing*/
+					thickness[i] = old_thickness[i]*(1+((rho_water*gravity*dt)/(rho_ice*latentheat))*epl_conductivity*pow(EPLgrad,2.0)-2.0*(A*dt/(pow(n,n)))*(pow(EPL_N,n)));
+			}
 		}
 		this->inputs->AddInput(new TriaInput(HydrologydcEplThicknessEnum,thickness,P1Enum));
Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.h	(revision 16816)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.h	(revision 16817)
@@ -346,5 +346,4 @@
 		void           HydrologyEPLGetMask(Vector<IssmDouble>* vec_mask);
 		void           ComputeEPLThickness(void);
-		void           UpdateConstraintsL2ProjectionEPL(void);
 		bool           AllActive(void);
 		bool           AnyActive(void);
Index: /issm/trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 16816)
+++ /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 16817)
@@ -1461,10 +1461,5 @@
 	/*Update dof indexings*/
 	this->UpdateConstraintsx();
-
-	/* for(int i=0;i<elements->Size();i++){ */
-	/* 	Element* element=dynamic_cast<Element*>(elements->GetObjectByOffset(i)); */
-	/* 	element->UpdateConstraintsL2ProjectionEPL(); */
-	/* } */
-
-}
-/*}}}*/#endif
+}
+/*}}}*/
+#endif
Index: /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp
===================================================================
--- /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp	(revision 16816)
+++ /issm/trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp	(revision 16817)
@@ -139,6 +139,8 @@
 				solutionsequence_linear(femmodel);
 
+				femmodel->HydrologyEPLThicknessx();
+
 				femmodel->SetCurrentConfiguration(HydrologyDCEfficientAnalysisEnum);
-				femmodel->HydrologyEPLThicknessx();
+				//				femmodel->HydrologyEPLThicknessx();
 				//updating mask after the computation of the epl thickness (Allow to close too thin EPL)
 				femmodel->HydrologyEPLupdateDomainx();
