Index: /issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp	(revision 21745)
+++ /issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.cpp	(revision 21746)
@@ -54,2 +54,25 @@
 	*pvector=vector;
 }
+
+void GetVectorFromInputsx(IssmDouble** pvector,int* pvector_size, FemModel* femmodel,int name){
+
+	int interpolation_type;
+	/*this one is special: we don't specify the type, but let the nature of the inputs dictace. 
+	 * P0 -> ElementSIdEnum, P1 ->VertexSIdEnum: */
+	
+	/*We go find the input of the first element, and query its interpolation type: */
+	Element* element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(0));
+	Input* input=element->GetInput(name); 
+	if (!input) _error_("could not find input: " << name);
+
+	interpolation_type=input->GetInputInterpolationType(); 
+	if(interpolation_type==P0Enum){
+		*pvector_size=femmodel->elements->NumberOfElements();
+		GetVectorFromInputsx(pvector,femmodel,name, ElementSIdEnum);
+	}
+	else if(interpolation_type==P1Enum){
+		*pvector_size=femmodel->vertices->NumberOfVertices();
+		GetVectorFromInputsx(pvector,femmodel,name, VertexSIdEnum);
+	}
+	else _error_("interpolation type : " << interpolation_type << " not supported yet!");
+}
Index: /issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.h
===================================================================
--- /issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.h	(revision 21745)
+++ /issm/trunk-jpl/src/c/modules/GetVectorFromInputsx/GetVectorFromInputsx.h	(revision 21746)
@@ -10,4 +10,5 @@
 void	GetVectorFromInputsx( Vector<IssmDouble>** pvector,FemModel* femmodel,int name,int type);
 void	GetVectorFromInputsx( IssmDouble** pvector,FemModel* femmodel,int name,int type);
+void    GetVectorFromInputsx(IssmDouble** pvector,int* pvector_size, FemModel* femmodel,int name);
 
 #endif  /* _GETVECTORFROMINPUTSXX_H */
