Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 16036)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 16037)
@@ -5310,6 +5310,5 @@
 	IssmDouble  normal_base[3], d1enthalpy[3];
 	IssmDouble  basalmeltingrate[NUMVERTICES], watercolumn[NUMVERTICES];
-	IssmDouble  enthalpy[NUMVERTICES], enthalpyup;
-	IssmDouble  pressure[NUMVERTICES], pressureup;
+	IssmDouble  enthalpy[NUMVERTICES],pressure[NUMVERTICES];
 	IssmDouble  temperature, waterfraction;
 	IssmDouble  latentheat, rho_ice;
@@ -5340,4 +5339,5 @@
 	Input* enthalpy_input=inputs->GetInput(EnthalpyEnum); _assert_(enthalpy_input);
 
+	GetVerticesCoordinates(&xyz_list[0][0],vertices,NUMVERTICES);
 	for(i=0;i<NUMVERTICES2D;i++) for(j=0;j<3;j++) xyz_list_tria[i][j]=xyz_list[i][j];
 
@@ -5348,9 +5348,7 @@
 	/*Ok, get meltingrates now from basal conditions*/
 	GaussPenta* gauss=new GaussPenta();
-	GaussPenta* gaussup=new GaussPenta();
 	for(int iv=0;iv<3;iv++){
 
 		gauss->GaussVertex(iv);
-		gaussup->GaussVertex(iv+3);
 		checkpositivethickness=true;
 
@@ -5408,5 +5406,4 @@
 	/*Clean up and return*/
 	delete gauss;
-	delete gaussup;
 	delete friction;
 }
@@ -5420,9 +5417,4 @@
 	IssmDouble enthalpy[NUMVERTICES], pressure[NUMVERTICES]; 
 	IssmDouble latentheat, dt;
-	GaussPenta* gauss;
-
-	Input* watercolumn_input=inputs->GetInput(WatercolumnEnum); _assert_(watercolumn_input);
-	Input* enthalpy_input=inputs->GetInput(EnthalpyEnum);       _assert_(enthalpy_input);
-	Input* pressure_input=inputs->GetInput(PressureEnum);       _assert_(pressure_input);
 
 	/*Check wether enthalpy is activated*/
@@ -5430,12 +5422,10 @@
 	if(!isenthalpy) return;       
 
+	GetInputListOnVertices(&enthalpy[0],EnthalpyEnum);
+	GetInputListOnVertices(&pressure[0],PressureEnum);
 	this->parameters->FindParam(&dt,TimesteppingTimeStepEnum);
 	latentheat=matpar->GetLatentHeat();
 
-	gauss=new GaussPenta();
 	for(int iv=0;iv<NUMVERTICES;iv++){ 
-		gauss->GaussVertex(iv);
-		enthalpy_input->GetInputValue(&enthalpy[iv], gauss);
-		pressure_input->GetInputValue(&pressure[iv], gauss);
 		matpar->EnthalpyToThermal(&temperature[iv],&waterfraction[iv], enthalpy[iv],pressure[iv]); 
 
