Index: /issm/trunk-jpl/src/c/main/esmfbinders.cpp
===================================================================
--- /issm/trunk-jpl/src/c/main/esmfbinders.cpp	(revision 25813)
+++ /issm/trunk-jpl/src/c/main/esmfbinders.cpp	(revision 25814)
@@ -171,5 +171,52 @@
 		if(rc!=ESMF_SUCCESS) _error_("could not create EMSC_Mesh");
 
+		/*How to install ESMG with lib/libesmf.so
+		 * what is a PET?
+		 * should all of these arrays be specific to an MPI? or do all vectors need to be serialized
+		 * do indices need to be 1 based?
+		 * do we need ElementMask, ElementArea or Element Coords?*/
+
 		/*Add nodes (which are ISSM Vertices)*/
+		int numnodes = femmodel->vertices->NumberOfVertices();
+
+		IssmDouble* x=NULL;
+		IssmDouble* y=NULL;
+		IssmDouble* z=NULL;
+		int* nodeOwner=NULL;
+		VertexCoordinatesx(&x,&y,&z,&nodeOwner,femmodel->vertices);
+
+		int* nodeId = xNew<int>(numnodes);
+		IssmDouble* nodeCoord = xNew<IssmDouble>(sdim*numnodes);
+		for(int i=0;i<numnodes;i++){
+			nodeId[i] = i;
+			nodeCoord[sdim*i+0] = x[i];
+			nodeCoord[sdim*i+1] = y[i];
+			nodeCoord[sdim*i+2] = z[i];
+		}
+		xDelete<IssmDouble>(x);
+		xDelete<IssmDouble>(y);
+		xDelete<IssmDouble>(z);
+
+		rc = ESMC_MeshAddNodes(mesh,numnodes,nodeId,nodeCoord,nodeOwner);
+		if(rc!=ESMF_SUCCESS) _error_("could not add nodes to EMSC_Mesh");
+
+		xDelete<int>(nodeOwner);
+		xDelete<int>(nodeId);
+		xDelete<IssmDouble>(nodeCoord);
+
+		/*Add Elements (Assume triangles only for now)*/
+		int numelements = femmodel->elements->NumberOfElements();
+		int* elemId   = xNew<int>(numelements);
+		int* elemType = xNew<int>(numelements);
+		int* elemConn = xNew<int>(numelements*3); /*Assuming triangles*/
+		for(int i=0;i<numelements;i++){
+			_error_("STOP");
+			elemId[i] = i;
+			elemType[i] = ESMC_MESHELEMTYPE_TRI; /*Assuming triangles*/
+		}
+		rc = ESMC_MeshAddElements(mesh,numelements,elemId,elemType,elemConn,NULL,NULL,NULL);
+		xDelete<int>(elemId);
+		xDelete<int>(elemType);
+		xDelete<int>(elemConn);
 
 		/*Some specific code here for the binding: */
