Index: ../trunk-jpl/src/c/classes/Masscon.h
===================================================================
--- ../trunk-jpl/src/c/classes/Masscon.h	(revision 18884)
+++ ../trunk-jpl/src/c/classes/Masscon.h	(revision 18885)
@@ -19,6 +19,7 @@
 
 	public: 
 
+		int         definitionenum;
 		char*       name;
 		IssmDouble* levelset;
 		int         M;
@@ -26,14 +27,16 @@
 		/*Masscon constructors, destructors :*/
 		Masscon(){/*{{{*/
 
+			this->definitionenum = -1;
 			this->name = NULL;
 			this->levelset=NULL;
 			this->M=0;
 
 		}
 		/*}}}*/
-		Masscon(char* in_name, IssmDouble* levelsetin, int Min){ /*{{{*/
+		Masscon(char* in_name, int in_definitionenum, IssmDouble* levelsetin, int Min){ /*{{{*/
 
+			this->definitionenum=in_definitionenum;
 			this->name   = xNew<char>(strlen(in_name)+1);
 			xMemCpy<char>(this->name,in_name,strlen(in_name)+1);
 
@@ -51,7 +54,7 @@
 		/*}}}*/
 		/*Object virtual function resolutoin: */
 		void Echo(void){/*{{{*/
-			_printf_(" Masscon: " << name << "\n");
+			_printf_(" Masscon: " << this->name << " " << this->definitionenum << "\n");
 			_printf_("    levelset: " << this->levelset << "\n");
 			_printf_("    M: " << this->M << "\n");
 		}
@@ -69,7 +72,7 @@
 		}
 		/*}}}*/
 		Object* copy() {/*{{{*/
-			Masscon* mf = new Masscon(this->name,this->levelset,this->M);
+			Masscon* mf = new Masscon(this->name,this->definitionenum,this->levelset,this->M);
 			return (Object*) mf;
 		}
 		/*}}}*/
@@ -82,6 +85,11 @@
 			return name2;
 		}
 		/*}}}*/
+		int DefinitionEnum(){/*{{{*/
+
+			return this->definitionenum;
+		}
+		/*}}}*/
 		 IssmDouble Response(FemModel* femmodel){/*{{{*/
 
 			 int i;
Index: ../trunk-jpl/src/c/classes/Misfit.h
===================================================================
--- ../trunk-jpl/src/c/classes/Misfit.h	(revision 18884)
+++ ../trunk-jpl/src/c/classes/Misfit.h	(revision 18885)
@@ -20,6 +20,7 @@
 
 	public: 
 
+		int         definitionenum;
 		char*       name;
 		int         model_enum;
 		int         observation_enum;
@@ -32,6 +33,7 @@
 		/*Misfit constructors, destructors :*/
 		Misfit(){/*{{{*/
 
+			this->definitionenum = -1;
 			this->name = NULL;
 			this->model_enum = UNDEF;
 			this->observation_enum = UNDEF;
@@ -42,8 +44,9 @@
 
 		}
 		/*}}}*/
-		Misfit(char* in_name, int in_model_enum, int in_observation_enum, char* in_timeinterpolation, int in_weights_enum){/*{{{*/
+		Misfit(char* in_name, int in_definitionenum, int in_model_enum, int in_observation_enum, char* in_timeinterpolation, int in_weights_enum){/*{{{*/
 
+			this->definitionenum=in_definitionenum;
 			this->name   = xNew<char>(strlen(in_name)+1);
 			xMemCpy<char>(this->name,in_name,strlen(in_name)+1);
 
@@ -67,7 +70,7 @@
 		/*}}}*/
 		/*Object virtual function resolutoin: */
 		void Echo(void){/*{{{*/
-			_printf_(" Misfit: " << name << "\n");
+			_printf_(" Misfit: " << name << " " << this->definitionenum << "\n");
 			_printf_("    model_enum: " << model_enum << " " << EnumToStringx(model_enum) << "\n");
 			_printf_("    observation_enum: " << observation_enum << " " << EnumToStringx(observation_enum) << "\n");
 			_printf_("    weights_enum: " << weights_enum << " " << EnumToStringx(weights_enum) << "\n");
@@ -87,7 +90,7 @@
 		}
 		/*}}}*/
 		Object* copy() {/*{{{*/
-			Misfit* mf = new Misfit(this->name,this->model_enum,this->observation_enum,this->timeinterpolation,this->weights_enum);
+			Misfit* mf = new Misfit(this->name,this->definitionenum, this->model_enum,this->observation_enum,this->timeinterpolation,this->weights_enum);
 			mf->misfit=this->misfit;
 			mf->lock=this->lock;
 			return (Object*) mf;
@@ -102,6 +105,11 @@
 			return name2;
 		}
 		/*}}}*/
+		int DefinitionEnum(){/*{{{*/
+
+			return this->definitionenum;
+		}
+		/*}}}*/
 		 IssmDouble Response(FemModel* femmodel){/*{{{*/
 
 			 int i;
Index: ../trunk-jpl/src/c/classes/Massconaxpby.h
===================================================================
--- ../trunk-jpl/src/c/classes/Massconaxpby.h	(revision 18884)
+++ ../trunk-jpl/src/c/classes/Massconaxpby.h	(revision 18885)
@@ -19,6 +19,7 @@
 
 	public: 
 
+		int         definitionenum;
 		char*       name;
 		char*       namex;
 		char*       namey;
@@ -28,6 +29,7 @@
 		/*Massconaxpby constructors, destructors :*/
 		Massconaxpby(){/*{{{*/
 
+			this->definitionenum = -1;
 			this->name = NULL;
 			this->namex = NULL;
 			this->namey = NULL;
@@ -36,8 +38,9 @@
 
 		}
 		/*}}}*/
-		Massconaxpby(char* in_name,char* in_namex, char* in_namey, IssmDouble in_alpha,IssmDouble in_beta){ /*{{{*/
+		Massconaxpby(char* in_name,int in_definitionenum, char* in_namex, char* in_namey, IssmDouble in_alpha,IssmDouble in_beta){ /*{{{*/
 
+			this->definitionenum = in_definitionenum;
 			this->name   = xNew<char>(strlen(in_name)+1);
 			xMemCpy<char>(this->name,in_name,strlen(in_name)+1);
 
@@ -60,7 +63,7 @@
 		/*}}}*/
 		/*Object virtual function resolutoin: */
 		void Echo(void){/*{{{*/
-			_printf_(" Massconaxpby: " << this->name << "\n");
+			_printf_(" Massconaxpby: " << this->name << " " << this->definitionenum << "\n");
 			_printf_("    namex: " << this->namex << "\n");
 			_printf_("    namey: " << this->namey << "\n");
 			_printf_("    alpha: " << this->alpha << "\n");
@@ -80,7 +83,7 @@
 		}
 		/*}}}*/
 		Object* copy() {/*{{{*/
-			Massconaxpby* mf = new Massconaxpby(this->name,this->namex,this->namey, this->alpha, this->beta);
+			Massconaxpby* mf = new Massconaxpby(this->name,this->definitionenum,this->namex,this->namey, this->alpha, this->beta);
 			return (Object*) mf;
 		}
 		/*}}}*/
@@ -93,6 +96,11 @@
 			return name2;
 		}
 		/*}}}*/
+		int DefinitionEnum(){/*{{{*/
+
+			return this->definitionenum;
+		}
+		/*}}}*/
 		 IssmDouble Response(FemModel* femmodel){/*{{{*/
 
 			 IssmDouble xresponse,yresponse;
Index: ../trunk-jpl/src/c/classes/Massfluxatgate.h
===================================================================
--- ../trunk-jpl/src/c/classes/Massfluxatgate.h	(revision 18884)
+++ ../trunk-jpl/src/c/classes/Massfluxatgate.h	(revision 18885)
@@ -19,6 +19,7 @@
 
 	public: 
 
+		int         definitionenum;
 		char*       name;
 		int         numsegments;
 		doubletype *x1;
@@ -29,15 +30,18 @@
 
 		/*Massfluxatgate constructors, destructors :*/
 		Massfluxatgate(){/*{{{*/
+			this->definitionenum        = -1;
 			this->name        = 0;
 			this->numsegments = 0;
 			this->segments    = 0;
 		}
 		/*}}}*/
-		Massfluxatgate(char* in_name, int in_numsegments, doubletype* in_segments) {/*{{{*/
+		Massfluxatgate(char* in_name, int in_definitionenum, int in_numsegments, doubletype* in_segments) {/*{{{*/
 			
 			int i;
 
+			this->definitionenum=in_definitionenum;
+
 			this->name   = xNew<char>(strlen(in_name)+1);
 			xMemCpy<char>(this->name,in_name,strlen(in_name)+1);
 
@@ -60,8 +64,9 @@
 			}
 		}
 		/*}}}*/
-		Massfluxatgate(char* in_name, int in_numsegments, doubletype* in_x1, doubletype* in_y1, doubletype* in_x2, doubletype* in_y2,int* in_elements){/*{{{*/
+		Massfluxatgate(char* in_name, int in_definitionenum, int in_numsegments, doubletype* in_x1, doubletype* in_y1, doubletype* in_x2, doubletype* in_y2,int* in_elements){/*{{{*/
 
+			this->definitionenum=in_definitionenum;
 			this->name   = xNew<char>(strlen(in_name)+1);
 			xMemCpy<char>(this->name,in_name,strlen(in_name)+1);
 
@@ -89,7 +94,7 @@
 
 		/*Object virtual function resolutoin: */
 		void Echo(void){/*{{{*/
-			_printf_(" Massfluxatgate: " << name << "\n");
+			_printf_(" Massfluxatgate: " << name << " " << this->definitionenum << "\n");
 			_printf_("    numsegments: " << numsegments << "\n");
 			if(numsegments){
 				_printf_("   element: x1, y1, x2, y2:\n");
@@ -112,7 +117,7 @@
 		}
 		/*}}}*/
 		Object* copy() {/*{{{*/
-			return new Massfluxatgate(this->name,this->numsegments,this->x1,this->y1,this->x2,this->y2,this->elements); 
+			return new Massfluxatgate(this->name,this->definitionenum,this->numsegments,this->x1,this->y1,this->x2,this->y2,this->elements); 
 		}
 		/*}}}*/
 		/*Definition virtual function resolutoin: */
@@ -124,6 +129,11 @@
 			return name2;
 		}
 		/*}}}*/
+		int DefinitionEnum(){/*{{{*/
+
+			return this->definitionenum;
+		}
+		/*}}}*/
 		 IssmDouble Response(FemModel* femmodel){/*{{{*/
 
 			int          i,j;
