Index: /issm/trunk/src/c/objects/Beam.cpp
===================================================================
--- /issm/trunk/src/c/objects/Beam.cpp	(revision 3621)
+++ /issm/trunk/src/c/objects/Beam.cpp	(revision 3622)
@@ -59,12 +59,10 @@
 }
 /*}}}*/
-/*FUNCTION Beam::Beam(int i, IoModel* iomodel){{{1*/
-Beam::Beam(int index,IoModel* iomodel){
-
+/*FUNCTION Beam::Beam(int id, int i, IoModel* iomodel){{{1*/
+Beam::Beam(int beam_id, int index,IoModel* iomodel){
 
 	int i;
 
 	/*beam constructor input: */
-	int   beam_id;
 	int   beam_matice_id;
 	int   beam_matpar_id;
@@ -73,5 +71,4 @@
 
 	/*id: */
-	beam_id=index+1; 
 	this->id=beam_id;
 
Index: /issm/trunk/src/c/objects/Beam.h
===================================================================
--- /issm/trunk/src/c/objects/Beam.h	(revision 3621)
+++ /issm/trunk/src/c/objects/Beam.h	(revision 3622)
@@ -42,5 +42,5 @@
 		Beam(int beam_id,int* beam_node_ids, int beam_matice_id, int beam_matpar_id);
 		Beam(int beam_id,Hook* beam_hnodes, Hook* beam_hmatice, Hook* beam_hmatpar, Parameters* beam_parameters, Inputs* beam_inputs);
-		Beam(int i, IoModel* iomodel);
+		Beam(int beam_id,int i, IoModel* iomodel);
 		~Beam();
 		/*}}}*/
Index: /issm/trunk/src/c/objects/Icefront.cpp
===================================================================
--- /issm/trunk/src/c/objects/Icefront.cpp	(revision 3621)
+++ /issm/trunk/src/c/objects/Icefront.cpp	(revision 3622)
@@ -19,10 +19,10 @@
 		
 /*Object constructors and destructor*/
-/*FUNCTION Icefront constructor {{{1*/
+/*FUNCTION Icefront::Icefront() {{{1*/
 Icefront::Icefront(){
 	return;
 }
 /*}}}*/
-/*FUNCTION Icefront constructor {{{1*/
+/*FUNCTION Icefront::Icefront(char icefront_type[ICEFRONTSTRING],int icefront_fill,int icefront_sid, ...) {{{1*/
 Icefront::Icefront(char icefront_type[ICEFRONTSTRING],int icefront_fill,int icefront_sid, int icefront_mparid, int icefront_eid, int icefront_element_type, 
 		int icefront_node_ids[MAX_ICEFRONT_GRIDS],double icefront_h[MAX_ICEFRONT_GRIDS],double	icefront_b[MAX_ICEFRONT_GRIDS]){
@@ -33,5 +33,5 @@
 }
 /*}}}*/
-/*FUNCTION Init: used by  constructor {{{1*/
+/*FUNCTION Icefront::Init {{{1*/
 void Icefront::Init(char icefront_type[ICEFRONTSTRING],int icefront_fill,int icefront_sid, int icefront_mparid, int icefront_eid, int icefront_element_type, 
 		int icefront_node_ids[MAX_ICEFRONT_GRIDS],double icefront_h[MAX_ICEFRONT_GRIDS],double	icefront_b[MAX_ICEFRONT_GRIDS]){
@@ -62,6 +62,6 @@
 }
 /*}}}*/
-/*FUNCTION Icefront constructor from iomodel {{{1*/
-Icefront::Icefront(int i, IoModel* iomodel){
+/*FUNCTION Icefront::Icefront(int id, int i, IoModel* iomodel) {{{1*/
+Icefront::Icefront(int icefront_id,int i, IoModel* iomodel){
 
 	int segment_width;
@@ -74,5 +74,4 @@
 	int  icefront_fill;
 	int  icefront_element_type;
-	int  icefront_sid;
 	int  icefront_eid;
 	int  icefront_mparid;
@@ -94,5 +93,4 @@
 	icefront_mparid=iomodel->numberofelements+1; //matlab indexing
 	icefront_mparid=iomodel->numberofelements+1; //matlab indexing
-	icefront_sid=i+1; //matlab indexing
 	icefront_fill=(int)*(iomodel->pressureload+segment_width*i+segment_width-1); 
 	icefront_eid=(int) *(iomodel->pressureload+segment_width*i+segment_width-2); //matlab indexing
@@ -148,10 +146,10 @@
 	else ISSMERROR("Not supported yet!");
 
-	this->Init(icefront_type,icefront_fill,icefront_sid,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);
-}
-
-
-/*}}}*/
-/*FUNCTION Icefront destructor {{{1*/
+	this->Init(icefront_type,icefront_fill,icefront_id,icefront_mparid,icefront_eid,icefront_element_type,icefront_node_ids,icefront_h,icefront_b);
+}
+
+
+/*}}}*/
+/*FUNCTION Icefront::~Icefront() {{{1*/
 Icefront::~Icefront(){
 	return;
Index: /issm/trunk/src/c/objects/Icefront.h
===================================================================
--- /issm/trunk/src/c/objects/Icefront.h	(revision 3621)
+++ /issm/trunk/src/c/objects/Icefront.h	(revision 3622)
@@ -54,5 +54,5 @@
 		Icefront(char type[ICEFRONTSTRING],int fill,int sid, int mparid, int eid, int element_type, int node_ids[MAX_ICEFRONT_GRIDS],double h[MAX_ICEFRONT_GRIDS],double	b[MAX_ICEFRONT_GRIDS]);
 		void Init(char type[ICEFRONTSTRING],int fill,int sid, int mparid, int eid, int element_type, int node_ids[MAX_ICEFRONT_GRIDS],double h[MAX_ICEFRONT_GRIDS],double	b[MAX_ICEFRONT_GRIDS]);
-		Icefront(int i, IoModel* iomodel);
+		Icefront(int sid, int i, IoModel* iomodel);
 		~Icefront();
 		/*}}}*/
Index: /issm/trunk/src/c/objects/Matice.cpp
===================================================================
--- /issm/trunk/src/c/objects/Matice.cpp	(revision 3621)
+++ /issm/trunk/src/c/objects/Matice.cpp	(revision 3622)
@@ -18,15 +18,15 @@
 		
 /*Object constructors and destructor*/
-/*FUNCTION Matice::default constructor {{{1*/
+/*FUNCTION Matice::Matice(){{{1*/
 Matice::Matice(){
 	return;
 }
 /*}}}*/
-/*FUNCTION Matice::constructor {{{1*/
+/*FUNCTION Matice::Matice(int in_mid,double in_B,double in_n){{{1*/
 Matice::Matice(int in_mid,double in_B,double in_n){
 	this->Init(in_mid,in_B,in_n);
 }
 /*}}}*/
-/*FUNCTION Matice::init {{{1*/
+/*FUNCTION Matice::Init {{{1*/
 void Matice::Init(int in_mid,double in_B,double in_n){
 	this->mid=in_mid;
@@ -35,11 +35,10 @@
 }
 /*}}}*/
-/*FUNCTION Matice::constructor from iomodel {{{1*/
-Matice::Matice(int i, IoModel* iomodel, int num_vertices){
+/*FUNCTION Matice::Matice(int id, int i, IoModel* iomodel, int num_vertices){{{1*/
+Matice::Matice(int matice_mid,int i, IoModel* iomodel, int num_vertices){
 
 	int j;
 	
 	/*needed for Init routine:*/
-	int matice_mid;
 	double matice_B;
 	double matice_n;
@@ -47,7 +46,4 @@
 	/*intermediary: */
 	double B_avg;
-	
-	/*id: */
-	matice_mid=i+1;  //same as element it is created for
  
 	/*Compute B on the element if provided*/
@@ -85,5 +81,5 @@
 }
 /*}}}*/
-/*FUNCTION Matice::destructor {{{1*/
+/*FUNCTION Matice::~Matice(){{{1*/
 Matice::~Matice(){
 	return;
Index: /issm/trunk/src/c/objects/Matice.h
===================================================================
--- /issm/trunk/src/c/objects/Matice.h	(revision 3621)
+++ /issm/trunk/src/c/objects/Matice.h	(revision 3622)
@@ -21,5 +21,5 @@
 		Matice();
 		Matice(int mid,double B,double n);
-		Matice(int i, IoModel* iomodel, int num_vertices);
+		Matice(int mid,int i, IoModel* iomodel, int num_vertices);
 		void Init(int mid,double B,double n);
 		~Matice();
Index: /issm/trunk/src/c/objects/Matpar.cpp
===================================================================
--- /issm/trunk/src/c/objects/Matpar.cpp	(revision 3621)
+++ /issm/trunk/src/c/objects/Matpar.cpp	(revision 3622)
@@ -19,10 +19,10 @@
 		
 /*Object constructors and destructor*/
-/*FUNCTION Matpar::default constructor {{{1*/
+/*FUNCTION Matpar::Matpar() {{{1*/
 Matpar::Matpar(){
 	return;
 }
 /*}}}1*/
-/*FUNCTION Matpar::constructorr {{{1*/
+/*FUNCTION Matpar::Matpar(int matpar_mid, double matpar_rho_ice, double matpar_rho_water, double matpar_heatcapacity, ...){{{1*/
 Matpar::Matpar(int	matpar_mid, double	matpar_rho_ice, double	matpar_rho_water, double  matpar_heatcapacity, double  matpar_thermalconductivity, double  matpar_latentheat, double  matpar_beta, double  matpar_meltingpoint, double  matpar_mixed_layer_capacity, double  matpar_thermal_exchange_velocity, double  matpar_g){
 
@@ -31,8 +31,7 @@
 }
 /*}}}1*/
-/*FUNCTION Matpar::constructor  from iomodel{{{1*/
-Matpar::Matpar(IoModel* iomodel){
-
-	int	  matpar_mid;
+/*FUNCTION Matpar::Matpar(int matpar_mid,IoModel* iomodel){{{1*/
+Matpar::Matpar(int matpar_mid, IoModel* iomodel){
+
 	double  matpar_rho_ice;
 	double  matpar_rho_water;
@@ -46,13 +45,4 @@
 	double  matpar_g;
 
-	if (iomodel->analysis_type==DiagnosticAnalysisEnum && iomodel->sub_analysis_type==HutterAnalysisEnum){
-		if (strcmp(iomodel->meshtype,"2d")==0){
-			matpar_mid=iomodel->numberofvertices+1; //put it at the end of the materials
-		}
-		else{ matpar_mid=iomodel->numberofvertices2d*(iomodel->numlayers-1)+1;}
-	}
-	else{
-		matpar_mid=iomodel->numberofelements+1; //put it at the end of the materials
-	}
 	matpar_g=iomodel->g; 
 	matpar_rho_ice=iomodel->rho_ice; 
@@ -88,5 +78,5 @@
 }
 /*}}}1*/
-/*FUNCTION Matpar::destructor{{{1*/
+/*FUNCTION Matpar::~Matpar() {{{1*/
 Matpar::~Matpar(){
 	return;
Index: /issm/trunk/src/c/objects/Matpar.h
===================================================================
--- /issm/trunk/src/c/objects/Matpar.h	(revision 3621)
+++ /issm/trunk/src/c/objects/Matpar.h	(revision 3622)
@@ -32,5 +32,5 @@
 		Matpar(int	mid, double	rho_ice, double	rho_water, double  heatcapacity, double  thermalconductivity, double  latentheat, double  beta, double  meltingpoint, double  mixed_layer_capacity, double  thermal_exchange_velocity, double  g);
 		void Init(int	mid, double	rho_ice, double	rho_water, double  heatcapacity, double  thermalconductivity, double  latentheat, double  beta, double  meltingpoint, double  mixed_layer_capacity, double  thermal_exchange_velocity, double  g);
-		Matpar(IoModel* iomodel);
+		Matpar(int matpar_id, IoModel* iomodel);
 		~Matpar();
 
Index: /issm/trunk/src/c/objects/Node.cpp
===================================================================
--- /issm/trunk/src/c/objects/Node.cpp	(revision 3621)
+++ /issm/trunk/src/c/objects/Node.cpp	(revision 3622)
@@ -52,6 +52,6 @@
 }
 /*}}}*/
-/*FUNCTION Node::Node(int i, IoModel* iomodel)          -> Continuous Galerkin{{{2*/
-Node::Node(int i, IoModel* iomodel){ //i is the node index
+/*FUNCTION Node::Node(int id, int i, IoModel* iomodel)          -> Continuous Galerkin{{{2*/
+Node::Node(int node_id, int i, IoModel* iomodel){ //i is the node index
 
 	int k;
@@ -62,5 +62,5 @@
 
 	/*id: */
-	this->id=i+1; //matlab indexing
+	this->id=node_id; //matlab indexing
 
 	/*indexing:*/
@@ -161,6 +161,6 @@
 }
 /*}}}*/
-/*FUNCTION Node::Node(int i, int j, IoModel* iomodel)   -> Discontinuous Galerkin{{{2*/
-Node::Node(int i,int j,IoModel* iomodel){
+/*FUNCTION Node::Node(int id, int i, int j, IoModel* iomodel)   -> Discontinuous Galerkin{{{2*/
+Node::Node(int node_id,int i,int j,IoModel* iomodel){
 	/* i -> index of the vertex in C indexing
 	 * j -> index of the node in C indexing*/
@@ -171,5 +171,5 @@
 
 	/*id: */
-	this->id=j+1; //matlab indexing
+	this->id=node_id; //matlab indexing
 
 	/*indexing:*/
Index: sm/trunk/src/c/objects/NodeProperties.cpp
===================================================================
--- /issm/trunk/src/c/objects/NodeProperties.cpp	(revision 3621)
+++ 	(revision )
@@ -1,143 +1,0 @@
-/*!\file NodeProperties.c
- * \brief: implementation of the NodeProperties object
- */
-
-#ifdef HAVE_CONFIG_H
-	#include "config.h"
-#else
-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
-#endif
-
-#include "stdio.h"
-#include "./NodeProperties.h"
-#include <string.h>
-#include "../EnumDefinitions/EnumDefinitions.h"
-#include "../shared/shared.h"
-#include "../DataSet/DataSet.h"
-#include "../include/typedefs.h"
-#include "../include/macros.h"
-
-/*Object constructors and destructor*/
-/*FUNCTION NodeProperties default constructor {{{1*/
-NodeProperties::NodeProperties(){
-	
-	/*initialize to UNDEF every value: */
-	this->onbed=UNDEF;
-	this->onsurface=UNDEF;
-	this->onshelf=UNDEF;
-	this->onsheet=UNDEF;
-}
-/*}}}*/
-/*FUNCTION NodeProperties constructor {{{1*/
-NodeProperties::NodeProperties(int nodeproperties_onbed, int nodeproperties_onsurface, int nodeproperties_onshelf, int nodeproperties_onsheet){
-	this->Init(nodeproperties_onbed, nodeproperties_onsurface, nodeproperties_onshelf, nodeproperties_onsheet);
-
-}
-/*}}}*/
-/*FUNCTION NodeProperties Init: used by constructor {{{1*/
-void NodeProperties::Init(int nodeproperties_onbed, int nodeproperties_onsurface, int nodeproperties_onshelf, int nodeproperties_onsheet){
-
-	this->onbed=nodeproperties_onbed;
-	this->onsurface=nodeproperties_onsurface;
-	this->onshelf=nodeproperties_onshelf;
-	this->onsheet=nodeproperties_onsheet;
-
-}
-/*}}}*/
-/*FUNCTION NodeProperties Init from iomodel: used by constructor {{{1*/
-void NodeProperties::Init(int i, IoModel* iomodel){ //i is the node index
-
-	if (iomodel->gridonbed)      this->onbed=(int)iomodel->gridonbed[i];
-	if (iomodel->gridonsurface)  this->onsurface=(int)iomodel->gridonsurface[i];
-	if (iomodel->gridoniceshelf) this->onshelf=(int)iomodel->gridoniceshelf[i];
-	if (iomodel->gridonicesheet) this->onsheet=(int)iomodel->gridonicesheet[i];
-
-}
-/*}}}*/
-/*FUNCTION NodeProperties copy constructor{{{1*/
-NodeProperties::NodeProperties(NodeProperties* prop){ //copy constructor
-	
-	this->onbed=prop->onbed;
-	this->onsurface=prop->onsurface;
-	this->onshelf=prop->onshelf;
-	this->onsheet=prop->onsheet;
-
-}
-/*}}}*/
-/*FUNCTION NodeProperties destructor {{{1*/
-NodeProperties::~NodeProperties(){ //destructor
-}
-/*}}}*/
-/*FUNCTION NodeProperties Marshall{{{1*/
-void  NodeProperties::Marshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   enum_type=0;
-	int   nill=0;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*get enum type of NodeProperties: */
-	enum_type=NodePropertiesEnum;
-	
-	/*marshall enum: */
-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
-	
-	memcpy(marshalled_dataset,&onbed,sizeof(onbed));marshalled_dataset+=sizeof(onbed);
-	memcpy(marshalled_dataset,&onsurface,sizeof(onsurface));marshalled_dataset+=sizeof(onsurface);
-	memcpy(marshalled_dataset,&onshelf,sizeof(onshelf));marshalled_dataset+=sizeof(onshelf);
-	memcpy(marshalled_dataset,&onsheet,sizeof(onsheet));marshalled_dataset+=sizeof(onsheet);
-
-	*pmarshalled_dataset=marshalled_dataset;
-	return;
-}
-/*}}}*/
-/*FUNCTION NodeProperties MarshallSize{{{1*/
-int NodeProperties::MarshallSize(){
-
-	return sizeof(onbed)+
-		sizeof(onsurface)+
-		sizeof(onshelf)+
-		sizeof(onsheet)+
-		sizeof(int); //sizeof(int) for enum type
-
-}
-/*}}}*/
-/*FUNCTION NodeProperties Demarshall{{{1*/
-void  NodeProperties::Demarshall(char** pmarshalled_dataset){
-
-	char* marshalled_dataset=NULL;
-	int   i;
-	int   enum_type;
-
-	/*recover marshalled_dataset: */
-	marshalled_dataset=*pmarshalled_dataset;
-
-	/*get enum type of object since NodeProperties is not directly called by DataSet: */
-	memcpy(&enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);
-
-	memcpy(&onbed,marshalled_dataset,sizeof(onbed));marshalled_dataset+=sizeof(onbed);
-	memcpy(&onsurface,marshalled_dataset,sizeof(onsurface));marshalled_dataset+=sizeof(onsurface);
-	memcpy(&onshelf,marshalled_dataset,sizeof(onshelf));marshalled_dataset+=sizeof(onshelf);
-	memcpy(&onsheet,marshalled_dataset,sizeof(onsheet));marshalled_dataset+=sizeof(onsheet);
-
-	/*return: */
-	*pmarshalled_dataset=marshalled_dataset;
-	return;
-}
-/*FUNCTION NodeProperties Echo{{{1*/
-void  NodeProperties::Echo(void){
-
-	printf("Node properties:\n");
-	printf("   onbed: %i\n",onbed);
-	printf("   onsurface: %i\n",onsurface);
-	printf("   onshelf: %i\n",onshelf);
-	printf("   onsheet: %i\n",onsheet);
-}
-/*}}}*/
-/*FUNCTION NodeProperties DeepEcho{{{1*/
-void  NodeProperties::DeepEcho(void){
-	this->Echo();
-}
-/*}}}*/
Index: sm/trunk/src/c/objects/NodeProperties.h
===================================================================
--- /issm/trunk/src/c/objects/NodeProperties.h	(revision 3621)
+++ 	(revision )
@@ -1,37 +1,0 @@
-/*!\file: NodeProperties.h
- * \brief prototype for NodeProperties.h
- */ 
-
-#ifndef _NODEPROPERTIES_H_
-#define  _NODEPROPERTIES_H_
-
-/*indefinitions: */
-struct IoModel;
-
-class NodeProperties{
-	
-	public:
-		
-		int	    onbed; /*! for 3d, on bedrock*/
-		int	    onsurface; /*! for 3d, on surface*/
-		int	    onshelf; 
-		int	    onsheet;
-
-		NodeProperties();
-		NodeProperties(int onbed, int onsurface, int onshelf, int onsheet);
-		void Init(int onbed, int onsurface, int onshelf, int onsheet);
-		void Init(int i, IoModel* iomodel);
-		NodeProperties(NodeProperties* properties);
-		~NodeProperties();
-		
-		void  Marshall(char** pmarshalled_dataset);
-		int   MarshallSize();
-		void  Demarshall(char** pmarshalled_dataset);
-		void  copy(NodeProperties* properties);
-		void  Echo(void); 
-		void  DeepEcho(void); 
-
-};
-#endif //ifndef _NODEPROPERTIES_H_
-
-		
Index: /issm/trunk/src/c/objects/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Penta.cpp	(revision 3621)
+++ /issm/trunk/src/c/objects/Penta.cpp	(revision 3622)
@@ -21,5 +21,5 @@
 
 /*Object constructors and destructor*/
-/*FUNCTION Penta default constructor {{{1*/
+/*FUNCTION Penta::Penta(){{{1*/
 Penta::Penta(){
 	this->inputs=NULL;
@@ -27,5 +27,5 @@
 }
 /*}}}*/
-/*FUNCTION Penta constructor {{{1*/
+/*FUNCTION Penta::Penta(int penta_id,int* penta_node_ids, int penta_matice_id, int penta_matpar_id) {{{1*/
 Penta::Penta(int penta_id,int* penta_node_ids, int penta_matice_id, int penta_matpar_id):
 	hnodes(penta_node_ids,6),
@@ -60,6 +60,6 @@
 }
 /*}}}*/
-/*FUNCTION Penta other constructor {{{1*/
-Penta::Penta(int index, IoModel* iomodel){ //i is the element index
+/*FUNCTION Penta::Penta(int id, int index, IoModel* iomodel) {{{1*/
+Penta::Penta(int penta_id, int index, IoModel* iomodel){ //i is the element index
 
 	IssmInt i;
@@ -71,5 +71,5 @@
 
 	/*id: */
-	this->id=index+1;
+	this->id=penta_id;
 
 	/*hooks: */
@@ -139,5 +139,5 @@
 }
 /*}}}*/
-/*FUNCTION Penta destructor {{{1*/
+/*FUNCTION Penta::~Penta(){{{1*/
 Penta::~Penta(){
 	delete inputs;
Index: /issm/trunk/src/c/objects/Penta.h
===================================================================
--- /issm/trunk/src/c/objects/Penta.h	(revision 3621)
+++ /issm/trunk/src/c/objects/Penta.h	(revision 3622)
@@ -43,5 +43,5 @@
 		Penta(int penta_id,int* penta_node_ids, int penta_matice_id, int penta_matpar_id);
 		Penta(int penta_id,Hook* penta_hnodes, Hook* penta_hmatice, Hook* penta_hmatpar, Parameters* penta_parameters, Inputs* inputs);
-		Penta(int i, IoModel* iomodel);
+		Penta(int penta_id,int i, IoModel* iomodel);
 		~Penta();
 		/*}}}*/
Index: /issm/trunk/src/c/objects/Riftfront.cpp
===================================================================
--- /issm/trunk/src/c/objects/Riftfront.cpp	(revision 3621)
+++ /issm/trunk/src/c/objects/Riftfront.cpp	(revision 3622)
@@ -20,5 +20,5 @@
 		
 /*Object constructors and destructor*/
-/*FUNCTION Riftfront::default constructor {{{1*/
+/*FUNCTION Riftfront::Riftfront(){{{1*/
 Riftfront::Riftfront(){
 	/*in case :*/
@@ -27,5 +27,5 @@
 }
 /*}}}1*/
-/*FUNCTION Riftfront::constructor {{{1*/
+/*FUNCTION Riftfront::Riftfront(char riftfront_type[RIFTFRONTSTRING],int riftfront_id, int riftfront_node_ids[MAX_RIFTFRONT_GRIDS], ...){{{1*/
 Riftfront::Riftfront(char riftfront_type[RIFTFRONTSTRING],int riftfront_id, int riftfront_node_ids[MAX_RIFTFRONT_GRIDS], int riftfront_mparid, double riftfront_h[MAX_RIFTFRONT_GRIDS],double riftfront_b[MAX_RIFTFRONT_GRIDS],double riftfront_s[MAX_RIFTFRONT_GRIDS],double riftfront_normal[2],double riftfront_length,int riftfront_fill,double riftfront_friction, double riftfront_fraction,double riftfront_fractionincrement, double riftfront_penalty_offset, int riftfront_penalty_lock, bool riftfront_active,bool riftfront_frozen, int riftfront_counter,bool riftfront_prestable,bool riftfront_shelf){
 
@@ -34,10 +34,9 @@
 }
 /*}}}1*/
-/*FUNCTION Riftfront::constructor from iomodel{{{1*/
-Riftfront::Riftfront(int i, IoModel* iomodel){
+/*FUNCTION Riftfront::Riftfront(int id, int i, IoModel* iomodel){{{1*/
+Riftfront::Riftfront(int riftfront_id,int i, IoModel* iomodel){
 
 	/*rifts: */
 	char riftfront_type[RIFTFRONTSTRING];
-	int  riftfront_id;
 	int  riftfront_node_ids[2];
 	int  riftfront_mparid;
@@ -84,5 +83,4 @@
 
 	strcpy(riftfront_type,"2d");
-	riftfront_id=i+1; //matlab indexing
 	riftfront_node_ids[0]=grid1;
 	riftfront_node_ids[1]=grid2;
@@ -120,5 +118,5 @@
 }
 /*}}}1*/
-/*FUNCTION Riftfront::Init, used by constructor {{{1*/
+/*FUNCTION Riftfront::Init {{{1*/
 void Riftfront::Init(char riftfront_type[RIFTFRONTSTRING],int riftfront_id, int riftfront_node_ids[MAX_RIFTFRONT_GRIDS], int riftfront_mparid, double riftfront_h[MAX_RIFTFRONT_GRIDS],double riftfront_b[MAX_RIFTFRONT_GRIDS],double riftfront_s[MAX_RIFTFRONT_GRIDS],double riftfront_normal[2],double riftfront_length,int riftfront_fill,double riftfront_friction, double riftfront_fraction,double riftfront_fractionincrement, double riftfront_penalty_offset, int riftfront_penalty_lock, bool riftfront_active,bool riftfront_frozen, int riftfront_counter,bool riftfront_prestable,bool riftfront_shelf){
 
@@ -165,5 +163,5 @@
 }
 /*}}}1*/
-/*FUNCTION Riftfront::destructor {{{1*/
+/*FUNCTION Riftfront::~Riftfront(){{{1*/
 Riftfront::~Riftfront(){
 	return;
Index: /issm/trunk/src/c/objects/Riftfront.h
===================================================================
--- /issm/trunk/src/c/objects/Riftfront.h	(revision 3621)
+++ /issm/trunk/src/c/objects/Riftfront.h	(revision 3622)
@@ -54,5 +54,4 @@
 		bool        material_converged;
 
-
 	public:
 
@@ -61,5 +60,5 @@
 		void Init(char type[RIFTFRONTSTRING],int id, int node_ids[MAX_RIFTFRONT_GRIDS], int mparid, double h[MAX_RIFTFRONT_GRIDS],double b[MAX_RIFTFRONT_GRIDS],double s[MAX_RIFTFRONT_GRIDS],double normal[2],double length,int fill,double friction, double fraction, double fractionincrement, double penalty_offset, int penalty_lock,bool active,bool frozen, int counter,bool prestable,bool shelf);
 		Riftfront(char type[RIFTFRONTSTRING],int id, int node_ids[MAX_RIFTFRONT_GRIDS], int mparid, double h[MAX_RIFTFRONT_GRIDS],double b[MAX_RIFTFRONT_GRIDS],double s[MAX_RIFTFRONT_GRIDS],double normal[2],double length,int fill,double friction, double fraction, double fractionincrement, double penalty_offset, int penalty_lock,bool active,bool frozen, int counter,bool prestable,bool shelf);
-		Riftfront(int i, IoModel* iomodel);
+		Riftfront(int id, int i, IoModel* iomodel);
 		~Riftfront();
 		/*}}}*/
Index: /issm/trunk/src/c/objects/Sing.cpp
===================================================================
--- /issm/trunk/src/c/objects/Sing.cpp	(revision 3621)
+++ /issm/trunk/src/c/objects/Sing.cpp	(revision 3622)
@@ -22,5 +22,5 @@
 
 /*Object constructors and destructor*/
-/*FUNCTION Sing::constructor {{{1*/
+/*FUNCTION Sing::Sing(){{{1*/
 Sing::Sing(){
 	this->inputs=NULL;
@@ -29,5 +29,5 @@
 }
 /*}}}*/
-/*FUNCTION Sing constructor {{{1*/
+/*FUNCTION Sing::Sing(int sing_id,int* sing_node_ids, int sing_matice_id, int sing_matpar_id, int sing_numpar_id) {{{1*/
 Sing::Sing(int sing_id,int* sing_node_ids, int sing_matice_id, int sing_matpar_id):
 	hnodes(sing_node_ids,1),
@@ -44,5 +44,5 @@
 }
 /*}}}*/
-/*FUNCTION Sing other constructor {{{1*/
+/*FUNCTION Sing::Sing(int sing_id,Hook* sing_hnodes, Hook* sing_hmatice, Hook* sing_hmatpar, Hook* sing_hnumpar, Inputs* sing_inputs) {{{1*/
 Sing::Sing(int sing_id,Hook* sing_hnodes, Hook* sing_hmatice, Hook* sing_hmatpar, Parameters* sing_parameters,Inputs* sing_inputs):
 	hnodes(sing_hnodes),
@@ -63,6 +63,6 @@
 }
 /*}}}*/
-/*FUNCTION Sing iomodel constructor {{{1*/
-Sing::Sing(int i, IoModel* iomodel){
+/*FUNCTION Sing::Sing(int sing_id, int i, IoModel* iomodel) {{{1*/
+Sing::Sing(int sing_id, int i, IoModel* iomodel){
 
 	int sing_matice_id;
@@ -73,10 +73,9 @@
 	double sing_k;
 
-
 	/*id: */
-	this->id=i+1;
+	this->id=sing_id;
 
 	/*hooks: */
-	sing_matice_id=i+1; //refers to the corresponding material property card
+	sing_matice_id=i+1;                        //refers to the corresponding material property card
 	sing_matpar_id=iomodel->numberofvertices+1;//refers to the corresponding matpar property card
 	sing_g=i+1;
@@ -97,5 +96,5 @@
 }
 /*}}}*/
-/*FUNCTION Sing::destructor {{{1*/
+/*FUNCTION Sing::~Sing(){{{1*/
 Sing::~Sing(){
 	delete inputs;
Index: /issm/trunk/src/c/objects/Sing.h
===================================================================
--- /issm/trunk/src/c/objects/Sing.h	(revision 3621)
+++ /issm/trunk/src/c/objects/Sing.h	(revision 3622)
@@ -36,5 +36,5 @@
 		Sing(int sing_id,int* sing_node_ids, int sing_matice_id, int sing_matpar_id);
 		Sing(int sing_id,Hook* sing_hnodes, Hook* sing_hmatice, Hook* sing_hmatpar, Parameters* sing_parameters,Inputs* sing_inputs);
-		Sing(int i, IoModel* iomodel);
+		Sing(int sing_id, int i, IoModel* iomodel);
 		~Sing();
 		/*}}}*/
Index: /issm/trunk/src/c/objects/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Tria.cpp	(revision 3621)
+++ /issm/trunk/src/c/objects/Tria.cpp	(revision 3622)
@@ -63,6 +63,6 @@
 }
 /*}}}*/
-/*FUNCTION Tria::Tria(int i, IoModel* iomodel){{{1*/
-Tria::Tria(int index, IoModel* iomodel){ //i is the element index
+/*FUNCTION Tria::Tria(int id, int i, IoModel* iomodel){{{1*/
+Tria::Tria(int tria_id, int index, IoModel* iomodel){ //i is the element index
 
 	int i,j;
@@ -73,5 +73,5 @@
 
 	/*id: */
-	this->id=index+1;
+	this->id=tria_id;
 	
 	/*hooks: */
Index: /issm/trunk/src/c/objects/Tria.h
===================================================================
--- /issm/trunk/src/c/objects/Tria.h	(revision 3621)
+++ /issm/trunk/src/c/objects/Tria.h	(revision 3622)
@@ -34,5 +34,5 @@
 		Tria(int tria_id,int* tria_node_ids, int tria_matice_id, int tria_matpar_id);
 		Tria(int tria_id,Hook* tria_hnodes, Hook* tria_hmatice, Hook* tria_hmatpar, Parameters* parameters, Inputs* tria_inputs);
-		Tria(int i, IoModel* iomodel);
+		Tria(int tria_id,int i, IoModel* iomodel);
 		~Tria();
 		/*}}}*/
Index: /issm/trunk/src/c/objects/Vertex.cpp
===================================================================
--- /issm/trunk/src/c/objects/Vertex.cpp	(revision 3621)
+++ /issm/trunk/src/c/objects/Vertex.cpp	(revision 3622)
@@ -21,23 +21,23 @@
 
 /*Object constructors and destructor{{{1*/
-/*FUNCTION Vertex default constructor {{{2*/
+/*FUNCTION Vertex::Vertex() {{{2*/
 Vertex::Vertex(){
 	return;
 }
 /*}}}*/
-/*FUNCTION Vertex constructor {{{2*/
-Vertex::Vertex(int tria_id, double tria_x, double tria_y, double tria_z, double tria_sigma){
-	this->Init(tria_id, tria_x, tria_y, tria_z, tria_sigma);
-}
-/*}}}*/
-/*FUNCTION Vertex init, used by constructor {{{2*/
-void Vertex::Init(int tria_id, double tria_x, double tria_y, double tria_z, double tria_sigma){
+/*FUNCTION Vertex::Vertex(int vertex_id, double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){{{2*/
+Vertex::Vertex(int vertex_id, double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){
+	this->Init(vertex_id, vertex_x, vertex_y, vertex_z, vertex_sigma);
+}
+/*}}}*/
+/*FUNCTION Vertex::Init{{{2*/
+void Vertex::Init(int vertex_id, double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){
 
 	/*all the initialization has been done by the initializer, just fill in the id: */
-	this->id=tria_id;
-	this->x=tria_x;
-	this->y=tria_y;
-	this->z=tria_z;
-	this->sigma=tria_sigma;
+	this->id=vertex_id;
+	this->x=vertex_x;
+	this->y=vertex_y;
+	this->z=vertex_z;
+	this->sigma=vertex_sigma;
 	this->dof=UNDEF;
 
@@ -45,12 +45,12 @@
 }
 /*}}}*/
-/*FUNCTION Vertex constructor  from iomodel{{{2*/
-Vertex::Vertex(int i, IoModel* iomodel){
-
-	this->Init(i+1, iomodel->x[i],iomodel->y[i],iomodel->z[i],(iomodel->z[i]-iomodel->bed[i])/(iomodel->thickness[i]));
-
-}
-/*}}}*/
-/*FUNCTION Vertex destructor {{{2*/
+/*FUNCTION Vertex::Vertex(int vertex_id, int i, IoModel* iomodel) {{{2*/
+Vertex::Vertex(int vertex_id, int i, IoModel* iomodel){
+
+	this->Init(vertex_id, iomodel->x[i],iomodel->y[i],iomodel->z[i],(iomodel->z[i]-iomodel->bed[i])/(iomodel->thickness[i]));
+
+}
+/*}}}*/
+/*FUNCTION Vertex::~Vertex() {{{2*/
 Vertex::~Vertex(){
 	return;
Index: /issm/trunk/src/c/objects/Vertex.h
===================================================================
--- /issm/trunk/src/c/objects/Vertex.h	(revision 3621)
+++ /issm/trunk/src/c/objects/Vertex.h	(revision 3622)
@@ -31,5 +31,5 @@
 		Vertex(int id, double x, double y, double z, double sigma); 
 		void Init(int id, double x, double y, double z, double sigma);
-		Vertex(int i, IoModel* iomodel);
+		Vertex(int id, int i, IoModel* iomodel);
 		~Vertex();
 		/*}}}*/
