Index: issm/trunk/src/c/objects/Penta.cpp
===================================================================
--- issm/trunk/src/c/objects/Penta.cpp	(revision 3599)
+++ issm/trunk/src/c/objects/Penta.cpp	(revision 3612)
@@ -266,68 +266,4 @@
 }
 /*}}}*/
-/*FUNCTION UpdateFromInputs {{{1*/
-void  Penta::UpdateFromInputs(void* vinputs){
-
-	int     dofs[1]={0};
-	double  temperature_list[6];
-	double  temperature_average;
-	double  B_list[6];
-	double  B_average;
-
-	/*dynamic objects pointed to by hooks: */
-	Node**  nodes=NULL;
-	Matice* matice=NULL;
-
-	ParameterInputs* inputs=NULL;
-
-	/*If on water, skip: */
-	if(this->properties.onwater)return;
-
-	/*recover objects from hooks: */
-	nodes=(Node**)hnodes.deliverp();
-	matice=(Matice*)hmatice.delivers();
-
-	/*recover pointers: */
-	inputs=(ParameterInputs*)vinputs;
-
-	/*Update internal data if inputs holds new values: */
-	if (this->properties.h)              inputs->Recover("thickness",&this->properties.h[0],1,dofs,6,(void**)nodes);
-	if (this->properties.s)              inputs->Recover("surface",&this->properties.s[0],1,dofs,6,(void**)nodes);
-	if (this->properties.b)              inputs->Recover("bed",&this->properties.b[0],1,dofs,6,(void**)nodes);
-	if (this->properties.k)              inputs->Recover("drag",&this->properties.k[0],1,dofs,6,(void**)nodes);
-	if (this->properties.melting)        inputs->Recover("melting",&this->properties.melting[0],1,dofs,6,(void**)nodes);
-	if (this->properties.accumulation)   inputs->Recover("accumulation",&this->properties.accumulation[0],1,dofs,6,(void**)nodes);
-	if (this->properties.geothermalflux) inputs->Recover("geothermalflux",&this->properties.geothermalflux[0],1,dofs,6,(void**)nodes);
-
-	//Update material if necessary
-	if(inputs->Recover("temperature",&temperature_list[0],1,dofs,6,(void**)nodes)){
-		if(matice && !this->properties.collapse){
-			//B_average=(Paterson(temperature_list[0])+Paterson(temperature_list[1])+Paterson(temperature_list[2])
-			//			+Paterson(temperature_list[3])+Paterson(temperature_list[4])+Paterson(temperature_list[5]))/6.0;
-			temperature_average=(temperature_list[0]+temperature_list[1]+temperature_list[2]+temperature_list[3]+temperature_list[4]+temperature_list[5])/6.0;
-			B_average=Paterson(temperature_average);
-			matice->SetB(B_average);
-		}
-	}
-
-	if(inputs->Recover("temperature_average",&temperature_list[0],1,dofs,6,(void**)nodes)){
-		if(matice && this->properties.collapse){
-			temperature_average=(temperature_list[0]+temperature_list[1]+temperature_list[2]+temperature_list[3]+temperature_list[4]+temperature_list[5])/6.0;
-			B_average=Paterson(temperature_average);
-			//B_average=(Paterson(temperature_list[0])+Paterson(temperature_list[1])+Paterson(temperature_list[2])
-			//			+Paterson(temperature_list[3])+Paterson(temperature_list[4])+Paterson(temperature_list[5]))/6.0;
-			matice->SetB(B_average);
-		}
-	}
-
-	if(inputs->Recover("B",&B_list[0],1,dofs,6,(void**)nodes)){
-		if(matice){
-			B_average=(B_list[0]+B_list[1]+B_list[2]+B_list[3]+B_list[4]+B_list[5])/6.0;
-			matice->SetB(B_average);
-		}
-	}
-
-}
-/*}}}*/
 /*FUNCTION UpdateFromDakota {{{1*/
 void  Penta::UpdateFromDakota(void* vinputs){
@@ -345,5 +281,5 @@
 /*Object functions*/
 /*FUNCTION ComputeBasalStress {{{1*/
-void  Penta::ComputeBasalStress(Vec sigma_b,void* vinputs,int analysis_type,int sub_analysis_type){
+void  Penta::ComputeBasalStress(Vec sigma_b,int analysis_type,int sub_analysis_type){
 
 	int i,j;
@@ -477,5 +413,5 @@
 /*}}}*/
 /*FUNCTION ComputePressure {{{1*/
-void  Penta::ComputePressure(Vec pg,void* vinputs,int analysis_type,int sub_analysis_type){
+void  Penta::ComputePressure(Vec pg,int analysis_type,int sub_analysis_type){
 
 	int i;
@@ -519,5 +455,5 @@
 /*}}}*/
 /*FUNCTION ComputeStrainRate {{{1*/
-void  Penta::ComputeStrainRate(Vec eps,void* vinputs,int analysis_type,int sub_analysis_type){
+void  Penta::ComputeStrainRate(Vec eps,int analysis_type,int sub_analysis_type){
 
 	ISSMERROR("Not implemented yet");
@@ -526,5 +462,5 @@
 /*}}}*/
 /*FUNCTION CostFunction {{{1*/
-double Penta::CostFunction(void* inputs,int analysis_type,int sub_analysis_type){
+double Penta::CostFunction(int analysis_type,int sub_analysis_type){
 
 	double J;
@@ -560,5 +496,5 @@
 /*FUNCTION CreateKMatrix {{{1*/
 
-void  Penta::CreateKMatrix(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
+void  Penta::CreateKMatrix(Mat Kgg,int analysis_type,int sub_analysis_type){
 
 	/*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */
@@ -608,5 +544,5 @@
 /*}}}*/
 /*FUNCTION CreateKMatrixDiagnosticHoriz {{{1*/
-void Penta::CreateKMatrixDiagnosticHoriz( Mat Kgg, void* vinputs, int analysis_type,int sub_analysis_type){
+void Penta::CreateKMatrixDiagnosticHoriz( Mat Kgg,  int analysis_type,int sub_analysis_type){
 
 
@@ -844,5 +780,5 @@
 /*}}}*/
 /*FUNCTION CreateKMatrixDiagnosticStokes {{{1*/
-void Penta::CreateKMatrixDiagnosticStokes( Mat Kgg, void* vinputs, int analysis_type,int sub_analysis_type){
+void Penta::CreateKMatrixDiagnosticStokes( Mat Kgg,  int analysis_type,int sub_analysis_type){
 
 	int i,j;
@@ -1139,5 +1075,5 @@
 /*}}}*/
 /*FUNCTION CreateKMatrixDiagnosticVert {{{1*/
-void Penta::CreateKMatrixDiagnosticVert( Mat Kgg, void* vinputs, int analysis_type,int sub_analysis_type){
+void Penta::CreateKMatrixDiagnosticVert( Mat Kgg,  int analysis_type,int sub_analysis_type){
 
 	/* local declarations */
@@ -1275,5 +1211,5 @@
 /*}}}*/
 /*FUNCTION CreateKMatrixMelting {{{1*/
-void  Penta::CreateKMatrixMelting(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
+void  Penta::CreateKMatrixMelting(Mat Kgg,int analysis_type,int sub_analysis_type){
 
 	Tria* tria=NULL;
@@ -1296,5 +1232,5 @@
 /*FUNCTION CreateKMatrixPrognostic {{{1*/
 
-void  Penta::CreateKMatrixPrognostic(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
+void  Penta::CreateKMatrixPrognostic(Mat Kgg,int analysis_type,int sub_analysis_type){
 
 	/*Collapsed formulation: */
@@ -1317,5 +1253,5 @@
 /*FUNCTION CreateKMatrixSlopeCompute {{{1*/
 
-void  Penta::CreateKMatrixSlopeCompute(Mat Kgg,void* inputs,int analysis_type,int sub_analysis_type){
+void  Penta::CreateKMatrixSlopeCompute(Mat Kgg,int analysis_type,int sub_analysis_type){
 
 	/*Collapsed formulation: */
@@ -1337,5 +1273,5 @@
 /*}}}*/
 /*FUNCTION CreateKMatrixThermal {{{1*/
-void  Penta::CreateKMatrixThermal(Mat Kgg,void* vinputs,int analysis_type,int sub_analysis_type){
+void  Penta::CreateKMatrixThermal(Mat Kgg,int analysis_type,int sub_analysis_type){
 
 	/* local declarations */
@@ -1600,5 +1536,5 @@
 /*}}}*/
 /*FUNCTION CreatePVector {{{1*/
-void  Penta::CreatePVector(Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
+void  Penta::CreatePVector(Vec pg,  int analysis_type,int sub_analysis_type){
 
 	/*Just branch to the correct element stiffness matrix generator, according to the type of analysis we are carrying out: */
@@ -1646,5 +1582,5 @@
 /*}}}*/
 /*FUNCTION CreatePVectorDiagnosticHoriz {{{1*/
-void Penta::CreatePVectorDiagnosticHoriz( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){
+void Penta::CreatePVectorDiagnosticHoriz( Vec pg, int analysis_type,int sub_analysis_type){
 
 	int i,j;
@@ -1801,5 +1737,5 @@
 /*}}}*/
 /*FUNCTION CreatePVectorDiagnosticStokes {{{1*/
-void Penta::CreatePVectorDiagnosticStokes( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){
+void Penta::CreatePVectorDiagnosticStokes( Vec pg, int analysis_type,int sub_analysis_type){
 
 	/*indexing: */
@@ -2051,5 +1987,5 @@
 /*}}}*/
 /*FUNCTION CreatePVectorDiagnosticVert {{{1*/
-void  Penta::CreatePVectorDiagnosticVert( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){
+void  Penta::CreatePVectorDiagnosticVert( Vec pg, int analysis_type,int sub_analysis_type){
 
 	int i;
@@ -2190,5 +2126,5 @@
 /*}}}*/
 /*FUNCTION CreatePVectorMelting {{{1*/
-void Penta::CreatePVectorMelting( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){
+void Penta::CreatePVectorMelting( Vec pg, int analysis_type,int sub_analysis_type){
 	return;
 }
@@ -2196,5 +2132,5 @@
 /*FUNCTION CreatePVectorPrognostic {{{1*/
 
-void Penta::CreatePVectorPrognostic( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
+void Penta::CreatePVectorPrognostic( Vec pg,  int analysis_type,int sub_analysis_type){
 
 	/*Collapsed formulation: */
@@ -2216,5 +2152,5 @@
 /*FUNCTION CreatePVectorSlopeCompute {{{1*/
 
-void Penta::CreatePVectorSlopeCompute( Vec pg, void* inputs, int analysis_type,int sub_analysis_type){
+void Penta::CreatePVectorSlopeCompute( Vec pg,  int analysis_type,int sub_analysis_type){
 
 	/*Collapsed formulation: */
@@ -2235,5 +2171,5 @@
 /*}}}*/
 /*FUNCTION CreatePVectorThermal {{{1*/
-void Penta::CreatePVectorThermal( Vec pg, void* vinputs,int analysis_type,int sub_analysis_type){
+void Penta::CreatePVectorThermal( Vec pg, int analysis_type,int sub_analysis_type){
 
 
@@ -2438,5 +2374,5 @@
 /*}}}*/
 /*FUNCTION Du {{{1*/
-void  Penta::Du(Vec du_g,void* inputs,int analysis_type,int sub_analysis_type){
+void  Penta::Du(Vec du_g,int analysis_type,int sub_analysis_type){
 
 	int i;
@@ -3647,5 +3583,5 @@
 /*}}}*/
 /*FUNCTION GetOnBed {{{1*/
-int Penta::GetOnBed(){
+bool Penta::GetOnBed(){
 	return this->properties.onbed;
 }
@@ -3792,5 +3728,5 @@
 /*}}}*/
 /*FUNCTION Gradj {{{1*/
-void  Penta::Gradj(Vec grad_g,void* inputs,int analysis_type,int sub_analysis_type,char* control_type){
+void  Penta::Gradj(Vec grad_g,int analysis_type,int sub_analysis_type,char* control_type){
 
 	/*If on water, skip grad (=0): */
@@ -3807,5 +3743,5 @@
 /*}}}*/
 /*FUNCTION GradjDrag {{{1*/
-void  Penta::GradjDrag(Vec grad_g,void* inputs,int analysis_type,int sub_analysis_type){
+void  Penta::GradjDrag(Vec grad_g,int analysis_type,int sub_analysis_type){
 
 	Tria* tria=NULL;
@@ -3840,5 +3776,5 @@
 /*}}}*/
 /*FUNCTION GradjB {{{1*/
-void  Penta::GradjB(Vec grad_g,void* inputs,int analysis_type,int sub_analysis_type){
+void  Penta::GradjB(Vec grad_g,int analysis_type,int sub_analysis_type){
 
 	Tria* tria=NULL;
@@ -3873,5 +3809,5 @@
 /*}}}*/
 /*FUNCTION Misfit {{{1*/
-double Penta::Misfit(void* inputs,int analysis_type,int sub_analysis_type){
+double Penta::Misfit(int analysis_type,int sub_analysis_type){
 
 	double J;
@@ -4006,5 +3942,5 @@
 /*}}}1*/
 /*FUNCTION SurfaceArea {{{1*/
-double Penta::SurfaceArea(void* inputs,int analysis_type,int sub_analysis_type){
+double Penta::SurfaceArea(int analysis_type,int sub_analysis_type){
 
 	double S;
