Index: ../trunk-jpl/src/c/classes/Elements/Tetra.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/Elements/Tetra.cpp	(revision 18922)
+++ ../trunk-jpl/src/c/classes/Elements/Tetra.cpp	(revision 18923)
@@ -103,14 +103,6 @@
 }
 /*}}}*/
 
-int      Tetra::FiniteElement(void){/*{{{*/
-	return this->element_type;
-} /*}}}*/
-int      Tetra::ObjectEnum(void){/*{{{*/
-
-	return TetraEnum;
-
-}/*}}}*/
 void     Tetra::AddInput(int input_enum,IssmDouble* values, int interpolation_enum){/*{{{*/
 
 	/*Call inputs method*/
@@ -195,16 +187,16 @@
 	_error_("Could not find 3 vertices on bed");
 }
 /*}}}*/
-void     Tetra::FaceOnSurfaceIndices(int* pindex1,int* pindex2,int* pindex3){/*{{{*/
+void     Tetra::FaceOnFrontIndices(int* pindex1,int* pindex2,int* pindex3){/*{{{*/
 
 	IssmDouble values[NUMVERTICES];
 	int        indices[4][3] = {{0,1,2},{0,3,1},{1,3,2},{0,2,3}};
 
 	/*Retrieve all inputs and parameters*/
-	GetInputListOnVertices(&values[0],MeshVertexonsurfaceEnum);
+	GetInputListOnVertices(&values[0],MaskIceLevelsetEnum);
 
 	for(int i=0;i<4;i++){
-		if(values[indices[i][0]] == 1. && values[indices[i][1]] == 1. && values[indices[i][2]] == 1.){
+		if(values[indices[i][0]] == 0. && values[indices[i][1]] == 0. && values[indices[i][2]] == 0.){
 			*pindex1 = indices[i][0];
 			*pindex2 = indices[i][1];
 			*pindex3 = indices[i][2];
@@ -215,16 +207,16 @@
 	_error_("Could not find 3 vertices on bed");
 }
 /*}}}*/
-void     Tetra::FaceOnFrontIndices(int* pindex1,int* pindex2,int* pindex3){/*{{{*/
+void     Tetra::FaceOnSurfaceIndices(int* pindex1,int* pindex2,int* pindex3){/*{{{*/
 
 	IssmDouble values[NUMVERTICES];
 	int        indices[4][3] = {{0,1,2},{0,3,1},{1,3,2},{0,2,3}};
 
 	/*Retrieve all inputs and parameters*/
-	GetInputListOnVertices(&values[0],MaskIceLevelsetEnum);
+	GetInputListOnVertices(&values[0],MeshVertexonsurfaceEnum);
 
 	for(int i=0;i<4;i++){
-		if(values[indices[i][0]] == 0. && values[indices[i][1]] == 0. && values[indices[i][2]] == 0.){
+		if(values[indices[i][0]] == 1. && values[indices[i][1]] == 1. && values[indices[i][2]] == 1.){
 			*pindex1 = indices[i][0];
 			*pindex2 = indices[i][1];
 			*pindex3 = indices[i][2];
@@ -235,6 +227,9 @@
 	_error_("Could not find 3 vertices on bed");
 }
 /*}}}*/
+int      Tetra::FiniteElement(void){/*{{{*/
+	return this->element_type;
+} /*}}}*/
 int      Tetra::GetElementType(){/*{{{*/
 
 	/*return TetraRef field*/
@@ -474,14 +469,6 @@
 	xDelete<int>(doflist);
 }
 /*}}}*/
-bool     Tetra::IsOnBase(){/*{{{*/
-	return HasFaceOnBase();
-}
-/*}}}*/
-bool     Tetra::IsOnSurface(){/*{{{*/
-	return HasFaceOnSurface();
-}
-/*}}}*/
 bool     Tetra::IsIcefront(void){/*{{{*/
 
 	/*Retrieve all inputs and parameters*/
@@ -496,6 +483,14 @@
 	}
 	return false;
 }/*}}}*/
+bool     Tetra::IsOnBase(){/*{{{*/
+	return HasFaceOnBase();
+}
+/*}}}*/
+bool     Tetra::IsOnSurface(){/*{{{*/
+	return HasFaceOnSurface();
+}
+/*}}}*/
 void     Tetra::JacobianDeterminant(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
 
 	_assert_(gauss->Enum()==GaussTetraEnum);
@@ -503,17 +498,17 @@
 
 }
 /*}}}*/
-void     Tetra::JacobianDeterminantSurface(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
+void     Tetra::JacobianDeterminantBase(IssmDouble* pJdet,IssmDouble* xyz_list_base,Gauss* gauss){/*{{{*/
 
 	_assert_(gauss->Enum()==GaussTetraEnum);
-	this->GetJacobianDeterminantFace(pJdet,xyz_list,(GaussTetra*)gauss);
+	this->GetJacobianDeterminantFace(pJdet,xyz_list_base,(GaussTetra*)gauss);
 
 }
 /*}}}*/
-void     Tetra::JacobianDeterminantBase(IssmDouble* pJdet,IssmDouble* xyz_list_base,Gauss* gauss){/*{{{*/
+void     Tetra::JacobianDeterminantSurface(IssmDouble* pJdet,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
 
 	_assert_(gauss->Enum()==GaussTetraEnum);
-	this->GetJacobianDeterminantFace(pJdet,xyz_list_base,(GaussTetra*)gauss);
+	this->GetJacobianDeterminantFace(pJdet,xyz_list,(GaussTetra*)gauss);
 
 }
 /*}}}*/
@@ -560,61 +555,41 @@
 
 }
 /*}}}*/
-void     Tetra::NodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss){/*{{{*/
+void     Tetra::NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
 
 	_assert_(gauss->Enum()==GaussTetraEnum);
-	this->GetNodalFunctions(basis,(GaussTetra*)gauss,this->VelocityInterpolation());
+	this->GetNodalFunctionsDerivatives(dbasis,xyz_list,(GaussTetra*)gauss,this->element_type);
 
 }
 /*}}}*/
-void     Tetra::NodalFunctionsPressure(IssmDouble* basis, Gauss* gauss){/*{{{*/
+void     Tetra::NodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
 
 	_assert_(gauss->Enum()==GaussTetraEnum);
-	this->GetNodalFunctions(basis,(GaussTetra*)gauss,this->PressureInterpolation());
+	this->GetNodalFunctionsDerivatives(dbasis,xyz_list,(GaussTetra*)gauss,this->VelocityInterpolation());
 
 }
 /*}}}*/
-void     Tetra::NodalFunctionsTensor(IssmDouble* basis, Gauss* gauss){/*{{{*/
+void     Tetra::NodalFunctionsPressure(IssmDouble* basis, Gauss* gauss){/*{{{*/
 
 	_assert_(gauss->Enum()==GaussTetraEnum);
-	this->GetNodalFunctions(basis,(GaussTetra*)gauss,this->TensorInterpolation());
+	this->GetNodalFunctions(basis,(GaussTetra*)gauss,this->PressureInterpolation());
 
 }
 /*}}}*/
-void     Tetra::NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
+void     Tetra::NodalFunctionsTensor(IssmDouble* basis, Gauss* gauss){/*{{{*/
 
 	_assert_(gauss->Enum()==GaussTetraEnum);
-	this->GetNodalFunctionsDerivatives(dbasis,xyz_list,(GaussTetra*)gauss,this->element_type);
+	this->GetNodalFunctions(basis,(GaussTetra*)gauss,this->TensorInterpolation());
 
 }
 /*}}}*/
-void     Tetra::NodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){/*{{{*/
+void     Tetra::NodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss){/*{{{*/
 
 	_assert_(gauss->Enum()==GaussTetraEnum);
-	this->GetNodalFunctionsDerivatives(dbasis,xyz_list,(GaussTetra*)gauss,this->VelocityInterpolation());
+	this->GetNodalFunctions(basis,(GaussTetra*)gauss,this->VelocityInterpolation());
 
 }
 /*}}}*/
-void     Tetra::NormalSection(IssmDouble* normal,IssmDouble* xyz_list){/*{{{*/
-
-	/*Build unit outward pointing vector*/
-	IssmDouble AB[3];
-	IssmDouble AC[3];
-	IssmDouble norm;
-
-	AB[0]=xyz_list[1*3+0] - xyz_list[0*3+0];
-	AB[1]=xyz_list[1*3+1] - xyz_list[0*3+1];
-	AB[2]=xyz_list[1*3+2] - xyz_list[0*3+2];
-	AC[0]=xyz_list[2*3+0] - xyz_list[0*3+0];
-	AC[1]=xyz_list[2*3+1] - xyz_list[0*3+1];
-	AC[2]=xyz_list[2*3+2] - xyz_list[0*3+2];
-
-	cross(normal,AB,AC);
-	norm=sqrt(normal[0]*normal[0]+normal[1]*normal[1]+normal[2]*normal[2]);
-
-	for(int i=0;i<3;i++) normal[i]=normal[i]/norm;
-}
-/*}}}*/
 void     Tetra::NormalBase(IssmDouble* bed_normal,IssmDouble* xyz_list){/*{{{*/
 
 	IssmDouble v13[3],v23[3];
@@ -639,6 +614,26 @@
 	_assert_(bed_normal[2]<0.);
 }
 /*}}}*/
+void     Tetra::NormalSection(IssmDouble* normal,IssmDouble* xyz_list){/*{{{*/
+
+	/*Build unit outward pointing vector*/
+	IssmDouble AB[3];
+	IssmDouble AC[3];
+	IssmDouble norm;
+
+	AB[0]=xyz_list[1*3+0] - xyz_list[0*3+0];
+	AB[1]=xyz_list[1*3+1] - xyz_list[0*3+1];
+	AB[2]=xyz_list[1*3+2] - xyz_list[0*3+2];
+	AC[0]=xyz_list[2*3+0] - xyz_list[0*3+0];
+	AC[1]=xyz_list[2*3+1] - xyz_list[0*3+1];
+	AC[2]=xyz_list[2*3+2] - xyz_list[0*3+2];
+
+	cross(normal,AB,AC);
+	norm=sqrt(normal[0]*normal[0]+normal[1]*normal[1]+normal[2]*normal[2]);
+
+	for(int i=0;i<3;i++) normal[i]=normal[i]/norm;
+}
+/*}}}*/
 void     Tetra::NormalTop(IssmDouble* top_normal,IssmDouble* xyz_list){/*{{{*/
 
 	IssmDouble v13[3],v23[3];
@@ -669,6 +664,15 @@
 	return TetraRef::NumberofNodes(this->VelocityInterpolation());
 }
 /*}}}*/
+int      Tetra::ObjectEnum(void){/*{{{*/
+
+	return TetraEnum;
+
+}/*}}}*/
+int      Tetra::PressureInterpolation(void){/*{{{*/
+	return TetraRef::PressureInterpolation(this->element_type);
+}
+/*}}}*/
 void     Tetra::ReduceMatrices(ElementMatrix* Ke,ElementVector* pe){/*{{{*/
 
 	if(pe){
@@ -763,21 +767,6 @@
 	delete gauss;
 }
 /*}}}*/
-void     Tetra::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, Nodes* nodesin, Materials* materialsin, Parameters* parametersin){/*{{{*/
-
-	/*go into parameters and get the analysis_counter: */
-	int analysis_counter;
-	parametersin->FindParam(&analysis_counter,AnalysisCounterEnum);
-
-	/*Get Element type*/
-	this->element_type=this->element_type_list[analysis_counter];
-
-	/*Pick up nodes*/
-	if(this->hnodes[analysis_counter]) this->nodes=(Node**)this->hnodes[analysis_counter]->deliverp();
-	else this->nodes=NULL;
-
-}
-/*}}}*/
 void     Tetra::ResetHooks(){/*{{{*/
 
 	this->nodes=NULL;
@@ -794,6 +783,21 @@
 	if(this->hneighbors) this->hneighbors->reset();
 }
 /*}}}*/
+void     Tetra::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, Nodes* nodesin, Materials* materialsin, Parameters* parametersin){/*{{{*/
+
+	/*go into parameters and get the analysis_counter: */
+	int analysis_counter;
+	parametersin->FindParam(&analysis_counter,AnalysisCounterEnum);
+
+	/*Get Element type*/
+	this->element_type=this->element_type_list[analysis_counter];
+
+	/*Pick up nodes*/
+	if(this->hnodes[analysis_counter]) this->nodes=(Node**)this->hnodes[analysis_counter]->deliverp();
+	else this->nodes=NULL;
+
+}
+/*}}}*/
 Element* Tetra::SpawnBasalElement(void){/*{{{*/
 
 	_assert_(HasFaceOnBase());
@@ -837,6 +841,10 @@
 	return tria;
 }
 /*}}}*/
+int      Tetra::TensorInterpolation(void){/*{{{*/
+	return TetraRef::TensorInterpolation(this->element_type);
+}
+/*}}}*/
 void     Tetra::Update(int index,IoModel* iomodel,int analysis_counter,int analysis_type,int finiteelement_type){ /*{{{*/
 
 	/*Intermediaries*/
@@ -980,14 +988,6 @@
 	*pphi = phi;
 }
 /*}}}*/
-int      Tetra::PressureInterpolation(void){/*{{{*/
-	return TetraRef::PressureInterpolation(this->element_type);
-}
-/*}}}*/
-int      Tetra::TensorInterpolation(void){/*{{{*/
-	return TetraRef::TensorInterpolation(this->element_type);
-}
-/*}}}*/
 void     Tetra::ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum){/*{{{*/
 	/*Compute portion of the element that is grounded*/ 
 
Index: ../trunk-jpl/src/c/classes/Elements/Tetra.h
===================================================================
--- ../trunk-jpl/src/c/classes/Elements/Tetra.h	(revision 18922)
+++ ../trunk-jpl/src/c/classes/Elements/Tetra.h	(revision 18923)
@@ -38,145 +38,141 @@
 		int     ObjectEnum();
 		Object *copy();
 		/*}}}*/
-		/*Update virtual functions resolution: {{{*/
-		void  InputUpdateFromSolutionOneDofCollapsed(IssmDouble* solution,int inputenum){_error_("not implemented yet");};
-		void  InputUpdateFromSolutionOneDof(IssmDouble* solution,int inputenum);
-		void  InputUpdateFromVector(IssmDouble* vector, int name, int type){_error_("not implemented yet");};
-#ifdef _HAVE_DAKOTA_
-		void  InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error_("not implemented yet");};
-		void  InputUpdateFromMatrixDakota(IssmDouble* matrix, int nows, int ncols, int name, int type){_error_("not implemented yet");};
-#endif
-		void  InputUpdateFromIoModel(int index, IoModel* iomodel);
-		/*}}}*/
 		/*Element virtual functions definitions: {{{*/
 		void        AddBasalInput(int input_enum, IssmDouble* values, int interpolation_enum){_error_("not implemented yet");};
 		void        AddInput(int input_enum, IssmDouble* values, int interpolation_enum);
+		void        AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){_error_("not implemented yet");};
+		void        CalvingRateLevermann(void){_error_("not implemented yet");};
 		IssmDouble  CharacteristicLength(void){_error_("not implemented yet");};
 		void        ComputeBasalStress(Vector<IssmDouble>* sigma_b){_error_("not implemented yet");};
 		void        ComputeSigmaNN(){_error_("not implemented yet");};
 		void        ComputeStressTensor(){_error_("not implemented yet");};
 		void        ComputeDeviatoricStressTensor(){_error_("not implemented yet");};
-		void        StressIntensityFactor(void){_error_("not implemented yet");};
-		void        StrainRateparallel(void){_error_("not implemented yet");};
-		void        StrainRateperpendicular(void){_error_("not implemented yet");};
-		void        CalvingRateLevermann(void){_error_("not implemented yet");};
 		void        Configure(Elements* elements,Loads* loads,Nodes* nodesin,Vertices* verticesin,Materials* materials,Parameters* parameters);
-		void        SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters);
-		void        ResetHooks();
+		void        ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index){_error_("not implemented yet");};
+		void        ControlToVectors(Vector<IssmPDouble>* vector_control, Vector<IssmPDouble>* vector_gradient,int control_enum){_error_("not implemented yet");};
 		void        Delta18oParameterization(void){_error_("not implemented yet");};
+		IssmDouble  DragCoefficientAbsGradient(void){_error_("not implemented yet");};
+		void        ElementResponse(IssmDouble* presponse,int response_enum){_error_("not implemented yet");};
 		void        ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz);
+		void        FaceOnBaseIndices(int* pindex1,int* pindex2,int* pindex3);
 		void        FaceOnFrontIndices(int* pindex1,int* pindex2,int* pindex3);
-		void        FaceOnBaseIndices(int* pindex1,int* pindex2,int* pindex3);
 		void        FaceOnSurfaceIndices(int* pindex1,int* pindex2,int* pindex3);
+		int         FiniteElement(void);
 		void        FSContactMigration(Vector<IssmDouble>* vertexgrounded,Vector<IssmDouble>* vertexfloating){_error_("not implemented yet");};
-		int         FiniteElement(void);
-		Element*    GetUpperElement(void){_error_("not implemented yet");};
 		Element*    GetBasalElement(void){_error_("not implemented yet");};
+		int         GetElementType(void);
+		void        GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating){_error_("not implemented yet");};
+		IssmDouble  GetGroundedPortion(IssmDouble* xyz_list){_error_("not implemented yet");};
+		void		   GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum){_error_("not implemented yet");};
+		void        GetInputValue(IssmDouble* pvalue,Node* node,int enumtype);
+		void		   GetLevelCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum,IssmDouble level){_error_("not implemented yet");};
+		void        GetLevelsetPositivePart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlynegative,IssmDouble* levelsetvalues){_error_("not implemented yet");};
+		Node*       GetNode(int node_number){_error_("Not implemented");};
 		int         GetNodeIndex(Node* node);
 		int         GetNumberOfNodes(void);
 		int         GetNumberOfNodes(int enum_type){_error_("not implemented yet");};
 		int         GetNumberOfVertices(void);
+		void        GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type){_error_("not implemented yet");};
+		Element*    GetUpperElement(void){_error_("not implemented yet");};
+		void        GetVectorFromControlInputs(Vector<IssmDouble>* gradient,int control_enum,int control_index,const char* data,bool onsid){_error_("not implemented yet");};
 		void        GetVerticesCoordinatesBase(IssmDouble** pxyz_list);
 		void        GetVerticesCoordinatesTop(IssmDouble** pxyz_list);
+		void        GradientIndexing(int* indexing,int control_index){_error_("not implemented yet");};
 		bool        HasFaceOnBase();
 		bool        HasFaceOnSurface();
+		IssmDouble  IceVolume(void){_error_("not implemented yet");};
+		IssmDouble  IceVolumeAboveFloatation(void){_error_("not implemented yet");};
+		bool        IsFaceOnBoundary(void){_error_("not implemented yet");};
+		bool		   IsIcefront(void);
+		bool        IsNodeOnShelfFromFlags(IssmDouble* flags){_error_("not implemented yet");};
 		bool        IsOnBase();
 		bool        IsOnSurface();
-		bool        IsNodeOnShelfFromFlags(IssmDouble* flags){_error_("not implemented yet");};
+		bool        IsZeroLevelset(int levelset_enum){_error_("not implemented");};
+		void        InputControlUpdate(IssmDouble scalar,bool save_parameter){_error_("not implemented yet");};
+		void        InputDepthAverageAtBase(int enum_type,int average_enum_type){_error_("not implemented yet");};
+		void        InputExtrude(int enum_type,int start){_error_("not implemented"); /*For penta only*/};
+		void        InputScale(int enum_type,IssmDouble scale_factor){_error_("not implemented yet");};
+		void        InputUpdateFromIoModel(int index, IoModel* iomodel);
+		void        InputUpdateFromSolutionOneDof(IssmDouble* solution,int inputenum);
+		void        InputUpdateFromSolutionOneDofCollapsed(IssmDouble* solution,int inputenum){_error_("not implemented yet");};
+		void        InputUpdateFromVector(IssmDouble* vector, int name, int type){_error_("not implemented yet");};
 		void        JacobianDeterminant(IssmDouble*  Jdet, IssmDouble* xyz_list,Gauss* gauss);
+		void        JacobianDeterminantBase(IssmDouble* pJdet,IssmDouble* xyz_list_base,Gauss* gauss);
 		void        JacobianDeterminantLine(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
 		void        JacobianDeterminantSurface(IssmDouble*  pJdet, IssmDouble* xyz_list,Gauss* gauss);
-		void        JacobianDeterminantBase(IssmDouble* pJdet,IssmDouble* xyz_list_base,Gauss* gauss);
 		void        JacobianDeterminantTop(IssmDouble* pJdet,IssmDouble* xyz_list_base,Gauss* gauss);
+		IssmDouble  Masscon(IssmDouble* levelset){_error_("not implemented yet");};
+		IssmDouble  MassFlux(IssmDouble* segment){_error_("not implemented yet");};
+		IssmDouble  MassFlux(IssmDouble x1,IssmDouble y1, IssmDouble x2, IssmDouble y2,int segment_id){_error_("not implemented yet");}
+		void        MaterialUpdateFromTemperature(void){_error_("not implemented yet");};
 		IssmDouble  MinEdgeLength(IssmDouble* xyz_list){_error_("not implemented yet");};
+		IssmDouble  Misfit(int modelenum,int observationenum,int weightsenum){_error_("not implemented yet");};
+		IssmDouble  MisfitArea(int weightsenum){_error_("not implemented yet");};
+		Gauss*      NewGauss(void);
+		Gauss*      NewGauss(int order);
+      Gauss*      NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order){_error_("not implemented yet");};
+      Gauss*      NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert);
+      Gauss*      NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order){_error_("not implemented yet");};
+		Gauss*      NewGaussBase(int order);
+		Gauss*      NewGaussLine(int vertex1,int vertex2,int order){_error_("not implemented yet");};
+		Gauss*      NewGaussTop(int order);
 		void        NodalFunctions(IssmDouble* basis,Gauss* gauss);
+		void        NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss);
+		void        NodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss);
+		void        NodalFunctionsMINIDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
+		void        NodalFunctionsPressure(IssmDouble* basis,Gauss* gauss);
 		void        NodalFunctionsP1(IssmDouble* basis,Gauss* gauss){_error_("not implemented yet");};
+		void        NodalFunctionsP1Derivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
 		void        NodalFunctionsP2(IssmDouble* basis,Gauss* gauss){_error_("not implemented yet");};
+		void        NodalFunctionsTensor(IssmDouble* basis,Gauss* gauss);
 		void        NodalFunctionsVelocity(IssmDouble* basis,Gauss* gauss);
-		void        NodalFunctionsPressure(IssmDouble* basis,Gauss* gauss);
-		void        NodalFunctionsTensor(IssmDouble* basis,Gauss* gauss);
-		void        NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss);
-		void        NodalFunctionsP1Derivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
-		void        NodalFunctionsMINIDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
-		void        NodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss);
+		int         NodalValue(IssmDouble* pvalue, int index, int natureofdataenum){_error_("not implemented yet");};
+		void        NormalBase(IssmDouble* normal,IssmDouble* xyz_list);
 		void        NormalSection(IssmDouble* normal,IssmDouble* xyz_list);
 		void        NormalTop(IssmDouble* normal,IssmDouble* xyz_list);
-		void        NormalBase(IssmDouble* normal,IssmDouble* xyz_list);
+		int         NumberofNodesPressure(void);
 		int         NumberofNodesVelocity(void);
-		int         NumberofNodesPressure(void);
+		void        PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm){_error_("not implemented yet");};
+		void        PotentialUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding){_error_("not implemented yet");};
+		int         PressureInterpolation(void);
+		void        ResetFSBasalBoundaryCondition(void);
+		void        ResetHooks();
+		void        ReduceMatrices(ElementMatrix* Ke,ElementVector* pe);
+		void        SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index){_error_("not implemented yet");};
+		void        SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters);
+		void        SetTemporaryElementType(int element_type_in){_error_("not implemented yet");};
 	   Element*    SpawnBasalElement(void);
 		Element*    SpawnTopElement(void);
 		Tria*       SpawnTria(int index1,int index2,int index3);
 		IssmDouble  StabilizationParameter(IssmDouble u, IssmDouble v, IssmDouble w, IssmDouble diameter, IssmDouble kappa){_error_("not implemented yet");};
-		int         PressureInterpolation(void);
+		void        StrainRateparallel(void){_error_("not implemented yet");};
+		void        StrainRateperpendicular(void){_error_("not implemented yet");};
+		void        StressIntensityFactor(void){_error_("not implemented yet");};
+		IssmDouble  SurfaceArea(void){_error_("not implemented yet");};
+		int         TensorInterpolation(void);
+		IssmDouble  TimeAdapt(){_error_("not implemented yet");};
+		IssmDouble  TotalSmb(void){_error_("not implemented yet");};
+		void        Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type,int finitelement);
+		void        UpdateConstraintsExtrudeFromBase(){_error_("not implemented");};
+		void        UpdateConstraintsExtrudeFromTop(){_error_("not implemented");};
+		int         UpdatePotentialUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf){_error_("not implemented yet");};
+		void        ValueP1DerivativesOnGauss(IssmDouble* dvalue,IssmDouble* values,IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
 		void        ValueP1OnGauss(IssmDouble* pvalue,IssmDouble* values,Gauss* gauss);
-		void        ValueP1DerivativesOnGauss(IssmDouble* dvalue,IssmDouble* values,IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
 		int         VelocityInterpolation(void);
-		int         TensorInterpolation(void);
-		void        GetLevelsetPositivePart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlynegative,IssmDouble* levelsetvalues){_error_("not implemented yet");};
-		void        GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating){_error_("not implemented yet");};
-		IssmDouble  GetGroundedPortion(IssmDouble* xyz_list){_error_("not implemented yet");};
-		void        GetInputValue(IssmDouble* pvalue,Node* node,int enumtype);
-		Node*       GetNode(int node_number){_error_("Not implemented");};
-		int         GetElementType(void);
-		Gauss*      NewGauss(void);
-		Gauss*      NewGauss(int order);
-      Gauss*      NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order){_error_("not implemented yet");};
-      Gauss*      NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert);
-      Gauss*      NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order){_error_("not implemented yet");};
-		Gauss*      NewGaussBase(int order);
-		Gauss*      NewGaussLine(int vertex1,int vertex2,int order){_error_("not implemented yet");};
-		Gauss*      NewGaussTop(int order);
 		int         VertexConnectivity(int vertexindex){_error_("not implemented yet");};
 		void        VerticalSegmentIndices(int** pindices,int* pnumseg){_error_("not implemented yet");};
 		void        ViscousHeating(IssmDouble* pphi,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input);
-		bool        IsZeroLevelset(int levelset_enum){_error_("not implemented");};
-		bool		   IsIcefront(void);
-		bool        IsFaceOnBoundary(void){_error_("not implemented yet");};
 		void        ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum);
-		void		   GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum){_error_("not implemented yet");};
-		void		   GetLevelCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum,IssmDouble level){_error_("not implemented yet");};
-		void        GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type){_error_("not implemented yet");};
-		void        InputDepthAverageAtBase(int enum_type,int average_enum_type){_error_("not implemented yet");};
-		void        InputExtrude(int enum_type,int start){_error_("not implemented"); /*For penta only*/};
-		void        InputScale(int enum_type,IssmDouble scale_factor){_error_("not implemented yet");};
-		void        MaterialUpdateFromTemperature(void){_error_("not implemented yet");};
-		int         NodalValue(IssmDouble* pvalue, int index, int natureofdataenum){_error_("not implemented yet");};
-		void        PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm){_error_("not implemented yet");};
-		void        ResetFSBasalBoundaryCondition(void);
-		void        ReduceMatrices(ElementMatrix* Ke,ElementVector* pe);
-		void        SetTemporaryElementType(int element_type_in){_error_("not implemented yet");};
-		IssmDouble  SurfaceArea(void){_error_("not implemented yet");};
-		void        Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type,int finitelement);
-		IssmDouble  TimeAdapt(){_error_("not implemented yet");};
-		void UpdateConstraintsExtrudeFromBase(){_error_("not implemented");};
-		void UpdateConstraintsExtrudeFromTop(){_error_("not implemented");};
 
-		void       AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part){_error_("not implemented yet");};
-		IssmDouble IceVolume(void){_error_("not implemented yet");};
-		IssmDouble IceVolumeAboveFloatation(void){_error_("not implemented yet");};
-		IssmDouble TotalSmb(void){_error_("not implemented yet");};
-		IssmDouble MassFlux(IssmDouble* segment){_error_("not implemented yet");};
-		IssmDouble MassFlux(IssmDouble x1,IssmDouble y1, IssmDouble x2, IssmDouble y2,int segment_id){_error_("not implemented yet");}
-		void       ElementResponse(IssmDouble* presponse,int response_enum){_error_("not implemented yet");};
-		IssmDouble Misfit(int modelenum,int observationenum,int weightsenum){_error_("not implemented yet");};
-		IssmDouble MisfitArea(int weightsenum){_error_("not implemented yet");};
-		IssmDouble Masscon(IssmDouble* levelset){_error_("not implemented yet");};
-
 #ifdef _HAVE_GIA_
-		void   GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,IssmDouble* x,IssmDouble* y){_error_("not implemented yet");};
+		void        GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,IssmDouble* x,IssmDouble* y){_error_("not implemented yet");};
 #endif
 
-		IssmDouble DragCoefficientAbsGradient(void){_error_("not implemented yet");};
-		void       GradientIndexing(int* indexing,int control_index){_error_("not implemented yet");};
-		void       GetVectorFromControlInputs(Vector<IssmDouble>* gradient,int control_enum,int control_index,const char* data,bool onsid){_error_("not implemented yet");};
-		void       SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index){_error_("not implemented yet");};
-		void       ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index){_error_("not implemented yet");};
-		void       ControlToVectors(Vector<IssmPDouble>* vector_control, Vector<IssmPDouble>* vector_gradient,int control_enum){_error_("not implemented yet");};
-		void       InputControlUpdate(IssmDouble scalar,bool save_parameter){_error_("not implemented yet");};
-
-		void   PotentialUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding){_error_("not implemented yet");};
-		int    UpdatePotentialUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf){_error_("not implemented yet");};
+#ifdef _HAVE_DAKOTA_
+		void        InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type){_error_("not implemented yet");};
+		void        InputUpdateFromMatrixDakota(IssmDouble* matrix, int nows, int ncols, int name, int type){_error_("not implemented yet");};
+#endif
 		/*}}}*/
 };
 #endif  /* _TETRA_H_*/
