Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 4174)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 4175)
@@ -628,4 +628,37 @@
 
 	ISSMERROR("not supported yet!");
+
+}
+/*}}}*/
+/*FUNCTION Penta::UpdateGeometry{{{1*/
+void  Penta::UpdateGeometry(void){
+
+	/*Intermediaries*/
+	int i;
+	double rho_ice,rho_water;
+
+	/*If shelf: hydrostatic equilibrium*/
+	if (this->GetShelf()){
+
+		/*recover material parameters: */
+		rho_ice=matpar->GetRhoIce();
+		rho_water=matpar->GetRhoWater();
+
+		/*Create New Surface: s = (1-rho_ice/rho_water) h*/
+		InputDuplicate(ThicknessEnum,SurfaceEnum);     //1: copy thickness into surface
+		InputScale(SurfaceEnum,(1-rho_ice/rho_water)); //2: surface = surface * (1-di)
+
+		/*Create New Bed b = -rho_ice/rho_water h*/
+		InputDuplicate(ThicknessEnum,BedEnum);         //1: copy thickness into bed
+		InputScale(BedEnum, -rho_ice/rho_water);       //2: bed = bed * (-di)
+	}
+
+	/*If sheet: surface = bed + thickness*/
+	else{
+
+		/*The bed does not change, update surface only s = b + h*/
+		InputDuplicate(BedEnum,SurfaceEnum);          //1: copy bed into surface
+		InputAXPY(SurfaceEnum,1.0,ThicknessEnum);     //2: surface = surface + 1 * thickness
+	}
 
 }
Index: /issm/trunk/src/c/objects/Elements/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.h	(revision 4174)
+++ /issm/trunk/src/c/objects/Elements/Penta.h	(revision 4175)
@@ -45,5 +45,5 @@
 		Penta(int penta_id,int i, IoModel* iomodel,int nummodels);
 		void  Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type);
-		void  UpdateGeometry(void){ISSMERROR("not implemented yet");};
+		void  UpdateGeometry(void);
 		~Penta();
 		/*}}}*/
Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 4174)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 4175)
@@ -556,9 +556,21 @@
 		rho_water=matpar->GetRhoWater();
 
-	}
+		/*Create New Surface: s = (1-rho_ice/rho_water) h*/
+		InputDuplicate(ThicknessEnum,SurfaceEnum);     //1: copy thickness into surface
+		InputScale(SurfaceEnum,(1-rho_ice/rho_water)); //2: surface = surface * (1-di)
+
+		/*Create New Bed b = -rho_ice/rho_water h*/
+		InputDuplicate(ThicknessEnum,BedEnum);         //1: copy thickness into bed
+		InputScale(BedEnum, -rho_ice/rho_water);       //2: bed = bed * (-di)
+	}
+
 	/*If sheet: surface = bed + thickness*/
 	else{
-		ISSMERROR("not supported yet!");
-	}
+
+		/*The bed does not change, update surface only s = b + h*/
+		InputDuplicate(BedEnum,SurfaceEnum);          //1: copy bed into surface
+		InputAXPY(SurfaceEnum,1.0,ThicknessEnum);     //2: surface = surface + 1 * thickness
+	}
+
 }
 /*}}}*/
