Index: /issm/trunk/src/c/Container/DataSet.cpp
===================================================================
--- /issm/trunk/src/c/Container/DataSet.cpp	(revision 8591)
+++ /issm/trunk/src/c/Container/DataSet.cpp	(revision 8592)
@@ -252,4 +252,10 @@
 				dataset->AddObject(controlinputinput);}
 				break;
+			case DatasetInputEnum:{
+				DatasetInput* datasetinputinput=NULL;
+				datasetinputinput=new DatasetInput();
+				datasetinputinput->Demarshall(&marshalled_dataset);
+				dataset->AddObject(datasetinputinput);}
+				break;
 			case TriaVertexElementResultEnum:{
 				TriaVertexElementResult* triavertexelementresult=NULL;
Index: /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
===================================================================
--- /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 8591)
+++ /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 8592)
@@ -455,5 +455,6 @@
 	ReferenceTemperatureEnum,
 	ThicknessAbsGradientEnum,
-	VelAbsGradientEnum
+	VelAbsGradientEnum,
+	DatasetInputEnum
 };
 
Index: /issm/trunk/src/c/Makefile.am
===================================================================
--- /issm/trunk/src/c/Makefile.am	(revision 8591)
+++ /issm/trunk/src/c/Makefile.am	(revision 8592)
@@ -220,4 +220,6 @@
 					./objects/Inputs/ControlInput.h\
 					./objects/Inputs/ControlInput.cpp\
+					./objects/Inputs/DatasetInput.h\
+					./objects/Inputs/DatasetInput.cpp\
 					./objects/Elements/Penta.h\
 					./objects/Elements/Penta.cpp\
@@ -887,4 +889,6 @@
 					./objects/Inputs/ControlInput.h\
 					./objects/Inputs/ControlInput.cpp\
+					./objects/Inputs/DatasetInput.h\
+					./objects/Inputs/DatasetInput.cpp\
 					./objects/Elements/Penta.h\
 					./objects/Elements/Penta.cpp\
Index: /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp
===================================================================
--- /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 8591)
+++ /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 8592)
@@ -399,4 +399,5 @@
 		case ThicknessAbsGradientEnum : return "ThicknessAbsGradient";
 		case VelAbsGradientEnum : return "VelAbsGradient";
+		case DatasetInputEnum : return "DatasetInput";
 		default : return "unknown";
 
Index: /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp
===================================================================
--- /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 8591)
+++ /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 8592)
@@ -397,4 +397,5 @@
 	else if (strcmp(name,"ThicknessAbsGradient")==0) return ThicknessAbsGradientEnum;
 	else if (strcmp(name,"VelAbsGradient")==0) return VelAbsGradientEnum;
+	else if (strcmp(name,"DatasetInput")==0) return DatasetInputEnum;
 	else _error_("Enum %s not found",name);
 
Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 8591)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 8592)
@@ -4599,5 +4599,5 @@
 
 		if(control_type[i]==RheologyBbarEnum){
-			if (!IsOnBed()) return;
+			if (!IsOnBed()) goto cleanup_and_return;
 			input=(Input*)matice->inputs->GetInput(RheologyBEnum); _assert_(input);
 		}
@@ -4618,4 +4618,5 @@
 
 	/*Clean up and return*/
+cleanup_and_return:
 	xfree((void**)&control_type);
 }
@@ -4946,8 +4947,4 @@
 		for(i=0;i<6;i++)nodeinputs[i]=iomodel->vz_obs[penta_vertex_ids[i]-1]/iomodel->yts;
 		this->inputs->AddInput(new PentaVertexInput(VzObsEnum,nodeinputs));
-	}
-	if (iomodel->weights) {
-		for(i=0;i<6;i++)nodeinputs[i]=iomodel->weights[penta_vertex_ids[i]-1];
-		this->inputs->AddInput(new PentaVertexInput(WeightsEnum,nodeinputs));
 	}
 	if (iomodel->elementoniceshelf) this->inputs->AddInput(new BoolInput(ElementOnIceShelfEnum,(IssmBool)iomodel->elementoniceshelf[index]));
@@ -5031,4 +5028,17 @@
 	}
 
+	/*DatasetInputs*/
+	if (iomodel->weights) {
+
+		/*Create inputs and add to DataSetInput*/
+		DatasetInput* datasetinput=new DatasetInput(WeightsEnum);
+		for(j=0;j<iomodel->num_cm_responses;j++){
+			for(i=0;i<6;i++)nodeinputs[i]=iomodel->weights[penta_vertex_ids[i]-1];
+			datasetinput->inputs->AddObject(new PentaVertexInput(WeightsEnum,nodeinputs));
+		}
+
+		/*Add datasetinput to element inputs*/
+		this->inputs->AddInput(datasetinput);
+	}
 }
 /*}}}*/
Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 8591)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 8592)
@@ -1630,5 +1630,5 @@
 		thickness_input->GetParameterDerivativeValue(&dH[0],&xyz_list[0][0],gauss);
 		thicknessobs_input->GetParameterValue(&thicknessobs, gauss);
-		weights_input->GetParameterValue(&weight, gauss);
+		weights_input->GetParameterValue(&weight, gauss,0);
 
 		for(i=0;i<numdof;i++) pe->values[i]+=(thicknessobs-thickness)*weight*Jdet*gauss->weight*l1l2l3[i];
@@ -1677,5 +1677,5 @@
 	GetParameterListOnVertices(&vx_list[0],VxEnum);
 	GetParameterListOnVertices(&vy_list[0],VyEnum);
-	GetParameterListOnVertices(&weights_list[0],WeightsEnum);
+	GetParameterListOnVertices(&weights_list[0],WeightsEnum,0,0);
 	inputs->GetParameterValue(&response,CmResponseEnum);
 	if(response==SurfaceAverageVelMisfitEnum){
@@ -1857,5 +1857,5 @@
 	GetParameterListOnVertices(&vx_list[0],VxEnum);
 	GetParameterListOnVertices(&vy_list[0],VyEnum);
-	GetParameterListOnVertices(&weights_list[0],WeightsEnum);
+	GetParameterListOnVertices(&weights_list[0],WeightsEnum,0,0);
 	inputs->GetParameterValue(&response,CmResponseEnum);
 	if(response==SurfaceAverageVelMisfitEnum){
@@ -2184,6 +2184,6 @@
 	GetVerticesCoordinates(&xyz_list[0][0], nodes, NUMVERTICES);
 	Input* surface_mass_balance_input=inputs->GetInput(SurfaceMassBalanceEnum); _assert_(surface_mass_balance_input);
-	Input* basal_melting_input=inputs->GetInput(BasalMeltingRateEnum);           _assert_(basal_melting_input);
-	Input* thickness_input=inputs->GetInput(ThicknessEnum);           _assert_(thickness_input);
+	Input* basal_melting_input=inputs->GetInput(BasalMeltingRateEnum);          _assert_(basal_melting_input);
+	Input* thickness_input=inputs->GetInput(ThicknessEnum);                     _assert_(thickness_input);
 
 	/* Start  looping on the number of gaussian points: */
@@ -2558,4 +2558,30 @@
 			gauss->GaussVertex(iv);
 			input->GetParameterValue(&pvalue[iv],gauss);
+		}
+	}
+	else{
+		for (int iv=0;iv<NUMVERTICES;iv++) pvalue[iv]=defaultvalue;
+	}
+
+	/*clean-up*/
+	delete gauss;
+}
+/*}}}*/
+/*FUNCTION Tria::GetParameterListOnVertices(double* pvalue,int enumtype,double defaultvalue,int index) TO BE REMOVED{{{1*/
+void Tria::GetParameterListOnVertices(double* pvalue,int enumtype,double defaultvalue,int index){
+
+	double     value[NUMVERTICES];
+	GaussTria *gauss = NULL;
+	Input     *input = inputs->GetInput(enumtype);
+
+	/*Checks in debugging mode*/
+	_assert_(pvalue);
+
+	/* Start looping on the number of vertices: */
+	if (input){
+		gauss=new GaussTria();
+		for (int iv=0;iv<NUMVERTICES;iv++){
+			gauss->GaussVertex(iv);
+			input->GetParameterValue(&pvalue[iv],gauss,index);
 		}
 	}
@@ -3518,8 +3544,5 @@
 		this->inputs->AddInput(new TriaVertexInput(VzObsEnum,nodeinputs));
 	}
-	if (iomodel->weights) {
-		for(i=0;i<3;i++)nodeinputs[i]=iomodel->weights[tria_vertex_ids[i]-1];
-		this->inputs->AddInput(new TriaVertexInput(WeightsEnum,nodeinputs));
-	}
+
 	if (iomodel->elementoniceshelf) this->inputs->AddInput(new BoolInput(ElementOnIceShelfEnum,(IssmBool)iomodel->elementoniceshelf[index]));
 	if (iomodel->elementonbed) this->inputs->AddInput(new BoolInput(ElementOnBedEnum,(IssmBool)iomodel->elementonbed[index]));
@@ -3570,4 +3593,18 @@
 		}
 	}
+
+	/*DatasetInputs*/
+	if (iomodel->weights) {
+
+		/*Create inputs and add to DataSetInput*/
+		DatasetInput* datasetinput=new DatasetInput(WeightsEnum);
+		for(j=0;j<iomodel->num_cm_responses;j++){
+			for(i=0;i<3;i++)nodeinputs[i]=iomodel->weights[tria_vertex_ids[i]-1];
+			datasetinput->inputs->AddObject(new TriaVertexInput(WeightsEnum,nodeinputs));
+		}
+
+		/*Add datasetinput to element inputs*/
+		this->inputs->AddInput(datasetinput);
+	}
 }
 /*}}}*/
@@ -4831,5 +4868,5 @@
 	GetParameterListOnVertices(&vx_list[0],VxEnum);
 	GetParameterListOnVertices(&vy_list[0],VyEnum);
-	GetParameterListOnVertices(&weights_list[0],WeightsEnum);
+	GetParameterListOnVertices(&weights_list[0],WeightsEnum,0,0);
 
 	/*retrieve some parameters: */
@@ -4941,5 +4978,5 @@
 	GetParameterListOnVertices(&vx_list[0],VxEnum);
 	GetParameterListOnVertices(&vy_list[0],VyEnum);
-	GetParameterListOnVertices(&weights_list[0],WeightsEnum);
+	GetParameterListOnVertices(&weights_list[0],WeightsEnum,0,0);
 
 	/*retrieve some parameters: */
@@ -5021,5 +5058,5 @@
 	GetParameterListOnVertices(&vx_list[0],VxEnum);
 	GetParameterListOnVertices(&vy_list[0],VyEnum);
-	GetParameterListOnVertices(&weights_list[0],WeightsEnum);
+	GetParameterListOnVertices(&weights_list[0],WeightsEnum,0,0);
 
 	/*retrieve some parameters: */
@@ -5104,5 +5141,5 @@
 	GetParameterListOnVertices(&vx_list[0],VxEnum);
 	GetParameterListOnVertices(&vy_list[0],VyEnum);
-	GetParameterListOnVertices(&weights_list[0],WeightsEnum);
+	GetParameterListOnVertices(&weights_list[0],WeightsEnum,0,0);
 
 	/*retrieve some parameters: */
@@ -5206,9 +5243,9 @@
 
 	/* Recover input data: */
+	GetParameterListOnVertices(&weights_list[0],WeightsEnum,0,0);
 	GetParameterListOnVertices(&obs_vx_list[0],VxObsEnum);
 	GetParameterListOnVertices(&obs_vy_list[0],VyObsEnum);
 	GetParameterListOnVertices(&vx_list[0],VxEnum);
 	GetParameterListOnVertices(&vy_list[0],VyEnum);
-	GetParameterListOnVertices(&weights_list[0],WeightsEnum);
 
 	/*retrieve some parameters: */
@@ -5304,5 +5341,5 @@
 		thickness_input->GetParameterDerivativeValue(&dH[0],&xyz_list[0][0],gauss);
 		thicknessobs_input->GetParameterValue(&thicknessobs,gauss);
-		weights_input->GetParameterValue(&weight,gauss);
+		weights_input->GetParameterValue(&weight,gauss,0);
 
 		/*compute ThicknessAbsMisfit*/
Index: /issm/trunk/src/c/objects/Elements/Tria.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.h	(revision 8591)
+++ /issm/trunk/src/c/objects/Elements/Tria.h	(revision 8592)
@@ -178,4 +178,5 @@
 		void    GetParameterListOnVertices(double* pvalue,int enumtype);
 		void    GetParameterListOnVertices(double* pvalue,int enumtype,double defaultvalue);
+		void    GetParameterListOnVertices(double* pvalue,int enumtype,double defaultvalue,int index); //TO BE REMOVED
 		void    GetParameterValue(double* pvalue,Node* node,int enumtype);
 		void	  GetSolutionFromInputsDiagnosticHoriz(Vec solution);
Index: /issm/trunk/src/c/objects/Inputs/BoolInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/BoolInput.h	(revision 8591)
+++ /issm/trunk/src/c/objects/Inputs/BoolInput.h	(revision 8592)
@@ -53,4 +53,6 @@
 		void GetParameterValue(double* pvalue,GaussTria* gauss);
 		void GetParameterValue(double* pvalue,GaussPenta* gauss);
+		void GetParameterValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
Index: /issm/trunk/src/c/objects/Inputs/ControlInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/ControlInput.h	(revision 8591)
+++ /issm/trunk/src/c/objects/Inputs/ControlInput.h	(revision 8592)
@@ -57,4 +57,6 @@
 		void GetParameterValue(double* pvalue,GaussTria* gauss);
 		void GetParameterValue(double* pvalue,GaussPenta* gauss);
+		void GetParameterValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
Index: /issm/trunk/src/c/objects/Inputs/DatasetInput.cpp
===================================================================
--- /issm/trunk/src/c/objects/Inputs/DatasetInput.cpp	(revision 8592)
+++ /issm/trunk/src/c/objects/Inputs/DatasetInput.cpp	(revision 8592)
@@ -0,0 +1,192 @@
+/*!\file DatasetInput.c
+ * \brief: implementation of the DatasetInput object
+ */
+/*Headers{{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include "stdio.h"
+#include <string.h>
+#include "../objects.h"
+#include "../../EnumDefinitions/EnumDefinitions.h"
+#include "../../shared/shared.h"
+#include "../../Container/Container.h"
+#include "../../include/include.h"
+/*}}}*/
+
+/*DatasetInput constructors and destructor*/
+/*FUNCTION DatasetInput::DatasetInput(){{{1*/
+DatasetInput::DatasetInput(){
+	enum_type=UNDEF;
+	inputs=NULL;
+	parameters=NULL;
+}
+/*}}}*/
+/*FUNCTION DatasetInput::DatasetInput(int in_enum_type) {{{1*/
+DatasetInput::DatasetInput(int in_enum_type){
+
+	enum_type  = in_enum_type;
+	inputs     = new Inputs();
+	parameters = NULL;
+}
+/*}}}*/
+/*FUNCTION DatasetInput::~DatasetInput(){{{1*/
+DatasetInput::~DatasetInput(){
+	delete inputs;
+	parameters=NULL; //do not delete parameters !!
+}
+/*}}}*/
+
+/*Object virtual functions definitions:*/
+		/*FUNCTION DatasetInput::Echo {{{1*/
+void DatasetInput::Echo(void){
+	this->DeepEcho();
+}
+/*}}}*/
+/*FUNCTION DatasetInput::DeepEcho{{{1*/
+void DatasetInput::DeepEcho(void){
+
+	printf("DatasetInput:\n");
+	printf("   enum: %i (%s)\n",this->enum_type,EnumToStringx(this->enum_type));
+	printf("---inputs: \n"); inputs->Echo();
+}
+/*}}}*/
+/*FUNCTION DatasetInput::Id{{{1*/
+int    DatasetInput::Id(void){ return -1; }
+/*}}}*/
+/*FUNCTION DatasetInput::MyRank{{{1*/
+int    DatasetInput::MyRank(void){ 
+	extern int my_rank;
+	return my_rank; 
+}
+/*}}}*/
+/*FUNCTION DatasetInput::Marshall{{{1*/
+void  DatasetInput::Marshall(char** pmarshalled_dataset){
+
+	char* marshalled_dataset=NULL;
+	char* marshalled_inputs=NULL;
+	int   marshalled_inputs_size;
+	int   enum_value=0;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*get enum value of DatasetInput: */
+	enum_value=DatasetInputEnum;
+	
+	/*marshall enum: */
+	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+	
+	/*marshall enum_type: */
+	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+
+	/*marshal inputs*/
+	marshalled_inputs_size=inputs->MarshallSize();
+	marshalled_inputs=inputs->Marshall();
+	memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));
+	marshalled_dataset+=marshalled_inputs_size;
+
+	/*parameters: don't do anything about it. parameters are marshalled somewhere else!*/
+
+	/*clean up and assign output pointer*/
+	xfree((void**)&marshalled_inputs);
+	*pmarshalled_dataset=marshalled_dataset;
+}
+/*}}}*/
+/*FUNCTION DatasetInput::MarshallSize{{{1*/
+int   DatasetInput::MarshallSize(){
+	
+	int size=0;
+
+	size=sizeof(enum_type)+
+	  +inputs->MarshallSize()
+	  +sizeof(int); //sizeof(int) for enum value
+
+	return size;
+}
+/*}}}*/
+/*FUNCTION DatasetInput::Demarshall{{{1*/
+void  DatasetInput::Demarshall(char** pmarshalled_dataset){
+	char* marshalled_dataset=NULL;
+
+	/*recover marshalled_dataset: */
+	marshalled_dataset=*pmarshalled_dataset;
+
+	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+	 *object data (thanks to DataSet::Demarshall):*/
+	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+
+	/*Demarshal values*/
+	inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset); 
+
+	/*parameters: may not exist even yet, so let Configure handle it: */
+	this->parameters=NULL;
+
+	/*return: */
+	*pmarshalled_dataset=marshalled_dataset;
+	return;
+}
+/*}}}*/
+/*FUNCTION DatasetInput::Enum{{{1*/
+int DatasetInput::Enum(void){
+
+	return DatasetInputEnum;
+
+}
+/*}}}*/
+/*FUNCTION DatasetInput::copy{{{1*/
+Object* DatasetInput::copy() {
+	
+	DatasetInput* output=NULL;
+
+	output = new DatasetInput();
+	output->enum_type=this->enum_type;
+	output->inputs=(Inputs*)this->inputs->Copy();
+
+	return output;
+}
+/*}}}*/
+/*FUNCTION DatasetInput::SpawnTriaInput{{{1*/
+Input* DatasetInput::SpawnTriaInput(int* indices){
+
+	/*output*/
+	DatasetInput* outinput=NULL;
+
+	/*Create new Datasetinput (copy of current input)*/
+	outinput=new DatasetInput();
+	outinput->enum_type=this->enum_type;
+	outinput->inputs=(Inputs*)this->inputs->SpawnTriaInputs(indices);
+
+	/*Assign output*/
+	return outinput;
+}
+/*}}}*/
+	
+/*DatasetInput management*/
+/*FUNCTION DatasetInput::EnumType{{{1*/
+int DatasetInput::EnumType(void){
+
+	return this->enum_type;
+
+}
+/*}}}*/
+
+/*Object functions*/
+/*FUNCTION DatasetInput::Configure{{{1*/
+void DatasetInput::Configure(Parameters* parameters){
+	/*do nothing: */
+}
+/*}}}*/
+/*FUNCTION DatasetInput::GetParameterValue(double* pvalue,GaussTria* gauss,int index){{{1*/
+void DatasetInput::GetParameterValue(double* pvalue,GaussTria* gauss,int index){
+
+	/*Get requested input within dataset*/
+	if(index<0 || index > inputs->Size()-1) _error_("index requested (%i) exceeds dataset size (%i)",index,inputs->Size());
+	Input* input=(Input*)this->inputs->GetObjectByOffset(index);
+	
+	input->GetParameterValue(pvalue,gauss);
+}
+/*}}}*/
Index: /issm/trunk/src/c/objects/Inputs/DatasetInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/DatasetInput.h	(revision 8592)
+++ /issm/trunk/src/c/objects/Inputs/DatasetInput.h	(revision 8592)
@@ -0,0 +1,94 @@
+/*! \file DatasetInput.h 
+ *  \brief: header file for triavertexinput object
+ */
+
+
+#ifndef _DATASETINPUT_H_
+#define _DATASETINPUT_H_
+
+/*Headers:*/
+/*{{{1*/
+#include "./Input.h"
+#include "../../include/include.h"
+class GaussTria;
+/*}}}*/
+
+class DatasetInput: public Input{
+
+	public:
+		int    enum_type;
+
+		Inputs*     inputs;
+		Parameters* parameters; //to find current time or step
+
+		/*DatasetInput constructors, destructors: {{{1*/
+		DatasetInput();
+		DatasetInput(int enum_type);
+		~DatasetInput();
+		/*}}}*/
+		/*Object virtual functions definitions:{{{1 */
+		void  Echo();
+		void  DeepEcho();
+		int   Id();
+		int   MyRank();
+		void  Marshall(char** pmarshalled_dataset);
+		int   MarshallSize();
+		void  Demarshall(char** pmarshalled_dataset);
+		int   Enum();
+		Object* copy();
+		/*}}}*/
+		/*DatasetInput management: {{{1*/
+		int    EnumType();
+		Input* SpawnTriaInput(int* indices);
+		Input* PointwiseDivide(Input* inputB){_error_("not implemented yet");};
+		Input* PointwiseMin(Input* inputB){_error_("not implemented yet");};
+		Input* PointwiseMax(Input* inputB){_error_("not implemented yet");};
+		ElementResult* SpawnResult(int step, double time){_error_("not implemented yet");};
+		void AddTimeValues(double* values,int step,double time){_error_("not supported yet");};
+		void Configure(Parameters* parameters);
+		/*}}}*/
+		/*numerics: {{{1*/
+		void GetParameterValue(bool* pvalue){_error_("not implemented yet");};
+		void GetParameterValue(int* pvalue){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussTria* gauss){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussTria* gauss ,int index);
+		void GetParameterValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
+		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetParameterAverage(double* pvalue){_error_("not implemented yet");};
+		void GetVxStrainRate2d(double* epsilonvx,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate2d(double* epsilonvy,double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
+		void GetVxStrainRate3d(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate3d(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVzStrainRate3d(double* epsilonvz,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVxStrainRate3dPattyn(double* epsilonvx,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void GetVyStrainRate3dPattyn(double* epsilonvy,double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
+		void ChangeEnum(int newenumtype){_error_("not implemented yet");};
+		void SquareMin(double* psquaremin, bool process_units,Parameters* parameters){_error_("not implemented yet");};
+		void ConstrainMin(double minimum){_error_("not implemented yet");};
+		void Scale(double scale_factor){_error_("not implemented yet");};
+		void ArtificialNoise(double min,double max){_error_("not implemented yet");};
+		void AXPY(Input* xinput,double scalar){_error_("not implemented yet");};
+		void Constrain(void){_error_("not implemented yet");};
+		void Constrain(double min,double max){_error_("not implemented yet");};
+		double InfinityNorm(void){_error_("not implemented yet");};
+		double Max(void){_error_("not implemented yet");};
+		double MaxAbs(void){_error_("not implemented yet");};
+		double Min(void){_error_("not implemented yet");};
+		double MinAbs(void){_error_("not implemented yet");};
+		void Extrude(void){_error_("not implemented yet");};
+		void VerticallyIntegrate(Input* thickness_input){_error_("not implemented yet");};
+		void GetVectorFromInputs(Vec vector,int* doflist){_error_("not implemented yet");};
+		void GetValuesPtr(double** pvalues,int* pnum_values){_error_("not implemented yet");};
+		ElementResult* SpawnGradient(int step, double time){_error_("not implemented yet");};
+		void GetGradient(Vec gradient_vec,int* doflist){_error_("not implemented yet");};
+		void ScaleGradient(double scale){_error_("not implemented yet");};
+		void SetGradient(Input* gradient_in){_error_("not implemented yet");};
+		void UpdateValue(double scalar){_error_("not implemented yet");};
+		void SaveValue(void){_error_("not implemented yet");};
+		/*}}}*/
+
+};
+#endif  /* _DATASETINPUT_H */
Index: /issm/trunk/src/c/objects/Inputs/DoubleInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/DoubleInput.h	(revision 8591)
+++ /issm/trunk/src/c/objects/Inputs/DoubleInput.h	(revision 8592)
@@ -52,4 +52,6 @@
 		void GetParameterValue(double* pvalue,GaussTria* gauss);
 		void GetParameterValue(double* pvalue,GaussPenta* gauss);
+		void GetParameterValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
Index: /issm/trunk/src/c/objects/Inputs/Input.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/Input.h	(revision 8591)
+++ /issm/trunk/src/c/objects/Inputs/Input.h	(revision 8592)
@@ -28,4 +28,6 @@
 		virtual void GetParameterValue(double* pvalue,GaussTria* gauss)=0;
 		virtual void GetParameterValue(double* pvalue,GaussPenta* gauss)=0;
+		virtual void GetParameterValue(double* pvalue,GaussTria* gauss ,int index)=0;
+		virtual void GetParameterValue(double* pvalue,GaussPenta* gauss,int index)=0;
 		virtual void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss)=0;
 		virtual void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss)=0;
Index: /issm/trunk/src/c/objects/Inputs/IntInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/IntInput.h	(revision 8591)
+++ /issm/trunk/src/c/objects/Inputs/IntInput.h	(revision 8592)
@@ -53,4 +53,6 @@
 		void GetParameterValue(double* pvalue,GaussTria* gauss);
 		void GetParameterValue(double* pvalue,GaussPenta* gauss);
+		void GetParameterValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
Index: /issm/trunk/src/c/objects/Inputs/PentaVertexForcing.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/PentaVertexForcing.h	(revision 8591)
+++ /issm/trunk/src/c/objects/Inputs/PentaVertexForcing.h	(revision 8592)
@@ -58,4 +58,6 @@
 		void GetParameterValue(double* pvalue,GaussTria* gauss);
 		void GetParameterValue(double* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
Index: /issm/trunk/src/c/objects/Inputs/PentaVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/PentaVertexInput.h	(revision 8591)
+++ /issm/trunk/src/c/objects/Inputs/PentaVertexInput.h	(revision 8592)
@@ -53,4 +53,6 @@
 		void GetParameterValue(double* pvalue,GaussTria* gauss){_error_("not implemented yet");};
 		void GetParameterValue(double* pvalue,GaussPenta* gauss);
+		void GetParameterValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss){_error_("not implemented yet");};
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss);
Index: /issm/trunk/src/c/objects/Inputs/TriaVertexForcing.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/TriaVertexForcing.h	(revision 8591)
+++ /issm/trunk/src/c/objects/Inputs/TriaVertexForcing.h	(revision 8592)
@@ -58,4 +58,6 @@
 		void GetParameterValue(double* pvalue,GaussTria* gauss);
 		void GetParameterValue(double* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussPenta* gauss ,int index){_error_("not implemented yet");};
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
Index: /issm/trunk/src/c/objects/Inputs/TriaVertexInput.h
===================================================================
--- /issm/trunk/src/c/objects/Inputs/TriaVertexInput.h	(revision 8591)
+++ /issm/trunk/src/c/objects/Inputs/TriaVertexInput.h	(revision 8592)
@@ -53,4 +53,6 @@
 		void GetParameterValue(double* pvalue,GaussTria* gauss);
 		void GetParameterValue(double* pvalue,GaussPenta* gauss){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussTria* gauss ,int index){_error_("not implemented yet");};
+		void GetParameterValue(double* pvalue,GaussPenta* gauss,int index){_error_("not implemented yet");};
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussTria* gauss);
 		void GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, GaussPenta* gauss){_error_("not implemented yet");};
Index: /issm/trunk/src/c/objects/IoModel.cpp
===================================================================
--- /issm/trunk/src/c/objects/IoModel.cpp	(revision 8591)
+++ /issm/trunk/src/c/objects/IoModel.cpp	(revision 8592)
@@ -169,4 +169,5 @@
 	/*Get control parameters: */
 	IoModelFetchData(&this->num_control_type,iomodel_handle,"num_control_type"); 
+	IoModelFetchData(&this->num_cm_responses,iomodel_handle,"num_cm_responses"); 
 
 	/*!Get solution parameters: */
Index: /issm/trunk/src/c/objects/IoModel.h
===================================================================
--- /issm/trunk/src/c/objects/IoModel.h	(revision 8591)
+++ /issm/trunk/src/c/objects/IoModel.h	(revision 8592)
@@ -133,4 +133,5 @@
 
 		/*control methods: */
+		int      num_cm_responses;
 		int      num_control_type;
 		double*  control_type;
Index: /issm/trunk/src/c/objects/objects.h
===================================================================
--- /issm/trunk/src/c/objects/objects.h	(revision 8591)
+++ /issm/trunk/src/c/objects/objects.h	(revision 8592)
@@ -89,4 +89,5 @@
 #include "./Inputs/TriaVertexForcing.h"
 #include "./Inputs/ControlInput.h"
+#include "./Inputs/DatasetInput.h"
 
 /*ElementResults: */
Index: /issm/trunk/src/m/classes/version/7.6/model.m
===================================================================
--- /issm/trunk/src/m/classes/version/7.6/model.m	(revision 8591)
+++ /issm/trunk/src/m/classes/version/7.6/model.m	(revision 8592)
@@ -223,5 +223,4 @@
 		 control_analysis=0;
 		 control_type=0;
-		 num_control_type=0;
 		 weights=[];
 		 nsteps=0;
@@ -252,5 +251,4 @@
 		 %debugging
 		 verbose=0;
-		 verbose_binary=0;
 		 element_debug=0;
 		 element_debugid=NaN;
@@ -399,4 +397,6 @@
 		 accumulation_rate;
 		 hydro_gamma;
+		 num_control_type;
+		 verbose_binary;
 		 % }}}
 	 end
Index: /issm/trunk/src/m/classes/version/7.7/model.m
===================================================================
--- /issm/trunk/src/m/classes/version/7.7/model.m	(revision 8591)
+++ /issm/trunk/src/m/classes/version/7.7/model.m	(revision 8592)
@@ -223,5 +223,4 @@
 		 control_analysis=0;
 		 control_type=0;
-		 num_control_type=0;
 		 weights=[];
 		 nsteps=0;
@@ -252,5 +251,4 @@
 		 %debugging
 		 verbose=0;
-		 verbose_binary=0;
 		 element_debug=0;
 		 element_debugid=NaN;
@@ -399,4 +397,6 @@
 		 accumulation_rate;
 		 hydro_gamma;
+		 num_control_type;
+		 verbose_binary;
 		 % }}}
 	 end
Index: /issm/trunk/src/m/enum/DatasetInputEnum.m
===================================================================
--- /issm/trunk/src/m/enum/DatasetInputEnum.m	(revision 8592)
+++ /issm/trunk/src/m/enum/DatasetInputEnum.m	(revision 8592)
@@ -0,0 +1,11 @@
+function macro=DatasetInputEnum()
+%DATASETINPUTENUM - Enum of DatasetInput
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
+%            Please read src/c/EnumDefinitions/README for more information
+%
+%   Usage:
+%      macro=DatasetInputEnum()
+
+macro=StringToEnum('DatasetInput');
Index: /issm/trunk/src/m/model/marshall.m
===================================================================
--- /issm/trunk/src/m/model/marshall.m	(revision 8591)
+++ /issm/trunk/src/m/model/marshall.m	(revision 8592)
@@ -34,5 +34,4 @@
 WriteData(fid,md.nodeonhutter,'Mat','nodeonhutter');
 WriteData(fid,md.nodeonmacayeal,'Mat','nodeonmacayeal');
-
 if md.dim==3,
 	WriteData(fid,md.numberofelements2d,'Integer','numberofelements2d');
@@ -51,5 +50,4 @@
 WriteData(fid,md.borderstokes,'Mat','borderstokes');
 
-
 WriteData(fid,md.thickness,'Mat','thickness');
 WriteData(fid,md.thickness_coeff,'Mat','thickness_coeff');
@@ -67,5 +65,4 @@
 WriteData(fid,md.temperature,'Mat','temperature');
 WriteData(fid,md.waterfraction,'Mat','waterfraction');
-
 
 WriteData(fid,md.drag_type,'Integer','drag_type');
@@ -154,5 +151,6 @@
 %Control methods
 WriteData(fid,md.control_analysis,'Integer','control_analysis');
-WriteData(fid,md.num_control_type,'Integer','num_control_type');
+WriteData(fid,numel(md.control_type),'Integer','num_control_type');
+WriteData(fid,size(md.cm_responses,2),'Integer','num_cm_responses');
 WriteData(fid,md.control_type,'Mat','control_type');
 
@@ -164,5 +162,5 @@
 WriteData(fid,md.meanvel,'Scalar','meanvel');
 WriteData(fid,md.epsvel,'Scalar','epsvel');
-WriteData(fid,md.verbose_binary,'Integer','verbose_binary');
+WriteData(fid,VerboseToBinary(md.verbose),'Integer','verbose_binary');
 WriteData(fid,md.output_frequency,'Integer','output_frequency');
 WriteData(fid,md.artificial_diffusivity,'Integer','artificial_diffusivity');
Index: /issm/trunk/src/m/model/presolve.m
===================================================================
--- /issm/trunk/src/m/model/presolve.m	(revision 8591)
+++ /issm/trunk/src/m/model/presolve.m	(revision 8592)
@@ -8,14 +8,4 @@
 md.inputfilename=[md.name '.bin'];
 md.outputfilename=[md.name '.outbin'];
-
-%verbose;
-md.verbose_binary=VerboseToBinary(md.verbose);
-
-%deal with control methods
-if ~md.control_analysis
-	md.num_control_type=0;
-else
-	md.num_control_type=numel(md.control_type);
-end
 
 %deal with rifts.
Index: /issm/trunk/src/m/solutions/NewFemModel.m
===================================================================
--- /issm/trunk/src/m/solutions/NewFemModel.m	(revision 8591)
+++ /issm/trunk/src/m/solutions/NewFemModel.m	(revision 8592)
@@ -10,5 +10,5 @@
 
 	%Set verbosity
-	SetVerbosityLevel(md.verbose_binary);
+	SetVerbosityLevel(VerboseToBinary(md.verbose));
 
    %Dynamically allocate whatever is a list of length nummodels: */
Index: /issm/trunk/src/mex/Makefile.am
===================================================================
--- /issm/trunk/src/mex/Makefile.am	(revision 8591)
+++ /issm/trunk/src/mex/Makefile.am	(revision 8592)
@@ -28,5 +28,4 @@
 				InputControlUpdate \
 				InputConvergence\
-				GetPId\
 				GetSolutionFromInputs\
 				GetVectorFromInputs\
@@ -177,7 +176,4 @@
 			  StringToEnum/StringToEnum.h
 
-GetPId_SOURCES = GetPId/GetPId.cpp\
-					  GetPId/GetPId.h
-
 GetSolutionFromInputs_SOURCES = GetSolutionFromInputs/GetSolutionFromInputs.cpp\
 			  GetSolutionFromInputs/GetSolutionFromInputs.h
