Index: /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 20343)
+++ /issm/trunk-jpl/src/c/classes/Elements/Tria.cpp	(revision 20344)
@@ -3610,9 +3610,7 @@
 	bool computerigid = true;
 	bool computeelastic= true;
-	bool computeeustatic = true;
-
 	
 	/*early return if we are not on an ice cap:*/
-	if(IsWaterInElement() | !IsIceInElement()){
+	if(!(this->inputs->Max(MaskIceLevelsetEnum)<0)){
 		*peustatic=0; //do not forget to assign this pointer, otherwise, global eustatic will be garbage!
 		return;
@@ -3627,5 +3625,4 @@
 	this->parameters->FindParam(&computerigid,SealevelriseRigidEnum);
 	this->parameters->FindParam(&computeelastic,SealevelriseElasticEnum);
-	this->parameters->FindParam(&computeeustatic,SealevelriseEustaticEnum);
 
 	/*recover elastic green function:*/
@@ -3639,8 +3636,9 @@
 	this->parameters->FindParam(&gsize,MeshNumberofverticesEnum);
 
+	/* Where is the centroid of this element?:{{{*/
+	
 	/*retrieve coordinates: */
 	::GetVerticesCoordinates(&llr_list[0][0],this->vertices,NUMVERTICES,spherical);
 	
-	/* Where is the centroid of this element?:*/
 	IssmDouble minlong=400;
 	IssmDouble maxlong=-20;
@@ -3675,4 +3673,5 @@
 	late=late/180*PI;
 	longe=longe/180*PI;
+	/*}}}*/
 
 	/*Compute area of element:*/
@@ -3685,5 +3684,5 @@
 
 	/*Compute eustatic compoent:*/
-	if(computeeustatic) eustatic += rho_ice*area*I/(oceanarea*rho_water); 
+	eustatic += rho_ice*area*I/(oceanarea*rho_water); 
 
 	if(computeelastic | computerigid){
@@ -3758,5 +3757,4 @@
 	bool computerigid = true;
 	bool computeelastic= true;
-	bool computeeustatic = true;
 
 	/*early return if we are not on the ocean:*/
@@ -3766,5 +3764,4 @@
 	this->parameters->FindParam(&computerigid,SealevelriseRigidEnum);
 	this->parameters->FindParam(&computeelastic,SealevelriseElasticEnum);
-	this->parameters->FindParam(&computeeustatic,SealevelriseEustaticEnum);
 	
 	/*early return if rigid or elastic not requested:*/
@@ -3858,5 +3855,5 @@
 		}
 
-		/*Add all components to the pSgi or pSgo solution vectors:*/
+		/*Add all components to the pSgo solution vectors:*/
 		if(computerigid)values[i]+=3*rho_water/rho_earth*area/eartharea*I*G_rigid[i];
 		if(computeelastic)values[i]+=3*rho_water/rho_earth*area/eartharea*I*G_elastic[i];
