Index: /issm/trunk-jpl/src/c/Container/DataSet.h
===================================================================
--- /issm/trunk-jpl/src/c/Container/DataSet.h	(revision 14964)
+++ /issm/trunk-jpl/src/c/Container/DataSet.h	(revision 14965)
@@ -5,4 +5,5 @@
 #include <cstring>
 #include "../classes/objects/Contour.h"
+#include "../shared/Exp/exp.h"
 
 /*forward declarations */
Index: /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp	(revision 14964)
+++ /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp	(revision 14965)
@@ -10,8 +10,7 @@
 #include "./ContourToMeshx.h"
 
-int ContourToMeshx(IssmSeqVec<double>** pin_nod,IssmSeqVec<double>** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue) {
+int ContourToMeshx(double** pin_nod,double** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue) {
 
 	/*Contour:*/
-	double*  in_nod_serial;
 	double   value;
 
@@ -24,8 +23,8 @@
 
 	/*output: */
-	IssmSeqVec<double>* in_nod=NULL;
-	IssmSeqVec<double>* in_elem=NULL;
-	in_nod  = new IssmSeqVec<double>(nods);
-	in_elem = new IssmSeqVec<double>(nel);
+	double*  in_nod;
+	double*  in_elem;
+	in_nod  = xNew<double>(nods);
+	in_elem  = xNew<double>(nel);
 
 	/*initialize thread parameters: */
@@ -40,21 +39,12 @@
 	LaunchThread(ContourToMeshxt,(void*)&gate,num);
 
-	/*Assemble in_nod: */
-	in_nod->Assemble();
-
-	/*Get in_nod serialised for next operation: */
-	in_nod_serial=in_nod->ToMPISerial();
-
 	/*Take care of the case where an element interpolation has been requested: */
 	if ((strcmp(interptype,"element")==0) || (strcmp(interptype,"element and node")==0)){
 		for(int n=0;n<nel;n++){
-			if ( (in_nod_serial[ (int)*(index+3*n+0) -1] == 1) && (in_nod_serial[ (int)*(index+3*n+1) -1] == 1) && (in_nod_serial[ (int)*(index+3*n+2) -1] == 1) ){
-				value=1; in_elem->SetValue(n,value,INS_VAL);
+			if ( (in_nod[ (int)*(index+3*n+0) -1] == 1) && (in_nod[ (int)*(index+3*n+1) -1] == 1) && (in_nod[ (int)*(index+3*n+2) -1] == 1) ){
+				value=1; in_elem[n]=value;
 			}
 		}
 	}
-
-	/*Assemble vectors: */
-	in_elem->Assemble();
 
 	/*Assign output pointers: */
@@ -62,7 +52,4 @@
 	*pin_elem=in_elem;
 
-	/*Free ressources:*/
-	xDelete<double>(in_nod_serial);
-
 	return 1;
 }
Index: /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.h
===================================================================
--- /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.h	(revision 14964)
+++ /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.h	(revision 14965)
@@ -15,5 +15,5 @@
 	int    nods;
 	int    edgevalue;
-	IssmSeqVec<double> *in_nod;
+	double* in_nod;
 	double *x;
 	double *y;
@@ -22,5 +22,5 @@
 
 /* local prototypes: */
-int ContourToMeshx(IssmSeqVec<double>** pin_nods,IssmSeqVec<double>** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue);
+int ContourToMeshx(double** pin_nods,double** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue);
 
 void* ContourToMeshxt(void* vContourToMeshxThreadStruct);
Index: /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp	(revision 14964)
+++ /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp	(revision 14965)
@@ -33,5 +33,5 @@
 	double* x=NULL;
 	double* y=NULL;
-	IssmSeqVec<double>* in_nod=NULL;
+	double* in_nod=NULL;
 
 	/*recover handle and gate: */
Index: /issm/trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.cpp	(revision 14964)
+++ /issm/trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.cpp	(revision 14965)
@@ -4,5 +4,5 @@
 #include "./ContourToNodesx.h"
 
-int ContourToNodesx(IssmSeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, Contour<IssmPDouble>** contours,int numcontours,int edgevalue){
+int ContourToNodesx(IssmPDouble** pflags,double* x, double* y, int nods, Contour<IssmPDouble>** contours,int numcontours,int edgevalue){
 
 	int i;
@@ -15,6 +15,6 @@
 
 	/*output: */
-	IssmSeqVec<IssmPDouble>* flags=NULL;
-	flags=new IssmSeqVec<IssmPDouble>(nods);
+	IssmPDouble* flags=NULL;
+	flags=xNew<IssmPDouble>(nods);
 
 	/*Loop through all contours: */
@@ -27,7 +27,4 @@
 	}
 
-	/*Assemble vector: */
-	flags->Assemble();
-
 	/*Assign output pointers: */
 	*pflags=flags;
@@ -35,5 +32,5 @@
 }
 
-int ContourToNodesx(IssmSeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue){
+int ContourToNodesx(IssmPDouble** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue){
 
 	/*Contour:*/
@@ -43,6 +40,6 @@
 
 	/*output: */
-	IssmSeqVec<IssmPDouble>* flags=NULL;
-	flags=new IssmSeqVec<IssmPDouble>(nods);
+	IssmPDouble* flags=NULL;
+	flags=xNew<IssmPDouble>(nods);
 
 	/*Loop through all contours: */
@@ -54,7 +51,4 @@
 	}
 
-	/*Assemble vector: */
-	flags->Assemble();
-
 	/*Assign output pointers: */
 	*pflags=flags;
Index: /issm/trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.h
===================================================================
--- /issm/trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.h	(revision 14964)
+++ /issm/trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.h	(revision 14965)
@@ -10,6 +10,6 @@
 
 /* local prototypes: */
-int ContourToNodesx(IssmSeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, Contour<IssmPDouble>** contours,int numcontours,int edgevalue);
-int ContourToNodesx(IssmSeqVec<IssmPDouble>** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue);
+int ContourToNodesx(IssmPDouble** pflags,double* x, double* y, int nods, Contour<IssmPDouble>** contours,int numcontours,int edgevalue);
+int ContourToNodesx(IssmPDouble** pflags,double* x, double* y, int nods, DataSet* contours, int edgevalue);
 
 #endif /* _CONTOURTONODESX_H */
Index: /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp	(revision 14964)
+++ /issm/trunk-jpl/src/c/modules/InterpFromMesh2dx/InterpFromMesh2dx.cpp	(revision 14965)
@@ -25,5 +25,4 @@
 
 	/*contours: */
-	IssmSeqVec<IssmPDouble> *vec_incontour = NULL;
 	double              *incontour     = NULL;
 
@@ -77,6 +76,5 @@
 	/*Build indices of contour: */
 	if(numcontours){
-		ContourToNodesx( &vec_incontour,x_prime,y_prime,nods_prime,contours,numcontours,1);
-		incontour=vec_incontour->ToMPISerial();
+		ContourToNodesx( &incontour,x_prime,y_prime,nods_prime,contours,numcontours,1);
 	}
 	else{
Index: /issm/trunk-jpl/src/c/shared/Exp/exp.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/Exp/exp.h	(revision 14964)
+++ /issm/trunk-jpl/src/c/shared/Exp/exp.h	(revision 14965)
@@ -8,5 +8,6 @@
 #include <cstring>
 #include "../Numerics/recast.h"
-#include "../../toolkits/toolkits.h"
+#include "../Exceptions/exceptions.h"
+#include "../MemOps/MemOps.h"
 
 int IsInPolySerial(double* in,double* xc,double* yc,int numvertices,double* x,double* y,int nods, int edgevalue);
@@ -14,5 +15,5 @@
 int pnpoly(int npol, double *xp, double *yp, double x, double y, int edgevalue);
 
-template <class doubletype> int IsInPoly(IssmSeqVec<doubletype>* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue){ /*{{{*/
+template <class doubletype> int IsInPoly(doubletype* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue){ /*{{{*/
 
 	int i;
@@ -36,5 +37,5 @@
 
 		//Get current value of value[i] -> do not change it if != 0
-		in->GetValue(&value,i);
+		value=in[i];
 		if (reCast<bool,doubletype>(value)){
 			/*this vertex already is inside one of the contours, continue*/
@@ -50,5 +51,5 @@
 			value=pnpoly(numvertices,xc,yc,x0,y0,edgevalue);
 		}
-		in->SetValue(i,value,INS_VAL);
+		in[i]=value;
 	}
 	 return 1;
Index: /issm/trunk-jpl/src/c/shared/io/Disk/WriteLockFile.cpp
===================================================================
--- /issm/trunk-jpl/src/c/shared/io/Disk/WriteLockFile.cpp	(revision 14964)
+++ /issm/trunk-jpl/src/c/shared/io/Disk/WriteLockFile.cpp	(revision 14965)
@@ -2,6 +2,7 @@
  * \brief
  */ 
-#include <stdio.h>
-#include "../../shared.h"
+#include "../../Exceptions/exceptions.h"
+#include "../Comm/Comm.h"
+#include "../Print/Print.h"
 
 void WriteLockFile(char* filename){
Index: /issm/trunk-jpl/src/c/shared/shared.h
===================================================================
--- /issm/trunk-jpl/src/c/shared/shared.h	(revision 14964)
+++ /issm/trunk-jpl/src/c/shared/shared.h	(revision 14965)
@@ -11,4 +11,5 @@
 #include "./Enum/Enum.h"
 #include "./Exceptions/exceptions.h"
+#include "./io/io.h"
 #include "./Exp/exp.h"
 #include "./Matrix/matrix.h"
Index: /issm/trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp
===================================================================
--- /issm/trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp	(revision 14964)
+++ /issm/trunk-jpl/src/c/toolkits/mpi/patches/DetermineLocalSize.cpp	(revision 14965)
@@ -6,5 +6,4 @@
 #include <math.h>
 #include "../../../shared/shared.h"
-#include "../../../shared/Numerics/types.h"
 
 int DetermineLocalSize(int global_size,COMM comm){
Index: /issm/trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.cpp
===================================================================
--- /issm/trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.cpp	(revision 14964)
+++ /issm/trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.cpp	(revision 14965)
@@ -40,6 +40,6 @@
 
 	/* output: */
-	IssmSeqVec<double> *in_nod  = NULL;
-	IssmSeqVec<double> *in_elem = NULL;
+	double *in_nod  = NULL;
+	double *in_elem = NULL;
 
 	/*Boot module: */
@@ -72,14 +72,14 @@
 	/* output: */
 	if (strcmp(interptype,"node")==0){
-		WriteData(PLHS0,in_nod);
+		WriteData(PLHS0,in_nod,nods);
 		WriteData(PLHS1);
 	}
 	else if (strcmp(interptype,"element")==0){
-		WriteData(PLHS0,in_elem);
+		WriteData(PLHS0,in_elem,nel);
 		WriteData(PLHS1);
 	}
 	else if (strcmp(interptype,"element and node")==0){
-		WriteData(PLHS0,in_nod);
-		WriteData(PLHS1,in_elem);
+		WriteData(PLHS0,in_nod,nods);
+		WriteData(PLHS1,in_elem,nel);
 	}
 	else _error_("wrong interpolation type");
Index: /issm/trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.h
===================================================================
--- /issm/trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.h	(revision 14964)
+++ /issm/trunk-jpl/src/wrappers/ContourToMesh/ContourToMesh.h	(revision 14965)
@@ -25,5 +25,5 @@
 #include "../../c/shared/shared.h"
 #include "../../c/shared/io/io.h"
-#include "../../c/EnumDefinitions/EnumDefinitions.h"
+#include "../../c/shared/Enum/Enum.h"
 
 #undef __FUNCT__
Index: /issm/trunk-jpl/src/wrappers/ContourToNodes/ContourToNodes.cpp
===================================================================
--- /issm/trunk-jpl/src/wrappers/ContourToNodes/ContourToNodes.cpp	(revision 14964)
+++ /issm/trunk-jpl/src/wrappers/ContourToNodes/ContourToNodes.cpp	(revision 14965)
@@ -25,5 +25,5 @@
 
 	/* output: */
-	IssmSeqVec<double> *flags = NULL;
+	double *flags = NULL;
 
 	/*Boot module: */
@@ -43,5 +43,5 @@
 
 	/* output: */
-	WriteData(FLAGS,flags);
+	WriteData(FLAGS,flags,nods);
 
 	/*end module: */
Index: /issm/trunk-jpl/src/wrappers/EdgeDetection/EdgeDetection.h
===================================================================
--- /issm/trunk-jpl/src/wrappers/EdgeDetection/EdgeDetection.h	(revision 14964)
+++ /issm/trunk-jpl/src/wrappers/EdgeDetection/EdgeDetection.h	(revision 14965)
@@ -25,5 +25,5 @@
 #include "../../c/shared/shared.h"
 #include "../../c/shared/io/io.h"
-#include "../../c/EnumDefinitions/EnumDefinitions.h"
+#include "../../c/shared/Enum/Enum.h"
 
 #undef __FUNCT__ 
Index: /issm/trunk-jpl/src/wrappers/ElementConnectivity/ElementConnectivity.h
===================================================================
--- /issm/trunk-jpl/src/wrappers/ElementConnectivity/ElementConnectivity.h	(revision 14964)
+++ /issm/trunk-jpl/src/wrappers/ElementConnectivity/ElementConnectivity.h	(revision 14965)
@@ -25,5 +25,5 @@
 #include "../../c/shared/shared.h"
 #include "../../c/shared/io/io.h"
-#include "../../c/EnumDefinitions/EnumDefinitions.h"
+#include "../../c/shared/Enum/Enum.h"
 
 #undef __FUNCT__ 
Index: /issm/trunk-jpl/src/wrappers/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
===================================================================
--- /issm/trunk-jpl/src/wrappers/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h	(revision 14964)
+++ /issm/trunk-jpl/src/wrappers/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h	(revision 14965)
@@ -25,5 +25,5 @@
 #include "../../c/shared/shared.h"
 #include "../../c/shared/io/io.h"
-#include "../../c/EnumDefinitions/EnumDefinitions.h"
+#include "../../c/shared/Enum/Enum.h"
 
 #undef __FUNCT__ 
Index: /issm/trunk-jpl/src/wrappers/NodeConnectivity/NodeConnectivity.h
===================================================================
--- /issm/trunk-jpl/src/wrappers/NodeConnectivity/NodeConnectivity.h	(revision 14964)
+++ /issm/trunk-jpl/src/wrappers/NodeConnectivity/NodeConnectivity.h	(revision 14965)
@@ -28,5 +28,5 @@
 #include "../../c/shared/shared.h"
 #include "../../c/shared/io/io.h"
-#include "../../c/EnumDefinitions/EnumDefinitions.h"
+#include "../../c/shared/Enum/Enum.h"
 
 #ifdef _HAVE_MATLAB_MODULES_
Index: /issm/trunk-jpl/src/wrappers/TriMesh/TriMesh.h
===================================================================
--- /issm/trunk-jpl/src/wrappers/TriMesh/TriMesh.h	(revision 14964)
+++ /issm/trunk-jpl/src/wrappers/TriMesh/TriMesh.h	(revision 14965)
@@ -25,5 +25,5 @@
 #include "../../c/shared/shared.h"
 #include "../../c/shared/io/io.h"
-#include "../../c/EnumDefinitions/EnumDefinitions.h"
+#include "../../c/shared/Enum/Enum.h"
 
 #undef __FUNCT__ 
Index: /issm/trunk-jpl/src/wrappers/python/io/WritePythonData.cpp
===================================================================
--- /issm/trunk-jpl/src/wrappers/python/io/WritePythonData.cpp	(revision 14964)
+++ /issm/trunk-jpl/src/wrappers/python/io/WritePythonData.cpp	(revision 14965)
@@ -15,5 +15,5 @@
 #include "../../c/Container/Container.h"
 #include "../../c/shared/shared.h"
-#include "../../c/EnumDefinitions/EnumDefinitions.h"
+#include "../../c/shared/Enum/Enum.h"
 
 /*Primitive data types*/
