Index: /issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp
===================================================================
--- /issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp	(revision 22145)
+++ /issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp	(revision 22146)
@@ -5366,4 +5366,7 @@
 ElementMatrix* StressbalanceAnalysis::CreateKMatrixCouplingHOFS(Element* element){/*{{{*/
 
+	/* Check if ice in element */
+	if(!element->IsIceInElement()) return NULL;
+
 	/*Constants*/
 	int numnodes       = 3*6+1;
@@ -5443,4 +5446,7 @@
 }/*}}}*/
 ElementMatrix* StressbalanceAnalysis::CreateKMatrixCouplingSSAFSFriction(Element* element){/*{{{*/
+
+	/* Check if ice in element */
+	if(!element->IsIceInElement()) return NULL;
 
 	/*Constants*/
@@ -5566,4 +5572,7 @@
 ElementMatrix* StressbalanceAnalysis::CreateKMatrixCouplingSSAFSViscous(Element* element){/*{{{*/
 
+	/* Check if ice in element */
+	if(!element->IsIceInElement()) return NULL;
+
 	/*Constants*/
 	const int numdofm     = 2 *3;
@@ -5684,4 +5693,7 @@
 ElementMatrix* StressbalanceAnalysis::CreateKMatrixCouplingSSAHOFriction(Element* element){/*{{{*/
 
+	/* Check if ice in element */
+	if(!element->IsIceInElement()) return NULL;
+
 	if(element->IsFloating() || !element->IsOnBase()) return NULL;
 
@@ -5760,4 +5772,7 @@
 }/*}}}*/
 ElementMatrix* StressbalanceAnalysis::CreateKMatrixCouplingSSAHOViscous(Element* element){/*{{{*/
+
+	/* Check if ice in element */
+	if(!element->IsIceInElement()) return NULL;
 
 	/*Constants*/
@@ -5914,4 +5929,7 @@
 ElementMatrix* StressbalanceAnalysis::CreateKMatrixSSA3dFriction(Element* element){/*{{{*/
 
+	/* Check if ice in element */
+	if(!element->IsIceInElement()) return NULL;
+
 	/*Initialize Element matrix and return if necessary*/
 	if(element->IsFloating() || !element->IsOnBase()) return NULL;
@@ -5928,4 +5946,7 @@
 }/*}}}*/
 ElementMatrix* StressbalanceAnalysis::CreateKMatrixSSA3dViscous(Element* element){/*{{{*/
+
+	/* Check if ice in element */
+	if(!element->IsIceInElement()) return NULL;
 
 	/*Constants*/
@@ -6021,4 +6042,7 @@
 ElementVector* StressbalanceAnalysis::CreatePVectorCouplingHOFSFriction(Element* element){/*{{{*/
 
+	/* Check if ice in element */
+	if(!element->IsIceInElement()) return NULL;
+
 	/*Intermediaries*/
 	int         i,approximation;
@@ -6104,4 +6128,7 @@
 ElementVector* StressbalanceAnalysis::CreatePVectorCouplingHOFSViscous(Element* element){/*{{{*/
 
+	/* Check if ice in element */
+	if(!element->IsIceInElement()) return NULL;
+
 	/*Intermediaries */
 	int         i,approximation;
@@ -6184,4 +6211,7 @@
 }/*}}}*/
 ElementVector* StressbalanceAnalysis::CreatePVectorCouplingSSAFSFriction(Element* element){/*{{{*/
+
+	/* Check if ice in element */
+	if(!element->IsIceInElement()) return NULL;
 
 	/*Intermediaries*/
@@ -6264,4 +6294,7 @@
 }/*}}}*/
 ElementVector* StressbalanceAnalysis::CreatePVectorCouplingSSAFSViscous(Element* element){/*{{{*/
+
+	/* Check if ice in element */
+	if(!element->IsIceInElement()) return NULL;
 
 	/*Intermediaries */
