Index: /issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp	(revision 21487)
+++ /issm/trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp	(revision 21488)
@@ -234,5 +234,5 @@
 		gauss           ->GaussPoint(ig);
 		basalelement    ->JacobianDeterminant(&Jdet,xyz_list,gauss);
-
+		
 		epl_transmitivity = EplTransmitivity(basalelement,gauss,epl_thick_input,epl_head_input,base_input);
 		epl_storing				= EplStoring(basalelement,gauss,epl_thick_input,epl_head_input,base_input);
@@ -665,30 +665,7 @@
 	for(int i=1;i<numnodes;i++) if(sedhead[i]<=sedheadmin)sedheadmin=sedhead[i];
 	for(int i=0;i<numnodes;i++){
-		/*If node is now closed bring its thickness back to initial*/
-		if (old_active[i]==0.){
-			epl_thickness[i]=init_thick;
-		}
-		/*Now starting to look at the activations*/
-		if(residual[i]>0.){
-			vec_mask->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL);
-			if(old_active[i]==0.){
-				recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL);
-			}
-		}
-		/*Increase of the efficient system is needed if the epl head reach the maximum value (sediment max value for now)*/
 		GetHydrologyDCInefficientHmax(&h_max,basalelement,basalelement->nodes[i]);
-		if(eplhead[i]>=h_max && active_element){
-			for(int j=0;j<numnodes;j++){
-				/*Increase of the domain is on the downstream node in term of sediment head*/
-				if(sedhead[j] == sedheadmin){
-					vec_mask->SetValue(basalelement->nodes[j]->Sid(),1.,INS_VAL);
-					if(old_active[i]==0.){
-						recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL);
-					}
-				}
-			}
-		}
 		/*If mask was already one, keep one or colapse*/
-		else if(old_active[i]>0.){
+		if(old_active[i]>0.){
 			vec_mask->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL);
 			/* If epl thickness gets under colapse thickness, close the layer */
@@ -697,10 +674,34 @@
 				recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL);
 			}
-			/*If epl head gets under base elevation, close the layer*/
+			/* If epl head gets under base elevation, close the layer */
 			/* else if(eplhead[i]<(base[i]-1.0e-8)){ */
 			/* 	vec_mask->SetValue(basalelement->nodes[i]->Sid(),0.,INS_VAL); */
 			/* 	recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL); */
-			/* }*/
-		}
+			/* } */
+		}
+		/*If node is now closed bring its thickness back to initial*/
+		if (old_active[i]==0.){
+			epl_thickness[i]=init_thick;
+		}
+		/*Activate if we have a residual from sediment*/
+		if(residual[i]>0.){
+			vec_mask->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL);
+			if(old_active[i]==0.){
+				recurence->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL);
+			}
+		}
+		/*Increase of the efficient system is needed if the epl head reach the maximum value (sediment max value for now)*/
+		if(eplhead[i]>=h_max && active_element){
+			for(int j=0;j<numnodes;j++){
+				/*Increase of the domain is on the downstream node in term of sediment head*/
+				if((sedhead[j] == sedheadmin) && (i!=j)){
+					vec_mask->SetValue(basalelement->nodes[j]->Sid(),1.,INS_VAL);
+					if(old_active[j]==0.){
+						recurence->SetValue(basalelement->nodes[j]->Sid(),1.,INS_VAL);
+					}
+				}
+			}
+		}
+		
 	}
 	basalelement->AddInput(HydrologydcEplThicknessEnum,epl_thickness,basalelement->GetElementType());
@@ -758,8 +759,7 @@
 
 	water_sheet=max(0.0,(prestep_head-base_elev));
-	//water_sheet=prestep_head-base_elev;
 	
-	//epl_transmitivity=epl_conductivity*epl_thickness;
-	epl_transmitivity=epl_conductivity*min(water_sheet,epl_thickness);
+	epl_transmitivity=epl_conductivity*epl_thickness;
+	/* epl_transmitivity=max(1.0e-6,(epl_conductivity*min(water_sheet,epl_thickness))); */
 	return epl_transmitivity;
 }/*}}}*/
Index: /issm/trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 21487)
+++ /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 21488)
@@ -2719,6 +2719,4 @@
 		}
 	}
-
-	
 	this->parameters->SetParam(eplzigzag_counter,this->nodes->Size(),EplZigZagCounterEnum);
 	/*Assemble and serialize*/
