Index: /issm/trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 23492)
+++ /issm/trunk-jpl/src/c/classes/FemModel.cpp	(revision 23493)
@@ -182,5 +182,4 @@
 	if(lockfilename)xDelete<char>(lockfilename);
 	if(elements)delete elements;
-	if(nodes)delete nodes;
 	if(vertices)delete vertices;
 	if(this->constraints_list && this->nummodels){
@@ -191,4 +190,8 @@
 		for(int i=0;i<this->nummodels;i++) delete this->loads_list[i];
 		xDelete<Loads*>(loads_list);
+	}
+	if(this->nodes_list && this->nummodels){
+		for(int i=0;i<this->nummodels;i++) delete this->nodes_list[i];
+		xDelete<Nodes*>(nodes_list);
 	}
 	if(materials)delete materials;
@@ -328,4 +331,5 @@
 	output->constraints_list=xNew<Constraints*>(this->nummodels);
 	output->loads_list=xNew<Loads*>(this->nummodels);
+	output->nodes_list=xNew<Nodes*>(this->nummodels);
 
 	output->profiler=static_cast<Profiler*>(this->profiler->copy());
@@ -334,5 +338,4 @@
 	output->parameters=static_cast<Parameters*>(this->parameters->Copy());
 	output->results=static_cast<Results*>(this->results->Copy());
-	output->nodes=static_cast<Nodes*>(this->nodes->Copy());
 	output->vertices=static_cast<Vertices*>(this->vertices->Copy());
 	output->elements=static_cast<Elements*>(this->elements->Copy());
@@ -347,10 +350,11 @@
 		output->constraints_list[i] = static_cast<Constraints*>(this->constraints_list[i]->Copy());
 		output->loads_list[i] = static_cast<Loads*>(this->loads_list[i]->Copy());
+		output->nodes_list[i] = static_cast<Nodes*>(this->nodes_list[i]->Copy());
 		analysis_type=output->analysis_type_list[i];
 		output->SetCurrentConfiguration(analysis_type);
 		if(i==0) VerticesDofx(output->vertices,output->parameters); //only call once, we only have one set of vertices
-		SpcNodesx(output->nodes,output->constraints_list[i],output->parameters,analysis_type);
-		NodesDofx(output->nodes,output->parameters,analysis_type);
-		ConfigureObjectsx(output->elements,output->loads_list[i],output->nodes,output->vertices,output->materials,output->parameters);
+		SpcNodesx(output->nodes_list[i],output->constraints_list[i],output->parameters,analysis_type);
+		NodesDofx(output->nodes_list[i],output->parameters,analysis_type);
+		ConfigureObjectsx(output->elements,output->loads_list[i],output->nodes_list[i],output->vertices,output->materials,output->parameters);
 	}
 
@@ -426,5 +430,5 @@
 
 	/*create datasets for all analyses*/
-	ModelProcessorx(&this->elements,&this->nodes,&this->vertices,&this->materials,&this->constraints_list,&this->loads_list,&this->parameters,iomodel,toolkitsoptionsfid,rootpath,this->solution_type,this->nummodels,this->analysis_type_list);
+	ModelProcessorx(&this->elements,&this->nodes_list,&this->vertices,&this->materials,&this->constraints_list,&this->loads_list,&this->parameters,iomodel,toolkitsoptionsfid,rootpath,this->solution_type,this->nummodels,this->analysis_type_list);
 
 	/*do the post-processing of the datasets to get an FemModel that can actually run analyses: */
@@ -471,6 +475,9 @@
 			xDelete<Loads*>(loads_list);
 		}
+		if(this->nodes_list && this->nummodels){
+			for(i=0;i<this->nummodels;i++) delete this->nodes_list[i];
+			xDelete<Nodes*>(nodes_list);
+		}
 		delete this->results;
-		delete this->nodes;
 		delete this->vertices;
 		delete this->elements;
@@ -495,5 +502,4 @@
 	this->parameters->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
 	this->results->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
-	this->nodes->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
 	this->vertices->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
 	this->elements->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
@@ -504,4 +510,6 @@
 		this->loads_list = xNew<Loads*>(this->nummodels);
 		for(i=0;i<nummodels;i++) this->loads_list[i] = new Loads();
+		this->nodes_list = xNew<Nodes*>(this->nummodels);
+		for(i=0;i<nummodels;i++) this->nodes_list[i] = new Nodes();
 	}
 
@@ -509,4 +517,5 @@
 		this->constraints_list[i]->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
 		this->loads_list[i]->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
+		this->nodes_list[i]->Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
 	}
 
@@ -522,7 +531,7 @@
 			SetCurrentConfiguration(analysis_type);
 			if(i==0) VerticesDofx(this->vertices,this->parameters); //only call once, we only have one set of vertices
-			SpcNodesx(this->nodes,this->constraints_list[i],this->parameters,analysis_type);
-			NodesDofx(this->nodes,this->parameters,analysis_type);
-			ConfigureObjectsx(this->elements,this->loads_list[i],this->nodes,this->vertices,this->materials,this->parameters);
+			SpcNodesx(this->nodes_list[i],this->constraints_list[i],this->parameters,analysis_type);
+			NodesDofx(this->nodes_list[i],this->parameters,analysis_type);
+			ConfigureObjectsx(this->elements,this->loads_list[i],this->nodes_list[i],this->vertices,this->materials,this->parameters);
 		}
 
@@ -607,4 +616,5 @@
 	this->loads = this->loads_list[this->analysis_counter];
 	this->constraints = this->constraints_list[this->analysis_counter];
+	this->nodes = this->nodes_list[this->analysis_counter];
 	this->loads->SetCurrentConfiguration(elements, loads, nodes,vertices, materials,parameters);
 	this->elements->SetCurrentConfiguration(elements,loads, nodes,vertices, materials,parameters);
@@ -2637,6 +2647,6 @@
 	/*Creating nodes and constraints*/
 	/*Just SSA (2D) and P1 in this version*/
-	Nodes* new_nodes = new Nodes();
 	Constraints** new_constraints_list = xNew<Constraints*>(this->nummodels);
+	Nodes** new_nodes_list = xNew<Nodes*>(this->nummodels);
 
 	int nodecounter		=0;
@@ -2647,4 +2657,5 @@
 		if(this->loads_list[i]->Size()!=0) _error_("not supported yet");
 		new_constraints_list[i] = new Constraints();
+		new_nodes_list[i] = new Nodes();
 
 		int analysis_enum = this->analysis_type_list[i];
@@ -2653,9 +2664,9 @@
 		if(analysis_enum==StressbalanceVerticalAnalysisEnum) continue;
 
-		this->CreateNodes(newnumberofvertices,my_vertices,nodecounter,analysis_enum,new_nodes);
+		this->CreateNodes(newnumberofvertices,my_vertices,nodecounter,analysis_enum,new_nodes_list[i]);
 		this->CreateConstraints(new_vertices,nodecounter,constraintcounter,analysis_enum,new_constraints_list[i]);
 		this->UpdateElements(newnumberofelements,newelementslist,my_elements,nodecounter,i,new_elements);
 
-		if(new_nodes->Size()) nodecounter=new_nodes->MaximumId();
+		if(new_nodes_list[i]->Size()) nodecounter=new_nodes_list[i]->MaximumId();
 		constraintcounter = new_constraints_list[i]->NumberOfConstraints();
 		/*Make sure nodecounter is at least 0 (if no node exists, maxid will be -1*/
@@ -2663,13 +2674,13 @@
 
 		new_constraints_list[i]->Presort();
+		new_nodes_list[i]->Presort();
 	}
 
 	new_elements->Presort();
-	new_nodes->Presort();
 	new_vertices->Presort();
 	//this->loads->Presort();
 	new_materials->Presort();
 
-	/*reset hooks for elements, loads and nodes: */
+	/*reset hooks*/
 	new_elements->ResetHooks();
 	//this->loads->ResetHooks();
@@ -2689,6 +2700,6 @@
 
 		/*configure elements, loads and nodes, for this new analysis: */
-		new_elements->SetCurrentConfiguration(new_elements,this->loads,new_nodes,new_vertices,new_materials,this->parameters);
-		this->loads->SetCurrentConfiguration(new_elements,this->loads,new_nodes,new_vertices,new_materials,this->parameters);
+		new_elements->SetCurrentConfiguration(new_elements,this->loads,new_nodes_list[i],new_vertices,new_materials,this->parameters);
+		this->loads->SetCurrentConfiguration(new_elements,this->loads,new_nodes_list[i],new_vertices,new_materials,this->parameters);
 
 		/*take care of toolkits options, that depend on this analysis type (present only after model processor)*/
@@ -2698,10 +2709,10 @@
 		}
 
-		ConfigureObjectsx(new_elements,this->loads,new_nodes,new_vertices,new_materials,this->parameters);
+		ConfigureObjectsx(new_elements,this->loads,new_nodes_list[i],new_vertices,new_materials,this->parameters);
 		if(i==0){
 			VerticesDofx(new_vertices,this->parameters); //only call once, we only have one set of vertices
 		}
-		SpcNodesx(new_nodes,new_constraints_list[i],this->parameters,analysis_type);
-		NodesDofx(new_nodes,this->parameters,analysis_type);
+		SpcNodesx(new_nodes_list[i],new_constraints_list[i],this->parameters,analysis_type);
+		NodesDofx(new_nodes_list[i],this->parameters,analysis_type);
 	}
 
@@ -2712,12 +2723,15 @@
 	delete this->vertices;		this->vertices		= new_vertices;
 	delete this->elements;		this->elements		= new_elements;
-	delete this->nodes;			this->nodes			= new_nodes;
 	delete this->materials;		this->materials	= new_materials;
-
 	if(this->constraints_list && this->nummodels){
 		for(int i=0;i<this->nummodels;i++) delete this->constraints_list[i];
 		xDelete<Constraints*>(this->constraints_list);
 	}
-	this->constraints_list = new_constraints_list;
+	this->constraints_list= new_constraints_list;
+	if(this->nodes_list && this->nummodels){
+		for(int i=0;i<this->nummodels;i++) delete this->nodes_list[i];
+		xDelete<Nodes*>(this->nodes_list);
+	}
+	this->nodes_list = new_nodes_list;
 
 	GetMaskOfIceVerticesLSMx0(this);
Index: /issm/trunk-jpl/src/c/classes/FemModel.h
===================================================================
--- /issm/trunk-jpl/src/c/classes/FemModel.h	(revision 23492)
+++ /issm/trunk-jpl/src/c/classes/FemModel.h	(revision 23493)
@@ -43,5 +43,4 @@
 		Elements    *elements;             //elements (one set for all analyses)
 		Materials   *materials;            //one set of materials, for each element
-		Nodes       *nodes;                //one set of nodes
 		Parameters  *parameters;           //one set of parameters, independent of the analysis_type
 		Results     *results;              //results that cannot be fit into the elements
@@ -53,4 +52,6 @@
 		Loads        *loads;
 		Loads       **loads_list;
+		Nodes        *nodes;
+		Nodes       **nodes_list;
 
 		//FIXME: do we want only one class and have virtual functions? or keep 2 classes, at least rename AdaptiveMeshRefinement -> AmrNeopz
Index: /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp	(revision 23492)
+++ /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp	(revision 23493)
@@ -13,5 +13,5 @@
 #include "./ModelProcessorx.h"
 
-void ModelProcessorx(Elements** pelements, Nodes** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints*** pconstraints, Loads*** ploads, Parameters** pparameters,IoModel* iomodel,FILE* toolkitfile, char* rootpath,const int solution_enum,const int nummodels,const int* analysis_enum_list){
+void ModelProcessorx(Elements** pelements, Nodes*** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints*** pconstraints, Loads*** ploads, Parameters** pparameters,IoModel* iomodel,FILE* toolkitfile, char* rootpath,const int solution_enum,const int nummodels,const int* analysis_enum_list){
 
 	/*Set Verbosity once for all*/
@@ -25,5 +25,4 @@
 	/*Initialize datasets*/
 	Elements    *elements    = new Elements();
-	Nodes       *nodes       = new Nodes();
 	Vertices    *vertices    = new Vertices();
 	Materials   *materials   = new Materials();
@@ -34,4 +33,6 @@
 	Loads **loads = xNew<Loads*>(nummodels);
 	for(int i=0;i<nummodels;i++) loads[i] = new Loads();
+	Nodes **nodes = xNew<Nodes*>(nummodels);
+	for(int i=0;i<nummodels;i++) nodes[i] = new Nodes();
 
 
@@ -55,5 +56,5 @@
 		Analysis* analysis = EnumToAnalysis(analysis_enum);
 		analysis->UpdateParameters(parameters,iomodel,solution_enum,analysis_enum);
-		analysis->CreateNodes(nodes,iomodel);
+		analysis->CreateNodes(nodes[i],iomodel);
 		analysis->CreateConstraints(constraints[i],iomodel);
 		analysis->CreateLoads(loads[i],iomodel);
@@ -64,5 +65,5 @@
 		 * constraints, and ids for objects created in next call to CreateDataSets
 		 * will need to start at the end of the updated counters: */
-		if(nodes->Size()) iomodel->nodecounter = nodes->MaximumId();
+		if(nodes[i]->Size()) iomodel->nodecounter = nodes[i]->MaximumId();
 		iomodel->loadcounter       = loads[i]->NumberOfLoads();
 		iomodel->constraintcounter = constraints[i]->NumberOfConstraints();
@@ -74,4 +75,5 @@
 		constraints[i]->Presort();
 		loads[i]->Presort();
+		nodes[i]->Presort();
 	}
 
@@ -94,5 +96,4 @@
 	 * redone: */
 	elements->Presort();
-	nodes->Presort();
 	vertices->Presort();
 	materials->Presort();
Index: /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h
===================================================================
--- /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h	(revision 23492)
+++ /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.h	(revision 23493)
@@ -9,5 +9,5 @@
 #include "../../analyses/analyses.h"
 
-void ModelProcessorx(Elements** pelements, Nodes** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints*** pconstraints, Loads*** ploads, Parameters** pparameters,IoModel* iomodel,FILE* toolkitfile, char* rootpath,const int solution_type,const int nummodels,const int* analysis_type_listh);
+void ModelProcessorx(Elements** pelements, Nodes*** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints*** pconstraints, Loads*** ploads, Parameters** pparameters,IoModel* iomodel,FILE* toolkitfile, char* rootpath,const int solution_type,const int nummodels,const int* analysis_type_listh);
 
 /*Creation of fem datasets: general drivers*/
