Index: /issm/trunk/src/c/Container/DataSet.cpp
===================================================================
--- /issm/trunk/src/c/Container/DataSet.cpp	(revision 4574)
+++ /issm/trunk/src/c/Container/DataSet.cpp	(revision 4575)
@@ -587,2 +587,30 @@
 }
 /*}}}*/
+/*FUNCTION DataSet::SetCurrentConfiguration{{{1*/
+void DataSet::SetCurrentConfiguration(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters){
+
+	vector<Object*>::iterator object;
+	Element* element=NULL;
+	Load* load=NULL;
+	Node* node=NULL;
+
+	for ( object=objects.begin() ; object < objects.end(); object++ ){
+
+		if(EnumIsElement((*object)->Enum())){
+
+			element=(Element*)(*object);
+			element->SetCurrentConfiguration(elements,loads,nodes,materials,parameters);
+		}
+		if(EnumIsLoad((*object)->Enum())){
+			load=(Load*)(*object);
+			load->SetCurrentConfiguration(elements,loads,nodes,vertices,materials,parameters);
+		}
+
+		if((*object)->Enum()==NodeEnum){
+			node=(Node*)(*object);
+			node->SetCurrentConfiguration(nodes,vertices);
+		}
+	}
+
+}
+/*}}}*/
Index: /issm/trunk/src/c/Container/DataSet.h
===================================================================
--- /issm/trunk/src/c/Container/DataSet.h	(revision 4574)
+++ /issm/trunk/src/c/Container/DataSet.h	(revision 4575)
@@ -54,4 +54,5 @@
 		void  clear();
 		void  Configure(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters);
+		void  SetCurrentConfiguration(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters);
 		Object* GetObjectByOffset(int offset);
 		Object* GetObjectById(int* poffset,int eid);
Index: /issm/trunk/src/c/objects/Elements/Beam.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Beam.cpp	(revision 4574)
+++ /issm/trunk/src/c/objects/Elements/Beam.cpp	(revision 4575)
@@ -234,4 +234,11 @@
 /*FUNCTION Beam::Configure {{{1*/
 void  Beam::Configure(Elements* elementsin,Loads* loadsin, DataSet* nodesin, Materials* materialsin, Parameters* parametersin){
+
+	ISSMERROR(" not supported yet!");
+
+}
+/*}}}*/
+/*FUNCTION Beam::SetCurrentConfiguration {{{1*/
+void  Beam::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin, DataSet* nodesin, Materials* materialsin, Parameters* parametersin){
 
 	ISSMERROR(" not supported yet!");
Index: /issm/trunk/src/c/objects/Elements/Beam.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Beam.h	(revision 4574)
+++ /issm/trunk/src/c/objects/Elements/Beam.h	(revision 4575)
@@ -66,4 +66,5 @@
 		void	   ComputeStrainRate(Vec eps);
 		void	   Configure(Elements* elements,Loads* loads,DataSet* nodes,Materials* materials,Parameters* parameters);
+		void	   SetCurrentConfiguration(Elements* elements,Loads* loads,DataSet* nodes,Materials* materials,Parameters* parameters);
 		double	   CostFunction(void);
 		void	   CreateKMatrix(Mat Kgg);
Index: /issm/trunk/src/c/objects/Elements/Element.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Element.h	(revision 4574)
+++ /issm/trunk/src/c/objects/Elements/Element.h	(revision 4575)
@@ -27,4 +27,5 @@
 	
 		virtual void   Configure(Elements* elements,Loads* loads,DataSet* nodes,Materials* materials,Parameters* parameters)=0;
+		virtual void   SetCurrentConfiguration(Elements* elements,Loads* loads,DataSet* nodes,Materials* materials,Parameters* parameters)=0;
 		virtual void   CreateKMatrix(Mat Kgg)=0;
 		virtual void   CreatePVector(Vec pg)=0;
Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 4574)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 4575)
@@ -650,4 +650,23 @@
 
 	/*Now, go pick up the objects inside the hooks: */
+	if (this->hnodes[analysis_counter]) this->nodes=(Node**)this->hnodes[analysis_counter]->deliverp();
+	else this->nodes=NULL;
+	this->matice=(Matice*)this->hmatice->delivers();
+	this->matpar=(Matpar*)this->hmatpar->delivers();
+	this->neighbors=(Penta**)this->hneighbors->deliverp();
+
+	/*point parameters to real dataset: */
+	this->parameters=parametersin;
+}
+/*}}}*/
+		/*FUNCTION Penta::SetCurrentConfiguration {{{1*/
+void  Penta::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, DataSet* nodesin, Materials* materialsin, Parameters* parametersin){
+
+	int analysis_counter;
+	
+	/*go into parameters and get the analysis_counter: */
+	parametersin->FindParam(&analysis_counter,AnalysisCounterEnum);
+
+	/*Pick up the objects inside the hooks: */
 	if (this->hnodes[analysis_counter]) this->nodes=(Node**)this->hnodes[analysis_counter]->deliverp();
 	else this->nodes=NULL;
Index: /issm/trunk/src/c/objects/Elements/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.h	(revision 4574)
+++ /issm/trunk/src/c/objects/Elements/Penta.h	(revision 4575)
@@ -69,4 +69,5 @@
 		void   ComputeStrainRate(Vec eps);
 		void   Configure(Elements* elements,Loads* loads,DataSet* nodes,Materials* materials,Parameters* parameters);
+		void   SetCurrentConfiguration(Elements* elements,Loads* loads,DataSet* nodes,Materials* materials,Parameters* parameters);
 		double CostFunction(void);
 		void   CreateKMatrix(Mat Kgg);
Index: /issm/trunk/src/c/objects/Elements/Sing.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Sing.cpp	(revision 4574)
+++ /issm/trunk/src/c/objects/Elements/Sing.cpp	(revision 4575)
@@ -204,4 +204,11 @@
 /*FUNCTION Sing::Configure {{{1*/
 void  Sing::Configure(Elements* elementsin,Loads* loadsin, DataSet* nodesin, Materials* materialsin, Parameters* parametersin){
+
+	ISSMERROR(" not supported yet!");
+
+}
+/*}}}*/
+/*FUNCTION Sing::SetCurrentConfiguration {{{1*/
+void  Sing::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin, DataSet* nodesin, Materials* materialsin, Parameters* parametersin){
 
 	ISSMERROR(" not supported yet!");
Index: /issm/trunk/src/c/objects/Elements/Sing.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Sing.h	(revision 4574)
+++ /issm/trunk/src/c/objects/Elements/Sing.h	(revision 4575)
@@ -66,4 +66,5 @@
 		void   ComputeStrainRate(Vec eps);
 		void   Configure(Elements* elements,Loads* loads,DataSet* nodes,Materials* materials,Parameters* parameters);
+		void   SetCurrentConfiguration(Elements* elements,Loads* loads,DataSet* nodes,Materials* materials,Parameters* parameters);
 		double CostFunction(void);
 		void   CreateKMatrix(Mat Kgg);
Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 4574)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 4575)
@@ -495,4 +495,23 @@
 	ISSMERROR("Not Implemented yet");
 	//VecSetValues(eps,1,2,(const double*)&value,INSERT_VALUES);
+
+}
+/*}}}*/
+/*FUNCTION Tria::SetCurrentConfiguration {{{1*/
+void  Tria::SetCurrentConfiguration(Elements* elementsin, Loads* loadsin, DataSet* nodesin, Materials* materialsin, Parameters* parametersin){
+
+	int analysis_counter;
+	
+	/*go into parameters and get the analysis_counter: */
+	parametersin->FindParam(&analysis_counter,AnalysisCounterEnum);
+
+	/*Pick up the objects inside the hooks: */
+	if(this->hnodes[analysis_counter]) this->nodes=(Node**)this->hnodes[analysis_counter]->deliverp();
+	else this->nodes=NULL;
+	this->matice=(Matice*)this->hmatice->delivers();
+	this->matpar=(Matpar*)this->hmatpar->delivers();
+
+	/*point parameters to real dataset: */
+	this->parameters=parametersin;
 
 }
Index: /issm/trunk/src/c/objects/Elements/Tria.h
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.h	(revision 4574)
+++ /issm/trunk/src/c/objects/Elements/Tria.h	(revision 4575)
@@ -66,4 +66,5 @@
 		void   ComputeStrainRate(Vec eps);
 		void   Configure(Elements* elements,Loads* loads,DataSet* nodes,Materials* materials,Parameters* parameters);
+		void   SetCurrentConfiguration(Elements* elements,Loads* loads,DataSet* nodes,Materials* materials,Parameters* parameters);
 		double CostFunction(void);
 		void   CreateKMatrix(Mat Kgg);
Index: /issm/trunk/src/c/objects/FemModel.cpp
===================================================================
--- /issm/trunk/src/c/objects/FemModel.cpp	(revision 4574)
+++ /issm/trunk/src/c/objects/FemModel.cpp	(revision 4575)
@@ -174,7 +174,7 @@
 
 	/*configure elements, loads and nodes, for this new analysis: */
-	this->elements->  Configure(elements,loads, nodes,vertices, materials,parameters);
-	this->nodes->     Configure(elements,loads, nodes,vertices, materials,parameters);
-	this->loads->     Configure(elements, loads, nodes,vertices, materials,parameters);
+	this->elements->SetCurrentConfiguration(elements,loads, nodes,vertices, materials,parameters);
+	this->nodes->SetCurrentConfiguration(elements,loads, nodes,vertices, materials,parameters);
+	this->loads->SetCurrentConfiguration(elements, loads, nodes,vertices, materials,parameters);
 
 }
Index: /issm/trunk/src/c/objects/Loads/Icefront.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Icefront.cpp	(revision 4574)
+++ /issm/trunk/src/c/objects/Loads/Icefront.cpp	(revision 4575)
@@ -271,4 +271,17 @@
 /*FUNCTION Icefront::Configure {{{1*/
 void  Icefront::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+
+	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
+	 * datasets, using internal ids and offsets hidden in hooks: */
+	hnodes->configure(nodesin);
+	helement->configure(elementsin);
+	hmatpar->configure(materialsin);
+
+	/*point parameters to real dataset: */
+	this->parameters=parametersin;
+}
+/*}}}*/
+/*FUNCTION Icefront::SetCurrentConfiguration {{{1*/
+void  Icefront::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
 
 	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
Index: /issm/trunk/src/c/objects/Loads/Icefront.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Icefront.h	(revision 4574)
+++ /issm/trunk/src/c/objects/Loads/Icefront.h	(revision 4575)
@@ -60,4 +60,5 @@
 		/*Load virtual functions definitions: {{{1*/
 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+		void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
 		void  CreateKMatrix(Mat Kgg);
 		void  CreatePVector(Vec pg);
Index: /issm/trunk/src/c/objects/Loads/Load.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Load.h	(revision 4574)
+++ /issm/trunk/src/c/objects/Loads/Load.h	(revision 4575)
@@ -25,4 +25,5 @@
 		/*Virtual functions: {{{1*/
 		virtual void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters)=0;
+		virtual void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters)=0;
 		virtual void  CreateKMatrix(Mat Kgg)=0;
 		virtual void  CreatePVector(Vec pg)=0;
Index: /issm/trunk/src/c/objects/Loads/Numericalflux.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Numericalflux.cpp	(revision 4574)
+++ /issm/trunk/src/c/objects/Loads/Numericalflux.cpp	(revision 4575)
@@ -291,4 +291,17 @@
 }
 /*}}}*/
+/*FUNCTION Numericalflux::SetCurrentConfiguration {{{1*/
+void  Numericalflux::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+
+	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
+	 * datasets, using internal ids and offsets hidden in hooks: */
+	hnodes->configure(nodesin);
+	helement->configure(elementsin);
+
+	/*point parameters to real dataset: */
+	this->parameters=parametersin;
+
+}
+/*}}}*/
 /*FUNCTION Numericalflux::CreateKMatrix {{{1*/
 void  Numericalflux::CreateKMatrix(Mat Kgg){
Index: /issm/trunk/src/c/objects/Loads/Numericalflux.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Numericalflux.h	(revision 4574)
+++ /issm/trunk/src/c/objects/Loads/Numericalflux.h	(revision 4575)
@@ -55,4 +55,5 @@
 		/*Load virtual functions definitions: {{{1*/
 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+		void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
 		void  CreateKMatrix(Mat Kgg);
 		void  CreatePVector(Vec pg);
Index: /issm/trunk/src/c/objects/Loads/Pengrid.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Pengrid.cpp	(revision 4574)
+++ /issm/trunk/src/c/objects/Loads/Pengrid.cpp	(revision 4575)
@@ -243,4 +243,17 @@
 /*FUNCTION Pengrid::Configure {{{1*/
 void  Pengrid::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+
+	/*Take care of hooking up all objects for this load, ie links the objects in the hooks to their respective 
+	 * datasets, using internal ids and offsets hidden in hooks: */
+	hnode->configure(nodesin);
+	helement->configure(elementsin);
+	hmatpar->configure(materialsin);
+
+	/*point parameters to real dataset: */
+	this->parameters=parametersin;
+}
+/*}}}1*/
+/*FUNCTION Pengrid::SetCurrentConfiguration {{{1*/
+void  Pengrid::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
 
 	/*Take care of hooking up all objects for this load, ie links the objects in the hooks to their respective 
Index: /issm/trunk/src/c/objects/Loads/Pengrid.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Pengrid.h	(revision 4574)
+++ /issm/trunk/src/c/objects/Loads/Pengrid.h	(revision 4575)
@@ -61,4 +61,5 @@
 		/*Load virtual functions definitions: {{{1*/
 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+		void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
 		void  CreateKMatrix(Mat Kgg);
 		void  CreatePVector(Vec pg);
Index: /issm/trunk/src/c/objects/Loads/Penpair.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Penpair.cpp	(revision 4574)
+++ /issm/trunk/src/c/objects/Loads/Penpair.cpp	(revision 4575)
@@ -180,4 +180,13 @@
 }
 /*}}}1*/
+/*FUNCTION Penpair::SetCurrentConfiguration {{{1*/
+void  Penpair::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+
+	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
+	 * datasets, using internal ids and offsets hidden in hooks: */
+	hnodes->configure(nodesin);
+
+}
+/*}}}1*/
 /*FUNCTION Penpair::CreateKMatrix {{{1*/
 void  Penpair::CreateKMatrix(Mat Kgg){
Index: /issm/trunk/src/c/objects/Loads/Penpair.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Penpair.h	(revision 4574)
+++ /issm/trunk/src/c/objects/Loads/Penpair.h	(revision 4575)
@@ -52,4 +52,5 @@
 			/*Load virtual functions definitions: {{{1*/
 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+		void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
 		void  CreateKMatrix(Mat Kgg);
 		void  CreatePVector(Vec pg);
Index: /issm/trunk/src/c/objects/Loads/Riftfront.cpp
===================================================================
--- /issm/trunk/src/c/objects/Loads/Riftfront.cpp	(revision 4574)
+++ /issm/trunk/src/c/objects/Loads/Riftfront.cpp	(revision 4575)
@@ -281,4 +281,17 @@
 /*FUNCTION Riftfront::Configure {{{1*/
 void  Riftfront::Configure(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
+
+	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
+	 * datasets, using internal ids and offsets hidden in hooks: */
+	hnodes->configure(nodesin);
+	hmatpar->configure(materialsin);
+
+	/*point parameters to real dataset: */
+	this->parameters=parametersin;
+
+}
+/*}}}*/
+/*FUNCTION Riftfront::SetCurrentConfiguration {{{1*/
+void  Riftfront::SetCurrentConfiguration(Elements* elementsin,Loads* loadsin,Nodes* nodesin,Vertices* verticesin,Materials* materialsin,Parameters* parametersin){
 
 	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
Index: /issm/trunk/src/c/objects/Loads/Riftfront.h
===================================================================
--- /issm/trunk/src/c/objects/Loads/Riftfront.h	(revision 4574)
+++ /issm/trunk/src/c/objects/Loads/Riftfront.h	(revision 4575)
@@ -70,4 +70,5 @@
 		/*Load virtual functions definitions: {{{1*/
 		void  Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
+		void  SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
 		void  CreateKMatrix(Mat Kgg);
 		void  CreatePVector(Vec pg);
Index: /issm/trunk/src/c/objects/Node.cpp
===================================================================
--- /issm/trunk/src/c/objects/Node.cpp	(revision 4574)
+++ /issm/trunk/src/c/objects/Node.cpp	(revision 4575)
@@ -336,4 +336,15 @@
 
 }
+/*FUNCTION Node::SetCurrentConfiguration {{{1*/
+void  Node::SetCurrentConfiguration(DataSet* nodesin,Vertices* verticesin){
+
+	int i;
+
+	/*Take care of hooking up all objects for this element, ie links the objects in the hooks to their respective 
+	 * datasets, using internal ids and offsets hidden in hooks: */
+	hvertex->configure(verticesin);
+	hupper_node->configure(nodesin);
+
+}
 /*FUNCTION Node::GetDof {{{1*/
 int   Node::GetDof(int dofindex){
Index: /issm/trunk/src/c/objects/Node.h
===================================================================
--- /issm/trunk/src/c/objects/Node.h	(revision 4574)
+++ /issm/trunk/src/c/objects/Node.h	(revision 4575)
@@ -63,4 +63,5 @@
 		/*Node numerical routines {{{1*/
 		void  Configure(DataSet* nodes,Vertices* vertices);
+		void  SetCurrentConfiguration(DataSet* nodes,Vertices* vertices);
 		int   Sid(void); 
 		int   GetVertexDof(void);
