Index: /issm/trunk-jpl/src/c/classes/ElementResults/BoolElementResult.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/ElementResults/BoolElementResult.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/ElementResults/BoolElementResult.cpp	(revision 15737)
@@ -75,21 +75,4 @@
 }
 /*}}}*/
-/*FUNCTION BoolElementResult::SpawnTriaElementResult{{{*/
-ElementResult* BoolElementResult::SpawnTriaElementResult(int* indices){
-
-	/*output*/
-	BoolElementResult* outresult=new BoolElementResult();
-
-	/*copy fields: */
-	outresult->enum_type=this->enum_type;
-	outresult->value=this->value;
-	outresult->time=this->time;
-	outresult->step=this->step;
-
-	/*Assign output*/
-	return outresult;
-
-}
-/*}}}*/
 /*FUNCTION BoolElementResult::NumberOfNodalValues{{{*/
 int BoolElementResult::NumberOfNodalValues(void){
Index: /issm/trunk-jpl/src/c/classes/ElementResults/BoolElementResult.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/ElementResults/BoolElementResult.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/ElementResults/BoolElementResult.h	(revision 15737)
@@ -34,5 +34,4 @@
 		/*}}}*/
 		/*ElementResult virtual functions definitions: {{{*/
-		ElementResult* SpawnTriaElementResult(int* indices);
 		IssmDouble  GetTime(void){return time;};
 		int     GetStep(void){return step;};
Index: /issm/trunk-jpl/src/c/classes/ElementResults/DoubleElementResult.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/ElementResults/DoubleElementResult.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/ElementResults/DoubleElementResult.cpp	(revision 15737)
@@ -75,21 +75,4 @@
 }
 /*}}}*/
-/*FUNCTION DoubleElementResult::SpawnTriaElementResult{{{*/
-ElementResult* DoubleElementResult::SpawnTriaElementResult(int* indices){
-
-	/*output*/
-	DoubleElementResult* outresult=new DoubleElementResult();
-
-	/*copy fields: */
-	outresult->enum_type=this->enum_type;
-	outresult->value=this->value;
-	outresult->time=this->time;
-	outresult->step=this->step;
-
-	/*Assign output*/
-	return outresult;
-
-}
-/*}}}*/
 /*FUNCTION DoubleElementResult::NumberOfNodalValues{{{*/
 int DoubleElementResult::NumberOfNodalValues(void){
Index: /issm/trunk-jpl/src/c/classes/ElementResults/DoubleElementResult.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/ElementResults/DoubleElementResult.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/ElementResults/DoubleElementResult.h	(revision 15737)
@@ -14,35 +14,33 @@
 
 	private: 
-		int    enum_type;
+		int        enum_type;
 		IssmDouble value;
-		int    step;
+		int        step;
 		IssmDouble time;
 
 	public:
 
-		/*DoubleElementResult constructors, destructors: {{{*/
+		/*DoubleElementResult constructors, destructors:*/
 		DoubleElementResult();
 		DoubleElementResult(int enum_type,IssmDouble value,int step,IssmDouble time);
 		~DoubleElementResult();
-		/*}}}*/
-		/*Object virtual functions definitions:{{{ */
-		void  Echo();
-		void  DeepEcho();
-		int   Id(); 
-		int   ObjectEnum();
+
+		/*Object virtual functions definitions:*/
+		void    Echo();
+		void    DeepEcho();
+		int     Id(); 
+		int     ObjectEnum();
 		Object* copy();
-		/*}}}*/
+
 		/*ElementResult virtual functions definitions: {{{*/
-		ElementResult* SpawnTriaElementResult(int* indices);
 		IssmDouble  GetTime(void){return time;};
 		int     GetStep(void){return step;};
 		int     NumberOfNodalValues(void);
 		void    PatchFill(int row, Patch* patch);
-		/*}}}*/
-		/*DoubleElementResult management: {{{*/
-		int   InstanceEnum();
+
+		/*DoubleElementResult management*/
+		int  InstanceEnum();
 		void GetVectorFromResults(Vector<IssmDouble>* vector,int* doflist,int* connectivitylist,int numdofs);
 		void GetElementVectorFromResults(Vector<IssmDouble>* vector,int dof);
-		/*}}}*/
 };
 #endif  /* _DOUBLEELEMENTRESULT_H */
Index: /issm/trunk-jpl/src/c/classes/ElementResults/ElementResult.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/ElementResults/ElementResult.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/ElementResults/ElementResult.h	(revision 15737)
@@ -15,13 +15,12 @@
 	public: 
 
-		virtual        ~ElementResult(){};
-		virtual         ElementResult* SpawnTriaElementResult(int* indices)=0;
-		virtual IssmDouble  GetTime(void)=0;
-		virtual int     GetStep(void)=0;
-		virtual int     NumberOfNodalValues(void)=0;
-		virtual void    PatchFill(int row, Patch* patch)=0;
-		virtual int     InstanceEnum()=0;
-		virtual void    GetVectorFromResults(Vector<IssmDouble>* vector,int* doflist,int* connectivitylist,int numdof)=0;
-		virtual void    GetElementVectorFromResults(Vector<IssmDouble>* vector,int dof)=0;
+		virtual ~ElementResult(){};
+		virtual IssmDouble GetTime(void) = 0;
+		virtual int        GetStep(void) = 0;
+		virtual int        NumberOfNodalValues(void) = 0;
+		virtual void       PatchFill(int row, Patch *patch)=0;
+		virtual int        InstanceEnum() = 0;
+		virtual void       GetVectorFromResults(Vector <IssmDouble> *vector,int*doflist,int*connectivitylist,int numdof)=0;
+		virtual void       GetElementVectorFromResults(Vector <IssmDouble> *vector,int dof)=0;
 
 };
Index: /issm/trunk-jpl/src/c/classes/ElementResults/PentaP1ElementResult.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/ElementResults/PentaP1ElementResult.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/ElementResults/PentaP1ElementResult.cpp	(revision 15737)
@@ -78,29 +78,4 @@
 }
 /*}}}*/
-/*FUNCTION PentaP1ElementResult::SpawnTriaElementResult{{{*/
-ElementResult* PentaP1ElementResult::SpawnTriaElementResult(int* indices){
-
-	/*output*/
-	TriaP1ElementResult* outresult=NULL;
-	IssmDouble newvalues[3];
-
-	/*Loop over the new indices*/
-	for(int i=0;i<3;i++){
-
-		/*Check index value*/
-		_assert_(indices[i]>=0 && indices[i]<6);
-
-		/*Assign value to new result*/
-		newvalues[i]=this->values[indices[i]];
-	}
-
-	/*Create new Tria result*/
-	outresult=new TriaP1ElementResult(this->enum_type,&newvalues[0],this->step,this->time);
-
-	/*Assign output*/
-	return outresult;
-
-}
-/*}}}*/
 /*FUNCTION PentaP1ElementResult::NumberOfNodalValues{{{*/
 int PentaP1ElementResult::NumberOfNodalValues(void){
Index: /issm/trunk-jpl/src/c/classes/ElementResults/PentaP1ElementResult.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/ElementResults/PentaP1ElementResult.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/ElementResults/PentaP1ElementResult.h	(revision 15737)
@@ -33,5 +33,4 @@
 		/*}}}*/
 		/*ElementResult virtual functions definitions: {{{*/
-		ElementResult* SpawnTriaElementResult(int* indices);
 		IssmDouble  GetTime(void){return time;};
 		int     GetStep(void){return step;};
Index: /issm/trunk-jpl/src/c/classes/ElementResults/TriaP1ElementResult.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/ElementResults/TriaP1ElementResult.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/ElementResults/TriaP1ElementResult.cpp	(revision 15737)
@@ -77,18 +77,4 @@
 }
 /*}}}*/
-/*FUNCTION TriaP1ElementResult::SpawnTriaElementResult{{{*/
-ElementResult* TriaP1ElementResult::SpawnTriaElementResult(int* indices){
-
-	/*output*/
-	TriaP1ElementResult* outresult=NULL;
-
-	/*Create new Tria result (copy of current result)*/
-	outresult=new TriaP1ElementResult(this->enum_type,&this->values[0],this->step,this->time);
-
-	/*Assign output*/
-	return outresult;
-
-}
-/*}}}*/
 /*FUNCTION TriaP1ElementResult::NumberOfNodalValues{{{*/
 int TriaP1ElementResult::NumberOfNodalValues(void){
Index: /issm/trunk-jpl/src/c/classes/ElementResults/TriaP1ElementResult.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/ElementResults/TriaP1ElementResult.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/ElementResults/TriaP1ElementResult.h	(revision 15737)
@@ -32,5 +32,4 @@
 		/*}}}*/
 		/*ElementResult virtual functions definitions: {{{*/
-		ElementResult* SpawnTriaElementResult(int* indices);
 		IssmDouble  GetTime(void){return time;};
 		int     GetStep(void){return step;};
Index: /issm/trunk-jpl/src/c/classes/Elements/ElementHook.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/ElementHook.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Elements/ElementHook.cpp	(revision 15737)
@@ -89,13 +89,28 @@
 /*}}}*/
 /*FUNCTION ElementHook::SpawnTriaHook{{{*/
-void ElementHook::SpawnTriaHook(ElementHook* triahook,int* indices){
+void ElementHook::SpawnTriaHook(ElementHook* triahook,int location){
 
-	int i;
-	int zero=0;
+	/*Create arrow of indices depending on location (0=base 1=surface)*/
+	int indices[3];
+	switch(location){
+		case 0:
+			indices[0] = 0;
+			indices[1] = 1;
+			indices[2] = 2;
+			break;
+		case 1:
+			indices[0] = 3;
+			indices[1] = 4;
+			indices[2] = 5;
+			break;
+		default:
+			_error_("case "<<location<<" not supported");
+	}
 
 	triahook->numanalyses=this->numanalyses;
+
+	/*Spawn nodes hook*/
 	triahook->hnodes=new Hook*[this->numanalyses];
-
-	for(i=0;i<this->numanalyses;i++){
+	for(int i=0;i<this->numanalyses;i++){
 		/*Do not do anything if Hook is empty*/
 		if (!this->hnodes[i] || this->hnodes[i]->GetNum()==0){
@@ -103,9 +118,9 @@
 		}
 		else{
-			/*Else, spawn Hook*/
 			triahook->hnodes[i]=this->hnodes[i]->Spawn(indices,3);
 		}
 	}
-	// do not spawn hmaterial. material will be taken care of by Penta
+
+	/*do not spawn hmaterial. material will be taken care of by Penta*/
 	triahook->hmaterial=NULL;
 	triahook->hvertices=(Hook*)this->hvertices->Spawn(indices,3);
Index: /issm/trunk-jpl/src/c/classes/Elements/ElementHook.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/ElementHook.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Elements/ElementHook.h	(revision 15737)
@@ -25,5 +25,5 @@
 
 		void SetHookNodes(int* node_ids,int numnodes,int analysis_counter);
-		void SpawnTriaHook(ElementHook* triahook,int* indices);    //3d only
+		void SpawnTriaHook(ElementHook* triahook,int location); //3d only
 		void InitHookNeighbors(int* element_ids);               //3d only
 };
Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.cpp	(revision 15737)
@@ -500,5 +500,5 @@
 	this->InputDepthAverageAtBase(VyEnum,VyAverageEnum);
 
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementMatrix* Ke=tria->CreateKMatrixPrognostic();
 	delete tria->material; delete tria;
@@ -517,5 +517,5 @@
 	if (!IsOnBed()) return NULL;
 
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementMatrix* Ke=tria->CreateMassMatrix();
 	delete tria->material; delete tria;
@@ -675,5 +675,5 @@
 
 	/*Call Tria function*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementVector* pe=tria->CreatePVectorPrognostic();
 	delete tria->material; delete tria;
@@ -693,5 +693,5 @@
 
 	/*Call Tria function*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementVector* pe=tria->CreatePVectorSlope();
 	delete tria->material; delete tria;
@@ -3060,32 +3060,18 @@
 /*}}}*/
 /*FUNCTION Penta::SpawnTria {{{*/
-Tria*  Penta::SpawnTria(int g0, int g1, int g2){
-
-	int   analysis_counter;
-	int   indices[3];
-	int   zero=0;
-	Tria*       tria            = NULL;
-	Inputs*     tria_inputs     = NULL;
-	Results*    tria_results    = NULL;
-	Parameters* tria_parameters = NULL;
+Tria*  Penta::SpawnTria(int location){
+
+	int analysis_counter;
 
 	/*go into parameters and get the analysis_counter: */
 	this->parameters->FindParam(&analysis_counter,AnalysisCounterEnum);
 
-	indices[0]=g0;
-	indices[1]=g1;
-	indices[2]=g2;
-
-	tria_parameters=this->parameters;
-	tria_inputs=(Inputs*)this->inputs->SpawnTriaInputs(indices);
-	tria_results=(Results*)this->results->SpawnTriaResults(indices);
-
-	tria=new Tria();
+	/*Create Tria*/
+	Tria* tria=new Tria();
 	tria->id=this->id;
-	tria->inputs=tria_inputs;
-	tria->results=tria_results;
-	tria->parameters=tria_parameters;
+	tria->inputs=(Inputs*)this->inputs->SpawnTriaInputs(location);
+	tria->parameters=this->parameters;
 	tria->element_type=P1Enum; //Only P1 CG for now (TO BE CHANGED)
-	this->SpawnTriaHook(dynamic_cast<ElementHook*>(tria),&indices[0]);
+	this->SpawnTriaHook(dynamic_cast<ElementHook*>(tria),location);
 
 	/*Spawn material*/
@@ -3093,5 +3079,5 @@
 	tria->material=(Material*)this->material->copy();
 	delete tria->material->inputs;
-	tria->material->inputs=(Inputs*)this->material->inputs->SpawnTriaInputs(indices);
+	tria->material->inputs=(Inputs*)this->material->inputs->SpawnTriaInputs(location);
 
 	/*recover nodes, material and matpar: */
@@ -3100,4 +3086,5 @@
 	tria->matpar=(Matpar*)tria->hmatpar->delivers();
 
+	/*Return new Tria*/
 	return tria;
 }
@@ -3172,5 +3159,5 @@
 		/*This element should be collapsed into a tria element at its base. Create this tria element, 
 		 * and compute SurfaceArea*/
-		tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
+		tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria (lower face).
 		S=tria->SurfaceArea();
 		delete tria->material; delete tria;
@@ -3179,5 +3166,5 @@
 	else{
 
-		tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
+		tria=(Tria*)SpawnTria(1); //nodes 3, 4 and 5 make the new tria (upper face).
 		S=tria->SurfaceArea();
 		delete tria->material; delete tria;
@@ -3668,5 +3655,5 @@
 
 	/*Spawn Tria element from the base of the Penta: */
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	mass_flux=tria->MassFlux(segment);
 	delete tria->material; delete tria;
@@ -4051,5 +4038,5 @@
 	if (!IsOnBed()) return NULL;
 
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementMatrix* Ke=tria->CreateKMatrixMelting();
 
@@ -5092,5 +5079,5 @@
 
 	/*Call Tria function*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementMatrix* Ke=tria->CreateKMatrixAdjointSSA();
 	delete tria->material; delete tria;
@@ -5275,5 +5262,5 @@
 
 	/*Call Tria function*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementVector* pe=tria->CreatePVectorAdjointHoriz();
 	delete tria->material; delete tria;
@@ -5762,5 +5749,5 @@
 		case DragCoefficientAbsGradientEnum:
 			if(IsOnBed()){
-				tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+				tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 				tria->GradjDragGradient(gradient,resp,control_index);
 				delete tria->material; delete tria;
@@ -5769,5 +5756,5 @@
 		case RheologyBbarAbsGradientEnum:
 			if(IsOnBed()){
-				tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+				tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 				tria->GradjBGradient(gradient,resp,control_index);
 				delete tria->material; delete tria;
@@ -5787,5 +5774,5 @@
 
 	/*Spawn tria*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	tria->GradjDragSSA(gradient,control_index);
 	delete tria->material; delete tria;
@@ -5965,5 +5952,5 @@
 
 	/*Collapse element to the base*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria (lower face).
 	tria->GradjBSSA(gradient,control_index);
 	delete tria->material; delete tria;
@@ -5983,5 +5970,5 @@
 
 	/*Collapse element to the base*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2);
+	Tria* tria=(Tria*)SpawnTria(0);
 	tria->GradjBSSA(gradient,control_index);    //We use SSA as an estimate for now
 	delete tria->material; delete tria;
@@ -6000,5 +5987,5 @@
 
 	/*Collapse element to the base*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2);
+	Tria* tria=(Tria*)SpawnTria(0);
 	tria->GradjBSSA(gradient,control_index);    //We use SSA as an estimate for now
 	delete tria->material; delete tria;
@@ -6175,5 +6162,5 @@
 		/*This element should be collapsed into a tria element at its base. Create this tria element, 
 		 * and compute SurfaceAverageVelMisfit*/
-		tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
+		tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria (lower face).
 		J=tria->SurfaceAverageVelMisfit(weight_index);
 		delete tria->material; delete tria;
@@ -6182,5 +6169,5 @@
 	else{
 
-		tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
+		tria=(Tria*)SpawnTria(1); //nodes 3, 4 and 5 make the new tria (upper face).
 		J=tria->SurfaceAverageVelMisfit(weight_index);
 		delete tria->material; delete tria;
@@ -6212,5 +6199,5 @@
 		/*This element should be collapsed into a tria element at its base. Create this tria element, 
 		 * and compute SurfaceAbsVelMisfit*/
-		tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
+		tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria (lower face).
 		J=tria->SurfaceAbsVelMisfit(weight_index);
 		delete tria->material; delete tria;
@@ -6219,5 +6206,5 @@
 	else{
 
-		tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
+		tria=(Tria*)SpawnTria(1); //nodes 3, 4 and 5 make the new tria (upper face).
 		J=tria->SurfaceAbsVelMisfit(weight_index);
 		delete tria->material; delete tria;
@@ -6249,5 +6236,5 @@
 		/*This element should be collapsed into a tria element at its base. Create this tria element, 
 		 * and compute SurfaceLogVelMisfit*/
-		tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
+		tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria (lower face).
 		J=tria->SurfaceLogVelMisfit(weight_index);
 		delete tria->material; delete tria;
@@ -6256,5 +6243,5 @@
 	else{
 
-		tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
+		tria=(Tria*)SpawnTria(1); //nodes 3, 4 and 5 make the new tria (upper face).
 		J=tria->SurfaceLogVelMisfit(weight_index);
 		delete tria->material; delete tria;
@@ -6288,5 +6275,5 @@
 		/*This element should be collapsed into a tria element at its base. Create this tria element, 
 		 * and compute SurfaceLogVxVyMisfit*/
-		tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
+		tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria (lower face).
 		J=tria->SurfaceLogVxVyMisfit(weight_index);
 		delete tria->material; delete tria;
@@ -6295,5 +6282,5 @@
 	else{
 
-		tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
+		tria=(Tria*)SpawnTria(1); //nodes 3, 4 and 5 make the new tria (upper face).
 		J=tria->SurfaceLogVxVyMisfit(weight_index);
 		delete tria->material; delete tria;
@@ -6325,5 +6312,5 @@
 		/*This element should be collapsed into a tria element at its base. Create this tria element, 
 		 * and compute SurfaceRelVelMisfit*/
-		tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria (lower face).
+		tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria (lower face).
 		J=tria->SurfaceRelVelMisfit(weight_index);
 		delete tria->material; delete tria;
@@ -6332,5 +6319,5 @@
 	else{
 
-		tria=(Tria*)SpawnTria(3,4,5); //nodes 3, 4 and 5 make the new tria (upper face).
+		tria=(Tria*)SpawnTria(1); //nodes 3, 4 and 5 make the new tria (upper face).
 		J=tria->SurfaceRelVelMisfit(weight_index);
 		delete tria->material; delete tria;
@@ -6359,5 +6346,5 @@
 	_error_("Not implemented yet");
 
-	tria=(Tria*)SpawnTria(0,1,2);
+	tria=(Tria*)SpawnTria(0);
 	J=tria->ThicknessAbsMisfit(weight_index);
 	delete tria->material; delete tria;
@@ -6374,5 +6361,5 @@
 	if(IsOnWater()|| IsFloating() || !IsOnBed()) return 0;
 
-	tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria
+	tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria
 	J=tria->DragCoefficientAbsGradient(weight_index);
 	delete tria->material; delete tria;
@@ -6389,5 +6376,5 @@
 	if(IsOnWater() || !IsOnBed()) return 0;
 
-	tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria
+	tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria
 	J=tria->RheologyBbarAbsGradient(weight_index);
 	delete tria->material; delete tria;
@@ -6693,5 +6680,5 @@
 	/*Find penta on bed as HO must be coupled to the dofs on the bed: */
 	Penta* pentabase=GetBasalElement();
-	Tria*  tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria*  tria=pentabase->SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 
 	/*Prepare node list*/
@@ -6890,5 +6877,5 @@
 	/*Find penta on bed as FS must be coupled to the dofs on the bed: */
 	Penta* pentabase=GetBasalElement();
-	Tria* tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=pentabase->SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 
 	/*Prepare node list*/
@@ -7247,5 +7234,5 @@
 
 	/*Call Tria function*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementMatrix* Ke=tria->CreateKMatrixDiagnosticSSA();
 	delete tria->material; delete tria;
@@ -7298,5 +7285,5 @@
 	/*Find penta on bed as this is a SSA elements: */
 	pentabase=GetBasalElement();
-	tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	tria=pentabase->SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 
 	/*Initialize Element matrix*/
@@ -7370,5 +7357,5 @@
 	 * the tria functionality to build a friction stiffness matrix on these 3
 	 * nodes: */
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementMatrix* Ke=tria->CreateKMatrixDiagnosticSSAFriction();
 	delete tria->material; delete tria;
@@ -7446,5 +7433,5 @@
 	/*Find penta on bed as this is a SSA elements: */
 	pentabase=GetBasalElement();
-	tria=pentabase->SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	tria=pentabase->SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 
 	/*Initialize Element matrix*/
@@ -7501,5 +7488,5 @@
 	 * the tria functionality to build a friction stiffness matrix on these 3
 	 * nodes: */
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementMatrix* Ke=tria->CreateKMatrixDiagnosticSSAFriction();
 	delete tria->material; delete tria;
@@ -8528,5 +8515,5 @@
 
 	/*Call Tria function*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementVector* pe=tria->CreatePVectorDiagnosticSSA();
 	delete tria->material; delete tria;
@@ -8542,5 +8529,5 @@
 
 	/*Call Tria function*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementVector* pe=tria->CreatePVectorDiagnosticSSA();
 	delete tria->material; delete tria;
@@ -9227,5 +9214,5 @@
 
 	/*Call Tria function*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementMatrix* Ke=tria->CreateJacobianDiagnosticSSA();
 	delete tria->material; delete tria;
@@ -10459,5 +10446,5 @@
 
 	/*Spawn Tria element from the base of the Penta: */
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementMatrix* Ke=tria->CreateKMatrixBalancethickness();
 	delete tria->material; delete tria;
@@ -10481,5 +10468,5 @@
 
 	/*Call Tria function*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementVector* pe=tria->CreatePVectorBalancethickness();
 	delete tria->material; delete tria;
@@ -10501,5 +10488,5 @@
 	if (!IsOnBed()) return NULL;
 
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementMatrix* Ke=tria->CreateKMatrixHydrologyDCInefficient();
 	delete tria->material; delete tria;
@@ -10514,5 +10501,5 @@
 	if (!IsOnBed()) return NULL;
 
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementMatrix* Ke=tria->CreateKMatrixHydrologyDCEfficient();
 	delete tria->material; delete tria;
@@ -10528,5 +10515,5 @@
 
 	/*Call Tria function*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementVector* pe=tria->CreatePVectorHydrologyDCInefficient();
 	delete tria->material; delete tria;
@@ -10542,5 +10529,5 @@
 
 	/*Call Tria function*/
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	ElementVector* pe=tria->CreatePVectorHydrologyDCEfficient();
 	delete tria->material; delete tria;
@@ -10555,5 +10542,5 @@
 	if (!IsOnBed()) return;
 
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	tria->GetHydrologyDCInefficientHmax(ph_max,innode);
 	delete tria->material; delete tria;
@@ -10565,5 +10552,5 @@
 	if (!IsOnBed()) return;
 
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	tria->GetHydrologyTransfer(transfer);
 	delete tria->material; delete tria;
@@ -10606,5 +10593,5 @@
 	if (!IsOnBed())return;
 
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	tria->HydrologyEPLGetActive(active_vec);
 	delete tria->material; delete tria;
@@ -10617,5 +10604,5 @@
 	if (!IsOnBed())return;
 
-	Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.
+	Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.
 	tria->HydrologyEPLGetMask(vec_mask);
 	delete tria->material; delete tria;
@@ -10659,5 +10646,5 @@
 		kappa=kmax*pow(10.,penalty_factor);
 
-		Tria* tria=(Tria*)SpawnTria(0,1,2); //nodes 0, 1 and 2 make the new tria.	
+		Tria* tria=(Tria*)SpawnTria(0); //nodes 0, 1 and 2 make the new tria.	
 		for(int i=0;i<NUMVERTICES2D;i++){
 			tria->GetHydrologyDCInefficientHmax(&h_max,nodes[i]);
Index: /issm/trunk-jpl/src/c/classes/Elements/Penta.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Elements/Penta.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Elements/Penta.h	(revision 15737)
@@ -224,5 +224,5 @@
 		void	  ReduceVectorFS(IssmDouble* Pe_reduced, IssmDouble* Ke_temp, IssmDouble* Pe_temp);
 		void	  SetClone(int* minranks);
-		Tria*	  SpawnTria(int g0, int g1, int g2);
+		Tria*	  SpawnTria(int location);
 		void	  SurfaceNormal(IssmDouble* surface_normal, IssmDouble xyz_list[3][3]);
 		void     UpdateConstraints(void);
Index: /issm/trunk-jpl/src/c/classes/ExternalResults/Results.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/ExternalResults/Results.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/ExternalResults/Results.cpp	(revision 15737)
@@ -34,30 +34,4 @@
 
 /*Object management*/
-/*FUNCTION Results::SpawnTriaResults{{{*/
-Results* Results::SpawnTriaResults(int* indices){
-
-	/*Intermediary*/
-	vector<Object*>::iterator object;
-	ElementResult* resultin=NULL;
-	ElementResult* resultout=NULL;
-
-	/*Output*/
-	Results* newresults=new Results();
-
-	/*Go through results and call Spawn function*/
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Create new result*/
-		resultin=(ElementResult*)(*object); 
-		resultout=resultin->SpawnTriaElementResult(indices);
-
-		/*Add result to new results*/
-		newresults->AddObject((Object*)resultout);
-	}
-
-	/*Assign output pointer*/
-	return newresults;
-}
-/*}}}*/
 /*FUNCTION Results::Write{{{*/
 void Results::Write(Parameters* parameters){
Index: /issm/trunk-jpl/src/c/classes/ExternalResults/Results.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/ExternalResults/Results.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/ExternalResults/Results.h	(revision 15737)
@@ -1,4 +1,4 @@
 #ifndef _CONTAINER_RESULTS_H_
-#define  _CONTAINER_RESULTS_H_
+#define _CONTAINER_RESULTS_H_
 
 #include "../../datastructures/datastructures.h"
@@ -20,6 +20,5 @@
 
 		/*numerics*/
-		Results* SpawnTriaResults(int* indices);
-		void     Write(Parameters* parameters);
+		void Write(Parameters* parameters);
 };
 #endif //ifndef _RESULTS_H_
Index: /issm/trunk-jpl/src/c/classes/Inputs/BoolInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/BoolInput.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/BoolInput.cpp	(revision 15737)
@@ -72,5 +72,5 @@
 /*}}}*/
 /*FUNCTION BoolInput::SpawnTriaInput{{{*/
-Input* BoolInput::SpawnTriaInput(int* indices){
+Input* BoolInput::SpawnTriaInput(int location){
 
 		/*output*/
Index: /issm/trunk-jpl/src/c/classes/Inputs/BoolInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/BoolInput.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/BoolInput.h	(revision 15737)
@@ -34,5 +34,5 @@
 		/*BoolInput management: {{{*/
 		int   InstanceEnum();
-		Input* SpawnTriaInput(int* indices);
+		Input* SpawnTriaInput(int location);
 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
 		Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
Index: /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.cpp	(revision 15737)
@@ -183,6 +183,6 @@
 }/*}}}*/
 /*FUNCTION ControlInput::SpawnTriaInput{{{*/
-Input* ControlInput::SpawnTriaInput(int* indices){
-	return values->SpawnTriaInput(indices);
+Input* ControlInput::SpawnTriaInput(int location){
+	return values->SpawnTriaInput(location);
 }/*}}}*/
 /*FUNCTION ControlInput::SpawnGradient{{{*/
Index: /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/ControlInput.h	(revision 15737)
@@ -38,5 +38,5 @@
 		/*ControlInput management: {{{*/
 		int    InstanceEnum();
-		Input* SpawnTriaInput(int* indices);
+		Input* SpawnTriaInput(int location);
 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
 		Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
Index: /issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.cpp	(revision 15737)
@@ -70,5 +70,5 @@
 /*}}}*/
 /*FUNCTION DatasetInput::SpawnTriaInput{{{*/
-Input* DatasetInput::SpawnTriaInput(int* indices){
+Input* DatasetInput::SpawnTriaInput(int location){
 
 	/*output*/
@@ -78,5 +78,5 @@
 	outinput=new DatasetInput();
 	outinput->enum_type=this->enum_type;
-	outinput->inputs=dynamic_cast<Inputs*>(this->inputs->SpawnTriaInputs(indices));
+	outinput->inputs=dynamic_cast<Inputs*>(this->inputs->SpawnTriaInputs(location));
 
 	/*Assign output*/
Index: /issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/DatasetInput.h	(revision 15737)
@@ -33,5 +33,5 @@
 		/*DatasetInput management: {{{*/
 		int    InstanceEnum();
-		Input* SpawnTriaInput(int* indices);
+		Input* SpawnTriaInput(int location);
 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
 		Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
Index: /issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.cpp	(revision 15737)
@@ -72,5 +72,5 @@
 /*}}}*/
 /*FUNCTION DoubleInput::SpawnTriaInput{{{*/
-Input* DoubleInput::SpawnTriaInput(int* indices){
+Input* DoubleInput::SpawnTriaInput(int location){
 
 	/*output*/
Index: /issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/DoubleInput.h	(revision 15737)
@@ -33,5 +33,5 @@
 		/*DoubleInput management: {{{*/
 		int   InstanceEnum();
-		Input* SpawnTriaInput(int* indices);
+		Input* SpawnTriaInput(int location);
 		Input* PointwiseDivide(Input* inputB);
 		Input* PointwiseMin(Input* inputB);
Index: /issm/trunk-jpl/src/c/classes/Inputs/Input.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/Input.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/Input.h	(revision 15737)
@@ -64,5 +64,5 @@
 		virtual void   GetVectorFromInputs(Vector<IssmDouble>* vector,int* doflist)=0;
 
-		virtual Input* SpawnTriaInput(int* indices)=0;
+		virtual Input* SpawnTriaInput(int location)=0;
 		virtual Input* PointwiseDivide(Input* inputB)=0;
 		virtual Input* PointwiseMax(Input* inputmax)=0;
Index: /issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp	(revision 15737)
@@ -370,5 +370,5 @@
 /*}}}*/
 /*FUNCTION Inputs::SpawnTriaInputs{{{*/
-Inputs* Inputs::SpawnTriaInputs(int* indices){
+Inputs* Inputs::SpawnTriaInputs(int location){
 
 	/*Intermediary*/
@@ -385,5 +385,5 @@
 		/*Create new input*/
 		inputin=dynamic_cast<Input*>(*object);
-		inputout=inputin->SpawnTriaInput(indices);
+		inputout=inputin->SpawnTriaInput(location);
 
 		/*Add input to new inputs*/
Index: /issm/trunk-jpl/src/c/classes/Inputs/Inputs.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/Inputs.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/Inputs.h	(revision 15737)
@@ -28,5 +28,5 @@
 		void       DuplicateInput(int original_enum,int new_enum);
 		Input*     GetInput(int enum_name);
-		Inputs*    SpawnTriaInputs(int* indices);
+		Inputs*    SpawnTriaInputs(int position);
 		void       AXPY(int MeshYEnum, IssmDouble scalar, int MeshXEnum);
 		IssmDouble  InfinityNorm(int enumtype);
Index: /issm/trunk-jpl/src/c/classes/Inputs/IntInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/IntInput.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/IntInput.cpp	(revision 15737)
@@ -72,5 +72,5 @@
 /*}}}*/
 /*FUNCTION IntInput::SpawnTriaInput{{{*/
-Input* IntInput::SpawnTriaInput(int* indices){
+Input* IntInput::SpawnTriaInput(int location){
 
 	/*output*/
Index: /issm/trunk-jpl/src/c/classes/Inputs/IntInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/IntInput.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/IntInput.h	(revision 15737)
@@ -34,5 +34,5 @@
 		/*IntInput management: {{{*/
 		int   InstanceEnum();
-		Input* SpawnTriaInput(int* indices);
+		Input* SpawnTriaInput(int location);
 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
 		Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
Index: /issm/trunk-jpl/src/c/classes/Inputs/PentaInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/PentaInput.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/PentaInput.cpp	(revision 15737)
@@ -84,5 +84,5 @@
 /*}}}*/
 /*FUNCTION PentaInput::SpawnTriaInput{{{*/
-Input* PentaInput::SpawnTriaInput(int* indices){
+Input* PentaInput::SpawnTriaInput(int location){
 
 	/*output*/
@@ -90,4 +90,21 @@
 	IssmDouble newvalues[3]; //Assume P1 interpolation only for now
 
+	/*Create arrow of indices depending on location (0=base 1=surface)*/
+	int indices[3];
+	switch(location){
+		case 0:
+			indices[0] = 0;
+			indices[1] = 1;
+			indices[2] = 2;
+			break;
+		case 1:
+			indices[0] = 3;
+			indices[1] = 4;
+			indices[2] = 5;
+			break;
+		default:
+			_error_("case "<<location<<" not supported");
+	}
+
 	/*Loop over the new indices*/
 	for(int i=0;i<3;i++){
@@ -105,5 +122,4 @@
 	/*Assign output*/
 	return outinput;
-
 }
 /*}}}*/
Index: /issm/trunk-jpl/src/c/classes/Inputs/PentaInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/PentaInput.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/PentaInput.h	(revision 15737)
@@ -34,5 +34,5 @@
 		/*PentaInput management*/
 		int   InstanceEnum();
-		Input* SpawnTriaInput(int* indices);
+		Input* SpawnTriaInput(int location);
 		Input* PointwiseDivide(Input* inputB);
 		Input* PointwiseMin(Input* inputB);
Index: /issm/trunk-jpl/src/c/classes/Inputs/TransientInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/TransientInput.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/TransientInput.cpp	(revision 15737)
@@ -108,5 +108,5 @@
 /*}}}*/
 /*FUNCTION TransientInput::SpawnTriaInput{{{*/
-Input* TransientInput::SpawnTriaInput(int* indices){
+Input* TransientInput::SpawnTriaInput(int location){
 
 	/*output*/
@@ -119,5 +119,5 @@
 	outinput->timesteps=xNew<IssmDouble>(this->numtimesteps);
 	xMemCpy(outinput->timesteps,this->timesteps,this->numtimesteps);
-	outinput->inputs=(Inputs*)this->inputs->SpawnTriaInputs(indices);
+	outinput->inputs=(Inputs*)this->inputs->SpawnTriaInputs(location);
 	outinput->parameters=this->parameters;
 
Index: /issm/trunk-jpl/src/c/classes/Inputs/TransientInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/TransientInput.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/TransientInput.h	(revision 15737)
@@ -38,5 +38,5 @@
 		/*TransientInput management: {{{*/
 		int    InstanceEnum();
-		Input* SpawnTriaInput(int* indices);
+		Input* SpawnTriaInput(int location);
 		Input* PointwiseDivide(Input* forcingB){_error_("not implemented yet");};
 		Input* PointwiseMin(Input* forcingB){_error_("not implemented yet");};
Index: /issm/trunk-jpl/src/c/classes/Inputs/TriaInput.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/TriaInput.cpp	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/TriaInput.cpp	(revision 15737)
@@ -84,5 +84,5 @@
 /*}}}*/
 /*FUNCTION TriaInput::SpawnTriaInput{{{*/
-Input* TriaInput::SpawnTriaInput(int* indices){
+Input* TriaInput::SpawnTriaInput(int location){
 
 	/*output*/
Index: /issm/trunk-jpl/src/c/classes/Inputs/TriaInput.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/TriaInput.h	(revision 15736)
+++ /issm/trunk-jpl/src/c/classes/Inputs/TriaInput.h	(revision 15737)
@@ -34,5 +34,5 @@
 		/*TriaInput management:*/
 		int    InstanceEnum();
-		Input* SpawnTriaInput(int* indices);
+		Input* SpawnTriaInput(int location);
 		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
 		Input* PointwiseMin(Input* inputB);
