Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 7373)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 7374)
@@ -540,4 +540,5 @@
 	/*}}}*/
 	
+	/*Skip if water element*/
 	if(IsOnWater()) return;
 
@@ -588,5 +589,5 @@
 	  bedrock, in which case we spawn a tria element using the 3 first grids, and use it to build 
 	  the stiffness matrix. */
-	if (!IsOnBed() || IsOnWater()) return NULL;
+	if (!IsOnBed()) return NULL;
 
 	/*Depth Averaging Vx and Vy*/
@@ -613,5 +614,5 @@
 	  bedrock, in which case we spawn a tria element using the 3 first grids, and use it to build 
 	  the stiffness matrix. */
-	if (!IsOnBed() || IsOnWater()) return NULL;
+	if (!IsOnBed()) return NULL;
 
 	/*Depth Averaging Vx and Vy*/
@@ -673,6 +674,5 @@
 	Tria* tria=pentabase->SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke1=new ElementMatrix(pentabase->nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
 	ElementMatrix* Ke2=new ElementMatrix(this->nodes     ,NUMVERTICES,this->parameters,PattynApproximationEnum);
@@ -730,5 +730,5 @@
 
 	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater() || IsOnShelf() || !IsOnBed()) return NULL;
+	if(IsOnShelf() || !IsOnBed()) return NULL;
 
 	Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
@@ -875,5 +875,5 @@
 	/*If on water or not Stokes, skip stiffness: */
 	inputs->GetParameterValue(&approximation,ApproximationEnum);
-	if(IsOnWater() || IsOnShelf() || !IsOnBed()) return NULL;
+	if(IsOnShelf() || !IsOnBed()) return NULL;
 	ElementMatrix* Ke1=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
 	ElementMatrix* Ke2=new ElementMatrix(this->nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
@@ -1017,6 +1017,5 @@
 	double    one0,one1;
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -1076,5 +1075,5 @@
 	  bedrock, in which case we spawn a tria element using the 3 first grids, and use it to build 
 	  the stiffness matrix. */
-	if (!IsOnBed() || IsOnWater()) return NULL;
+	if (!IsOnBed()) return NULL;
 
 	/*Depth Averaging B*/
@@ -1134,6 +1133,5 @@
 	tria=pentabase->SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(tria->nodes,NUMVERTICES2D,this->parameters,MacAyealApproximationEnum);
 	inputs->GetParameterValue(&approximation,ApproximationEnum);
@@ -1197,5 +1195,5 @@
 
 	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater() || IsOnShelf() || !IsOnBed()) return NULL;
+	if(IsOnShelf() || !IsOnBed()) return NULL;
 
 	/*Build a tria element using the 3 grids of the base of the penta. Then use 
@@ -1278,6 +1276,5 @@
 	GaussPenta *gauss=NULL;
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
 
@@ -1327,5 +1324,5 @@
 
 	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater() || IsOnShelf() || !IsOnBed()) return NULL;
+	if(IsOnShelf() || !IsOnBed()) return NULL;
 
 	/*Build a tria element using the 3 grids of the base of the penta. Then use 
@@ -1388,5 +1385,5 @@
 	/*If on water or not Stokes, skip stiffness: */
 	inputs->GetParameterValue(&approximation,ApproximationEnum);
-	if(IsOnWater() || (approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum)) return NULL;
+	if(approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
 
@@ -1456,5 +1453,5 @@
 	/*If on water or not Stokes, skip stiffness: */
 	inputs->GetParameterValue(&approximation,ApproximationEnum);
-	if(IsOnWater() || IsOnShelf() || !IsOnBed() || (approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum &&  approximation!=PattynStokesApproximationEnum)) return NULL;
+	if(IsOnShelf() || !IsOnBed() || (approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum &&  approximation!=PattynStokesApproximationEnum)) return NULL;
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
 
@@ -1547,6 +1544,5 @@
 	GaussPenta  *gauss=NULL;
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -1582,5 +1578,5 @@
 ElementMatrix* Penta::CreateKMatrixDiagnosticVertSurface(void){
 
-	if (!IsOnSurface() || IsOnWater()) return NULL;
+	if (!IsOnSurface()) return NULL;
 
 	/*Call Tria function*/
@@ -1596,5 +1592,5 @@
 ElementMatrix* Penta::CreateKMatrixMelting(void){
 
-	if (!IsOnBed() || IsOnWater()) return NULL;
+	if (!IsOnBed()) return NULL;
 
 	Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
@@ -1608,5 +1604,5 @@
 ElementMatrix* Penta::CreateKMatrixPrognostic(void){
 
-	if (!IsOnBed() || IsOnWater()) return NULL;
+	if (!IsOnBed()) return NULL;
 
 	/*Depth Averaging Vx and Vy*/
@@ -1629,5 +1625,5 @@
 ElementMatrix* Penta::CreateKMatrixSlope(void){
 
-	if (!IsOnBed() || IsOnWater()) return NULL;
+	if (!IsOnBed()) return NULL;
 
 	Tria* tria=(Tria*)SpawnTria(0,1,2); //grids 0, 1 and 2 make the new tria.
@@ -1686,6 +1682,5 @@
 	GaussPenta *gauss=NULL;
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -1816,5 +1811,5 @@
 ElementMatrix* Penta::CreateKMatrixThermalShelf(void){
 
-	if (!IsOnBed() || !IsOnShelf() || IsOnWater()) return NULL;
+	if (!IsOnBed() || !IsOnShelf()) return NULL;
 
 	/*Call Tria function*/
@@ -1838,4 +1833,5 @@
 	/*}}}*/
 
+	/*Skip if water element*/
 	if(IsOnWater()) return;
 
@@ -1906,5 +1902,5 @@
 ElementVector* Penta::CreatePVectorAdjointMacAyeal(){
 
-	if (!IsOnBed() || IsOnWater()) return NULL;
+	if (!IsOnBed()) return NULL;
 
 	/*Call Tria function*/
@@ -1920,5 +1916,5 @@
 ElementVector* Penta::CreatePVectorAdjointPattyn(void){
 
-	if (!IsOnSurface() || IsOnWater()) return NULL;
+	if (!IsOnSurface()) return NULL;
 
 	/*Call Tria function*/
@@ -1934,5 +1930,5 @@
 ElementVector* Penta::CreatePVectorBalancedthickness(void){
 
-	if (!IsOnBed() || IsOnWater()) return NULL;
+	if (!IsOnBed()) return NULL;
 
 	/*Depth Averaging Vx and Vy*/
@@ -1956,5 +1952,5 @@
 ElementVector* Penta::CreatePVectorBalancedvelocities(void){
 
-	if (!IsOnBed() || IsOnWater()) return NULL;
+	if (!IsOnBed()) return NULL;
 
 	/*Depth Averaging Vx and Vy*/
@@ -2008,5 +2004,4 @@
 
 	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
 	inputs->GetParameterValue(&approximation,ApproximationEnum);
 	if(approximation!=MacAyealStokesApproximationEnum) return NULL;
@@ -2072,5 +2067,5 @@
 
 	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater() || !IsOnBed() || IsOnShelf()) return NULL;
+	if(!IsOnBed() || IsOnShelf()) return NULL;
 	inputs->GetParameterValue(&approximation,ApproximationEnum);
 	if(approximation!=MacAyealStokesApproximationEnum) return NULL;
@@ -2154,5 +2149,4 @@
 
 	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
 	inputs->GetParameterValue(&approximation,ApproximationEnum);
 	if(approximation!=PattynStokesApproximationEnum) return NULL;
@@ -2218,5 +2212,5 @@
 
 	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater() || !IsOnBed() || IsOnShelf()) return NULL;
+	if(!IsOnBed() || IsOnShelf()) return NULL;
 	inputs->GetParameterValue(&approximation,ApproximationEnum);
 	if(approximation!=PattynStokesApproximationEnum) return NULL;
@@ -2361,6 +2355,5 @@
 	GaussPenta*  gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -2433,5 +2426,5 @@
 ElementVector* Penta::CreatePVectorDiagnosticMacAyeal(void){
 
-	if (!IsOnBed() || IsOnWater()) return NULL;
+	if (!IsOnBed()) return NULL;
 
 	/*Call Tria function*/
@@ -2459,6 +2452,5 @@
 	GaussPenta  *gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
 
@@ -2529,5 +2521,4 @@
 
 	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
 	inputs->GetParameterValue(&approximation,ApproximationEnum);
 	if(approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;
@@ -2599,5 +2590,5 @@
 
 	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater() || !IsOnBed() || !IsOnShelf()) return NULL;
+	if(!IsOnBed() || !IsOnShelf()) return NULL;
 	inputs->GetParameterValue(&approximation,ApproximationEnum);
 	if(approximation!=StokesApproximationEnum && approximation!=MacAyealStokesApproximationEnum && approximation!=PattynStokesApproximationEnum) return NULL;
@@ -2636,5 +2627,5 @@
 ElementVector* Penta::CreatePVectorAdjointStokes(void){
 
-	if (!IsOnSurface() || IsOnWater()) return NULL;
+	if (!IsOnSurface()) return NULL;
 
 	/*Call Tria function*/
@@ -2677,6 +2668,5 @@
 	GaussPenta *gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -2721,5 +2711,5 @@
 ElementVector* Penta::CreatePVectorDiagnosticVertBase(void){
 
-	if (!IsOnBed() || IsOnWater()) return NULL;
+	if (!IsOnBed()) return NULL;
 
 	/*Call Tria function*/
@@ -2740,5 +2730,5 @@
 ElementVector* Penta::CreatePVectorPrognostic(void){
 
-	if (!IsOnBed() || IsOnWater()) return NULL;
+	if (!IsOnBed()) return NULL;
 
 	/*Depth Averaging Vx and Vy*/
@@ -2762,5 +2752,5 @@
 ElementVector* Penta::CreatePVectorSlope(void){
 
-	if (!IsOnBed() || IsOnWater()) return NULL;
+	if (!IsOnBed()) return NULL;
 
 	/*Call Tria function*/
@@ -2812,6 +2802,5 @@
 	GaussPenta *gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -2880,5 +2869,5 @@
 
 	/* Ice/ocean heat exchange flux on ice shelf base */
-	if (!IsOnBed() || !IsOnShelf() || IsOnWater()) return NULL;
+	if (!IsOnBed() || !IsOnShelf()) return NULL;
 
 	/*Call Tria function*/
@@ -2895,5 +2884,5 @@
 
 	/* Geothermal flux on ice sheet base and basal friction */
-	if (!IsOnBed() || IsOnShelf() || IsOnWater()) return NULL;
+	if (!IsOnBed() || IsOnShelf()) return NULL;
 
 	/*Call Tria function*/
Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 7373)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 7374)
@@ -388,4 +388,5 @@
 	/*}}}*/
 	
+	/*Skip if water element*/
 	if(IsOnWater()) return;
 
@@ -485,6 +486,5 @@
 	GaussTria *gauss                            = NULL;
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -590,6 +590,5 @@
 	GaussTria  *gauss=NULL;
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -657,6 +656,5 @@
 	GaussTria *gauss=NULL;
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -788,6 +786,5 @@
 	GaussTria *gauss = NULL;
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
 
@@ -857,5 +854,5 @@
 
 	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater() || IsOnShelf()) return NULL;
+	if(IsOnShelf()) return NULL;
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
 
@@ -928,5 +925,5 @@
 
 	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater() || IsOnShelf()) return NULL;
+	if(IsOnShelf()) return NULL;
 	ElementMatrix* Ke1=new ElementMatrix(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
 	ElementMatrix* Ke2=new ElementMatrix(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
@@ -1017,5 +1014,5 @@
 
 	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater() || IsOnShelf()) return NULL;
+	if(IsOnShelf()) return NULL;
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,PattynApproximationEnum);
 
@@ -1076,6 +1073,5 @@
 	int    i,connectivity;
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -1106,6 +1102,5 @@
 	double Ke_g[numdof][numdof]; //stiffness matrix evaluated at the gaussian point.
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -1155,6 +1150,5 @@
 	GaussTria *gauss=NULL;
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -1228,6 +1222,5 @@
 	GaussTria *gauss=NULL;
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -1347,6 +1340,5 @@
 	GaussTria  *gauss=NULL;
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -1422,6 +1414,5 @@
 	GaussTria *gauss = NULL;
 
-	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element matrix*/
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -1470,5 +1461,5 @@
 
 	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater() || !IsOnShelf()) return NULL;
+	if(!IsOnShelf()) return NULL;
 	ElementMatrix* Ke=new ElementMatrix(nodes,NUMVERTICES,this->parameters,NoneApproximationEnum);
 
@@ -1520,4 +1511,5 @@
 	/*}}}*/
 	
+	/*Skip if water element*/
 	if(IsOnWater()) return;
 
@@ -1586,6 +1578,5 @@
 	GaussTria* gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -1630,6 +1621,5 @@
 	GaussTria* gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -1674,6 +1664,5 @@
 	GaussTria* gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -1719,6 +1708,5 @@
 	GaussTria* gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -1780,6 +1768,5 @@
 	GaussTria*     gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
 
@@ -1847,6 +1834,5 @@
 	GaussTria*  gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -1906,6 +1892,5 @@
 	GaussTria* gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -2087,6 +2072,5 @@
 	GaussTria* gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters,StokesApproximationEnum);
 
@@ -2257,6 +2241,5 @@
 	GaussTria* gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -2324,6 +2307,5 @@
 	GaussTria* gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -2373,6 +2355,5 @@
 	GaussTria* gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -2420,6 +2401,5 @@
 	GaussTria* gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -2475,6 +2455,5 @@
 	GaussTria* gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -2533,6 +2512,5 @@
 	GaussTria* gauss=NULL;
 
-	/*Initialize Element vector and return if necessary*/
-	if(IsOnWater()) return NULL;
+	/*Initialize Element vector*/
 	ElementVector* pe=new ElementVector(nodes,NUMVERTICES,this->parameters);
 
@@ -3043,5 +3021,5 @@
 
 	/*If on water, grad = 0: */
-	if(IsOnWater())return;
+	if(IsOnWater()) return;
 
 	switch(control_type){
