Index: ../trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp
===================================================================
--- ../trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp	(revision 18744)
+++ ../trunk-jpl/src/c/analyses/HydrologyDCEfficientAnalysis.cpp	(revision 18745)
@@ -425,6 +425,7 @@
 	IssmDouble hmax;
 	IssmDouble epl_head,sediment_head;
 	IssmDouble leakage,transfer;
+	IssmDouble continuum, factor;
 	HydrologyDCInefficientAnalysis* inefanalysis = NULL;
 
 	element->FindParam(&transfermethod,HydrologydcTransferFlagEnum);
@@ -447,19 +448,11 @@
 		epl_head_input->GetInputValue(&epl_head,gauss);
 		element->FindParam(&leakage,HydrologydcLeakageFactorEnum);
 		
-		if(epl_head>sediment_head){  
-			/* if(sediment_head>=hmax){ */
-			/* 	transfer=0.0; */
-			/* } */
-			/* else{ */
-			/* 	transfer=(leakage); */
-			/* } */
-			transfer=leakage*(1/(1+exp(-20.0*(hmax-sediment_head))));
-		}
-		else{
-			transfer=(leakage);
-			
-		}
+		//Computing continuum function to apply to transfer term, transfer is null only if
+		// epl_head>sediment_head AND sediment_head>h_max
+		continuum=((1.0/(1.0+exp(-20.0*(sediment_head-epl_head)))))+(1.0/(1.0+exp(-20.0*(hmax-sediment_head))));
+		factor=max(continuum,1.0);
+		transfer=leakage*factor;
 		break;
 	default:
 		_error_("no case higher than 1 for the Transfer method");
@@ -473,6 +466,7 @@
 	IssmDouble hmax;
 	IssmDouble epl_head,sediment_head;
 	IssmDouble leakage,transfer;
+	IssmDouble continuum, factor;
 
 	HydrologyDCInefficientAnalysis* inefanalysis = NULL;
 
@@ -496,18 +490,12 @@
 		epl_head_input->GetInputValue(&epl_head,gauss);
 		element->FindParam(&leakage,HydrologydcLeakageFactorEnum);
 
- 		if(epl_head>sediment_head){  
-			/* if(sediment_head>=hmax){ */
-			/* 	transfer=0.0; */
-			/* } */
-			/* else{ */
-			/* 	transfer=(sediment_head*leakage); */
-			/* } */
-			transfer=sediment_head*leakage*(1/(1+exp(-20.0*(hmax-sediment_head))));
-		}
-		else{
-			transfer=(sediment_head*leakage);
-		}
+		//Computing continuum function to apply to transfer term, transfer is null only if
+		// epl_head>sediment_head AND sediment_head>h_max
+		continuum=((1.0/(1.0+exp(-20.0*(sediment_head-epl_head)))))+(1.0/(1.0+exp(-20.0*(hmax-sediment_head))));
+		factor=max(continuum,1.0);
+		transfer=sediment_head*leakage*factor;
+
 		break;
 	default:
 		_error_("no case higher than 1 for the Transfer method");
@@ -737,7 +725,6 @@
 /*}}}*/
 void HydrologyDCEfficientAnalysis::HydrologyEPLGetActive(Vector<IssmDouble>* active_vec, Element* element){
 	/*Constants*/
-
 	int      domaintype;
 	Element*   basalelement=NULL;
 
@@ -759,12 +746,9 @@
 	IssmDouble* active   = xNew<IssmDouble>(numnodes);
 		
 	basalelement->GetInputListOnVertices(&active[0],HydrologydcMaskEplactiveNodeEnum);
-
 	bool active_element;
-	
 	Input* 	active_element_input=basalelement->GetInput(HydrologydcMaskEplactiveEltEnum); _assert_(active_element_input);		
 	active_element_input->GetInputValue(&active_element);
-
 	
 	for(int i=0;i<numnodes;i++) flag+=active[i];
 
@@ -774,13 +758,12 @@
 		}
 	}
 	else if(active_element){
-		/*Checking Stuff*/
 		for(int i=0;i<numnodes;i++){
 			active_vec->SetValue(basalelement->nodes[i]->Sid(),1.,INS_VAL);
 		}		
 	}
 	else{
-		/*Do not do anything: at least one node was active for this element but this element is not solved for*/
+		/*Do not do anything: at least one node is active for this element but this element is not solved for*/
 	}
 	if(domaintype!=Domain2DhorizontalEnum){basalelement->DeleteMaterials(); delete basalelement;};
 	xDelete<IssmDouble>(active);
Index: ../trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp
===================================================================
--- ../trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp	(revision 18744)
+++ ../trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp	(revision 18745)
@@ -592,7 +592,8 @@
 	IssmDouble hmax;
 	IssmDouble epl_head,sediment_head;
 	IssmDouble leakage,transfer;
-
+	IssmDouble continuum, factor;
+	
 	element->FindParam(&transfermethod,HydrologydcTransferFlagEnum);
 
 	/*Switch between the different transfer methods cases*/
@@ -610,19 +611,13 @@
 		element->FindParam(&leakage,HydrologydcLeakageFactorEnum);
 
 		hmax=GetHydrologyDCInefficientHmax(element, gauss, thick_input, base_input);
-		
-		if(epl_head>sediment_head){  
-			/* if(sediment_head>=hmax){ */
-			/* 	transfer=0.0; */
-			/* } */
-			/* else{ */
-			/* 	transfer=(leakage); */
-			/* } */
-			transfer=leakage*(1/(1+exp(-20.0*(hmax-sediment_head))));
-		}
-		else{
-			transfer=(leakage);
-		}		
+	
+		//Computing continuum function to apply to transfer term, transfer is null only if
+		//epl_head>sediment_head AND sediment_head>h_max
+		continuum=((1.0/(1.0+exp(-20.0*(sediment_head-epl_head)))))+(1.0/(1.0+exp(-20.0*(hmax-sediment_head))));
+		factor=max(continuum,1.0);
+		transfer=leakage*factor;
+
 		break;
 	default:
 		_error_("no case higher than 1 for the Transfer method");
@@ -636,7 +631,8 @@
 	IssmDouble hmax;
 	IssmDouble epl_head,sediment_head;
 	IssmDouble leakage,transfer;
-
+	IssmDouble continuum, factor;
+	
 	element->FindParam(&transfermethod,HydrologydcTransferFlagEnum);
 
 	/*Switch between the different transfer methods cases*/
@@ -655,18 +651,11 @@
 
 		hmax=GetHydrologyDCInefficientHmax(element, gauss, thick_input, base_input);
 		
-		if(epl_head>sediment_head){  
-			/* if(sediment_head>=hmax){ */
-			/* 	transfer=0.0; */
-			/* } */
-			/* else{ */
-			/* 	transfer=(epl_head*leakage); */
-			/* } */
-			transfer=epl_head*leakage*(1/(1+exp(-20.0*(hmax-sediment_head))));
-		}
-		else{
-			transfer=(epl_head*leakage);
-		}
+		//Computing continuum function to apply to transfer term, transfer is null only if
+		//epl_head>sediment_head AND sediment_head>h_max
+		continuum=((1.0/(1.0+exp(-20.0*(sediment_head-epl_head)))))+(1.0/(1.0+exp(-20.0*(hmax-sediment_head))));
+		factor=max(continuum,1.0);
+		transfer=epl_head*leakage*factor;
 		break;
 	default:
 		_error_("no case higher than 1 for the Transfer method");
