Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 4173)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 4174)
@@ -549,9 +549,16 @@
 	double rho_ice,rho_water;
 
-	/*recover material parameters: */
-	rho_ice=matpar->GetRhoIce();
-	rho_water=matpar->GetRhoWater();
-
-	ISSMERROR("not supported yet!");
+	/*If shelf: hydrostatic equilibrium*/
+	if (this->GetShelf()){
+
+		/*recover material parameters: */
+		rho_ice=matpar->GetRhoIce();
+		rho_water=matpar->GetRhoWater();
+
+	}
+	/*If sheet: surface = bed + thickness*/
+	else{
+		ISSMERROR("not supported yet!");
+	}
 }
 /*}}}*/
@@ -5477,6 +5484,5 @@
 
 	/*some checks: */
-	if(!xinput || !yinput)ISSMERROR("%s%s%s%s%s"," input ",EnumAsString(XEnum)," or input ",EnumAsString(YEnum)," could not be found!");
-	if(xinput->Enum()!=yinput->Enum())ISSMERROR("%s%s%s%s%s"," input ",EnumAsString(XEnum)," and input ",EnumAsString(YEnum)," are not of the same type!");
+	if(!xinput || !yinput) ISSMERROR("%s%s%s%s%s"," input ",EnumAsString(XEnum)," or input ",EnumAsString(YEnum)," could not be found!");
 
 	/*Scale: */
Index: /issm/trunk/src/c/objects/Inputs/BeamVertexInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/BeamVertexInput.cpp	(revision 4173)
+++ /issm/trunk/src/c/objects/Inputs/BeamVertexInput.cpp	(revision 4174)
@@ -23,5 +23,5 @@
 }
 /*}}}*/
-/*FUNCTION BeamVertexInput::BeamVertexInput(double* values){{{1*/
+/*FUNCTION BeamVertexInput::BeamVertexInput(int in_enum_type, double* values){{{1*/
 BeamVertexInput::BeamVertexInput(int in_enum_type,double* in_values){
 
@@ -269,6 +269,14 @@
 	xbeamvertexinput=(BeamVertexInput*)xinput;
 
-	/*Carry out the AXPY operation:*/
-	for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*xbeamvertexinput->values[i];
+	/*Carry out the AXPY operation depending on type:*/
+	switch(xinput->Enum()){
+
+		case BeamVertexInputEnum:
+			for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*xbeamvertexinput->values[i];
+			return;
+
+		default:
+			ISSMERROR("not implemented yet");
+	}
 
 }
Index: /issm/trunk/src/c/objects/Inputs/BoolInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/BoolInput.cpp	(revision 4173)
+++ /issm/trunk/src/c/objects/Inputs/BoolInput.cpp	(revision 4174)
@@ -236,6 +236,14 @@
 	xboolinput=(BoolInput*)xinput;
 
-	/*Carry out the AXPY operation:*/
-	this->value=this->value+scalar*xboolinput->value;
+	/*Carry out the AXPY operation depending on type:*/
+	switch(xinput->Enum()){
+
+		case BoolInputEnum:
+			this->value=(bool)(this->value+scalar*xboolinput->value);
+			return;
+
+		default:
+			ISSMERROR("not implemented yet");
+	}
 
 }
Index: /issm/trunk/src/c/objects/Inputs/DoubleInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/DoubleInput.cpp	(revision 4173)
+++ /issm/trunk/src/c/objects/Inputs/DoubleInput.cpp	(revision 4174)
@@ -247,6 +247,14 @@
 	xdoubleinput=(DoubleInput*)xinput;
 
-	/*Carry out the AXPY operation:*/
-	this->value=this->value+scalar*xdoubleinput->value;
+	/*Carry out the AXPY operation depending on type:*/
+	switch(xinput->Enum()){
+
+		case DoubleInputEnum:
+			this->value=this->value+scalar*xdoubleinput->value;
+			return;
+
+		default:
+			ISSMERROR("not implemented yet");
+	}
 
 }
Index: /issm/trunk/src/c/objects/Inputs/IntInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/IntInput.cpp	(revision 4173)
+++ /issm/trunk/src/c/objects/Inputs/IntInput.cpp	(revision 4174)
@@ -236,7 +236,15 @@
 	xintinput=(IntInput*)xinput;
 
-	/*Carry out the AXPY operation:*/
-	dvalue=(double)this->value+scalar*(double)xintinput->value;
-	this->value=(int)dvalue;
+	/*Carry out the AXPY operation depending on type:*/
+	switch(xinput->Enum()){
+
+		case IntInputEnum:
+			dvalue=(double)this->value+scalar*(double)xintinput->value;
+			this->value=(int)dvalue;
+			return;
+
+		default:
+			ISSMERROR("not implemented yet");
+	}
 
 }
Index: /issm/trunk/src/c/objects/Inputs/PentaVertexInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/PentaVertexInput.cpp	(revision 4173)
+++ /issm/trunk/src/c/objects/Inputs/PentaVertexInput.cpp	(revision 4174)
@@ -918,6 +918,14 @@
 	xpentavertexinput=(PentaVertexInput*)xinput;
 
-	/*Carry out the AXPY operation:*/
-	for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*xpentavertexinput->values[i];
+	/*Carry out the AXPY operation depending on type:*/
+	switch(xinput->Enum()){
+
+		case PentaVertexInputEnum:
+			for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*xpentavertexinput->values[i];
+			return;
+
+		default:
+			ISSMERROR("not implemented yet");
+	}
 
 }
Index: /issm/trunk/src/c/objects/Inputs/SingVertexInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/SingVertexInput.cpp	(revision 4173)
+++ /issm/trunk/src/c/objects/Inputs/SingVertexInput.cpp	(revision 4174)
@@ -237,6 +237,14 @@
 	xsingvertexinput=(SingVertexInput*)xinput;
 
-	/*Carry out the AXPY operation:*/
-	this->value=this->value+scalar*xsingvertexinput->value;
+	/*Carry out the AXPY operation depending on type:*/
+	switch(xinput->Enum()){
+
+		case SingVertexInputEnum:
+			this->value=this->value+scalar*xsingvertexinput->value;
+			return;
+
+		default:
+			ISSMERROR("not implemented yet");
+	}
 
 }
Index: /issm/trunk/src/c/objects/Inputs/TriaVertexInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/TriaVertexInput.cpp	(revision 4173)
+++ /issm/trunk/src/c/objects/Inputs/TriaVertexInput.cpp	(revision 4174)
@@ -492,6 +492,14 @@
 	xtriavertexinput=(TriaVertexInput*)xinput;
 
-	/*Carry out the AXPY operation:*/
-	for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*xtriavertexinput->values[i];
+	/*Carry out the AXPY operation depending on type:*/
+	switch(xinput->Enum()){
+
+		case TriaVertexInputEnum :
+			for(i=0;i<numgrids;i++)this->values[i]=this->values[i]+scalar*xtriavertexinput->values[i];
+			return;
+
+		default :
+			ISSMERROR("not implemented yet");
+	}
 
 }
Index: /issm/trunk/src/mex/VerticesDof/VerticesDof.cpp
===================================================================
--- /issm/trunk/src/mex/VerticesDof/VerticesDof.cpp	(revision 4173)
+++ /issm/trunk/src/mex/VerticesDof/VerticesDof.cpp	(revision 4174)
@@ -15,6 +15,6 @@
 
 	/* output datasets: */
-	Vec* partition=NULL;
-	Vec* tpartition=NULL;
+	Vec partition=NULL;
+	Vec tpartition=NULL;
 
 	/*Boot module: */
@@ -32,6 +32,6 @@
 
 	/*partition and tpartition should be incremented by 1: */
-	VecShift(partition->vector,1.0); //matlab indexing starts at 1.
-	VecShift(tpartition->vector,1.0);
+	VecShift(partition,1.0); //matlab indexing starts at 1.
+	VecShift(tpartition,1.0);
 
 	/*write output datasets: */
