Index: /issm/trunk/src/c/DataSet/DataSet.cpp
===================================================================
--- /issm/trunk/src/c/DataSet/DataSet.cpp	(revision 3701)
+++ /issm/trunk/src/c/DataSet/DataSet.cpp	(revision 3702)
@@ -17,4 +17,5 @@
 
 #include "./DataSet.h"
+#include "../objects/objects.h"
 #include "../shared/shared.h"
 #include "../include/macros.h"
@@ -23,7 +24,7 @@
 using namespace std;
 /*}}}*/
-/*DataSet: {{{1*/
+
 /*Constructors/Destructors*/
-/*FUNCTION DataSet::DataSet(){{{2*/
+/*FUNCTION DataSet::DataSet(){{{1*/
 DataSet::DataSet(){
 	
@@ -34,5 +35,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::DataSet(int dataset_enum){{{2*/
+/*FUNCTION DataSet::DataSet(int dataset_enum){{{1*/
 DataSet::DataSet(int dataset_enum){
 	enum_type=dataset_enum;
@@ -44,5 +45,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::Copy{{{2*/
+/*FUNCTION DataSet::Copy{{{1*/
 DataSet*   DataSet::Copy(void){
 
@@ -75,5 +76,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::~DataSet{{{2*/
+/*FUNCTION DataSet::~DataSet{{{1*/
 DataSet::~DataSet(){
 	clear();
@@ -84,5 +85,5 @@
 
 /*I/O*/
-/*FUNCTION DataSet::Marshall{{{2*/
+/*FUNCTION DataSet::Marshall{{{1*/
 char* DataSet::Marshall(){
 
@@ -131,5 +132,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::MarshallSize{{{2*/
+/*FUNCTION DataSet::MarshallSize{{{1*/
 int DataSet::MarshallSize(){
 
@@ -152,5 +153,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::Demarshall{{{2*/
+/*FUNCTION DataSet::Demarshall{{{1*/
 DataSet* DataSetDemarshall(char* marshalled_dataset){
 
@@ -159,5 +160,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::DemarshallRaw{{{2*/
+/*FUNCTION DataSet::DemarshallRaw{{{1*/
 DataSet* DataSetDemarshallRaw(char** pmarshalled_dataset){
 
@@ -311,5 +312,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::Spawn{{{2*/
+/*FUNCTION DataSet::Spawn{{{1*/
 DataSet* DataSet::Spawn(int* indices, int num){
 	ISSMERROR(" not supported yet!");
@@ -318,5 +319,5 @@
 
 /*Specific methods*/
-/*FUNCTION DataSet::AddObject{{{2*/
+/*FUNCTION DataSet::AddObject{{{1*/
 int  DataSet::AddObject(Object* object){
 
@@ -326,5 +327,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::clear{{{2*/
+/*FUNCTION DataSet::clear{{{1*/
 void  DataSet::clear(){
 
@@ -337,5 +338,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::DeleteObject{{{2*/
+/*FUNCTION DataSet::DeleteObject{{{1*/
 int  DataSet::DeleteObject(Object* object){
 
@@ -350,5 +351,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::DeepEcho{{{2*/
+/*FUNCTION DataSet::DeepEcho{{{1*/
 void DataSet::DeepEcho(){
 
@@ -369,5 +370,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::Echo{{{2*/
+/*FUNCTION DataSet::Echo{{{1*/
 void DataSet::Echo(){
 
@@ -388,5 +389,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::FindResult(Vec* presult,char* name){{{2*/
+/*FUNCTION DataSet::FindResult(Vec* presult,char* name){{{1*/
 int   DataSet::FindResult(Vec* presult,char* name){
 
@@ -418,5 +419,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::FindResult(void* pvalue, char* name){{{2*/
+/*FUNCTION DataSet::FindResult(void* pvalue, char* name){{{1*/
 int   DataSet::FindResult(void* pvalue, char* name){
 
@@ -450,10 +451,10 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::GetEnum{{{2*/
+/*FUNCTION DataSet::GetEnum{{{1*/
 int  DataSet::GetEnum(){
 	return enum_type;
 }
 /*}}}*/
-/*FUNCTION DataSet::GetEnum(int offset){{{2*/
+/*FUNCTION DataSet::GetEnum(int offset){{{1*/
 int   DataSet::GetEnum(int offset){
 
@@ -462,5 +463,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::GetObjectByOffset{{{2*/
+/*FUNCTION DataSet::GetObjectByOffset{{{1*/
 Object* DataSet::GetObjectByOffset(int offset){
 
@@ -469,5 +470,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::GetObjectById{{{2*/
+/*FUNCTION DataSet::GetObjectById{{{1*/
 Object* DataSet::GetObjectById(int* poffset,int eid){
 
@@ -493,5 +494,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::Ranks{{{2*/
+/*FUNCTION DataSet::Ranks{{{1*/
 void   DataSet::Ranks(int* ranks){
 
@@ -516,5 +517,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::Presort{{{2*/
+/*FUNCTION DataSet::Presort{{{1*/
 void DataSet::Presort(){
 
@@ -536,5 +537,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::SetSorting{{{2*/
+/*FUNCTION DataSet::SetSorting{{{1*/
 void DataSet::SetSorting(int* in_sorted_ids,int* in_id_offsets){
 
@@ -544,5 +545,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::Size{{{2*/
+/*FUNCTION DataSet::Size{{{1*/
 int  DataSet::Size(void){
 
@@ -550,5 +551,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::Sort{{{2*/
+/*FUNCTION DataSet::Sort{{{1*/
 void DataSet::Sort(){
 
@@ -561,5 +562,5 @@
 
 /*Objects methods*/
-/*FUNCTION DataSet::ComputeBasalStress{{{2*/
+/*FUNCTION DataSet::ComputeBasalStress{{{1*/
 void DataSet::ComputeBasalStress(Vec sigma_b,int analysis_type,int sub_analysis_type){
 
@@ -578,5 +579,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::ComputePressure{{{2*/
+/*FUNCTION DataSet::ComputePressure{{{1*/
 void DataSet::ComputePressure(Vec p_g,int analysis_type,int sub_analysis_type){
 
@@ -595,5 +596,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::ComputeStrainRate{{{2*/
+/*FUNCTION DataSet::ComputeStrainRate{{{1*/
 void DataSet::ComputeStrainRate(Vec eps,int analysis_type,int sub_analysis_type){
 
@@ -612,5 +613,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::Configure{{{2*/
+/*FUNCTION DataSet::Configure{{{1*/
 void DataSet::Configure(DataSet* elements,DataSet* loads, DataSet* nodes, DataSet* vertices, DataSet* materials,Parameters* parameters){
 
@@ -640,5 +641,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::CostFunction{{{2*/
+/*FUNCTION DataSet::CostFunction{{{1*/
 void  DataSet::CostFunction(double* pJ,int analysis_type,int sub_analysis_type){
 
@@ -663,5 +664,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::CreateKMatrix{{{2*/
+/*FUNCTION DataSet::CreateKMatrix{{{1*/
 void  DataSet::CreateKMatrix(Mat Kgg,int analysis_type,int sub_analysis_type){
 
@@ -686,5 +687,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::CreatePartitioningVector{{{2*/
+/*FUNCTION DataSet::CreatePartitioningVector{{{1*/
 void  DataSet::CreatePartitioningVector(Vec* ppartition,int numberofobjects){
 
@@ -714,5 +715,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::CreatePVector{{{2*/
+/*FUNCTION DataSet::CreatePVector{{{1*/
 void  DataSet::CreatePVector(Vec pg,int analysis_type,int sub_analysis_type){
 
@@ -737,5 +738,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::DistributeDofs{{{2*/
+/*FUNCTION DataSet::DistributeDofs{{{1*/
 void  DataSet::DistributeDofs(int numberofobjects,int numberofdofsperobject){
 
@@ -819,5 +820,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::Du{{{2*/
+/*FUNCTION DataSet::Du{{{1*/
 void  DataSet::Du(Vec du_g,int analysis_type,int sub_analysis_type){
 
@@ -838,5 +839,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::FieldAverageOntoVertices{{{2*/
+/*FUNCTION DataSet::FieldAverageOntoVertices{{{1*/
 void DataSet::FieldAverageOntoVertices(Vec fieldsum,Vec connectivity,double* field){
 
@@ -855,5 +856,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::FieldDepthAverageAtBase{{{2*/
+/*FUNCTION DataSet::FieldDepthAverageAtBase{{{1*/
 void  DataSet::FieldDepthAverageAtBase(Vec field,double* field_serial,char* fieldname){
 
@@ -872,5 +873,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::FieldExtrude{{{2*/
+/*FUNCTION DataSet::FieldExtrude{{{1*/
 void  DataSet::FieldExtrude(Vec field,double* field_serial,char* field_name, int collapse){
 
@@ -897,5 +898,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::FlagClones{{{2*/
+/*FUNCTION DataSet::FlagClones{{{1*/
 void  DataSet::FlagClones(int numberofobjects){
 
@@ -938,5 +939,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::FlagNodeSets{{{2*/
+/*FUNCTION DataSet::FlagNodeSets{{{1*/
 void DataSet::FlagNodeSets(Vec pv_g, Vec pv_m, Vec pv_n, Vec pv_f, Vec pv_s){
 
@@ -975,5 +976,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::Gradj{{{2*/
+/*FUNCTION DataSet::Gradj{{{1*/
 void  DataSet::Gradj(Vec grad_g,int analysis_type,int sub_analysis_type,char* control_type){
 
@@ -994,5 +995,5 @@
 }		
 /*}}}*/
-/*FUNCTION DataSet::MeltingIsPresent{{{2*/
+/*FUNCTION DataSet::MeltingIsPresent{{{1*/
 int   DataSet::MeltingIsPresent(){
 
@@ -1019,5 +1020,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::MeltingConstraints{{{2*/
+/*FUNCTION DataSet::MeltingConstraints{{{1*/
 void  DataSet::MeltingConstraints(int* pconverged, int* pnum_unstable_constraints,int analysis_type,int sub_analysis_type){
 
@@ -1061,5 +1062,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::Misfit{{{2*/
+/*FUNCTION DataSet::Misfit{{{1*/
 void  DataSet::Misfit(double* pJ,int analysis_type,int sub_analysis_type){
 
@@ -1084,5 +1085,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::NumberOfDofs{{{2*/
+/*FUNCTION DataSet::NumberOfDofs{{{1*/
 int   DataSet::NumberOfDofs(){
 
@@ -1116,5 +1117,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::NumberOfRgbs{{{2*/
+/*FUNCTION DataSet::NumberOfRgbs{{{1*/
 int   DataSet::NumberOfRgbs(){
 
@@ -1136,5 +1137,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::OutputRifts{{{2*/
+/*FUNCTION DataSet::OutputRifts{{{1*/
 void  DataSet::OutputRifts(Vec riftproperties){
 
@@ -1155,5 +1156,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::PenaltyCreateKMatrix{{{2*/
+/*FUNCTION DataSet::PenaltyCreateKMatrix{{{1*/
 void  DataSet::PenaltyCreateKMatrix(Mat Kgg,double kmax,int analysis_type,int sub_analysis_type){
 
@@ -1172,5 +1173,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::PenaltyCreatePVector{{{2*/
+/*FUNCTION DataSet::PenaltyCreatePVector{{{1*/
 void  DataSet::PenaltyCreatePVector(Vec pg,double kmax,int analysis_type,int sub_analysis_type){
 
@@ -1189,5 +1190,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::RiftIsPresent{{{2*/
+/*FUNCTION DataSet::RiftIsPresent{{{1*/
 int   DataSet::RiftIsPresent(){
 
@@ -1217,5 +1218,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::SetupMpcs{{{2*/
+/*FUNCTION DataSet::SetupMpcs{{{1*/
 void DataSet::SetupMpcs(Mat Rmg,DataSet* nodes){
 
@@ -1285,5 +1286,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::SetupSpcs{{{2*/
+/*FUNCTION DataSet::SetupSpcs{{{1*/
 void   DataSet::SetupSpcs(DataSet* nodes,Vec yg){
 
@@ -1324,8 +1325,8 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::SurfaceArea{{{2*/
+/*FUNCTION DataSet::SurfaceArea{{{1*/
 void  DataSet::SurfaceArea(double* pS,int analysis_type,int sub_analysis_type){
 
-	double S=0;;
+	double S=0;
 
 	vector<Object*>::iterator object;
@@ -1347,8 +1348,26 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::UpdateInputsFromVector{{{2*/
-void  DataSet::UpdateInputsFromVector(double* vector, int name, int type){
-
-	vector<Object*>::iterator object;
+/*FUNCTION DataSet::UpdateInputsFromSolution{{{1*/
+void  DataSet::UpdateInputsFromSolution(double* solution, int analysis_type, int sub_analysis_type){
+
+	vector<Object*>::iterator object;
+	Element* element=NULL;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		if(EnumIsElement((*object)->Enum())){
+
+			element=(Element*)(*object);
+			element->UpdateInputsFromSolution(solution,analysis_type,sub_analysis_type);
+		}
+		else ISSMERROR("%s%i%s"," object with id: ",(*object)->Id()," is not an element, in a function that deals only with elements!");
+	}
+}
+/*}}}*/
+/*FUNCTION DataSet::UpdateInputsFromVector{{{1*/
+void  DataSet::UpdateInputsFromVector(double* vec, int name, int type){
+
+	vector<Object*>::iterator object;
+	
 	Element* element=NULL;
 	Node* node=NULL;
@@ -1356,5 +1375,5 @@
 	Load* load=NULL;
 	Material* material=NULL;
-	Param* param=NULL:
+	Param* param=NULL;
 
 	for ( object=objects.begin() ; object < objects.end(); object++ ){
@@ -1363,30 +1382,30 @@
 
 			element=(Element*)(*object);
-			element->UpdateInputsFromVector(vector,name,type);
+			element->UpdateInputsFromVector(vec,name,type);
 		}
 		else if(((*object)->Enum()==NodeEnum)){
 
 			node=(Node*)(*object);
-			node->UpdateInputsFromVector(vector,name,type);
+			node->UpdateInputsFromVector(vec,name,type);
 		}
 		else if(((*object)->Enum()==VertexEnum)){
 
 			vertex=(Vertex*)(*object);
-			vertex->UpdateInputsFromVector(vector,name,type);
+			vertex->UpdateInputsFromVector(vec,name,type);
 		}
 		else if(EnumIsLoad((*object)->Enum())){
 
 			load=(Load*)(*object);
-			load->UpdateInputsFromVector(vector,name,type);
+			load->UpdateInputsFromVector(vec,name,type);
 		}
 		else if(EnumIsMaterial((*object)->Enum())){
 
 			material=(Material*)(*object);
-			material->UpdateInputsFromVector(vector,name,type);
+			material->UpdateInputsFromVector(vec,name,type);
 		}
 		else if(((*object)->Enum()==ParamEnum)){
 
 			param=(Param*)(*object);
-			param->UpdateInputsFromVector(vector,name,type);
+			param->UpdateInputsFromVector(vec,name,type);
 		}
 		else ISSMERROR("%s%i%s"," object with id: ",(*object)->Id()," is not an element, in a function that deals only with elements!");
@@ -1394,22 +1413,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::UpdateInputsFromSolution{{{2*/
-void  DataSet::UpdateInputsFromSolution(double* solution, int analysis_type, int sub_analysis_type){
-
-	vector<Object*>::iterator object;
-	Element* element=NULL;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		if(EnumIsElement((*object)->Enum())){
-
-			element=(Element*)(*object);
-			element->UpdateInputsFromSolution(solution,analysis_type,sub_analysis_type);
-		}
-		else ISSMERROR("%s%i%s"," object with id: ",(*object)->Id()," is not an element, in a function that deals only with elements!");
-	}
-}
-/*}}}*/
-/*FUNCTION DataSet::AddInput{{{2*/
+/*FUNCTION DataSet::AddInput{{{1*/
 void  DataSet::AddInput(double value, int enum_type){
 
@@ -1428,5 +1430,5 @@
 }
 /*}}}*/
-/*FUNCTION DataSet::UpdateVertexPositions{{{2*/
+/*FUNCTION DataSet::UpdateVertexPositions{{{1*/
 void  DataSet::UpdateVertexPositions(double* thickness,double* bed){
 
@@ -1444,654 +1446,2 @@
 }
 /*}}}*/
-
-/*}}}*/
-/*Inputs: {{{1*/
-
-/*Object constructors and destructor*/
-/*FUNCTION Inputs::Inputs(){{{2*/
-Inputs::Inputs(){
-	return;
-}
-/*}}}*/
-/*FUNCTION Inputs::Inputs(int in_enum){{{2*/
-Inputs::Inputs(int in_enum): DataSet(in_enum) {
-	//do nothing;
-	return;
-}
-/*}}}*/
-/*FUNCTION Inputs::~Inputs(){{{2*/
-Inputs::~Inputs(){
-	return;
-}
-/*}}}*/
-
-/*Object management*/
-/*FUNCTION Inputs::GetParameterValue(double* pvalue,double* gauss,int enum_type){{{2*/
-void Inputs::GetParameterValue(double* pvalue,double* gauss, int enum_type){
-
-	vector<Object*>::iterator object;
-	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
-	}
-
-	/*Ok, we have an input if we made it here, request the input to return the values: */
-	input->GetParameterValue(pvalue,gauss);
-
-}
-/*}}}*/
-/*FUNCTION Inputs::GetParameterValue(double* pvalue,double* gauss,int enum_type,double defaultvalue){{{2*/
-void Inputs::GetParameterValue(double* pvalue,double* gauss, int enum_type,double defaultvalue){
-
-	vector<Object*>::iterator object;
-	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. Return the default value: */
-		*pvalue=defaultvalue;
-	}
-	else{
-		input->GetParameterValue(pvalue,gauss);
-	}
-}
-/*}}}*/
-/*FUNCTION Inputs::GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type){{{2*/
-void Inputs::GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type){
-
-	vector<Object*>::iterator object;
-	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
-	}
-
-	/*Ok, we have an input if we made it here, request the input to return the values: */
-	input->GetParameterValues(values,gauss_pointers,numgauss);
-
-}
-/*}}}*/
-/*FUNCTION Inputs::GetParameterValue(double* pvalue, Node* node, int enum_type){{{2*/
-void Inputs::GetParameterValue(double* pvalue,Node* node,int enum_type){
-
-	/*given a node, instead of a gauss point, we want to recover a value: probably in an element!: */
-
-	vector<Object*>::iterator object;
-	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
-	}
-
-	/*Ok, we have an input if we made it here, request the input to return the values: */
-	input->GetParameterValue(pvalue,node);
-}
-/*}}}*/
-/*FUNCTION Inputs::GetParameterValue(double* pvalue, Node* node1, Node* node2,int enum_type){{{2*/
-void Inputs::GetParameterValue(double* pvalue,Node* node1, Node* node2,double gauss_coord,int enum_type){
-
-	/*given a node, instead of a gauss point, we want to recover a value: probably in an element!: */
-
-	vector<Object*>::iterator object;
-	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
-	}
-
-	/*Ok, we have an input if we made it here, request the input to return the values: */
-	input->GetParameterValue(pvalue,node1,node2,gauss_coord);
-}
-/*}}}*/
-/*FUNCTION Inputs::GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type,double* defaultvalues){{{2*/
-void Inputs::GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type,double* defaultvalues){
-
-	int i;
-	vector<Object*>::iterator object;
-	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. Return the default values: */
-		for(i=0;i<numgauss;i++)values[i]=defaultvalues[i];
-	}
-	else{
-		input->GetParameterValues(values,gauss_pointers,numgauss);
-	}
-
-}
-/*}}}*/
-/*FUNCTION Inputs::GetParameterValue(bool* pvalue,int enum-type){{{2*/
-void Inputs::GetParameterValue(bool* pvalue,int enum_type){
-
-	vector<Object*>::iterator object;
-	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
-	}
-
-	/*Ok, we have an input if we made it here, request the input to return the value: */
-	input->GetParameterValue(pvalue);
-
-}
-/*}}}*/
-/*FUNCTION Inputs::GetParameterValue(int* pvalue,int enum-type){{{2*/
-void Inputs::GetParameterValue(int* pvalue,int enum_type){
-
-	vector<Object*>::iterator object;
-	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
-	}
-
-	/*Ok, we have an input if we made it here, request the input to return the value: */
-	input->GetParameterValue(pvalue);
-
-}
-/*}}}*/
-/*FUNCTION Inputs::GetParameterValue(double* pvalue,int enum-type){{{2*/
-void Inputs::GetParameterValue(double* pvalue,int enum_type){
-
-	vector<Object*>::iterator object;
-	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
-	}
-
-	/*Ok, we have an input if we made it here, request the input to return the value: */
-	input->GetParameterValue(pvalue);
-
-}
-/*}}}*/
-/*FUNCTION Inputs::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss,int enum_type){{{2*/
-void Inputs::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss,int enum_type){
-
-	vector<Object*>::iterator object;
-	Input* input=NULL;
-
-	/*Go through inputs and check whether any input with the same name is already in: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-		if (input->EnumType()==enum_type)break;
-	}
-
-	if (!input){
-		/*we could not find an input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
-	}
-
-	/*Ok, we have an input if we made it here, request the input to return the value: */
-	input->GetParameterDerivativeValue(derivativevalues,xyz_list,gauss);
-}
-/*}}}*/
-/*FUNCTION Inputs::GetStrainRate(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum){{{2*/
-void Inputs::GetStrainRate(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum){
-
-	vector<Object*>::iterator object;
-	Input* xinput=NULL;
-	Input* yinput=NULL;
-
-	/*Go through inputs and find data for xenum: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-		xinput=(Input*)(*object); 
-		if (xinput->EnumType()==xenum)break;
-	}
-	/*Go through inputs and find data for yenum: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-		yinput=(Input*)(*object); 
-		if (yinput->EnumType()==yenum)break;
-	}
-
-	if (!xinput | !yinput){
-		/*we could not find one input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i%s%i\n"," could not find input with enum type ",xenum," or enum type ",yenum);
-	}
-
-	/*Ok, we have the inputs, call bilinear operator: */
-	xinput->GetStrainRate(epsilon,yinput,xyz_list,gauss);
-
-}
-/*}}}*/
-/*FUNCTION Inputs::GetStrainRateStokes(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum,int zenum){{{2*/
-void Inputs::GetStrainRateStokes(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum,int zenum){
-
-	vector<Object*>::iterator object;
-	Input* xinput=NULL;
-	Input* yinput=NULL;
-	Input* zinput=NULL;
-
-	/*Go through inputs and find data for xenum: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-		xinput=(Input*)(*object); 
-		if (xinput->EnumType()==xenum)break;
-	}
-	/*Go through inputs and find data for yenum: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-		yinput=(Input*)(*object); 
-		if (yinput->EnumType()==yenum)break;
-	}
-	/*Go through inputs and find data for zenum: */
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-		zinput=(Input*)(*object); 
-		if (zinput->EnumType()==zenum)break;
-	}
-
-	if (!xinput | !yinput | !zinput){
-		/*we could not find one input with the correct enum type. No defaults values were provided, 
-		 * error out: */
-		ISSMERROR("%s%i%s%i%s%i\n"," could not find input with enum type ",xenum," or enum type ",yenum, " or enum type ",zenum);
-	}
-
-	/*Ok, we have the inputs, call bilinear operator: */
-	xinput->GetStrainRateStokes(epsilon,yinput,zinput,xyz_list,gauss);
-
-}
-/*}}}*/
-/*FUNCTION Inputs::AddInput{{{2*/
-int  Inputs::AddInput(Input* in_input){
-
-	/*First, go through dataset of inputs and check whether any input 
-	 * with the same name is already in. If so, erase the corresponding 
-	 * object before adding this new one: */
-	vector<Object*>::iterator object;
-	Input* input=NULL;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		input=(Input*)(*object); 
-
-		if (input->EnumType()==in_input->EnumType()){
-			this->DeleteObject(input);
-			break;
-		}
-	}
-	this->AddObject(in_input);
-}
-/*}}}*/
-
-/*Object functions*/
-
-
-/*}}}*/
-/*Parameters: {{{1*/
-
-
-/*Object constructors and destructor*/
-/*FUNCTION Parameters::Parameters(){{{2*/
-Parameters::Parameters(){
-	return;
-}
-/*}}}*/
-/*FUNCTION Parameters::Parameters(int in_enum){{{2*/
-Parameters::Parameters(int in_enum): DataSet(in_enum){
-	//do nothing;
-	return;
-}
-/*}}}*/
-/*FUNCTION Parameters::~Parameters(){{{2*/
-Parameters::~Parameters(){
-	return;
-}
-/*}}}*/
-
-/*Object management*/
-/*FUNCTION Parameters::FindParam(double* pscalar, int enum_type){{{2*/
-int   Parameters::FindParam(double* pscalar, int enum_type){
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if(param->EnumType()==enum_type){
-				/*Ok, this is the one! Recover the value of this parameter: */
-				param->GetParameterValue(pscalar);
-				found=1;
-				break;
-			}
-		}
-	}
-	return found;
-}
-/*}}}*/
-/*FUNCTION Parameters::FindParam(int* pinteger,int enum_type){{{2*/
-int   Parameters::FindParam(int* pinteger,int enum_type){
-	
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if(param->EnumType()==enum_type){
-				/*Ok, this is the one! Recover the value of this parameter: */
-				param->GetParameterValue(pinteger);
-				found=1;
-				break;
-			}
-		}
-	}
-	return found;
-}
-/*}}}*/
-/*FUNCTION Parameters::FindParam(char** pstring,int enum_type){{{2*/
-int   Parameters::FindParam(char** pstring,int enum_type){
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if(param->EnumType()==enum_type){
-				/*Ok, this is the one! Recover the value of this parameter: */
-				param->GetParameterValue(pstring);
-				found=1;
-				break;
-			}
-		}
-	}
-	return found;
-
-}
-/*}}}*/
-/*FUNCTION Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){{{2*/
-int   Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if(param->EnumType()==enum_type){
-				/*Ok, this is the one! Recover the value of this parameter: */
-				param->GetParameterValue(pstringarray,pM);
-				found=1;
-				break;
-			}
-		}
-	}
-	return found;
-
-}
-/*}}}*/
-/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM,int enum_type){{{2*/
-int   Parameters::FindParam(double** pdoublearray,int* pM, int enum_type){
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if(param->EnumType()==enum_type){
-				/*Ok, this is the one! Recover the value of this parameter: */
-				param->GetParameterValue(pdoublearray,pM);
-				found=1;
-				break;
-			}
-		}
-	}
-	return found;
-
-}
-/*}}}*/
-/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){{{2*/
-int   Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if(param->EnumType()==enum_type){
-				/*Ok, this is the one! Recover the value of this parameter: */
-				param->GetParameterValue(pdoublearray,pM,pN);
-				found=1;
-				break;
-			}
-		}
-	}
-	return found;
-
-}
-/*}}}*/
-/*FUNCTION Parameters::FindParam(Vec* pvec,int enum_type){{{2*/
-int   Parameters::FindParam(Vec* pvec,int enum_type){
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if(param->EnumType()==enum_type){
-				/*Ok, this is the one! Recover the value of this parameter: */
-				param->GetParameterValue(pvec);
-				found=1;
-				break;
-			}
-		}
-	}
-	return found;
-
-}
-/*}}}*/
-/*FUNCTION Parameters::FindParamMat* pmat,int enum_type){{{2*/
-int   Parameters::FindParam(Mat* pmat,int enum_type){
-	
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-	
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	int found=0;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if(param->EnumType()==enum_type){
-				/*Ok, this is the one! Recover the value of this parameter: */
-				param->GetParameterValue(pmat);
-				found=1;
-				break;
-			}
-		}
-	}
-	return found;
-
-}
-/*}}}*/
-/*FUNCTION Parameters::FindParamObject{{{2*/
-Object* Parameters::FindParamObject(int enum_type){
-
-	/*Go through a dataset, and find a Param* object 
-	 *which parameter name is "name" : */
-
-	vector<Object*>::iterator object;
-	Param* param=NULL;
-
-	for ( object=objects.begin() ; object < objects.end(); object++ ){
-
-		/*Find param type objects: */
-		if((*object)->Enum()==ParamEnum){
-
-			/*Ok, this object is a parameter, recover it and ask which name it has: */
-			param=(Param*)(*object);
-
-			if(param->EnumType()==enum_type){
-				/*Ok, this is the one! Return the object: */
-				return (*object);
-			}
-		}
-	}
-	return NULL;
-}
-/*}}}*/
-
-/*Object functions*/
-
-
-/*}}}*/
Index: /issm/trunk/src/c/DataSet/Inputs.cpp
===================================================================
--- /issm/trunk/src/c/DataSet/Inputs.cpp	(revision 3702)
+++ /issm/trunk/src/c/DataSet/Inputs.cpp	(revision 3702)
@@ -0,0 +1,374 @@
+/*
+ * \file Inputs.c
+ * \brief: implementation of the Inputs class, derived from DataSet class
+ */
+
+/*Headers: {{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include <vector>
+#include <functional>
+#include <algorithm>
+#include <iostream>
+
+#include "./DataSet.h"
+#include "../shared/shared.h"
+#include "../include/macros.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+
+using namespace std;
+/*}}}*/
+/*Inputs: {{{1*/
+
+/*Object constructors and destructor*/
+/*FUNCTION Inputs::Inputs(){{{2*/
+Inputs::Inputs(){
+	return;
+}
+/*}}}*/
+/*FUNCTION Inputs::Inputs(int in_enum){{{2*/
+Inputs::Inputs(int in_enum): DataSet(in_enum) {
+	//do nothing;
+	return;
+}
+/*}}}*/
+/*FUNCTION Inputs::~Inputs(){{{2*/
+Inputs::~Inputs(){
+	return;
+}
+/*}}}*/
+
+/*Object management*/
+/*FUNCTION Inputs::GetParameterValue(double* pvalue,double* gauss,int enum_type){{{2*/
+void Inputs::GetParameterValue(double* pvalue,double* gauss, int enum_type){
+
+	vector<Object*>::iterator object;
+	Input* input=NULL;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type)break;
+	}
+
+	if (!input){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	}
+
+	/*Ok, we have an input if we made it here, request the input to return the values: */
+	input->GetParameterValue(pvalue,gauss);
+
+}
+/*}}}*/
+/*FUNCTION Inputs::GetParameterValue(double* pvalue,double* gauss,int enum_type,double defaultvalue){{{2*/
+void Inputs::GetParameterValue(double* pvalue,double* gauss, int enum_type,double defaultvalue){
+
+	vector<Object*>::iterator object;
+	Input* input=NULL;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type)break;
+	}
+
+	if (!input){
+		/*we could not find an input with the correct enum type. Return the default value: */
+		*pvalue=defaultvalue;
+	}
+	else{
+		input->GetParameterValue(pvalue,gauss);
+	}
+}
+/*}}}*/
+/*FUNCTION Inputs::GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type){{{2*/
+void Inputs::GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type){
+
+	vector<Object*>::iterator object;
+	Input* input=NULL;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type)break;
+	}
+
+	if (!input){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	}
+
+	/*Ok, we have an input if we made it here, request the input to return the values: */
+	input->GetParameterValues(values,gauss_pointers,numgauss);
+
+}
+/*}}}*/
+/*FUNCTION Inputs::GetParameterValue(double* pvalue, Node* node, int enum_type){{{2*/
+void Inputs::GetParameterValue(double* pvalue,Node* node,int enum_type){
+
+	/*given a node, instead of a gauss point, we want to recover a value: probably in an element!: */
+
+	vector<Object*>::iterator object;
+	Input* input=NULL;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type)break;
+	}
+
+	if (!input){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	}
+
+	/*Ok, we have an input if we made it here, request the input to return the values: */
+	input->GetParameterValue(pvalue,node);
+}
+/*}}}*/
+/*FUNCTION Inputs::GetParameterValue(double* pvalue, Node* node1, Node* node2,int enum_type){{{2*/
+void Inputs::GetParameterValue(double* pvalue,Node* node1, Node* node2,double gauss_coord,int enum_type){
+
+	/*given a node, instead of a gauss point, we want to recover a value: probably in an element!: */
+
+	vector<Object*>::iterator object;
+	Input* input=NULL;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type)break;
+	}
+
+	if (!input){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	}
+
+	/*Ok, we have an input if we made it here, request the input to return the values: */
+	input->GetParameterValue(pvalue,node1,node2,gauss_coord);
+}
+/*}}}*/
+/*FUNCTION Inputs::GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type,double* defaultvalues){{{2*/
+void Inputs::GetParameterValues(double* values,double* gauss_pointers, int numgauss,int enum_type,double* defaultvalues){
+
+	int i;
+	vector<Object*>::iterator object;
+	Input* input=NULL;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type)break;
+	}
+
+	if (!input){
+		/*we could not find an input with the correct enum type. Return the default values: */
+		for(i=0;i<numgauss;i++)values[i]=defaultvalues[i];
+	}
+	else{
+		input->GetParameterValues(values,gauss_pointers,numgauss);
+	}
+
+}
+/*}}}*/
+/*FUNCTION Inputs::GetParameterValue(bool* pvalue,int enum-type){{{2*/
+void Inputs::GetParameterValue(bool* pvalue,int enum_type){
+
+	vector<Object*>::iterator object;
+	Input* input=NULL;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type)break;
+	}
+
+	if (!input){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	}
+
+	/*Ok, we have an input if we made it here, request the input to return the value: */
+	input->GetParameterValue(pvalue);
+
+}
+/*}}}*/
+/*FUNCTION Inputs::GetParameterValue(int* pvalue,int enum-type){{{2*/
+void Inputs::GetParameterValue(int* pvalue,int enum_type){
+
+	vector<Object*>::iterator object;
+	Input* input=NULL;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type)break;
+	}
+
+	if (!input){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	}
+
+	/*Ok, we have an input if we made it here, request the input to return the value: */
+	input->GetParameterValue(pvalue);
+
+}
+/*}}}*/
+/*FUNCTION Inputs::GetParameterValue(double* pvalue,int enum-type){{{2*/
+void Inputs::GetParameterValue(double* pvalue,int enum_type){
+
+	vector<Object*>::iterator object;
+	Input* input=NULL;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type)break;
+	}
+
+	if (!input){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	}
+
+	/*Ok, we have an input if we made it here, request the input to return the value: */
+	input->GetParameterValue(pvalue);
+
+}
+/*}}}*/
+/*FUNCTION Inputs::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss,int enum_type){{{2*/
+void Inputs::GetParameterDerivativeValue(double* derivativevalues, double* xyz_list, double* gauss,int enum_type){
+
+	vector<Object*>::iterator object;
+	Input* input=NULL;
+
+	/*Go through inputs and check whether any input with the same name is already in: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+		if (input->EnumType()==enum_type)break;
+	}
+
+	if (!input){
+		/*we could not find an input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("%s%i"," could not find input with enum type ",enum_type);
+	}
+
+	/*Ok, we have an input if we made it here, request the input to return the value: */
+	input->GetParameterDerivativeValue(derivativevalues,xyz_list,gauss);
+}
+/*}}}*/
+/*FUNCTION Inputs::GetStrainRate(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum){{{2*/
+void Inputs::GetStrainRate(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum){
+
+	vector<Object*>::iterator object;
+	Input* xinput=NULL;
+	Input* yinput=NULL;
+
+	/*Go through inputs and find data for xenum: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+		xinput=(Input*)(*object); 
+		if (xinput->EnumType()==xenum)break;
+	}
+	/*Go through inputs and find data for yenum: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+		yinput=(Input*)(*object); 
+		if (yinput->EnumType()==yenum)break;
+	}
+
+	if (!xinput | !yinput){
+		/*we could not find one input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("%s%i%s%i\n"," could not find input with enum type ",xenum," or enum type ",yenum);
+	}
+
+	/*Ok, we have the inputs, call bilinear operator: */
+	xinput->GetStrainRate(epsilon,yinput,xyz_list,gauss);
+
+}
+/*}}}*/
+/*FUNCTION Inputs::GetStrainRateStokes(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum,int zenum){{{2*/
+void Inputs::GetStrainRateStokes(double* epsilon,double* xyz_list, double* gauss, int xenum, int yenum,int zenum){
+
+	vector<Object*>::iterator object;
+	Input* xinput=NULL;
+	Input* yinput=NULL;
+	Input* zinput=NULL;
+
+	/*Go through inputs and find data for xenum: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+		xinput=(Input*)(*object); 
+		if (xinput->EnumType()==xenum)break;
+	}
+	/*Go through inputs and find data for yenum: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+		yinput=(Input*)(*object); 
+		if (yinput->EnumType()==yenum)break;
+	}
+	/*Go through inputs and find data for zenum: */
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+		zinput=(Input*)(*object); 
+		if (zinput->EnumType()==zenum)break;
+	}
+
+	if (!xinput | !yinput | !zinput){
+		/*we could not find one input with the correct enum type. No defaults values were provided, 
+		 * error out: */
+		ISSMERROR("%s%i%s%i%s%i\n"," could not find input with enum type ",xenum," or enum type ",yenum, " or enum type ",zenum);
+	}
+
+	/*Ok, we have the inputs, call bilinear operator: */
+	xinput->GetStrainRateStokes(epsilon,yinput,zinput,xyz_list,gauss);
+
+}
+/*}}}*/
+/*FUNCTION Inputs::AddInput{{{2*/
+int  Inputs::AddInput(Input* in_input){
+
+	/*First, go through dataset of inputs and check whether any input 
+	 * with the same name is already in. If so, erase the corresponding 
+	 * object before adding this new one: */
+	vector<Object*>::iterator object;
+	Input* input=NULL;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		input=(Input*)(*object); 
+
+		if (input->EnumType()==in_input->EnumType()){
+			this->DeleteObject(input);
+			break;
+		}
+	}
+	this->AddObject(in_input);
+}
+/*}}}*/
+
+/*Object functions*/
+
+
+/*}}}*/
Index: /issm/trunk/src/c/DataSet/Parameters.cpp
===================================================================
--- /issm/trunk/src/c/DataSet/Parameters.cpp	(revision 3702)
+++ /issm/trunk/src/c/DataSet/Parameters.cpp	(revision 3702)
@@ -0,0 +1,324 @@
+/*
+ * \file Parameters.c
+ * \brief: implementation of the Parameters class, derived from DataSet class
+ */
+
+/*Headers: {{{1*/
+#ifdef HAVE_CONFIG_H
+	#include "config.h"
+#else
+#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+#endif
+
+#include <vector>
+#include <functional>
+#include <algorithm>
+#include <iostream>
+
+#include "./DataSet.h"
+#include "../shared/shared.h"
+#include "../include/macros.h"
+#include "../EnumDefinitions/EnumDefinitions.h"
+
+using namespace std;
+/*}}}*/
+/*Parameters: {{{1*/
+
+
+/*Object constructors and destructor*/
+/*FUNCTION Parameters::Parameters(){{{2*/
+Parameters::Parameters(){
+	return;
+}
+/*}}}*/
+/*FUNCTION Parameters::Parameters(int in_enum){{{2*/
+Parameters::Parameters(int in_enum): DataSet(in_enum){
+	//do nothing;
+	return;
+}
+/*}}}*/
+/*FUNCTION Parameters::~Parameters(){{{2*/
+Parameters::~Parameters(){
+	return;
+}
+/*}}}*/
+
+/*Object management*/
+/*FUNCTION Parameters::FindParam(double* pscalar, int enum_type){{{2*/
+int   Parameters::FindParam(double* pscalar, int enum_type){
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
+				/*Ok, this is the one! Recover the value of this parameter: */
+				param->GetParameterValue(pscalar);
+				found=1;
+				break;
+			}
+		}
+	}
+	return found;
+}
+/*}}}*/
+/*FUNCTION Parameters::FindParam(int* pinteger,int enum_type){{{2*/
+int   Parameters::FindParam(int* pinteger,int enum_type){
+	
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
+				/*Ok, this is the one! Recover the value of this parameter: */
+				param->GetParameterValue(pinteger);
+				found=1;
+				break;
+			}
+		}
+	}
+	return found;
+}
+/*}}}*/
+/*FUNCTION Parameters::FindParam(char** pstring,int enum_type){{{2*/
+int   Parameters::FindParam(char** pstring,int enum_type){
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
+				/*Ok, this is the one! Recover the value of this parameter: */
+				param->GetParameterValue(pstring);
+				found=1;
+				break;
+			}
+		}
+	}
+	return found;
+
+}
+/*}}}*/
+/*FUNCTION Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){{{2*/
+int   Parameters::FindParam(char*** pstringarray,int* pM,int enum_type){
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
+				/*Ok, this is the one! Recover the value of this parameter: */
+				param->GetParameterValue(pstringarray,pM);
+				found=1;
+				break;
+			}
+		}
+	}
+	return found;
+
+}
+/*}}}*/
+/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM,int enum_type){{{2*/
+int   Parameters::FindParam(double** pdoublearray,int* pM, int enum_type){
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
+				/*Ok, this is the one! Recover the value of this parameter: */
+				param->GetParameterValue(pdoublearray,pM);
+				found=1;
+				break;
+			}
+		}
+	}
+	return found;
+
+}
+/*}}}*/
+/*FUNCTION Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){{{2*/
+int   Parameters::FindParam(double** pdoublearray,int* pM, int* pN,int enum_type){
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
+				/*Ok, this is the one! Recover the value of this parameter: */
+				param->GetParameterValue(pdoublearray,pM,pN);
+				found=1;
+				break;
+			}
+		}
+	}
+	return found;
+
+}
+/*}}}*/
+/*FUNCTION Parameters::FindParam(Vec* pvec,int enum_type){{{2*/
+int   Parameters::FindParam(Vec* pvec,int enum_type){
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
+				/*Ok, this is the one! Recover the value of this parameter: */
+				param->GetParameterValue(pvec);
+				found=1;
+				break;
+			}
+		}
+	}
+	return found;
+
+}
+/*}}}*/
+/*FUNCTION Parameters::FindParamMat* pmat,int enum_type){{{2*/
+int   Parameters::FindParam(Mat* pmat,int enum_type){
+	
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+	
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	int found=0;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
+				/*Ok, this is the one! Recover the value of this parameter: */
+				param->GetParameterValue(pmat);
+				found=1;
+				break;
+			}
+		}
+	}
+	return found;
+
+}
+/*}}}*/
+/*FUNCTION Parameters::FindParamObject{{{2*/
+Object* Parameters::FindParamObject(int enum_type){
+
+	/*Go through a dataset, and find a Param* object 
+	 *which parameter name is "name" : */
+
+	vector<Object*>::iterator object;
+	Param* param=NULL;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		/*Find param type objects: */
+		if((*object)->Enum()==ParamEnum){
+
+			/*Ok, this object is a parameter, recover it and ask which name it has: */
+			param=(Param*)(*object);
+
+			if(param->EnumType()==enum_type){
+				/*Ok, this is the one! Return the object: */
+				return (*object);
+			}
+		}
+	}
+	return NULL;
+}
+/*}}}*/
+
+/*Object functions*/
+
+
+/*}}}*/
