Index: /issm/trunk/src/c/Container/Inputs.cpp
===================================================================
--- /issm/trunk/src/c/Container/Inputs.cpp	(revision 9733)
+++ /issm/trunk/src/c/Container/Inputs.cpp	(revision 9734)
@@ -412,5 +412,5 @@
 /*}}}*/
 /*FUNCTION Inputs::AXPY{{{1*/
-void  Inputs::AXPY(int YEnum, double scalar, int XEnum){
+void  Inputs::AXPY(int MeshYEnum, double scalar, int MeshXEnum){
 	   
 	Input* xinput=NULL;
@@ -418,10 +418,10 @@
 
 	/*Find x and y inputs: */
-	xinput=(Input*)this->GetInput(XEnum);
-	yinput=(Input*)this->GetInput(YEnum);
+	xinput=(Input*)this->GetInput(MeshXEnum);
+	yinput=(Input*)this->GetInput(MeshYEnum);
 
 	/*some checks: */
-	if(!xinput) _error_(" input %s could not be found!",EnumToStringx(XEnum));
-	if(!yinput) _error_(" input %s could not be found!",EnumToStringx(YEnum));
+	if(!xinput) _error_(" input %s could not be found!",EnumToStringx(MeshXEnum));
+	if(!yinput) _error_(" input %s could not be found!",EnumToStringx(MeshYEnum));
 
 	/*Apply AXPY: */
Index: /issm/trunk/src/c/Container/Inputs.h
===================================================================
--- /issm/trunk/src/c/Container/Inputs.h	(revision 9733)
+++ /issm/trunk/src/c/Container/Inputs.h	(revision 9734)
@@ -37,5 +37,5 @@
 		Input*  GetInput(int enum_name);
 		Inputs* SpawnTriaInputs(int* indices);
-		void    AXPY(int YEnum, double scalar, int XEnum);
+		void    AXPY(int MeshYEnum, double scalar, int MeshXEnum);
 		double  InfinityNorm(int enumtype);
 		double  Max(int enumtype);
Index: /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h
===================================================================
--- /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 9733)
+++ /issm/trunk/src/c/EnumDefinitions/EnumDefinitions.h	(revision 9734)
@@ -165,4 +165,7 @@
 	MeshElementsEnum,
 	MeshEdgesEnum,
+	MeshYEnum,
+	MeshZEnum,
+	MeshXEnum,
 	/*}}}*/
 	/*Datasets {{{1*/
@@ -473,7 +476,4 @@
 	TransientInputEnum,
 	/*Temporary*/
-	YEnum,
-	ZEnum,
-	XEnum,
 	OutputfilenameEnum,
 	WaterfractionEnum,
Index: /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp
===================================================================
--- /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 9733)
+++ /issm/trunk/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 9734)
@@ -169,4 +169,7 @@
 		case MeshElementsEnum : return "MeshElements";
 		case MeshEdgesEnum : return "MeshEdges";
+		case MeshYEnum : return "MeshY";
+		case MeshZEnum : return "MeshZ";
+		case MeshXEnum : return "MeshX";
 		case ConstraintsEnum : return "Constraints";
 		case LoadsEnum : return "Loads";
@@ -416,7 +419,4 @@
 		case DragCoefficientAbsGradientEnum : return "DragCoefficientAbsGradient";
 		case TransientInputEnum : return "TransientInput";
-		case YEnum : return "Y";
-		case ZEnum : return "Z";
-		case XEnum : return "X";
 		case OutputfilenameEnum : return "Outputfilename";
 		case WaterfractionEnum : return "Waterfraction";
Index: /issm/trunk/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp	(revision 9733)
+++ /issm/trunk/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp	(revision 9734)
@@ -72,5 +72,5 @@
 
 	/*Fetch data:*/
-	iomodel->FetchData(5,XEnum,YEnum,ZEnum,BedEnum,ThicknessEnum);
+	iomodel->FetchData(5,MeshXEnum,MeshYEnum,MeshZEnum,BedEnum,ThicknessEnum);
 	
 	for (i=0;i<numberofvertices;i++){
@@ -85,5 +85,5 @@
 
 	/*Free data: */
-	iomodel->DeleteData(5,XEnum,YEnum,ZEnum,BedEnum,ThicknessEnum);
+	iomodel->DeleteData(5,MeshXEnum,MeshYEnum,MeshZEnum,BedEnum,ThicknessEnum);
 
 	/*Assign output pointer: */
Index: /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp
===================================================================
--- /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp	(revision 9733)
+++ /issm/trunk/src/c/modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp	(revision 9734)
@@ -69,5 +69,5 @@
 	iomodel->FetchData(&vertices_type,NULL,NULL,FlowequationVertexEquationEnum);
 	iomodel->FetchData(&surface,NULL,NULL,SurfaceEnum);
-	iomodel->FetchData(&z,NULL,NULL,ZEnum);
+	iomodel->FetchData(&z,NULL,NULL,MeshZEnum);
 
 	/*Initialize counter: */
Index: /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp
===================================================================
--- /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 9733)
+++ /issm/trunk/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 9734)
@@ -167,4 +167,7 @@
 	else if (strcmp(name,"MeshElements")==0) return MeshElementsEnum;
 	else if (strcmp(name,"MeshEdges")==0) return MeshEdgesEnum;
+	else if (strcmp(name,"MeshY")==0) return MeshYEnum;
+	else if (strcmp(name,"MeshZ")==0) return MeshZEnum;
+	else if (strcmp(name,"MeshX")==0) return MeshXEnum;
 	else if (strcmp(name,"Constraints")==0) return ConstraintsEnum;
 	else if (strcmp(name,"Loads")==0) return LoadsEnum;
@@ -414,7 +417,4 @@
 	else if (strcmp(name,"DragCoefficientAbsGradient")==0) return DragCoefficientAbsGradientEnum;
 	else if (strcmp(name,"TransientInput")==0) return TransientInputEnum;
-	else if (strcmp(name,"Y")==0) return YEnum;
-	else if (strcmp(name,"Z")==0) return ZEnum;
-	else if (strcmp(name,"X")==0) return XEnum;
 	else if (strcmp(name,"Outputfilename")==0) return OutputfilenameEnum;
 	else if (strcmp(name,"Waterfraction")==0) return WaterfractionEnum;
Index: /issm/trunk/src/c/objects/Vertex.cpp
===================================================================
--- /issm/trunk/src/c/objects/Vertex.cpp	(revision 9733)
+++ /issm/trunk/src/c/objects/Vertex.cpp	(revision 9734)
@@ -31,5 +31,5 @@
 Vertex::Vertex(int vertex_id, int vertex_sid,int i, IoModel* iomodel){
 
-	this->Init(vertex_id, vertex_sid, iomodel->Data(XEnum)[i],iomodel->Data(YEnum)[i],iomodel->Data(ZEnum)[i],(iomodel->Data(ZEnum)[i]-iomodel->Data(BedEnum)[i])/(iomodel->Data(ThicknessEnum)[i]));
+	this->Init(vertex_id, vertex_sid, iomodel->Data(MeshXEnum)[i],iomodel->Data(MeshYEnum)[i],iomodel->Data(MeshZEnum)[i],(iomodel->Data(MeshZEnum)[i]-iomodel->Data(BedEnum)[i])/(iomodel->Data(ThicknessEnum)[i]));
 
 }
Index: /issm/trunk/src/m/classes/mesh.m
===================================================================
--- /issm/trunk/src/m/classes/mesh.m	(revision 9733)
+++ /issm/trunk/src/m/classes/mesh.m	(revision 9734)
@@ -37,4 +37,7 @@
 		elements            = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',2);
 		edges               = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',3);
+		x                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		y                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
+		z                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
 	end
 	methods
Index: /issm/trunk/src/m/classes/model/model.m
===================================================================
--- /issm/trunk/src/m/classes/model/model.m	(revision 9733)
+++ /issm/trunk/src/m/classes/model/model.m	(revision 9734)
@@ -41,9 +41,4 @@
 		 autodiff         = modelfield('default',0,'marshall',true);
 		 mesh             = modelfield('default',0,'marshall',true);
-
-		 %FIXME: all other fields should belong to other classes
-		 x                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 y                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
-		 z                   = modelfield('default',NaN,'marshall',true,'format','DoubleMat','mattype',1);
 
 		 %}}}
@@ -265,4 +260,7 @@
 			 if isfield(structmd,'elements'), md.mesh.elements=structmd.mesh.elements; end
 			 if isfield(structmd,'edges'), md.mesh.edges=structmd.mesh.edges; end
+			 if isfield(structmd,'y'), md.mesh.y=structmd.y; end
+			 if isfield(structmd,'x'), md.mesh.x=structmd.x; end
+			 if isfield(structmd,'z'), md.mesh.z=structmd.z; end
 
 			 %Field changes
Index: /issm/trunk/src/m/enum/MeshXEnum.m
===================================================================
--- /issm/trunk/src/m/enum/MeshXEnum.m	(revision 9734)
+++ /issm/trunk/src/m/enum/MeshXEnum.m	(revision 9734)
@@ -0,0 +1,11 @@
+function macro=MeshXEnum()
+%MESHXENUM - Enum of MeshX
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
+%            Please read src/c/EnumDefinitions/README for more information
+%
+%   Usage:
+%      macro=MeshXEnum()
+
+macro=StringToEnum('MeshX');
Index: /issm/trunk/src/m/enum/MeshYEnum.m
===================================================================
--- /issm/trunk/src/m/enum/MeshYEnum.m	(revision 9734)
+++ /issm/trunk/src/m/enum/MeshYEnum.m	(revision 9734)
@@ -0,0 +1,11 @@
+function macro=MeshYEnum()
+%MESHYENUM - Enum of MeshY
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
+%            Please read src/c/EnumDefinitions/README for more information
+%
+%   Usage:
+%      macro=MeshYEnum()
+
+macro=StringToEnum('MeshY');
Index: /issm/trunk/src/m/enum/MeshZEnum.m
===================================================================
--- /issm/trunk/src/m/enum/MeshZEnum.m	(revision 9734)
+++ /issm/trunk/src/m/enum/MeshZEnum.m	(revision 9734)
@@ -0,0 +1,11 @@
+function macro=MeshZEnum()
+%MESHZENUM - Enum of MeshZ
+%
+%   WARNING: DO NOT MODIFY THIS FILE
+%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
+%            Please read src/c/EnumDefinitions/README for more information
+%
+%   Usage:
+%      macro=MeshZEnum()
+
+macro=StringToEnum('MeshZ');
Index: sm/trunk/src/m/enum/XEnum.m
===================================================================
--- /issm/trunk/src/m/enum/XEnum.m	(revision 9733)
+++ 	(revision )
@@ -1,11 +1,0 @@
-function macro=XEnum()
-%XENUM - Enum of X
-%
-%   WARNING: DO NOT MODIFY THIS FILE
-%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
-%            Please read src/c/EnumDefinitions/README for more information
-%
-%   Usage:
-%      macro=XEnum()
-
-macro=StringToEnum('X');
Index: sm/trunk/src/m/enum/YEnum.m
===================================================================
--- /issm/trunk/src/m/enum/YEnum.m	(revision 9733)
+++ 	(revision )
@@ -1,11 +1,0 @@
-function macro=YEnum()
-%YENUM - Enum of Y
-%
-%   WARNING: DO NOT MODIFY THIS FILE
-%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
-%            Please read src/c/EnumDefinitions/README for more information
-%
-%   Usage:
-%      macro=YEnum()
-
-macro=StringToEnum('Y');
Index: sm/trunk/src/m/enum/ZEnum.m
===================================================================
--- /issm/trunk/src/m/enum/ZEnum.m	(revision 9733)
+++ 	(revision )
@@ -1,11 +1,0 @@
-function macro=ZEnum()
-%ZENUM - Enum of Z
-%
-%   WARNING: DO NOT MODIFY THIS FILE
-%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
-%            Please read src/c/EnumDefinitions/README for more information
-%
-%   Usage:
-%      macro=ZEnum()
-
-macro=StringToEnum('Z');
Index: /issm/trunk/src/m/model/BasinConstrain.m
===================================================================
--- /issm/trunk/src/m/model/BasinConstrain.m	(revision 9733)
+++ /issm/trunk/src/m/model/BasinConstrain.m	(revision 9734)
@@ -33,5 +33,5 @@
 		end
 		%ok, flag elements and nodes
-		[vertexondomain elementondomain]=ContourToMesh(md.mesh.elements(:,1:3),md.x,md.y,domain,'element and node',2);
+		[vertexondomain elementondomain]=ContourToMesh(md.mesh.elements(:,1:3),md.mesh.x,md.mesh.y,domain,'element and node',2);
 	end
 	if invert,
Index: /issm/trunk/src/m/model/BasinConstrainShelf.m
===================================================================
--- /issm/trunk/src/m/model/BasinConstrainShelf.m	(revision 9733)
+++ /issm/trunk/src/m/model/BasinConstrainShelf.m	(revision 9734)
@@ -33,5 +33,5 @@
 		end
 		%ok, flag elements and nodes
-		[vertexondomain elementondomain]=ContourToMesh(md.mesh.elements(:,1:3),md.x,md.y,domain,'element and node',2);
+		[vertexondomain elementondomain]=ContourToMesh(md.mesh.elements(:,1:3),md.mesh.x,md.mesh.y,domain,'element and node',2);
 	end
 	if invert,
Index: /issm/trunk/src/m/model/DepthAverage.m
===================================================================
--- /issm/trunk/src/m/model/DepthAverage.m	(revision 9733)
+++ /issm/trunk/src/m/model/DepthAverage.m	(revision 9734)
@@ -17,5 +17,5 @@
 	vector_average=zeros(md.mesh.numberofvertices2d,1);
 	for i=1:md.mesh.numberoflayers-1,
-		vector_average=vector_average+(project2d(md,vector,i)+project2d(md,vector,i+1))/2.*(project2d(md,md.z,i+1)-project2d(md,md.z,i));
+		vector_average=vector_average+(project2d(md,vector,i)+project2d(md,vector,i+1))/2.*(project2d(md,md.mesh.z,i+1)-project2d(md,md.mesh.z,i));
 	end
 	vector_average=vector_average./project2d(md,md.geometry.thickness,1);
@@ -25,5 +25,5 @@
 	vector_average=zeros(md.mesh.numberofelements2d,1);
 	for i=1:md.mesh.numberoflayers-1,
-		vector_average=vector_average+project2d(md,vector,i).*(project2d(md,md.z,i+1)-project2d(md,md.z,i));
+		vector_average=vector_average+project2d(md,vector,i).*(project2d(md,md.mesh.z,i+1)-project2d(md,md.mesh.z,i));
 	end
 	vector_average=vector_average./project2d(md,md.geometry.thickness,1);
Index: /issm/trunk/src/m/model/MeltingGroundingLines.m
===================================================================
--- /issm/trunk/src/m/model/MeltingGroundingLines.m	(revision 9733)
+++ /issm/trunk/src/m/model/MeltingGroundingLines.m	(revision 9734)
@@ -17,5 +17,5 @@
 
 	%search the node on ice sheet the closest to i
-	[d posd]=min(sqrt((md.x(pos_shelf(i))-md.x(pos_GL)).^2+(md.y(pos_shelf(i))-md.y(pos_GL)).^2));
+	[d posd]=min(sqrt((md.mesh.x(pos_shelf(i))-md.mesh.x(pos_GL)).^2+(md.mesh.y(pos_shelf(i))-md.mesh.y(pos_GL)).^2));
 
 	if d<distance,
Index: /issm/trunk/src/m/model/PropagateFlagsUntilDistance.m
===================================================================
--- /issm/trunk/src/m/model/PropagateFlagsUntilDistance.m	(revision 9733)
+++ /issm/trunk/src/m/model/PropagateFlagsUntilDistance.m	(revision 9734)
@@ -13,6 +13,6 @@
 %make 3d work in 2d: 
 if md.mesh.dimension==3,
-	md.x=md.mesh.x2d;
-	md.y=md.mesh.y2d;
+	md.mesh.x=md.mesh.x2d;
+	md.mesh.y=md.mesh.y2d;
 	md.mesh.elements=md.mesh.elements2d;
 end
@@ -27,6 +27,6 @@
 
 %average x and y over elements: 
-x_elem=md.x(md.mesh.elements)*[1;1;1]/3;
-y_elem=md.y(md.mesh.elements)*[1;1;1]/3;
+x_elem=md.mesh.x(md.mesh.elements)*[1;1;1]/3;
+y_elem=md.mesh.y(md.mesh.elements)*[1;1;1]/3;
 
 while 1,
Index: /issm/trunk/src/m/model/SectionValues.m
===================================================================
--- /issm/trunk/src/m/model/SectionValues.m	(revision 9733)
+++ /issm/trunk/src/m/model/SectionValues.m	(revision 9734)
@@ -82,6 +82,6 @@
 
 	%Interpolation of data on specified points
-	data_interp=InterpFromMeshToMesh2d(md.mesh.elements,md.x,md.y,data,X,Y);
-	%data_interp=griddata(md.x,md.y,data,X,Y);
+	data_interp=InterpFromMeshToMesh2d(md.mesh.elements,md.mesh.x,md.mesh.y,data,X,Y);
+	%data_interp=griddata(md.mesh.x,md.mesh.y,data,X,Y);
 
 	%Compute index
@@ -120,5 +120,5 @@
 
 	%Interpolation of data on specified points
-	data_interp=InterpFromMeshToMesh3d(md.mesh.elements,md.x,md.y,md.z,data,X3,Y3,Z3,NaN);
+	data_interp=InterpFromMeshToMesh3d(md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.z,data,X3,Y3,Z3,NaN);
 
 	%build outputs
Index: /issm/trunk/src/m/model/ThicknessCorrection.m
===================================================================
--- /issm/trunk/src/m/model/ThicknessCorrection.m	(revision 9733)
+++ /issm/trunk/src/m/model/ThicknessCorrection.m	(revision 9734)
@@ -48,5 +48,5 @@
 
 	%search the node on ice sheet the closest to i
-	[d posd]=min(sqrt((md.x(pos_shelf(i))-md.x(pos_GL)).^2+(md.y(pos_shelf(i))-md.y(pos_GL)).^2));
+	[d posd]=min(sqrt((md.mesh.x(pos_shelf(i))-md.mesh.x(pos_GL)).^2+(md.mesh.y(pos_shelf(i))-md.mesh.y(pos_GL)).^2));
 
 	if d>distance,
Index: /issm/trunk/src/m/model/averaging.m
===================================================================
--- /issm/trunk/src/m/model/averaging.m	(revision 9733)
+++ /issm/trunk/src/m/model/averaging.m	(revision 9734)
@@ -33,8 +33,8 @@
 if md.mesh.dimension==3
 	rep=6;
-	areas=GetAreas(index,md.x,md.y,md.z);
+	areas=GetAreas(index,md.mesh.x,md.mesh.y,md.mesh.z);
 else
 	rep=3;
-	areas=GetAreas(index,md.x,md.y);
+	areas=GetAreas(index,md.mesh.x,md.mesh.y);
 end
 summation=1/rep*ones(rep,1);
Index: /issm/trunk/src/m/model/bamg.m
===================================================================
--- /issm/trunk/src/m/model/bamg.m	(revision 9733)
+++ /issm/trunk/src/m/model/bamg.m	(revision 9734)
@@ -270,5 +270,5 @@
 		bamg_mesh=bamgmesh(md.private.bamg.mesh);
 	else
-		bamg_mesh.Vertices=[md.x md.y ones(md.mesh.numberofvertices,1)];
+		bamg_mesh.Vertices=[md.mesh.x md.mesh.y ones(md.mesh.numberofvertices,1)];
 		bamg_mesh.Triangles=[md.mesh.elements ones(md.mesh.numberofelements,1)];
 	end
@@ -317,6 +317,6 @@
 md.private.bamg.mesh=bamgmesh(bamgmesh_out);
 md.private.bamg.geometry=bamggeom(bamggeom_out);
-md.x=bamgmesh_out.Vertices(:,1);
-md.y=bamgmesh_out.Vertices(:,2);
+md.mesh.x=bamgmesh_out.Vertices(:,1);
+md.mesh.y=bamgmesh_out.Vertices(:,2);
 md.mesh.elements=bamgmesh_out.Triangles(:,1:3);
 md.mesh.edges=bamgmesh_out.IssmEdges;
@@ -327,7 +327,7 @@
 md.mesh.dimension=2;
 md.mesh.numberofelements=size(md.mesh.elements,1);
-md.mesh.numberofvertices=length(md.x);
+md.mesh.numberofvertices=length(md.mesh.x);
 md.mesh.numberofedges=size(md.mesh.edges,1);
-md.z=zeros(md.mesh.numberofvertices,1);
+md.mesh.z=zeros(md.mesh.numberofvertices,1);
 md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
 md.mask.vertexonwater=zeros(md.mesh.numberofvertices,1);
Index: /issm/trunk/src/m/model/basevert.m
===================================================================
--- /issm/trunk/src/m/model/basevert.m	(revision 9733)
+++ /issm/trunk/src/m/model/basevert.m	(revision 9734)
@@ -14,5 +14,5 @@
 
 for n=1:md.mesh.numberofelements
-	X=inv([md.x(md.mesh.elements(n,:)) md.y(md.mesh.elements(n,:)) ones(3,1)]);
+	X=inv([md.mesh.x(md.mesh.elements(n,:)) md.mesh.y(md.mesh.elements(n,:)) ones(3,1)]);
 	alpha(n,:)=X(1,:);
 	beta(n,:)=X(2,:);
Index: /issm/trunk/src/m/model/bedslope.m
===================================================================
--- /issm/trunk/src/m/model/bedslope.m	(revision 9733)
+++ /issm/trunk/src/m/model/bedslope.m	(revision 9734)
@@ -10,5 +10,5 @@
 	numberofnodes=md.mesh.numberofvertices;
 	index=md.mesh.elements;
-	x=md.x; y=md.y;
+	x=md.mesh.x; y=md.mesh.y;
 else
 	numberofelements=md.mesh.numberofelements2d;
Index: /issm/trunk/src/m/model/collapse.m
===================================================================
--- /issm/trunk/src/m/model/collapse.m	(revision 9733)
+++ /issm/trunk/src/m/model/collapse.m	(revision 9734)
@@ -90,7 +90,7 @@
 
 %Initialize with the 2d mesh
-md.x=md.mesh.x2d;
-md.y=md.mesh.y2d;
-md.z=zeros(size(md.mesh.x2d));
+md.mesh.x=md.mesh.x2d;
+md.mesh.y=md.mesh.y2d;
+md.mesh.z=zeros(size(md.mesh.x2d));
 md.mesh.numberofvertices=md.mesh.numberofvertices2d;
 md.mesh.numberofelements=md.mesh.numberofelements2d;
Index: /issm/trunk/src/m/model/contourenvelope.m
===================================================================
--- /issm/trunk/src/m/model/contourenvelope.m	(revision 9733)
+++ /issm/trunk/src/m/model/contourenvelope.m	(revision 9734)
@@ -47,5 +47,5 @@
 	if isfile,
 		%get flag list of elements and nodes inside the contour
-		nodein=ContourToMesh(md.mesh.elements,md.x,md.y,file,'node',1);
+		nodein=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,file,'node',1);
 		elemin=(sum(nodein(md.mesh.elements),2)==size(md.mesh.elements,2));
 		%modify element connectivity
Index: /issm/trunk/src/m/model/contourmassbalance.m
===================================================================
--- /issm/trunk/src/m/model/contourmassbalance.m	(revision 9733)
+++ /issm/trunk/src/m/model/contourmassbalance.m	(revision 9734)
@@ -22,10 +22,10 @@
 
 %get flag list of elements and nodes inside the contour
-nodein=ContourToMesh(md.mesh.elements,md.x,md.y,file,'node',1);
+nodein=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,file,'node',1);
 elemin=(sum(nodein(md.mesh.elements),2)==size(md.mesh.elements,2));
 
 %conputing Mass flux
-x=md.x;
-y=md.y;
+x=md.mesh.x;
+y=md.mesh.y;
 vx=mean(md.initialization.vx(segments(:,1:end-1)),2);
 vy=mean(md.initialization.vy(segments(:,1:end-1)),2);
@@ -36,5 +36,5 @@
 flux = - md.materials.rho_ice*sum(L.*H.*(vx.*nx+vy.*ny)); %outflux is negative!
 disp(['mass outflux on ' file ' = ' num2str(-flux/10^9) ' Gt/yr']);
-areas=GetAreas(md.mesh.elements,md.x,md.y);
+areas=GetAreas(md.mesh.elements,md.mesh.x,md.mesh.y);
 dhdt=flux/(sum(areas(find(elemin)))*md.materials.rho_ice);
 disp(['dhdt on ' file ' (Flux  method) = ' num2str(dhdt) ' m/yr']);
Index: /issm/trunk/src/m/model/divergence.m
===================================================================
--- /issm/trunk/src/m/model/divergence.m	(revision 9733)
+++ /issm/trunk/src/m/model/divergence.m	(revision 9734)
@@ -9,5 +9,5 @@
 	numberofnodes=md.mesh.numberofvertices;
 	index=md.mesh.elements;
-	x=md.x; y=md.y; z=md.z;
+	x=md.mesh.x; y=md.mesh.y; z=md.mesh.z;
 else
 	numberofelements=md.mesh.numberofelements2d;
Index: /issm/trunk/src/m/model/extrude.m
===================================================================
--- /issm/trunk/src/m/model/extrude.m	(revision 9733)
+++ /issm/trunk/src/m/model/extrude.m	(revision 9734)
@@ -72,6 +72,6 @@
 %Create the new layers
 for i=1:numlayers,
-	x3d=[x3d; md.x]; 
-	y3d=[y3d; md.y];
+	x3d=[x3d; md.mesh.x]; 
+	y3d=[y3d; md.mesh.y];
 	%nodes are distributed between bed and surface accordingly to the given exponent
 	z3d=[z3d; bed3d+thickness3d*extrusionlist(i)]; 
@@ -103,6 +103,6 @@
 
 %Save old mesh 
-md.mesh.x2d=md.x;
-md.mesh.y2d=md.y;
+md.mesh.x2d=md.mesh.x;
+md.mesh.y2d=md.mesh.y;
 md.mesh.elements2d=md.mesh.elements;
 md.mesh.numberofelements2d=md.mesh.numberofelements;
@@ -114,7 +114,7 @@
 %Build global 3d mesh 
 md.mesh.elements=elements3d;
-md.x=x3d;
-md.y=y3d;
-md.z=z3d;
+md.mesh.x=x3d;
+md.mesh.y=y3d;
+md.mesh.z=z3d;
 md.mesh.numberofelements=number_el3d;
 md.mesh.numberofvertices=number_nodes3d;
@@ -213,5 +213,5 @@
 %Put lithostatic pressure is there is an existing pressure
 if ~isnan(md.initialization.pressure),
-	md.initialization.pressure=md.constants.g*md.materials.rho_ice*(md.geometry.surface-md.z);
+	md.initialization.pressure=md.constants.g*md.materials.rho_ice*(md.geometry.surface-md.mesh.z);
 end
 
Index: /issm/trunk/src/m/model/mechanicalproperties.m
===================================================================
--- /issm/trunk/src/m/model/mechanicalproperties.m	(revision 9733)
+++ /issm/trunk/src/m/model/mechanicalproperties.m	(revision 9734)
@@ -34,5 +34,5 @@
 
 %compute nodal functions coefficients N(x,y)=alpha x + beta y +gamma
-[alpha beta]=GetNodalFunctionsCoeff(index,md.x,md.y);
+[alpha beta]=GetNodalFunctionsCoeff(index,md.mesh.x,md.mesh.y);
 
 %compute shear
Index: /issm/trunk/src/m/model/mesh/meshadaptation.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshadaptation.m	(revision 9733)
+++ /issm/trunk/src/m/model/mesh/meshadaptation.m	(revision 9734)
@@ -41,6 +41,6 @@
 
 %get areas and  nodal functions coefficients N(x,y)=alpha x + beta y + gamma 
-[alpha beta]=GetNodalFunctionsCoeff(index,md.x,md.y);
-areas=GetAreas(index,md.x,md.y);
+[alpha beta]=GetNodalFunctionsCoeff(index,md.mesh.x,md.mesh.y);
+areas=GetAreas(index,md.mesh.x,md.mesh.y);
 
 %Compute gradient for each element
Index: /issm/trunk/src/m/model/mesh/meshbamg.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshbamg.m	(revision 9733)
+++ /issm/trunk/src/m/model/mesh/meshbamg.m	(revision 9734)
@@ -77,9 +77,9 @@
 	disp('   interpolating velocities...');
 	if strcmpi(NamesV.interp,'node'),
-		vx_obs=InterpFromGridToMesh(Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vxname),md.x,md.y,0);
-		vy_obs=InterpFromGridToMesh(Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vyname),md.x,md.y,0);
+		vx_obs=InterpFromGridToMesh(Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vxname),md.mesh.x,md.mesh.y,0);
+		vy_obs=InterpFromGridToMesh(Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vyname),md.mesh.x,md.mesh.y,0);
 	else
-		vx_obs=InterpFromMeshToMesh2d(Vel.(NamesV.indexname),Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vxname),md.x,md.y,0);
-		vy_obs=InterpFromMeshToMesh2d(Vel.(NamesV.indexname),Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vyname),md.x,md.y,0);
+		vx_obs=InterpFromMeshToMesh2d(Vel.(NamesV.indexname),Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vxname),md.mesh.x,md.mesh.y,0);
+		vy_obs=InterpFromMeshToMesh2d(Vel.(NamesV.indexname),Vel.(NamesV.xname),Vel.(NamesV.yname),Vel.(NamesV.vyname),md.mesh.x,md.mesh.y,0);
 	end
 	field=sqrt(vx_obs.^2+vy_obs.^2);
@@ -88,7 +88,7 @@
 		disp('   interpolating thickness...');
 		if strcmpi(NamesH.interp,'node'),
-			h=InterpFromGridToMesh(Thi.(NamesH.xname),Thi.(NamesH.yname),Thi.(NamesH.dataname),md.x,md.y,0);
+			h=InterpFromGridToMesh(Thi.(NamesH.xname),Thi.(NamesH.yname),Thi.(NamesH.dataname),md.mesh.x,md.mesh.y,0);
 		else
-			h=InterpFromMeshToMesh2d(Thi.(NamesH.indexname),Thi.(NamesH.xname),Thi.(NamesH.yname),Thi.(NamesH.dataname),md.x,md.y,0);
+			h=InterpFromMeshToMesh2d(Thi.(NamesH.indexname),Thi.(NamesH.xname),Thi.(NamesH.yname),Thi.(NamesH.dataname),md.mesh.x,md.mesh.y,0);
 		end
 		field=[field h];
@@ -97,5 +97,5 @@
 	%set nodeonwater field
 	if ~strcmp(groundeddomain,'N/A'),
-		nodeground=ContourToMesh(md.mesh.elements,md.x,md.y,groundeddomain,'node',2);
+		nodeground=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,groundeddomain,'node',2);
 		md.nodeonwater=ones(md.mesh.numberofvertices,1);
 		md.nodeonwater(find(nodeground))=0;
Index: /issm/trunk/src/m/model/mesh/meshconvert.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshconvert.m	(revision 9733)
+++ /issm/trunk/src/m/model/mesh/meshconvert.m	(revision 9734)
@@ -12,6 +12,6 @@
 
 if nargin==1,
-	x=md.x;
-	y=md.y;
+	x=md.mesh.x;
+	y=md.mesh.y;
 	index=md.mesh.elements;
 else
@@ -28,6 +28,6 @@
 md.private.bamg.mesh=bamgmesh(bamgmesh_out);
 md.private.bamg.geometry=bamggeom(bamggeom_out);
-md.x=bamgmesh_out.Vertices(:,1);
-md.y=bamgmesh_out.Vertices(:,2);
+md.mesh.x=bamgmesh_out.Vertices(:,1);
+md.mesh.y=bamgmesh_out.Vertices(:,2);
 md.mesh.elements=bamgmesh_out.Triangles(:,1:3);
 md.mesh.edges=bamgmesh_out.IssmEdges;
@@ -38,7 +38,7 @@
 md.mesh.dimension=2;
 md.mesh.numberofelements=size(md.mesh.elements,1);
-md.mesh.numberofvertices=length(md.x);
+md.mesh.numberofvertices=length(md.mesh.x);
 md.mesh.numberofedges=size(md.mesh.edges,1);
-md.z=zeros(md.mesh.numberofvertices,1);
+md.mesh.z=zeros(md.mesh.numberofvertices,1);
 md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
 md.mask.vertexonwater=zeros(md.mesh.numberofvertices,1);
Index: /issm/trunk/src/m/model/mesh/meshexprefine.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshexprefine.m	(revision 9733)
+++ /issm/trunk/src/m/model/mesh/meshexprefine.m	(revision 9734)
@@ -35,6 +35,6 @@
 
 %Read domainame file into a matlab array (x,y):
-refinearea=ContourToMesh(md.mesh.elements,md.x,md.y,domainname,'element',1);
-aires=GetAreas(md.mesh.elements,md.x,md.y);
+refinearea=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,domainname,'element',1);
+aires=GetAreas(md.mesh.elements,md.mesh.x,md.mesh.y);
 
 %flags areas within the domain
Index: /issm/trunk/src/m/model/mesh/meshnodensity.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshnodensity.m	(revision 9733)
+++ /issm/trunk/src/m/model/mesh/meshnodensity.m	(revision 9734)
@@ -25,5 +25,5 @@
 %Mesh using TriMeshNoDensity
 if strcmp(riftname,''),
-	[md.mesh.elements,md.x,md.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMeshNoDensity(domainname);
+	[md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMeshNoDensity(domainname);
 else
 	[elements,x,y,segments,segmentmarkers]=TriMeshNoDensity(domainname,riftname);
@@ -47,6 +47,6 @@
 
 	%plug into md
-	md.x=x;
-	md.y=y;
+	md.mesh.x=x;
+	md.mesh.y=y;
 	md.mesh.elements=elements;
 	md.mesh.segments=segments;
@@ -56,6 +56,6 @@
 %Fill in rest of fields:
 md.mesh.numberofelements=length(md.mesh.elements);
-md.mesh.numberofvertices=length(md.x);
-md.z=zeros(md.mesh.numberofvertices,1);
+md.mesh.numberofvertices=length(md.mesh.x);
+md.mesh.z=zeros(md.mesh.numberofvertices,1);
 md.mesh.vertexonboundary=zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
 md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
Index: /issm/trunk/src/m/model/mesh/meshrefine.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshrefine.m	(revision 9733)
+++ /issm/trunk/src/m/model/mesh/meshrefine.m	(revision 9734)
@@ -16,10 +16,10 @@
 
 %Refine using TriMeshRefine
-[md.mesh.elements,md.x,md.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMeshRefine(md.mesh.elements,md.x,md.y,md.mesh.segments,md.mesh.segmentmarkers,areas,'yes');
+[md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMeshRefine(md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers,areas,'yes');
 
 %Fill in rest of fields:
 md.mesh.numberofelements=length(md.mesh.elements);
-md.mesh.numberofvertices=length(md.x);
-md.z=zeros(md.mesh.numberofvertices,1);
+md.mesh.numberofvertices=length(md.mesh.x);
+md.mesh.z=zeros(md.mesh.numberofvertices,1);
 md.mesh.vertexonboundary=zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
 md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
Index: /issm/trunk/src/m/model/mesh/meshyams.m
===================================================================
--- /issm/trunk/src/m/model/mesh/meshyams.m	(revision 9733)
+++ /issm/trunk/src/m/model/mesh/meshyams.m	(revision 9734)
@@ -71,9 +71,9 @@
 	disp('   interpolating velocities...');
 	if strcmpi(Names.interp,'node'),
-		vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,0);
-		vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,0);
+		vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.mesh.x,md.mesh.y,0);
+		vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.mesh.x,md.mesh.y,0);
 	else
-		vx_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,0);
-		vy_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,0);
+		vx_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.mesh.x,md.mesh.y,0);
+		vy_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.mesh.x,md.mesh.y,0);
 	end
 	field=sqrt(vx_obs.^2+vy_obs.^2);
@@ -81,5 +81,5 @@
 	%set nodeonwater field
 	if ~strcmp(groundeddomain,'N/A'),
-		nodeground=ContourToMesh(md.mesh.elements,md.x,md.y,groundeddomain,'node',2);
+		nodeground=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,groundeddomain,'node',2);
 		md.nodeonwater=ones(md.mesh.numberofvertices,1);
 		md.nodeonwater(find(nodeground))=0;
@@ -114,5 +114,5 @@
 
 %Fill in rest of fields:
-md.z=zeros(md.mesh.numberofvertices,1);
+md.mesh.z=zeros(md.mesh.numberofvertices,1);
 md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
 md.mesh.vertexonsurface=ones(md.mesh.numberofvertices,1);
@@ -120,5 +120,5 @@
 md.mesh.elementonsurface=ones(md.mesh.numberofelements,1);
 if ~strcmp(groundeddomain,'N/A'),
-	nodeground=ContourToMesh(md.mesh.elements,md.x,md.y,groundeddomain,'node',2);
+	nodeground=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,groundeddomain,'node',2);
 	md.nodeonwater=ones(md.mesh.numberofvertices,1);
 	md.nodeonwater(find(nodeground))=0;
@@ -127,9 +127,9 @@
 end
 if strcmpi(Names.interp,'node'),
-	md.inversion.vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,0);
-	md.inversion.vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,0);
+	md.inversion.vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.mesh.x,md.mesh.y,0);
+	md.inversion.vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.mesh.x,md.mesh.y,0);
 else
-	md.inversion.vx_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,0);
-	md.inversion.vy_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,0);
+	md.inversion.vx_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.mesh.x,md.mesh.y,0);
+	md.inversion.vy_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.mesh.x,md.mesh.y,0);
 end
 md.inversion.vel_obs=sqrt(md.inversion.vx_obs.^2+md.inversion.vy_obs.^2);
@@ -145,7 +145,7 @@
 
 		%build normals and lengths of segments:
-		lengths=sqrt((md.x(rift.segments(:,1))-md.x(rift.segments(:,2))).^2 + (md.y(rift.segments(:,1))-md.y(rift.segments(:,2))).^2 );
-		normalsx=cos(atan2((md.x(rift.segments(:,1))-md.x(rift.segments(:,2))) , (md.y(rift.segments(:,2))-md.y(rift.segments(:,1)))));
-		normalsy=sin(atan2((md.x(rift.segments(:,1))-md.x(rift.segments(:,2))) , (md.y(rift.segments(:,2))-md.y(rift.segments(:,1)))));
+		lengths=sqrt((md.mesh.x(rift.segments(:,1))-md.mesh.x(rift.segments(:,2))).^2 + (md.mesh.y(rift.segments(:,1))-md.mesh.y(rift.segments(:,2))).^2 );
+		normalsx=cos(atan2((md.mesh.x(rift.segments(:,1))-md.mesh.x(rift.segments(:,2))) , (md.mesh.y(rift.segments(:,2))-md.mesh.y(rift.segments(:,1)))));
+		normalsy=sin(atan2((md.mesh.x(rift.segments(:,1))-md.mesh.x(rift.segments(:,2))) , (md.mesh.y(rift.segments(:,2))-md.mesh.y(rift.segments(:,1)))));
 
 		%ok, build penaltypairs: 
Index: /issm/trunk/src/m/model/mesh/reorder.m
===================================================================
--- /issm/trunk/src/m/model/mesh/reorder.m	(revision 9733)
+++ /issm/trunk/src/m/model/mesh/reorder.m	(revision 9734)
@@ -22,6 +22,6 @@
 md.mesh.elements=tnewnodes(md.mesh.elements(newelements,:));
 md.mesh.segments=[tnewnodes(md.mesh.segments(:,1)) tnewnodes(md.mesh.segments(:,2)) tnewelements(md.mesh.segments(:,3))];
-md.x=md.x(newnodes);
-md.y=md.y(newnodes);
-md.z=md.z(newnodes);
+md.mesh.x=md.mesh.x(newnodes);
+md.mesh.y=md.mesh.y(newnodes);
+md.mesh.z=md.mesh.z(newnodes);
 md.mesh.vertexonboundary=zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
Index: /issm/trunk/src/m/model/mesh/rifts/meshaddrifts.m
===================================================================
--- /issm/trunk/src/m/model/mesh/rifts/meshaddrifts.m	(revision 9733)
+++ /issm/trunk/src/m/model/mesh/rifts/meshaddrifts.m	(revision 9734)
@@ -56,5 +56,5 @@
 	
 	%plug md2 mesh into md mesh: 
-	[md.mesh.elements,md.x,md.y,md.z,md.mesh.numberofelements,md.mesh.numberofvertices,elconv,nodeconv,elconv2,nodeconv2]=meshplug(md.mesh.elements,md.x,md.y,md.z,...
+	[md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.z,md.mesh.numberofelements,md.mesh.numberofvertices,elconv,nodeconv,elconv2,nodeconv2]=meshplug(md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.z,...
 								md2.mesh.elements,md2.x,md2.y,md2.z,md2.extractednodes,md2.extractedelements,domain_index);
 
Index: /issm/trunk/src/m/model/mesh/rifts/meshprocessoutsiderifts.m
===================================================================
--- /issm/trunk/src/m/model/mesh/rifts/meshprocessoutsiderifts.m	(revision 9733)
+++ /issm/trunk/src/m/model/mesh/rifts/meshprocessoutsiderifts.m	(revision 9734)
@@ -12,5 +12,5 @@
 	
 	%first, flag nodes that belong to the domain outline
-	flags=ContourToMesh(md.mesh.elements,md.x,md.y,domainoutline,'node',0);
+	flags=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,domainoutline,'node',0);
 
 	rift=md.rifts.riftstruct(i);
@@ -55,7 +55,7 @@
 		%take the list of elements on one side of the rift that connect to the tip, 
 		%and duplicate the tip on them, so as to open the rift to the outside.
-		num=length(md.x)+1;
-		md.x=[md.x;md.x(tip)];
-		md.y=[md.y;md.y(tip)];
+		num=length(md.mesh.x)+1;
+		md.mesh.x=[md.mesh.x;md.mesh.x(tip)];
+		md.mesh.y=[md.mesh.y;md.mesh.y(tip)];
 		md.mesh.numberofvertices=num;
 		
@@ -84,7 +84,7 @@
 %Fill in rest of fields:
 md.mesh.numberofelements=length(md.mesh.elements);
-md.mesh.numberofvertices=length(md.x);
-md.z=zeros(md.mesh.numberofvertices,1);
-md.mesh.vertexonboundary=zeros(length(md.x),1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
+md.mesh.numberofvertices=length(md.mesh.x);
+md.mesh.z=zeros(md.mesh.numberofvertices,1);
+md.mesh.vertexonboundary=zeros(length(md.mesh.x),1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
 md.rifts.numrifts=length(md.rifts.riftstruct);
 md.flowequation.element_equation=3*ones(md.mesh.numberofelements,1);
Index: /issm/trunk/src/m/model/mesh/rifts/meshprocessrifts.m
===================================================================
--- /issm/trunk/src/m/model/mesh/rifts/meshprocessrifts.m	(revision 9733)
+++ /issm/trunk/src/m/model/mesh/rifts/meshprocessrifts.m	(revision 9734)
@@ -25,5 +25,5 @@
 
 %Call MEX file
-[md.mesh.elements,md.x,md.y,md.mesh.segments,md.mesh.segmentmarkers,md.rifts.riftstruct]=TriMeshProcessRifts(md.mesh.elements,md.x,md.y,md.mesh.segments,md.mesh.segmentmarkers);
+[md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers,md.rifts.riftstruct]=TriMeshProcessRifts(md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers);
 md.rifts
 md.rifts.riftstruct
@@ -34,7 +34,7 @@
 %Fill in rest of fields:
 md.mesh.numberofelements=length(md.mesh.elements);
-md.mesh.numberofvertices=length(md.x);
-md.z=zeros(md.mesh.numberofvertices,1);
-md.mesh.vertexonboundary=zeros(length(md.x),1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
+md.mesh.numberofvertices=length(md.mesh.x);
+md.mesh.z=zeros(md.mesh.numberofvertices,1);
+md.mesh.vertexonboundary=zeros(length(md.mesh.x),1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
 md.rifts.numrifts=length(md.rifts.riftstruct);
 md.flowequation.element_equation=3*ones(md.mesh.numberofelements,1);
@@ -46,10 +46,10 @@
 %get coordinates of rift tips
 for i=1:md.rifts.numrifts,
-	md.rifts.riftstruct(i).tip1coordinates=[md.x(md.rifts.riftstruct(i).tips(1)) md.y(md.rifts.riftstruct(i).tips(1))];
-	md.rifts.riftstruct(i).tip2coordinates=[md.x(md.rifts.riftstruct(i).tips(2)) md.y(md.rifts.riftstruct(i).tips(2))];
+	md.rifts.riftstruct(i).tip1coordinates=[md.mesh.x(md.rifts.riftstruct(i).tips(1)) md.mesh.y(md.rifts.riftstruct(i).tips(1))];
+	md.rifts.riftstruct(i).tip2coordinates=[md.mesh.x(md.rifts.riftstruct(i).tips(2)) md.mesh.y(md.rifts.riftstruct(i).tips(2))];
 end
 
 %In case we have rifts that open up the domain outline, we need to open them: 
-flags=ContourToMesh(md.mesh.elements,md.x,md.y,domainoutline,'node',0);
+flags=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,domainoutline,'node',0);
 found=0;
 for i=1:md.rifts.numrifts,
@@ -68,5 +68,5 @@
 
 %get elements that are not correctly oriented in the correct direction:
-aires=GetAreas(md.mesh.elements,md.x,md.y);
+aires=GetAreas(md.mesh.elements,md.mesh.x,md.mesh.y);
 pos=find(aires<0);
 md.mesh.elements(pos,:)=[md.mesh.elements(pos,2) md.mesh.elements(pos,1) md.mesh.elements(pos,3)];
Index: /issm/trunk/src/m/model/mesh/rifts/meshyamsrecreateriftsegments.m
===================================================================
--- /issm/trunk/src/m/model/mesh/rifts/meshyamsrecreateriftsegments.m	(revision 9733)
+++ /issm/trunk/src/m/model/mesh/rifts/meshyamsrecreateriftsegments.m	(revision 9734)
@@ -11,11 +11,11 @@
 
 				%find tip1 and tip2 for this rift, in the new mesh created by yams.
-				pos=find_point(md.x(md.mesh.segments(:,1)),md.y(md.mesh.segments(:,1)),rift.tip1coordinates(1),rift.tip1coordinates(2));
+				pos=find_point(md.mesh.x(md.mesh.segments(:,1)),md.mesh.y(md.mesh.segments(:,1)),rift.tip1coordinates(1),rift.tip1coordinates(2));
 				tip1=md.mesh.segments(pos,1);
-				pos=find_point(md.x(md.mesh.segments(:,1)),md.y(md.mesh.segments(:,1)),rift.tip2coordinates(1),rift.tip2coordinates(2));
+				pos=find_point(md.mesh.x(md.mesh.segments(:,1)),md.mesh.y(md.mesh.segments(:,1)),rift.tip2coordinates(1),rift.tip2coordinates(2));
 				tip2=md.mesh.segments(pos,1);
 
 				%start from tip1, and build segments of this rift. 
-				pos=find_point(md.x(md.mesh.segments(:,1)),md.y(md.mesh.segments(:,1)),rift.tip1coordinates(1),rift.tip1coordinates(2));
+				pos=find_point(md.mesh.x(md.mesh.segments(:,1)),md.mesh.y(md.mesh.segments(:,1)),rift.tip1coordinates(1),rift.tip1coordinates(2));
 				pos_record=[pos_record; pos];
 				riftsegs=md.mesh.segments(pos,:);
@@ -39,7 +39,7 @@
 
 				%find tip1 and tip2 for this rift, in the new mesh created by yams.
-				pos1=find_point(md.x(md.mesh.segments(:,1)),md.y(md.mesh.segments(:,1)),rift.tip1coordinates(1),rift.tip1coordinates(2));
+				pos1=find_point(md.mesh.x(md.mesh.segments(:,1)),md.mesh.y(md.mesh.segments(:,1)),rift.tip1coordinates(1),rift.tip1coordinates(2));
 				tip1=md.mesh.segments(pos1,1);
-				pos2=find_point(md.x(md.mesh.segments(:,1)),md.y(md.mesh.segments(:,1)),rift.tip2coordinates(1),rift.tip2coordinates(2));
+				pos2=find_point(md.mesh.x(md.mesh.segments(:,1)),md.mesh.y(md.mesh.segments(:,1)),rift.tip2coordinates(1),rift.tip2coordinates(2));
 				tip2=md.mesh.segments(pos2,1);
 				if length(tip1)==2,
Index: /issm/trunk/src/m/model/mesh/setmesh.m
===================================================================
--- /issm/trunk/src/m/model/mesh/setmesh.m	(revision 9733)
+++ /issm/trunk/src/m/model/mesh/setmesh.m	(revision 9734)
@@ -39,5 +39,5 @@
 %Mesh using TriMesh
 if strcmp(riftname,''),
-	[md.mesh.elements,md.x,md.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMesh(domainname,area,'yes');
+	[md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMesh(domainname,area,'yes');
 else
 	[elements,x,y,segments,segmentmarkers]=TriMesh(domainname,riftname,area,'yes');
@@ -61,6 +61,6 @@
 
 	%plug into md
-	md.x=x;
-	md.y=y;
+	md.mesh.x=x;
+	md.mesh.y=y;
 	md.mesh.elements=elements;
 	md.mesh.segments=segments;
@@ -70,6 +70,6 @@
 %Fill in rest of fields:
 md.mesh.numberofelements=length(md.mesh.elements);
-md.mesh.numberofvertices=length(md.x);
-md.z=zeros(md.mesh.numberofvertices,1);
+md.mesh.numberofvertices=length(md.mesh.x);
+md.mesh.z=zeros(md.mesh.numberofvertices,1);
 md.mesh.vertexonboundary=zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
 md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
Index: /issm/trunk/src/m/model/misfit.m
===================================================================
--- /issm/trunk/src/m/model/misfit.m	(revision 9733)
+++ /issm/trunk/src/m/model/misfit.m	(revision 9734)
@@ -11,6 +11,6 @@
 if md.mesh.dimension==2,
 	elements=md.mesh.elements;
-	x=md.x;
-	y=md.y;
+	x=md.mesh.x;
+	y=md.mesh.y;
 	vx=md.initialization.vx;
 	vy=md.initialization.vy;
Index: /issm/trunk/src/m/model/outflow.m
===================================================================
--- /issm/trunk/src/m/model/outflow.m	(revision 9733)
+++ /issm/trunk/src/m/model/outflow.m	(revision 9734)
@@ -7,6 +7,6 @@
 A=md.mesh.segments(:,1);
 B=md.mesh.segments(:,2);
-Nx=-(md.y(A)-md.y(B));
-Ny=  md.x(A)-md.x(B);
+Nx=-(md.mesh.y(A)-md.mesh.y(B));
+Ny=  md.mesh.x(A)-md.mesh.x(B);
 Vx=(md.initialization.vx(A)+md.initialization.vx(B))/2;
 Vy=(md.initialization.vy(A)+md.initialization.vy(B))/2;
Index: /issm/trunk/src/m/model/partition/AreaAverageOntoPartition.m
===================================================================
--- /issm/trunk/src/m/model/partition/AreaAverageOntoPartition.m	(revision 9733)
+++ /issm/trunk/src/m/model/partition/AreaAverageOntoPartition.m	(revision 9734)
@@ -17,6 +17,6 @@
 	
 	md.mesh.elements=md.mesh.elements2d;
-	md.x=md.mesh.x2d;
-	md.y=md.mesh.y2d;
+	md.mesh.x=md.mesh.x2d;
+	md.mesh.y=md.mesh.y2d;
 	md.mesh.numberofvertices=md.mesh.numberofvertices2d;
 	md.mesh.numberofelements=md.mesh.numberofelements2d;
Index: /issm/trunk/src/m/model/partition/adjacency.m
===================================================================
--- /issm/trunk/src/m/model/partition/adjacency.m	(revision 9733)
+++ /issm/trunk/src/m/model/partition/adjacency.m	(revision 9734)
@@ -16,5 +16,5 @@
 
 %now, build vwgt:
-areas=GetAreas(md.mesh.elements,md.x,md.y);
+areas=GetAreas(md.mesh.elements,md.mesh.x,md.mesh.y);
 
 %get node connectivity
Index: /issm/trunk/src/m/model/partition/partitioner.m
===================================================================
--- /issm/trunk/src/m/model/partition/partitioner.m	(revision 9733)
+++ /issm/trunk/src/m/model/partition/partitioner.m	(revision 9734)
@@ -35,6 +35,6 @@
 	md3d=md; %save  for later
 	md.mesh.elements=md.mesh.elements2d;
-	md.x=md.mesh.x2d;
-	md.y=md.mesh.y2d;
+	md.mesh.x=md.mesh.x2d;
+	md.mesh.y=md.mesh.y2d;
 	md.mesh.numberofvertices=md.mesh.numberofvertices2d;
 	md.mesh.numberofelements=md.mesh.numberofelements2d;
@@ -70,5 +70,5 @@
 	
 	%  partition into nparts
-	part=Chaco(md.qmu.adjacency,weights,[],md.x, md.y ,md.z,method,npart,[])'+1; %index partitions from 1 up. like metis.
+	part=Chaco(md.qmu.adjacency,weights,[],md.mesh.x, md.mesh.y ,md.mesh.z,method,npart,[])'+1; %index partitions from 1 up. like metis.
 
 elseif strcmpi(package,'scotch'),
Index: /issm/trunk/src/m/model/plot/applyoptions.m
===================================================================
--- /issm/trunk/src/m/model/plot/applyoptions.m	(revision 9733)
+++ /issm/trunk/src/m/model/plot/applyoptions.m	(revision 9734)
@@ -424,6 +424,6 @@
 		[mdx mdy]=basinzoom(options);
 	else
-		mdx=[min(md.x) max(md.x)];
-		mdy=[min(md.y) max(md.y)];
+		mdx=[min(md.mesh.x) max(md.mesh.x)];
+		mdy=[min(md.mesh.y) max(md.mesh.y)];
 	end
 	line(A.x,A.y,ones(size(A.x)),'color','b');
@@ -437,5 +437,5 @@
 %flag edges of a partition
 if exist(options,'partitionedges')
-[xsegments ysegments]=flagedges(md.mesh.elements,md.x,md.y,md.qmu.partition);
+[xsegments ysegments]=flagedges(md.mesh.elements,md.mesh.x,md.mesh.y,md.qmu.partition);
 xsegments=xsegments*getfieldvalue(options,'unit',1);
 ysegments=ysegments*getfieldvalue(options,'unit',1);
Index: /issm/trunk/src/m/model/plot/checkplotoptions.m
===================================================================
--- /issm/trunk/src/m/model/plot/checkplotoptions.m	(revision 9733)
+++ /issm/trunk/src/m/model/plot/checkplotoptions.m	(revision 9734)
@@ -180,8 +180,8 @@
 	if strcmpi(getfieldvalue(options,'northarrow'),'on')
 		%default values
-		Lx=max(md.y)-min(md.y);
-		Ly=max(md.y)-min(md.y);
-		%default values
-		options=changefieldvalue(options,'northarrow',[min(md.x)+1/6*Lx   min(md.y)+5/6*Ly   1/15*Ly   0.25   1/250*Ly]);
+		Lx=max(md.mesh.y)-min(md.mesh.y);
+		Ly=max(md.mesh.y)-min(md.mesh.y);
+		%default values
+		options=changefieldvalue(options,'northarrow',[min(md.mesh.x)+1/6*Lx   min(md.mesh.y)+5/6*Ly   1/15*Ly   0.25   1/250*Ly]);
 	end
 end
@@ -191,8 +191,8 @@
 	if strcmpi(getfieldvalue(options,'scaleruler'),'on')
 		%default values
-		Lx=max(md.y)-min(md.y);
-		Ly=max(md.y)-min(md.y);
-		%default values
-		options=changefieldvalue(options,'scaleruler',[min(md.x)+6/8*Lx   min(md.y)+1/10*Ly   10^(ceil(log10(Lx)))/5 floor(Lx/100) 5]);
+		Lx=max(md.mesh.y)-min(md.mesh.y);
+		Ly=max(md.mesh.y)-min(md.mesh.y);
+		%default values
+		options=changefieldvalue(options,'scaleruler',[min(md.mesh.x)+6/8*Lx   min(md.mesh.y)+1/10*Ly   10^(ceil(log10(Lx)))/5 floor(Lx/100) 5]);
 	end
 end
Index: /issm/trunk/src/m/model/plot/plot_BC.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_BC.m	(revision 9733)
+++ /issm/trunk/src/m/model/plot/plot_BC.m	(revision 9734)
@@ -7,7 +7,7 @@
 
 %plot dirichlets
-h1=plot(md.x(find(~isnan(md.diagnostic.spcvx))),md.y(find(~isnan(md.diagnostic.spcvx))),'ro','MarkerSize',14,'MarkerFaceColor','r');
-h2=plot(md.x(find(~isnan(md.diagnostic.spcvy))),md.y(find(~isnan(md.diagnostic.spcvy))),'bo','MarkerSize',10,'MarkerFaceColor','b');
-h3=plot(md.x(find(~isnan(md.diagnostic.spcvz))),md.y(find(~isnan(md.diagnostic.spcvz))),'yo','MarkerSize',6 ,'MarkerFaceColor','y');
+h1=plot(md.mesh.x(find(~isnan(md.diagnostic.spcvx))),md.mesh.y(find(~isnan(md.diagnostic.spcvx))),'ro','MarkerSize',14,'MarkerFaceColor','r');
+h2=plot(md.mesh.x(find(~isnan(md.diagnostic.spcvy))),md.mesh.y(find(~isnan(md.diagnostic.spcvy))),'bo','MarkerSize',10,'MarkerFaceColor','b');
+h3=plot(md.mesh.x(find(~isnan(md.diagnostic.spcvz))),md.mesh.y(find(~isnan(md.diagnostic.spcvz))),'yo','MarkerSize',6 ,'MarkerFaceColor','y');
 
 %update legend
Index: /issm/trunk/src/m/model/plot/plot_quiver.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_quiver.m	(revision 9733)
+++ /issm/trunk/src/m/model/plot/plot_quiver.m	(revision 9734)
@@ -8,5 +8,5 @@
 %
 %   Example:
-%      plot_quiver(md.x,md.y,md.initialization.vx,md.initialization.vy,options);
+%      plot_quiver(md.mesh.x,md.mesh.y,md.initialization.vx,md.initialization.vy,options);
 
 %process fields
Index: /issm/trunk/src/m/model/plot/plot_quiver3.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_quiver3.m	(revision 9733)
+++ /issm/trunk/src/m/model/plot/plot_quiver3.m	(revision 9734)
@@ -8,5 +8,5 @@
 %
 %   Example:
-%      plot_quiver(md.x,md.y,md.z,md.initialization.vx,md.initialization.vy,md.initialization.vz,options);
+%      plot_quiver(md.mesh.x,md.mesh.y,md.mesh.z,md.initialization.vx,md.initialization.vy,md.initialization.vz,options);
 
 %keep only non NaN elements
Index: /issm/trunk/src/m/model/plot/plot_sarpwr.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_sarpwr.m	(revision 9733)
+++ /issm/trunk/src/m/model/plot/plot_sarpwr.m	(revision 9734)
@@ -13,7 +13,7 @@
 if exist(options,'unit'),
 	unit=getfieldvalue(options,'unit');
-	md.x=md.x*unit;
-	md.y=md.y*unit;
-	md.z=md.z*unit;
+	md.mesh.x=md.mesh.x*unit;
+	md.mesh.y=md.mesh.y*unit;
+	md.mesh.z=md.mesh.z*unit;
 end
 					
Index: /issm/trunk/src/m/model/plot/plot_section.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_section.m	(revision 9733)
+++ /issm/trunk/src/m/model/plot/plot_section.m	(revision 9734)
@@ -32,5 +32,5 @@
 md3d=md;
 if exist(options,'layer')
-	md.x=md.mesh.x2d; md.y=md.mesh.y2d; md.mesh.elements=md.mesh.elements2d; md.mesh.dimension=2;
+	md.mesh.x=md.mesh.x2d; md.mesh.y=md.mesh.y2d; md.mesh.elements=md.mesh.elements2d; md.mesh.dimension=2;
 end
 
@@ -96,5 +96,5 @@
 				text(x(end),y(end),'end','backgroundcolor',[0.8 0.9 0.8])
 				plot(x,y,'-r')
-				axis([min(md.x)-1 max(md.x)+1 min(md.y)-1 max(md.y)+1])
+				axis([min(md.mesh.x)-1 max(md.mesh.x)+1 min(md.mesh.y)-1 max(md.mesh.y)+1])
 				view(2)
 			end
@@ -138,5 +138,5 @@
 					text(x(end),y(end),'end','backgroundcolor',[0.8 0.9 0.8])
 					plot(x,y,'-r')
-					axis([min(md.x)-1 max(md.x)+1 min(md.y)-1 max(md.y)+1])
+					axis([min(md.mesh.x)-1 max(md.mesh.x)+1 min(md.mesh.y)-1 max(md.mesh.y)+1])
 					view(2)
 				end
@@ -173,5 +173,5 @@
 					text(x(end),y(end),'end','backgroundcolor',[0.8 0.9 0.8])
 					plot(x,y,'-r')
-					axis([min(md.x)-1 max(md.x)+1 min(md.y)-1 max(md.y)+1])
+					axis([min(md.mesh.x)-1 max(md.mesh.x)+1 min(md.mesh.y)-1 max(md.mesh.y)+1])
 					view(2)
 				end
Index: /issm/trunk/src/m/model/plot/plot_tensor_principalaxis.m
===================================================================
--- /issm/trunk/src/m/model/plot/plot_tensor_principalaxis.m	(revision 9733)
+++ /issm/trunk/src/m/model/plot/plot_tensor_principalaxis.m	(revision 9734)
@@ -29,5 +29,5 @@
 %take the center of each element if ~isonnode
 if datatype==1,
-	x=mean(md.x(md.mesh.elements'))'; y=mean(md.y(md.mesh.elements'))'; z=mean(md.z(md.mesh.elements'))';
+	x=mean(md.mesh.x(md.mesh.elements'))'; y=mean(md.mesh.y(md.mesh.elements'))'; z=mean(md.mesh.z(md.mesh.elements'))';
 end
 
Index: /issm/trunk/src/m/model/plot/processmesh.m
===================================================================
--- /issm/trunk/src/m/model/plot/processmesh.m	(revision 9733)
+++ /issm/trunk/src/m/model/plot/processmesh.m	(revision 9734)
@@ -16,7 +16,7 @@
 
 	if ~strcmpi(getfieldvalue(options,'coord','xy'),'latlon'),
-		x=md.x;
+		x=md.mesh.x;
 		x2d=md.mesh.x2d;
-		y=md.y;
+		y=md.mesh.y;
 		y2d=md.mesh.y2d;
 	else
@@ -27,5 +27,5 @@
 	end
 
-	z_field=getfieldvalue(options,'z',md.z);
+	z_field=getfieldvalue(options,'z',md.mesh.z);
 	if ischar(z_field),
 		z=md.(z_field);
@@ -33,5 +33,5 @@
 		z=z_field;
 	else
-		z=md.z;
+		z=md.mesh.z;
 	end
 
@@ -68,13 +68,13 @@
 	if (md.mesh.dimension==2),
 		elements=transpose(reshape(1:3*md.mesh.numberofelements,3,md.mesh.numberofelements));
-		x=transpose(reshape(md.x(data.index)',1,3*md.mesh.numberofelements));
-		y=transpose(reshape(md.y(data.index)',1,3*md.mesh.numberofelements));
+		x=transpose(reshape(md.mesh.x(data.index)',1,3*md.mesh.numberofelements));
+		y=transpose(reshape(md.mesh.y(data.index)',1,3*md.mesh.numberofelements));
 		z=zeros(3*md.mesh.numberofelements,1);
 		is2d=1;
 	else
 		elements=transpose(reshape(1:6*md.mesh.numberofelements,6,md.mesh.numberofelements));
-		x=transpose(reshape(md.x(data.index)',1,6*md.mesh.numberofelements));
-		y=transpose(reshape(md.y(data.index)',1,6*md.mesh.numberofelements));
-		z=transpose(reshape(md.z(data.index)',1,6*md.mesh.numberofelements));
+		x=transpose(reshape(md.mesh.x(data.index)',1,6*md.mesh.numberofelements));
+		y=transpose(reshape(md.mesh.y(data.index)',1,6*md.mesh.numberofelements));
+		z=transpose(reshape(md.mesh.z(data.index)',1,6*md.mesh.numberofelements));
 		is2d=0;
 	end
Index: /issm/trunk/src/m/model/plot/showregion.m
===================================================================
--- /issm/trunk/src/m/model/plot/showregion.m	(revision 9733)
+++ /issm/trunk/src/m/model/plot/showregion.m	(revision 9734)
@@ -26,6 +26,6 @@
 Ay=[min(A.y) max(A.y)];
 
-mdx=[min(md.x) max(md.x)];
-mdy=[min(md.y) max(md.y)];
+mdx=[min(md.mesh.x) max(md.mesh.x)];
+mdy=[min(md.mesh.y) max(md.mesh.y)];
 
 line(A.x,A.y,'color','b');
Index: /issm/trunk/src/m/model/radarpower.m
===================================================================
--- /issm/trunk/src/m/model/radarpower.m	(revision 9733)
+++ /issm/trunk/src/m/model/radarpower.m	(revision 9734)
@@ -19,6 +19,6 @@
 
 highres=getfieldvalue(options,'highres',0);
-xlim=getfieldvalue(options,'xlim',[min(md.x) max(md.x)]);
-ylim=getfieldvalue(options,'ylim',[min(md.y) max(md.y)]);
+xlim=getfieldvalue(options,'xlim',[min(md.mesh.x) max(md.mesh.x)]);
+ylim=getfieldvalue(options,'ylim',[min(md.mesh.y) max(md.mesh.y)]);
 posting=getfieldvalue(options,'posting',0); % 0 -> image posting default
 
Index: /issm/trunk/src/m/model/setmask.m
===================================================================
--- /issm/trunk/src/m/model/setmask.m	(revision 9733)
+++ /issm/trunk/src/m/model/setmask.m	(revision 9734)
@@ -21,6 +21,6 @@
 
 %Get assigned fields
-x=md.x;
-y=md.y;
+x=md.mesh.x;
+y=md.mesh.y;
 elements=md.mesh.elements;
 
Index: /issm/trunk/src/m/model/setmask2.m
===================================================================
--- /issm/trunk/src/m/model/setmask2.m	(revision 9733)
+++ /issm/trunk/src/m/model/setmask2.m	(revision 9734)
@@ -9,6 +9,6 @@
 
 %Get assigned fields
-x=md.x;
-y=md.y;
+x=md.mesh.x;
+y=md.mesh.y;
 elements=md.mesh.elements;
 
Index: /issm/trunk/src/m/model/shear2d.m
===================================================================
--- /issm/trunk/src/m/model/shear2d.m	(revision 9733)
+++ /issm/trunk/src/m/model/shear2d.m	(revision 9734)
@@ -8,5 +8,5 @@
 %      s=shear2d(md);
 
-[alpha beta]=GetNodalFunctionsCoeff(md.mesh.elements,md.x,md.y); 
+[alpha beta]=GetNodalFunctionsCoeff(md.mesh.elements,md.mesh.x,md.mesh.y); 
 
 summation=[1;1;1];
Index: /issm/trunk/src/m/model/slope.m
===================================================================
--- /issm/trunk/src/m/model/slope.m	(revision 9733)
+++ /issm/trunk/src/m/model/slope.m	(revision 9734)
@@ -10,5 +10,5 @@
 	numberofnodes=md.mesh.numberofvertices;
 	index=md.mesh.elements;
-	x=md.x; y=md.y;
+	x=md.mesh.x; y=md.mesh.y;
 else
 	numberofelements=md.mesh.numberofelements2d;
Index: /issm/trunk/src/m/model/thicknessevolution.m
===================================================================
--- /issm/trunk/src/m/model/thicknessevolution.m	(revision 9733)
+++ /issm/trunk/src/m/model/thicknessevolution.m	(revision 9734)
@@ -20,5 +20,5 @@
 
 %compute nodal functions coefficients N(x,y)=alpha x + beta y + gamma
-[alpha beta]=GetNodalFunctionsCoeff(md.mesh.elements,md.x,md.y); 
+[alpha beta]=GetNodalFunctionsCoeff(md.mesh.elements,md.mesh.x,md.mesh.y); 
 
 %compute dhdt=div(Hu)
Index: /issm/trunk/src/m/utils/BC/SetIceShelfBC.m
===================================================================
--- /issm/trunk/src/m/utils/BC/SetIceShelfBC.m	(revision 9733)
+++ /issm/trunk/src/m/utils/BC/SetIceShelfBC.m	(revision 9734)
@@ -19,5 +19,5 @@
 	icefrontfile=varargin{1};
 	if ~exist(icefrontfile), error(['SetIceShelfBC error message: ice front file ' icefrontfile ' not found']); end
-	nodeinsideicefront=ContourToMesh(md.mesh.elements,md.x,md.y,icefrontfile,'node',2);
+	nodeinsideicefront=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,icefrontfile,'node',2);
 	nodeonicefront=double(md.mesh.vertexonboundary & nodeinsideicefront);
 elseif nargin==1,
Index: /issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m
===================================================================
--- /issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m	(revision 9733)
+++ /issm/trunk/src/m/utils/BC/SetMarineIceSheetBC.m	(revision 9734)
@@ -23,5 +23,5 @@
 		error(['SetMarineIceSheetBC error message: ice front file ' icefrontfile ' not found']);
 	end
-	nodeinsideicefront=ContourToMesh(md.mesh.elements,md.x,md.y,icefrontfile,'node',2);
+	nodeinsideicefront=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,icefrontfile,'node',2);
 	vertexonicefront=double(md.mesh.vertexonboundary & nodeinsideicefront);
 else
Index: /issm/trunk/src/m/utils/Exp/clicktoflowline.m
===================================================================
--- /issm/trunk/src/m/utils/Exp/clicktoflowline.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Exp/clicktoflowline.m	(revision 9734)
@@ -4,5 +4,5 @@
 % Usage: clicktoflowline(index,x,y,u,v,x0,y0,filename)
 %
-% Ex: clicktoflowline(md.mesh.elements,md.x,md.y,md.inversion.vx_obs,md.inversion.vy_obs,'flowline1.exp')
+% Ex: clicktoflowline(md.mesh.elements,md.mesh.x,md.mesh.y,md.inversion.vx_obs,md.inversion.vy_obs,'flowline1.exp')
 
 
Index: /issm/trunk/src/m/utils/Exp/downstreamflowlines.m
===================================================================
--- /issm/trunk/src/m/utils/Exp/downstreamflowlines.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Exp/downstreamflowlines.m	(revision 9734)
@@ -10,5 +10,5 @@
 %
 %   Example:
-%      flowpath=downstreamflowlines(md.mesh.elements,md.x,md.y,md.vx,md.initialization.vy,x0,y0)
+%      flowpath=downstreamflowlines(md.mesh.elements,md.mesh.x,md.mesh.y,md.vx,md.initialization.vy,x0,y0)
 
 %check input size
Index: /issm/trunk/src/m/utils/Exp/flowlines.m
===================================================================
--- /issm/trunk/src/m/utils/Exp/flowlines.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Exp/flowlines.m	(revision 9734)
@@ -10,5 +10,5 @@
 %
 %   Example:
-%      flowpath=flowlines(md.mesh.elements,md.x,md.y,md.vx,md.initialization.vy,x0,y0)
+%      flowpath=flowlines(md.mesh.elements,md.mesh.x,md.mesh.y,md.vx,md.initialization.vy,x0,y0)
 
 %check input size
Index: /issm/trunk/src/m/utils/Geometry/FlagElements.m
===================================================================
--- /issm/trunk/src/m/utils/Geometry/FlagElements.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Geometry/FlagElements.m	(revision 9734)
@@ -33,9 +33,9 @@
 			if ~exist(region,'file'),
 				[xlim,ylim]=basinzoom('basin',region);
-				flag_nodes=double(md.x<xlim(2) & md.x>xlim(1) &  md.y<ylim(2) & md.y>ylim(1));
+				flag_nodes=double(md.mesh.x<xlim(2) & md.mesh.x>xlim(1) &  md.mesh.y<ylim(2) & md.mesh.y>ylim(1));
 				flag=prod(flag_nodes(md.mesh.elements),2);
 			else
 				%ok, flag elements
-				flag=ContourToMesh(md.mesh.elements(:,1:3),md.x,md.y,region,'element',1);
+				flag=ContourToMesh(md.mesh.elements(:,1:3),md.mesh.x,md.mesh.y,region,'element',1);
 			end
 		end
Index: /issm/trunk/src/m/utils/Interp/FillHole.m
===================================================================
--- /issm/trunk/src/m/utils/Interp/FillHole.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Interp/FillHole.m	(revision 9734)
@@ -6,5 +6,5 @@
 %
 %   Example:
-%      md.geometry.surface=FillHole(md.mesh.elements,x,md.y,md.geometry.surface)
+%      md.geometry.surface=FillHole(md.mesh.elements,x,md.mesh.y,md.geometry.surface)
 %
 
Index: /issm/trunk/src/m/utils/Interp/InterpFromFile.m
===================================================================
--- /issm/trunk/src/m/utils/Interp/InterpFromFile.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Interp/InterpFromFile.m	(revision 9734)
@@ -19,5 +19,5 @@
 %
 %   Example:
-%      md.geometry.surface=InterpFromFile(md.x,md.y,'surfacefile.mat',0);
+%      md.geometry.surface=InterpFromFile(md.mesh.x,md.mesh.y,'surfacefile.mat',0);
 %
 %   See also: PLUGVELOCITIES, INTERPFROMGRID, INTERPFROMMESH2D, INTERPFROMMESH3D
Index: /issm/trunk/src/m/utils/Interp/plugvelocities.m
===================================================================
--- /issm/trunk/src/m/utils/Interp/plugvelocities.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Interp/plugvelocities.m	(revision 9734)
@@ -29,9 +29,9 @@
 %Interpolation
 if strcmpi(Names.interp,'node'),
-	md.inversion.vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,default_value);
-	md.inversion.vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,default_value);
+	md.inversion.vx_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.mesh.x,md.mesh.y,default_value);
+	md.inversion.vy_obs=InterpFromGridToMesh(Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.mesh.x,md.mesh.y,default_value);
 else
-	md.inversion.vx_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.x,md.y,default_value);
-	md.inversion.vy_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.x,md.y,default_value);
+	md.inversion.vx_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vxname),md.mesh.x,md.mesh.y,default_value);
+	md.inversion.vy_obs=InterpFromMeshToMesh2d(Vel.(Names.indexname),Vel.(Names.xname),Vel.(Names.yname),Vel.(Names.vyname),md.mesh.x,md.mesh.y,default_value);
 end
 
Index: /issm/trunk/src/m/utils/Mesh/BamgCall.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/BamgCall.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Mesh/BamgCall.m	(revision 9734)
@@ -20,5 +20,5 @@
 %Compute Hessian
 t1=clock; fprintf('%s','      computing Hessian...');
-hessian=ComputeHessian(md.mesh.elements,md.x,md.y,field,'node');
+hessian=ComputeHessian(md.mesh.elements,md.mesh.x,md.mesh.y,field,'node');
 t2=clock;fprintf('%s\n',[' done (' num2str(etime(t2,t1)) ' seconds)']);
 
@@ -50,5 +50,5 @@
 %Vertices
 fprintf(fid,'\n%s\n%i\n\n','Vertices',md.mesh.numberofvertices);
-fprintf(fid,'%8g %8g %i\n',[md.x md.y ones(md.mesh.numberofvertices,1)]');
+fprintf(fid,'%8g %8g %i\n',[md.mesh.x md.mesh.y ones(md.mesh.numberofvertices,1)]');
 
 %Triangles
@@ -68,6 +68,6 @@
 t1=clock; fprintf('\n%s','      reading final mesh files...');
 A=meshread('carre1.mesh');
-md.x=A.x;
-md.y=A.y;
+md.mesh.x=A.x;
+md.mesh.y=A.y;
 md.z=zeros(A.nods,1);
 md.mesh.elements=A.index;
Index: /issm/trunk/src/m/utils/Mesh/BamgCallFromMetric.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/BamgCallFromMetric.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Mesh/BamgCallFromMetric.m	(revision 9734)
@@ -31,5 +31,5 @@
 %Vertices
 fprintf(fid,'\n%s\n%i\n\n','Vertices',md.mesh.numberofvertices);
-fprintf(fid,'%8g %8g %i\n',[md.x md.y ones(md.mesh.numberofvertices,1)]');
+fprintf(fid,'%8g %8g %i\n',[md.mesh.x md.mesh.y ones(md.mesh.numberofvertices,1)]');
 
 %Triangles
@@ -49,6 +49,6 @@
 t1=clock; fprintf('\n%s','      reading final mesh files...');
 A=meshread('carre1.mesh');
-md.x=A.x;
-md.y=A.y;
+md.mesh.x=A.x;
+md.mesh.y=A.y;
 md.z=zeros(A.nods,1);
 md.mesh.elements=A.index;
Index: /issm/trunk/src/m/utils/Mesh/ComputeHessian.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/ComputeHessian.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Mesh/ComputeHessian.m	(revision 9734)
@@ -10,5 +10,5 @@
 %
 %   Example:
-%      hessian=ComputeHessian(md.mesh.elements,md.x,md.y,md.inversion.vel_obs,'node')
+%      hessian=ComputeHessian(md.mesh.elements,md.mesh.x,md.mesh.y,md.inversion.vel_obs,'node')
 
 %some variables
Index: /issm/trunk/src/m/utils/Mesh/GetAreas.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/GetAreas.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Mesh/GetAreas.m	(revision 9734)
@@ -10,6 +10,6 @@
 %
 %   Examples:
-%      areas  =GetAreas(md.mesh.elements,md.x,md.y);
-%      volumes=GetAreas(md.mesh.elements,md.x,md.y,md.z);
+%      areas  =GetAreas(md.mesh.elements,md.mesh.x,md.mesh.y);
+%      volumes=GetAreas(md.mesh.elements,md.mesh.x,md.mesh.y,md.z);
 
 %get number of elements and number of nodes
Index: /issm/trunk/src/m/utils/Mesh/GetCharacteristicLength.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/GetCharacteristicLength.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Mesh/GetCharacteristicLength.m	(revision 9734)
@@ -9,6 +9,6 @@
 %
 %   Examples:
-%      length  =GetCharacteristicLength(md.mesh.elements,md.x,md.y);
-%      length  =GetCharacteristicLength(md.mesh.elements,md.x,md.y,md.z);
+%      length  =GetCharacteristicLength(md.mesh.elements,md.mesh.x,md.mesh.y);
+%      length  =GetCharacteristicLength(md.mesh.elements,md.mesh.x,md.mesh.y,md.z);
 
 
Index: /issm/trunk/src/m/utils/Mesh/GetNodalFunctionsCoeff.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/GetNodalFunctionsCoeff.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Mesh/GetNodalFunctionsCoeff.m	(revision 9734)
@@ -12,5 +12,5 @@
 %
 %   Example:
-%      [alpha beta gamma]=GetNodalFunctionsCoeff(md.mesh.elements,md.x,md.y);
+%      [alpha beta gamma]=GetNodalFunctionsCoeff(md.mesh.elements,md.mesh.x,md.mesh.y);
 
 %make columns out of x and y
Index: /issm/trunk/src/m/utils/Mesh/MeshQuality.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/MeshQuality.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Mesh/MeshQuality.m	(revision 9734)
@@ -7,6 +7,6 @@
 %Get some variables from the model
 index=md.mesh.elements;
-x=md.x;
-y=md.y;
+x=md.mesh.x;
+y=md.mesh.y;
 
 %2d geometric parameter (do not change)
Index: /issm/trunk/src/m/utils/Mesh/ProfileProjectOntoMesh.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/ProfileProjectOntoMesh.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Mesh/ProfileProjectOntoMesh.m	(revision 9734)
@@ -9,6 +9,6 @@
 %make a curve out of the mesh, to use the intersections routine.
 rows=[md.mesh.elements md.mesh.elements(:,1)]'; rows=rows(:);
-x=md.x(rows);
-y=md.y(rows);
+x=md.mesh.x(rows);
+y=md.mesh.y(rows);
 
 %[x0,y0] = intersections(profile.x,profile.y,x,y,1);
@@ -48,5 +48,5 @@
 
 %now, for each node, figure out which element it belongs to.
-node_in_element=NodeInElement(newx,newy,md.mesh.elements,md.x,md.y,md.mesh.vertexconnectivity);
+node_in_element=NodeInElement(newx,newy,md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.vertexconnectivity);
 
 % eliminate nodes that don't fall in any element
Index: /issm/trunk/src/m/utils/Mesh/YamsCall.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/YamsCall.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Mesh/YamsCall.m	(revision 9734)
@@ -20,5 +20,5 @@
 %Compute Hessian
 t1=clock; fprintf('%s','      computing Hessian...');
-hessian=ComputeHessian(md.mesh.elements,md.x,md.y,field,'node');
+hessian=ComputeHessian(md.mesh.elements,md.mesh.x,md.mesh.y,field,'node');
 t2=clock;fprintf('%s\n',[' done (' num2str(etime(t2,t1)) ' seconds)']);
 
@@ -47,5 +47,5 @@
 %Vertices
 fprintf(fid,'\n%s\n%i\n\n','Vertices',md.mesh.numberofvertices);
-fprintf(fid,'%8g %8g %i\n',[md.x md.y zeros(md.mesh.numberofvertices,1)]');
+fprintf(fid,'%8g %8g %i\n',[md.mesh.x md.mesh.y zeros(md.mesh.numberofvertices,1)]');
 
 %Triangles
@@ -88,6 +88,6 @@
 Tria=load('carre1.tria');
 Coor=load('carre1.coor');
-md.x=Coor(:,1);
-md.y=Coor(:,2);
+md.mesh.x=Coor(:,1);
+md.mesh.y=Coor(:,2);
 md.z=zeros(size(Coor,1),1);
 md.mesh.elements=Tria;
Index: /issm/trunk/src/m/utils/Mesh/argusmesh.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/argusmesh.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Mesh/argusmesh.m	(revision 9734)
@@ -78,8 +78,8 @@
 %Finally, use model constructor to build a complete model: 
 md.mesh.elements=elements;
-md.x=x;
-md.y=y;
+md.mesh.x=x;
+md.mesh.y=y;
 md.z=z;
-md.mesh.numberofvertices=size(md.x,1);
+md.mesh.numberofvertices=size(md.mesh.x,1);
 md.mesh.numberofelements=size(md.mesh.elements,1);
 md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
Index: /issm/trunk/src/m/utils/Mesh/rifttipsonmesh.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/rifttipsonmesh.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Mesh/rifttipsonmesh.m	(revision 9734)
@@ -14,5 +14,5 @@
 	y_tip=rift.y(1);
 	
-	index=find_point(md.x,md.y,x_tip,y_tip);
+	index=find_point(md.mesh.x,md.mesh.y,x_tip,y_tip);
 	tips(end+1)=index;
 
@@ -20,5 +20,5 @@
 	y_tip=rift.y(end);
 	
-	index=find_point(md.x,md.y,x_tip,y_tip);
+	index=find_point(md.mesh.x,md.mesh.y,x_tip,y_tip);
 	tips(end+1)=index;
 
Index: /issm/trunk/src/m/utils/Mesh/roundmesh.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/roundmesh.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Mesh/roundmesh.m	(revision 9734)
@@ -27,7 +27,7 @@
 
 %move the closest node to the center
-[mini pos]=min(md.x.^2+md.y.^2);
-md.x(pos)=0;
-md.y(pos)=0;
+[mini pos]=min(md.mesh.x.^2+md.mesh.y.^2);
+md.mesh.x(pos)=0;
+md.mesh.y(pos)=0;
 
 %delete domain
Index: /issm/trunk/src/m/utils/Mesh/squaremesh.m
===================================================================
--- /issm/trunk/src/m/utils/Mesh/squaremesh.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Mesh/squaremesh.m	(revision 9734)
@@ -56,6 +56,6 @@
 
 %plug coordinates and nodes
-md.x=x;
-md.y=y;
+md.mesh.x=x;
+md.mesh.y=y;
 md.z=zeros(nods,1);
 md.mesh.numberofvertices=nods;
Index: /issm/trunk/src/m/utils/Numerics/cfl_step.m
===================================================================
--- /issm/trunk/src/m/utils/Numerics/cfl_step.m	(revision 9733)
+++ /issm/trunk/src/m/utils/Numerics/cfl_step.m	(revision 9734)
@@ -16,6 +16,6 @@
 
 index=md.mesh.elements;
-edgex=max(md.x(index),[],2)-min(md.x(index),[],2);
-edgey=max(md.y(index),[],2)-min(md.y(index),[],2);
+edgex=max(md.mesh.x(index),[],2)-min(md.mesh.x(index),[],2);
+edgey=max(md.mesh.y(index),[],2)-min(md.mesh.y(index),[],2);
 vx=max(abs(vx(index)),[],2);
 vy=max(abs(vy(index)),[],2);
Index: /issm/trunk/template
===================================================================
--- /issm/trunk/template	(revision 9733)
+++ /issm/trunk/template	(revision 9734)
@@ -1,16 +1,2 @@
-mesh {{{
-
-	projection
-	  x
-	  y
-	  z
-	  elements 
-	  edges
-
-	  elements2d
-	  x2d
-	  y2d
-}}}
-
 %To be completed
 cluster{{{
Index: /issm/trunk/test/Miscellaneous/Bump/Bump.par
===================================================================
--- /issm/trunk/test/Miscellaneous/Bump/Bump.par	(revision 9733)
+++ /issm/trunk/test/Miscellaneous/Bump/Bump.par	(revision 9734)
@@ -5,10 +5,10 @@
 hmin=1000;
 hmax=1000;
-ymin=min(md.y);
-ymax=max(md.y);
-md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+ymin=min(md.mesh.y);
+ymax=max(md.mesh.y);
+md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin);
 md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness+10;
 md.geometry.surface=md.geometry.bed+md.geometry.thickness;
-md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness+height*exp(-((md.x-50000).^2+(md.y-50000).^2)/(4000)^2)+10;
+md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness+height*exp(-((md.mesh.x-50000).^2+(md.mesh.y-50000).^2)/(4000)^2)+10;
 md.geometry.thickness=md.geometry.surface-md.geometry.bed;
 
Index: /issm/trunk/test/Miscellaneous/GJM_test1/SquareShelf.par
===================================================================
--- /issm/trunk/test/Miscellaneous/GJM_test1/SquareShelf.par	(revision 9733)
+++ /issm/trunk/test/Miscellaneous/GJM_test1/SquareShelf.par	(revision 9734)
@@ -4,7 +4,7 @@
 hmin=300;
 hmax=1000;
-ymin=min(md.y);
-ymax=max(md.y);
-md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+ymin=min(md.mesh.y);
+ymax=max(md.mesh.y);
+md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin);
 md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
 md.geometry.surface=md.geometry.bed+md.geometry.thickness;
Index: /issm/trunk/test/Miscellaneous/connectivity/Square.par
===================================================================
--- /issm/trunk/test/Miscellaneous/connectivity/Square.par	(revision 9733)
+++ /issm/trunk/test/Miscellaneous/connectivity/Square.par	(revision 9734)
@@ -9,7 +9,7 @@
 hmin=300;
 hmax=1000;
-ymin=min(md.y);
-ymax=max(md.y);
-md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+ymin=min(md.mesh.y);
+ymax=max(md.mesh.y);
+md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin);
 md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
 md.geometry.surface=md.geometry.bed+md.geometry.thickness;
Index: /issm/trunk/test/NightlyRun/test1101.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1101.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1101.m	(revision 9734)
@@ -30,9 +30,9 @@
 
 	%Create MPCs to have periodic boundary conditions
-	posx=find(md.x==0);
-	posx2=find(md.x==max(md.x));
+	posx=find(md.mesh.x==0);
+	posx2=find(md.mesh.x==max(md.mesh.x));
 
-	posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same nodes two times
-	posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));
+	posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times
+	posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));
 
 	md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
Index: /issm/trunk/test/NightlyRun/test1102.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1102.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1102.m	(revision 9734)
@@ -17,5 +17,5 @@
 
 %	%Find elements at the corner and extract model
-%	posnodes=find((md.x==0 | md.x==max(md.x)) & (md.y==0 | md.y==max(md.y)));
+%	posnodes=find((md.mesh.x==0 | md.mesh.x==max(md.mesh.x)) & (md.mesh.y==0 | md.mesh.y==max(md.mesh.y)));
 %	[a,b]=find(ismember(md.mesh.elements,posnodes));
 %	elements=ones(md.mesh.numberofelements,1);
@@ -34,11 +34,11 @@
 
 	%Create MPCs to have periodic boundary conditions
-	%posx=find(md.x==0);
-	%posx2=find(md.x==max(md.x));
-	%posx=find(md.x==0 & md.y~=0 & md.y~=max(md.y) & ~md.mesh.vertexonbed);
-	%posx2=find(md.x==max(md.x) &  md.y~=0 & md.y~=max(md.y) & ~md.mesh.vertexonbed);
+	%posx=find(md.mesh.x==0);
+	%posx2=find(md.mesh.x==max(md.mesh.x));
+	%posx=find(md.mesh.x==0 & md.mesh.y~=0 & md.mesh.y~=max(md.mesh.y) & ~md.mesh.vertexonbed);
+	%posx2=find(md.mesh.x==max(md.mesh.x) &  md.mesh.y~=0 & md.mesh.y~=max(md.mesh.y) & ~md.mesh.vertexonbed);
 
-	%posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x) & ~md.mesh.vertexonbed); %Don't take the same nodes two times
-	%posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x) & ~md.mesh.vertexonbed);
+	%posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x) & ~md.mesh.vertexonbed); %Don't take the same nodes two times
+	%posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x) & ~md.mesh.vertexonbed);
 
 	%md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
Index: /issm/trunk/test/NightlyRun/test1103.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1103.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1103.m	(revision 9734)
@@ -27,9 +27,9 @@
 
 	%Create MPCs to have periodic boundary conditions
-	posx=find(md.x==0);
-	posx2=find(md.x==max(md.x));
+	posx=find(md.mesh.x==0);
+	posx2=find(md.mesh.x==max(md.mesh.x));
 
-	posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same nodes two times
-	posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));
+	posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times
+	posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));
 
 	md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
Index: /issm/trunk/test/NightlyRun/test1104.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1104.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1104.m	(revision 9734)
@@ -27,9 +27,9 @@
 
 	%Create MPCs to have periodic boundary conditions
-	posx=find(md.x==0);
-	posx2=find(md.x==max(md.x));
+	posx=find(md.mesh.x==0);
+	posx2=find(md.mesh.x==max(md.mesh.x));
 
-	posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same nodes two times
-	posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));
+	posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times
+	posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));
 
 	md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
Index: /issm/trunk/test/NightlyRun/test1105.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1105.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1105.m	(revision 9734)
@@ -25,14 +25,14 @@
 	md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1);
 
-	posx=find(md.x==0 & md.y~=0 & md.y~=L);
-	posx2=find(md.x==L & md.y~=0 & md.y~=L);
+	posx=find(md.mesh.x==0 & md.mesh.y~=0 & md.mesh.y~=L);
+	posx2=find(md.mesh.x==L & md.mesh.y~=0 & md.mesh.y~=L);
 
-	posy=find(md.y==0 & md.x~=0 & md.x~=L); %Don't take the same nodes two times
-	posy2=find(md.y==L & md.x~=0 & md.x~=L);
+	posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=L); %Don't take the same nodes two times
+	posy2=find(md.mesh.y==L & md.mesh.x~=0 & md.mesh.x~=L);
 
 	md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
 
 	%Add spc on the corners
-	pos=find((md.x==0 | md.x==L) & (md.y==0 | md.y==L) & md.mesh.vertexonbed);
+	pos=find((md.mesh.x==0 | md.mesh.x==L) & (md.mesh.y==0 | md.mesh.y==L) & md.mesh.vertexonbed);
 	md.diagnostic.spcvx(pos)=0;
 	md.diagnostic.spcvy(pos)=0;
Index: /issm/trunk/test/NightlyRun/test1106.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1106.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1106.m	(revision 9734)
@@ -19,9 +19,9 @@
 	%Create MPCs to have periodic boundary conditions
 
-	%posx=find(md.x==0);
-	%posx2=find(md.x==L);
+	%posx=find(md.mesh.x==0);
+	%posx2=find(md.mesh.x==L);
 
-	%posy=find(md.y==0 & md.x~=0 & md.x~=L); %Don't take the same nodes two times
-	%posy2=find(md.y==L & md.x~=0 & md.x~=L);
+	%posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=L); %Don't take the same nodes two times
+	%posy2=find(md.mesh.y==L & md.mesh.x~=0 & md.mesh.x~=L);
 
 	%md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
Index: /issm/trunk/test/NightlyRun/test1107.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1107.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1107.m	(revision 9734)
@@ -26,14 +26,14 @@
 
 	%Create MPCs to have periodic boundary conditions
-	posx=find(md.x==0 & ~(md.y==0 & md.mesh.vertexonbed) & ~(md.y==L & md.mesh.vertexonbed));
-	posx2=find(md.x==max(md.x) & ~(md.y==0 & md.mesh.vertexonbed) & ~(md.y==L & md.mesh.vertexonbed));
+	posx=find(md.mesh.x==0 & ~(md.mesh.y==0 & md.mesh.vertexonbed) & ~(md.mesh.y==L & md.mesh.vertexonbed));
+	posx2=find(md.mesh.x==max(md.mesh.x) & ~(md.mesh.y==0 & md.mesh.vertexonbed) & ~(md.mesh.y==L & md.mesh.vertexonbed));
 
-	posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same nodes two times
-	posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));
+	posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times
+	posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));
 
 	md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
 
 	%Add spc on the corners
-	pos=find((md.x==0 | md.x==L) & (md.y==0 | md.y==L) & md.mesh.vertexonbed);
+	pos=find((md.mesh.x==0 | md.mesh.x==L) & (md.mesh.y==0 | md.mesh.y==L) & md.mesh.vertexonbed);
 	md.diagnostic.spcvy(:)=0;
 	md.diagnostic.spcvx(pos)=0;
Index: /issm/trunk/test/NightlyRun/test1108.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1108.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1108.m	(revision 9734)
@@ -22,5 +22,5 @@
 	%md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1);
 	
-	%pos=find((md.x==0 | md.x==max(md.x)) & (md.y==0 | md.y==max(md.y)));
+	%pos=find((md.mesh.x==0 | md.mesh.x==max(md.mesh.x)) & (md.mesh.y==0 | md.mesh.y==max(md.mesh.y)));
 	%md.diagnostic.spcvx(pos)=0;
 	%md.diagnostic.spcvy(pos)=0;
@@ -28,9 +28,9 @@
 
 	%%Create MPCs to have periodic boundary conditions
-	%posx=find(md.x==0);
-	%posx2=find(md.x==max(md.x));
+	%posx=find(md.mesh.x==0);
+	%posx2=find(md.mesh.x==max(md.mesh.x));
 
-	%posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same nodes two times
-	%posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));
+	%posy=find(md.mesh.y==0 & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x)); %Don't take the same nodes two times
+	%posy2=find(md.mesh.y==max(md.mesh.y) & md.mesh.x~=0 & md.mesh.x~=max(md.mesh.x));
 
 	%md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
Index: /issm/trunk/test/NightlyRun/test1109.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1109.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1109.m	(revision 9734)
@@ -26,6 +26,6 @@
 
 	%Create MPCs to have periodic boundary conditions
-	posx=find(md.x==0);
-	posx2=find(md.x==max(md.x));
+	posx=find(md.mesh.x==0);
+	posx2=find(md.mesh.x==max(md.mesh.x));
 	md.diagnostic.vertex_pairing=[posx,posx2];
 
@@ -41,5 +41,5 @@
 	%Remove the spc where there is some sliding (case 3 and 4):
 	if i==3 | i==4,
-		pos=find(md.y/max(md.y)>=0.44 & md.y/max(md.y)<=0.5);
+		pos=find(md.mesh.y/max(md.mesh.y)>=0.44 & md.mesh.y/max(md.mesh.y)<=0.5);
 		md.diagnostic.spcvx(pos)=NaN;
 		md.diagnostic.spcvy(pos)=NaN;
Index: /issm/trunk/test/NightlyRun/test1110.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1110.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1110.m	(revision 9734)
@@ -30,5 +30,5 @@
 		md.diagnostic.spcvz(pos)=0;
 	else
-		pos=find(md.mesh.vertexonbed & (md.x==0 | md.x==max(md.x)) & (md.y==0 | md.y==max(md.y)));
+		pos=find(md.mesh.vertexonbed & (md.mesh.x==0 | md.mesh.x==max(md.mesh.x)) & (md.mesh.y==0 | md.mesh.y==max(md.mesh.y)));
 		md.diagnostic.spcvx(pos)=100; %because we need a dirichlet somewhere
 		md.diagnostic.spcvy(pos)=0;
@@ -39,9 +39,9 @@
 
 	%Create MPCs to have periodic boundary conditions
-	posx=find(md.x==0);
-	posx2=find(md.x==max(md.x));
+	posx=find(md.mesh.x==0);
+	posx2=find(md.mesh.x==max(md.mesh.x));
 
-	posy=find(md.y==0);
-	posy2=find(md.y==max(md.y));
+	posy=find(md.mesh.y==0);
+	posy2=find(md.mesh.y==max(md.mesh.y));
 
 	md.diagnostic.vertex_pairing=[posx,posx2;posy,posy2];
Index: /issm/trunk/test/NightlyRun/test1201.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1201.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1201.m	(revision 9734)
@@ -27,5 +27,5 @@
 
 	%spc thickness
-	pos=find(md.y>199999.9);
+	pos=find(md.mesh.y>199999.9);
 	times=0:1:500;
 	md.prognostic.spcthickness=NaN*ones(md.mesh.numberofvertices+1,length(times));
@@ -48,5 +48,5 @@
 [elements,x,y,z,s,h2]=SectionValues(md,results{2},'../Exp/CrossLineEISMINT.exp',100);
 [elements,x,y,z,s,h3]=SectionValues(md,results{3},'../Exp/CrossLineEISMINT.exp',100);
-[elements,x,y,z,s,hth]=SectionValues(md, 500+100*sin(2*pi/200*(500-md.y/400)),'../Exp/CrossLineEISMINT.exp',100);
+[elements,x,y,z,s,hth]=SectionValues(md, 500+100*sin(2*pi/200*(500-md.mesh.y/400)),'../Exp/CrossLineEISMINT.exp',100);
 plot(s,h1,'r',s,h2,'b',s,h3,'g',s,hth,'k')
 legend('Art. diff.','No Art. diff.','D.G.','Theoretical')
Index: /issm/trunk/test/NightlyRun/test1203.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1203.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1203.m	(revision 9734)
@@ -10,6 +10,6 @@
 
 %Impose a non zero velocity on the upper boundary condition (y=max(y))
-pos=find(md.y==max(md.y));
-md.diagnostic.spcvy(pos)=400*(((md.x(pos)-100000)/25000).^2-ones(size(pos,1),1)).*heaviside((1+eps)*ones(size(pos,1),1)-((md.x(pos)-100000)/25000).^2);
+pos=find(md.mesh.y==max(md.mesh.y));
+md.diagnostic.spcvy(pos)=400*(((md.mesh.x(pos)-100000)/25000).^2-ones(size(pos,1),1)).*heaviside((1+eps)*ones(size(pos,1),1)-((md.mesh.x(pos)-100000)/25000).^2);
 
 %Compute solution for MacAyeal's model 
Index: /issm/trunk/test/NightlyRun/test1204.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1204.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1204.m	(revision 9734)
@@ -10,6 +10,6 @@
 
 %Impose a non zero velocity on the upper boundary condition (y=max(y))
-pos=find(md.y==max(md.y));
-md.diagnostic.spcvy(pos)=400*(((md.x(pos)-100000)/25000).^2-ones(size(pos,1),1)).*heaviside((1+eps)*ones(size(pos,1),1)-((md.x(pos)-100000)/25000).^2);
+pos=find(md.mesh.y==max(md.mesh.y));
+md.diagnostic.spcvy(pos)=400*(((md.mesh.x(pos)-100000)/25000).^2-ones(size(pos,1),1)).*heaviside((1+eps)*ones(size(pos,1),1)-((md.mesh.x(pos)-100000)/25000).^2);
 
 %Compute solution for MacAyeal's model 
Index: /issm/trunk/test/NightlyRun/test1205.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1205.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1205.m	(revision 9734)
@@ -13,6 +13,6 @@
 %Calculation of the analytical 2d velocity field
 constant=0.3;
-vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
-vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
+vx_obs=constant/2*md.mesh.x.*(md.geometry.thickness).^-1;
+vy_obs=constant/2*md.mesh.y.*(md.geometry.thickness).^-1;
 vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
 
@@ -51,5 +51,5 @@
 set(gcf,'Position',[1 1 1580 1150])
 subplot(2,2,1)
-p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
+p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
 vel,'FaceColor','interp','EdgeColor','none');
 title('Modelled velocity','FontSize',14,'FontWeight','bold')
@@ -58,5 +58,5 @@
    
 subplot(2,2,2)
-p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
+p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
 vel_obs,'FaceColor','interp','EdgeColor','none');
 title('Analytical velocity','FontSize',14,'FontWeight','bold')
@@ -66,6 +66,6 @@
 subplot(2,2,3)
 hold on;
-plot(sqrt((md.x(1:md.mesh.numberofvertices2d)).^2+(md.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
-plot(sqrt((md.x2d).^2+(md.y2d).^2),vel_obs,'b.');
+plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
+plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.');
 title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold');
 xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold');
@@ -76,5 +76,5 @@
 
 subplot(2,2,4)
-p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
+p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
 abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none');
 title('Relative misfit [%]','FontSize',14,'FontWeight','bold')
Index: /issm/trunk/test/NightlyRun/test1206.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1206.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1206.m	(revision 9734)
@@ -13,6 +13,6 @@
 %Calculation of the analytical 2d velocity field
 constant=0.3;
-vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
-vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
+vx_obs=constant/2*md.mesh.x.*(md.geometry.thickness).^-1;
+vy_obs=constant/2*md.mesh.y.*(md.geometry.thickness).^-1;
 vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
 
@@ -50,5 +50,5 @@
 figure(1)
 subplot(2,2,1)
-p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
+p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
 vel,'FaceColor','interp','EdgeColor','none');
 title('Modelled velocity','FontSize',14,'FontWeight','bold')
@@ -57,5 +57,5 @@
    
 subplot(2,2,2)
-p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
+p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
 vel_obs,'FaceColor','interp','EdgeColor','none');
 title('Analytical velocity','FontSize',14,'FontWeight','bold')
@@ -65,6 +65,6 @@
 subplot(2,2,3)
 hold on;
-plot(sqrt((md.x(1:md.mesh.numberofvertices2d)).^2+(md.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
-plot(sqrt((md.x2d).^2+(md.y2d).^2),vel_obs,'b.');
+plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
+plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.');
 title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold');
 xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold');
@@ -75,5 +75,5 @@
 
 subplot(2,2,4)
-p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
+p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
 abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none');
 title('Relative misfit [%]','FontSize',14,'FontWeight','bold')
Index: /issm/trunk/test/NightlyRun/test1207.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1207.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1207.m	(revision 9734)
@@ -13,6 +13,6 @@
 %Calculation of the analytical 2d velocity field
 constant=0.3;
-vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
-vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
+vx_obs=constant/2*md.mesh.x.*(md.geometry.thickness).^-1;
+vy_obs=constant/2*md.mesh.y.*(md.geometry.thickness).^-1;
 vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
 
@@ -50,5 +50,5 @@
 figure(1)
 subplot(2,2,1)
-p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
+p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
 vel,'FaceColor','interp','EdgeColor','none');
 title('Modelled velocity','FontSize',14,'FontWeight','bold')
@@ -57,5 +57,5 @@
    
 subplot(2,2,2)
-p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
+p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
 vel_obs,'FaceColor','interp','EdgeColor','none');
 title('Analytical velocity','FontSize',14,'FontWeight','bold')
@@ -65,6 +65,6 @@
 subplot(2,2,3)
 hold on;
-plot(sqrt((md.x(1:md.mesh.numberofvertices2d)).^2+(md.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
-plot(sqrt((md.x2d).^2+(md.y2d).^2),vel_obs,'b.');
+plot(sqrt((md.mesh.x(1:md.mesh.numberofvertices2d)).^2+(md.mesh.y(1:md.mesh.numberofvertices2d)).^2),vel,'r.');
+plot(sqrt((md.mesh.x2d).^2+(md.mesh.y2d).^2),vel_obs,'b.');
 title('Analytical vs calculated velocity','FontSize',14,'FontWeight','bold');
 xlabel('distance to the center of the icesheet [m]','FontSize',14,'FontWeight','bold');
@@ -75,5 +75,5 @@
 
 subplot(2,2,4)
-p=patch('Faces',md.mesh.elements2d,'Vertices',[md.x2d md.y2d],'FaceVertexCData',...
+p=patch('Faces',md.mesh.elements2d,'Vertices',[md.mesh.x2d md.mesh.y2d],'FaceVertexCData',...
 abs(vel-vel_obs)./vel_obs*100,'FaceColor','interp','EdgeColor','none');
 title('Relative misfit [%]','FontSize',14,'FontWeight','bold')
Index: /issm/trunk/test/NightlyRun/test1302.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1302.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1302.m	(revision 9734)
@@ -23,5 +23,5 @@
 A=10/(exp(alpha*(-1000))-1);    %A=T(bed)/(exp(alpha*bed)-1)  with bed=-1000 T(bed)=10
 B=-A;
-md.initialization.temperature=A*exp(alpha*md.z)+B;
+md.initialization.temperature=A*exp(alpha*md.mesh.z)+B;
 
 %modeled  results
Index: /issm/trunk/test/NightlyRun/test1303.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1303.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1303.m	(revision 9734)
@@ -18,5 +18,5 @@
 %d2T/dz2=0 T(bed)=10 T(surface)=0  => T=0*(z-bed)/thickness+10*(surface-z)/thickness
 %each layer of the 3d mesh must have a constant value
-md.initialization.temperature=10*(md.geometry.surface-md.z)./md.geometry.thickness;
+md.initialization.temperature=10*(md.geometry.surface-md.mesh.z)./md.geometry.thickness;
 
 %modeled  results
Index: /issm/trunk/test/NightlyRun/test1304.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1304.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1304.m	(revision 9734)
@@ -19,5 +19,5 @@
 %the result is linear with depth and is equal to 0 on the upper surface (See BC)
 %d2T/dz2=0  -k*dT/dz(bed)=G  T(surface)=0  => T=-G/k*(z-surface)
-md.initialization.temperature=-0.1/md.thermalconductivity*(md.z-md.geometry.surface); %G=0.1 W/m2
+md.initialization.temperature=-0.1/md.thermalconductivity*(md.mesh.z-md.geometry.surface); %G=0.1 W/m2
 
 %modeled  results
Index: /issm/trunk/test/NightlyRun/test137.m
===================================================================
--- /issm/trunk/test/NightlyRun/test137.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test137.m	(revision 9734)
@@ -2,11 +2,11 @@
 %Simple mesh
 md=bamg(model,'domain','../Exp/Square.exp','hmax',100000);
-x1=md.x;
-y1=md.y;
+x1=md.mesh.x;
+y1=md.mesh.y;
 
 %hVertices
 md=bamg(model,'domain','../Exp/Square.exp','hmax',300000,'hvertices',[10000 100000 400000 100000]');
-x2=md.x;
-y2=md.y;
+x2=md.mesh.x;
+y2=md.mesh.y;
 
 %big mesh
Index: /issm/trunk/test/NightlyRun/test1401.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1401.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1401.m	(revision 9734)
@@ -1,4 +1,4 @@
 %test the anisotropic mesh adaptation
-%function to capture = exp(-(sqrt((md.x+0.1).^2+(md.y+0.1).^2)-0.75).^2*10^6)+((md.x+0.1).^2+(md.y+0.1).^2)/2;
+%function to capture = exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
 printingflag=false;
 
@@ -11,5 +11,5 @@
 %mesh adaptation loop YAMS
 md=squaremesh(md,L,L,nx,ny);
-md.inversion.vel_obs=exp(-(sqrt((md.x+0.1).^2+(md.y+0.1).^2)-0.75).^2*10^6)+((md.x+0.1).^2+(md.y+0.1).^2)/2;
+md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
 plotmodel(md,'data','vel_obs','data','vel_obs','nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
 if printingflag, 
@@ -20,5 +20,5 @@
 
 md=YamsCall(md,md.inversion.vel_obs,0.001,0.3,1.3,10^-4);
-md.inversion.vel_obs=exp(-(sqrt((md.x+0.1).^2+(md.y+0.1).^2)-0.75).^2*10^6)+((md.x+0.1).^2+(md.y+0.1).^2)/2;
+md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
 plotmodel(md,'data','vel_obs','data','vel_obs','nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
 if printingflag, 
@@ -29,5 +29,5 @@
 
 md=YamsCall(md,md.inversion.vel_obs,0.001,0.3,2.5,0.008);
-md.inversion.vel_obs=exp(-(sqrt((md.x+0.1).^2+(md.y+0.1).^2)-0.75).^2*10^6)+((md.x+0.1).^2+(md.y+0.1).^2)/2;
+md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
 plotmodel(md,'data','vel_obs','data','vel_obs','nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
 if printingflag, 
@@ -36,10 +36,10 @@
 	system(['mv mesh1_yams3.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Mesh/ ']);
 end
-x1=md.x;
-y1=md.y;
+x1=md.mesh.x;
+y1=md.mesh.y;
 
 %mesh adaptation loop BAMG
 md=squaremesh(md,L,L,nx,ny);
-md.inversion.vel_obs=exp(-(sqrt((md.x+0.1).^2+(md.y+0.1).^2)-0.75).^2*10^6)+((md.x+0.1).^2+(md.y+0.1).^2)/2;
+md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
 plotmodel(md,'data','vel_obs','data','vel_obs','nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
 if printingflag, 
@@ -51,5 +51,5 @@
 md.bamg=NaN;
 md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.001,'hmax',0.3,'gradation',1.3,'err',10^-4);
-md.inversion.vel_obs=exp(-(sqrt((md.x+0.1).^2+(md.y+0.1).^2)-0.75).^2*10^6)+((md.x+0.1).^2+(md.y+0.1).^2)/2;
+md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
 plotmodel(md,'data','vel_obs','data','vel_obs','nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
 if printingflag, 
@@ -61,5 +61,5 @@
 md.bamg=NaN;
 md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.001,'hmax',0.3,'gradation',2.5,'err',0.008);
-md.inversion.vel_obs=exp(-(sqrt((md.x+0.1).^2+(md.y+0.1).^2)-0.75).^2*10^6)+((md.x+0.1).^2+(md.y+0.1).^2)/2;
+md.inversion.vel_obs=exp(-(sqrt((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)-0.75).^2*10^6)+((md.mesh.x+0.1).^2+(md.mesh.y+0.1).^2)/2;
 plotmodel(md,'data','vel_obs','data','vel_obs','nlines',1,'ncols',2,'title','','figposition',[500 500 1000 500],'axis#all','equal','xlim#all',[0 1],'ylim#all',[0 1],'edgecolor#1','w'); pause(0.5);
 if printingflag, 
@@ -68,6 +68,6 @@
 	system(['mv mesh1_bamg3.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Mesh/ ']);
 end
-x2=md.x;
-y2=md.y;
+x2=md.mesh.x;
+y2=md.mesh.y;
 
 %Fields and tolerances to track changes
Index: /issm/trunk/test/NightlyRun/test1402.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1402.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1402.m	(revision 9734)
@@ -10,5 +10,5 @@
 %mesh adaptation loop YAMS
 md=squaremesh(md,L,L,nx,ny);
-u=4*md.x-2; v=4*md.y-2;
+u=4*md.mesh.x-2; v=4*md.mesh.y-2;
 md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
 	+tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
@@ -22,5 +22,5 @@
 
 md=YamsCall(md,md.inversion.vel_obs,0.005,0.3,2.3,10^-2);
-u=4*md.x-2; v=4*md.y-2;
+u=4*md.mesh.x-2; v=4*md.mesh.y-2;
 md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
 	+tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
@@ -34,5 +34,5 @@
 
 md=YamsCall(md,md.inversion.vel_obs,0.005,0.3,3,0.005);
-u=4*md.x-2; v=4*md.y-2;
+u=4*md.mesh.x-2; v=4*md.mesh.y-2;
 md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
 	+tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
@@ -44,10 +44,10 @@
 	system(['mv mesh2_yams3.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Mesh/ ']);
 end
-x1=md.x;
-y1=md.y;
+x1=md.mesh.x;
+y1=md.mesh.y;
 
 %mesh adaptation loop BAMG
 md=squaremesh(md,L,L,nx,ny);
-u=4*md.x-2; v=4*md.y-2;
+u=4*md.mesh.x-2; v=4*md.mesh.y-2;
 md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
 	+tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
@@ -62,5 +62,5 @@
 md.bamg=NaN;
 md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.005,'hmax',0.3,'gradation',2.3,'err',10^-2);
-u=4*md.x-2; v=4*md.y-2;
+u=4*md.mesh.x-2; v=4*md.mesh.y-2;
 md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
 	+tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
@@ -75,5 +75,5 @@
 md.bamg=NaN;
 md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.005,'hmax',0.3,'gradation',3,'err',0.005);
-u=4*md.x-2; v=4*md.y-2;
+u=4*md.mesh.x-2; v=4*md.mesh.y-2;
 md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
 	+tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
@@ -88,5 +88,5 @@
 md.bamg=NaN;
 md=bamg(md,'field',md.inversion.vel_obs,'hmin',0.005,'hmax',0.3,'gradation',1.5,'err',0.003,'anisomax',1);
-u=4*md.x-2; v=4*md.y-2;
+u=4*md.mesh.x-2; v=4*md.mesh.y-2;
 md.inversion.vel_obs=tanh(30*(u.^2+v.^2-0.25)) ...
 	+tanh(30*((u-0.75).^2+(v-0.75).^2-0.25)) +tanh(30*((u-0.75).^2+(v+0.75).^2-0.25)) ...
@@ -98,6 +98,6 @@
 	system(['mv mesh2_bamgiso.png ' ISSM_DIR '/website/doc_pdf/validation/Images/Mesh/ ']);
 end
-x2=md.x;
-y2=md.y;
+x2=md.mesh.x;
+y2=md.mesh.y;
 
 %Fields and tolerances to track changes
Index: /issm/trunk/test/NightlyRun/test1501.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1501.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1501.m	(revision 9734)
@@ -97,6 +97,6 @@
 
 	index = md.mesh.elements;
-	x1=md.x(index(:,1)); x2=md.x(index(:,2)); x3=md.x(index(:,3));
-	y1=md.y(index(:,1)); y2=md.y(index(:,2)); y3=md.y(index(:,3));
+	x1=md.mesh.x(index(:,1)); x2=md.mesh.x(index(:,2)); x3=md.mesh.x(index(:,3));
+	y1=md.mesh.y(index(:,1)); y2=md.mesh.y(index(:,2)); y3=md.mesh.y(index(:,3));
 	areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1)));
 
Index: /issm/trunk/test/NightlyRun/test1502.m
===================================================================
--- /issm/trunk/test/NightlyRun/test1502.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test1502.m	(revision 9734)
@@ -103,6 +103,6 @@
 
 	index = md.mesh.elements;
-	x1=md.x(index(:,1)); x2=md.x(index(:,2)); x3=md.x(index(:,3));
-	y1=md.y(index(:,1)); y2=md.y(index(:,2)); y3=md.y(index(:,3));
+	x1=md.mesh.x(index(:,1)); x2=md.mesh.x(index(:,2)); x3=md.mesh.x(index(:,3));
+	y1=md.mesh.y(index(:,1)); y2=md.mesh.y(index(:,2)); y3=md.mesh.y(index(:,3));
 	areas=(0.5*((x2-x1).*(y3-y1)-(y2-y1).*(x3-x1)));
 
Index: /issm/trunk/test/NightlyRun/test233.m
===================================================================
--- /issm/trunk/test/NightlyRun/test233.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test233.m	(revision 9734)
@@ -13,8 +13,8 @@
 
 %needed later
-ymin=min(md.y);
-ymax=max(md.y);
-xmin=min(md.x);
-xmax=max(md.x);
+ymin=min(md.mesh.y);
+ymax=max(md.mesh.y);
+xmin=min(md.mesh.x);
+xmax=max(md.mesh.x);
 
 di=md.materials.rho_ice/md.materials.rho_water;
@@ -42,10 +42,10 @@
 
 %constrain flanks to 0 normal velocity
-pos=find(md.x==xmin | md.x==xmax);
+pos=find(md.mesh.x==xmin | md.mesh.x==xmax);
 md.diagnostic.spcvx(pos)=0;
 md.diagnostic.spcvz(pos)=NaN;
 
 %constrain grounding line to 0 velocity
-pos=find(md.y==ymin);
+pos=find(md.mesh.y==ymin);
 md.diagnostic.spcvx(pos)=0;
 md.diagnostic.spcvy(pos)=0;
@@ -53,5 +53,5 @@
 %icefront
 nodeonicefront=zeros(md.mesh.numberofvertices,1);
-pos=find(md.y==ymax); nodeonicefront(pos)=1;
+pos=find(md.mesh.y==ymax); nodeonicefront(pos)=1;
 pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2))); diagnostic.icefront=md.mesh.segments(pos,:);
 diagnostic.icefront=[diagnostic.icefront 1*md.mask.elementonfloatingice(diagnostic.icefront(:,end))];
@@ -62,5 +62,5 @@
 %create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292.
 %ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.geometry.thickness./(4*md.materials.rheology_B)).^3;
-%vy_c=ey_c.*md.y*md.constants.yts;
+%vy_c=ey_c.*md.mesh.y*md.constants.yts;
 
 %Fields and tolerances to track changes
Index: /issm/trunk/test/NightlyRun/test234.m
===================================================================
--- /issm/trunk/test/NightlyRun/test234.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test234.m	(revision 9734)
@@ -13,8 +13,8 @@
 
 %needed later
-ymin=min(md.y);
-ymax=max(md.y);
-xmin=min(md.x);
-xmax=max(md.x);
+ymin=min(md.mesh.y);
+ymax=max(md.mesh.y);
+xmin=min(md.mesh.x);
+xmax=max(md.mesh.x);
 
 di=md.materials.rho_ice/md.materials.rho_water;
@@ -42,10 +42,10 @@
 
 %constrain flanks to 0 normal velocity
-pos=find(md.x==xmin | md.x==xmax);
+pos=find(md.mesh.x==xmin | md.mesh.x==xmax);
 md.diagnostic.spcvx(pos)=0;
 md.diagnostic.spcvz(pos)=NaN;
 
 %constrain grounding line to 0 velocity
-pos=find(md.y==ymin);
+pos=find(md.mesh.y==ymin);
 md.diagnostic.spcvx(pos)=0;
 md.diagnostic.spcvy(pos)=0;
@@ -53,5 +53,5 @@
 %icefront
 nodeonicefront=zeros(md.mesh.numberofvertices,1);
-pos=find(md.y==ymax); nodeonicefront(pos)=1;
+pos=find(md.mesh.y==ymax); nodeonicefront(pos)=1;
 pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2))); diagnostic.icefront=md.mesh.segments(pos,:);
 diagnostic.icefront=[diagnostic.icefront 1*md.mask.elementonfloatingice(diagnostic.icefront(:,end))];
@@ -62,5 +62,5 @@
 %create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292.
 %ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.geometry.thickness./(4*md.materials.rheology_B)).^3;
-%vy_c=ey_c.*md.y*md.constants.yts;
+%vy_c=ey_c.*md.mesh.y*md.constants.yts;
 
 %Fields and tolerances to track changes
Index: /issm/trunk/test/NightlyRun/test235.m
===================================================================
--- /issm/trunk/test/NightlyRun/test235.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test235.m	(revision 9734)
@@ -10,8 +10,8 @@
 
 %needed later
-ymin=min(md.y);
-ymax=max(md.y);
-xmin=min(md.x);
-xmax=max(md.x);
+ymin=min(md.mesh.y);
+ymax=max(md.mesh.y);
+xmin=min(md.mesh.x);
+xmax=max(md.mesh.x);
 
 di=md.materials.rho_ice/md.materials.rho_water;
@@ -39,10 +39,10 @@
 
 %constrain flanks to 0 normal velocity
-pos=find(md.x==xmin | md.x==xmax);
+pos=find(md.mesh.x==xmin | md.mesh.x==xmax);
 md.diagnostic.spcvx(pos)=0;
 md.diagnostic.spcvz(pos)=NaN;
 
 %constrain grounding line to 0 velocity
-pos=find(md.y==ymin);
+pos=find(md.mesh.y==ymin);
 md.diagnostic.spcvx(pos)=0;
 md.diagnostic.spcvy(pos)=0;
@@ -50,5 +50,5 @@
 %icefront
 nodeonicefront=zeros(md.mesh.numberofvertices,1);
-pos=find(md.y==ymax); nodeonicefront(pos)=1;
+pos=find(md.mesh.y==ymax); nodeonicefront(pos)=1;
 pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2))); diagnostic.icefront=md.mesh.segments(pos,:);
 diagnostic.icefront=[diagnostic.icefront 1*md.mask.elementonfloatingice(diagnostic.icefront(:,end))];
Index: /issm/trunk/test/NightlyRun/test236.m
===================================================================
--- /issm/trunk/test/NightlyRun/test236.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test236.m	(revision 9734)
@@ -10,8 +10,8 @@
 
 %needed later
-ymin=min(md.y);
-ymax=max(md.y);
-xmin=min(md.x);
-xmax=max(md.x);
+ymin=min(md.mesh.y);
+ymax=max(md.mesh.y);
+xmin=min(md.mesh.x);
+xmax=max(md.mesh.x);
 
 di=md.materials.rho_ice/md.materials.rho_water;
@@ -39,10 +39,10 @@
 
 %constrain flanks to 0 normal velocity
-pos=find(md.x==xmin | md.x==xmax);
+pos=find(md.mesh.x==xmin | md.mesh.x==xmax);
 md.diagnostic.spcvx(pos)=0;
 md.diagnostic.spcvz(pos)=NaN;
 
 %constrain grounding line to 0 velocity
-pos=find(md.y==ymin);
+pos=find(md.mesh.y==ymin);
 md.diagnostic.spcvx(pos)=0;
 md.diagnostic.spcvy(pos)=0;
@@ -50,5 +50,5 @@
 %icefront
 nodeonicefront=zeros(md.mesh.numberofvertices,1);
-pos=find(md.y==ymax); nodeonicefront(pos)=1;
+pos=find(md.mesh.y==ymax); nodeonicefront(pos)=1;
 pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2))); diagnostic.icefront=md.mesh.segments(pos,:);
 diagnostic.icefront=[diagnostic.icefront 1*md.mask.elementonfloatingice(diagnostic.icefront(:,end))];
Index: /issm/trunk/test/NightlyRun/test446.m
===================================================================
--- /issm/trunk/test/NightlyRun/test446.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test446.m	(revision 9734)
@@ -5,11 +5,11 @@
 md=roundmesh(model,radius,resolution);
 %fix center node to 0,0
-rad=sqrt((md.x).*md.x+(md.y).*md.y);
+rad=sqrt((md.mesh.x).*md.mesh.x+(md.mesh.y).*md.mesh.y);
 pos=find(rad==min(rad));
-md.x(pos)=0; md.y(pos)=0; %the closest node to the center is changed to be exactly at the center
+md.mesh.x(pos)=0; md.mesh.y(pos)=0; %the closest node to the center is changed to be exactly at the center
 %}}}
 %put our grounding line 'shelfextent' meters from the icefront {{{1
-xelem=md.x(md.mesh.elements)*[1;1;1]/3;
-yelem=md.y(md.mesh.elements)*[1;1;1]/3;
+xelem=md.mesh.x(md.mesh.elements)*[1;1;1]/3;
+yelem=md.mesh.y(md.mesh.elements)*[1;1;1]/3;
 rad=sqrt((xelem).*xelem+(yelem).*yelem);
 flags=zeros(md.mesh.numberofelements,1);
@@ -24,5 +24,5 @@
 %plug holes into the ice sheet, to test for grounding line migration. {{{1
 di=md.materials.rho_ice/md.materials.rho_water;
-rad=sqrt((md.x).*md.x+(md.y).*md.y);
+rad=sqrt((md.mesh.x).*md.mesh.x+(md.mesh.y).*md.mesh.y);
 pos=find(rad<200000);
 md.geometry.thickness(pos)=100;
@@ -30,10 +30,10 @@
 md.geometry.surface(pos)=md.geometry.bed(pos)+md.geometry.thickness(pos);
 
-pos=find(md.x<.2*1e6 & md.x>-.2*1e6 & md.y>0);
+pos=find(md.mesh.x<.2*1e6 & md.mesh.x>-.2*1e6 & md.mesh.y>0);
 md.geometry.thickness(pos)=100;
 md.geometry.bed(pos)=-di*md.geometry.thickness(pos)-20;
 md.geometry.surface(pos)=md.geometry.bed(pos)+md.geometry.thickness(pos);
 
-pos=find(md.x<.1*1e6 & md.x>-.1*1e6 & md.y<-.5*1e6 & md.y>-.6*1e6);
+pos=find(md.mesh.x<.1*1e6 & md.mesh.x>-.1*1e6 & md.mesh.y<-.5*1e6 & md.mesh.y>-.6*1e6);
 md.geometry.thickness(pos)=100;
 md.geometry.bed(pos)=-di*md.geometry.thickness(pos)-20;
Index: /issm/trunk/test/NightlyRun/test527.m
===================================================================
--- /issm/trunk/test/NightlyRun/test527.m	(revision 9733)
+++ /issm/trunk/test/NightlyRun/test527.m	(revision 9734)
@@ -3,6 +3,6 @@
 hVertices(1:5)=1000;
 md=bamg(model,'domain','../Exp/Pig.exp','hmax',20000,'hVertices',hVertices,'gradation',3,'geometricalmetric',1);
-x1=md.x;
-y1=md.y;
+x1=md.mesh.x;
+y1=md.mesh.y;
 
 %Simple mesh 2
@@ -10,9 +10,9 @@
 md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
 md=parameterize(md,'../Par/Pig.par');
-x2=md.x;
-y2=md.y;
+x2=md.mesh.x;
+y2=md.mesh.y;
 
 %refine existing mesh 1
-hessian=ComputeHessian(md.mesh.elements,md.x,md.y,md.inversion.vy_obs,'node');
+hessian=ComputeHessian(md.mesh.elements,md.mesh.x,md.mesh.y,md.inversion.vy_obs,'node');
 metric=ComputeMetric(hessian,2/9,1,1000,25*10^3,[]);
 md.miscellaneous.dummy=metric;
Index: /issm/trunk/test/Par/79North.par
===================================================================
--- /issm/trunk/test/Par/79North.par	(revision 9733)
+++ /issm/trunk/test/Par/79North.par	(revision 9734)
@@ -3,8 +3,8 @@
 %Geometry and observation
 load('../Data/79North.data','-mat');
-md.initialization.vx       =InterpFromMeshToMesh2d(index,x,y,vx,md.x,md.y);
-md.initialization.vy       =InterpFromMeshToMesh2d(index,x,y,vy,md.x,md.y);
-md.geometry.surface  =InterpFromMeshToMesh2d(index,x,y,surface,md.x,md.y);
-md.geometry.thickness=InterpFromMeshToMesh2d(index,x,y,thickness,md.x,md.y);
+md.initialization.vx       =InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y);
+md.initialization.vy       =InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y);
+md.geometry.surface  =InterpFromMeshToMesh2d(index,x,y,surface,md.mesh.x,md.mesh.y);
+md.geometry.thickness=InterpFromMeshToMesh2d(index,x,y,thickness,md.mesh.x,md.mesh.y);
 md.geometry.bed=md.geometry.surface-md.geometry.thickness;
 clear surface thickness vx vy x y index;
Index: /issm/trunk/test/Par/ISMIPA.par
===================================================================
--- /issm/trunk/test/Par/ISMIPA.par	(revision 9733)
+++ /issm/trunk/test/Par/ISMIPA.par	(revision 9734)
@@ -2,6 +2,6 @@
 
 disp('      creating thickness');
-md.geometry.surface=-md.x*tan(0.5*pi/180);
-md.geometry.bed=md.geometry.surface-1000+500*sin(md.x*2*pi/max(md.x)).*sin(md.y*2*pi/max(md.x));
+md.geometry.surface=-md.mesh.x*tan(0.5*pi/180);
+md.geometry.bed=md.geometry.surface-1000+500*sin(md.mesh.x*2*pi/max(md.mesh.x)).*sin(md.mesh.y*2*pi/max(md.mesh.x));
 md.geometry.thickness=md.geometry.surface-md.geometry.bed;
 
Index: /issm/trunk/test/Par/ISMIPB.par
===================================================================
--- /issm/trunk/test/Par/ISMIPB.par	(revision 9733)
+++ /issm/trunk/test/Par/ISMIPB.par	(revision 9734)
@@ -2,6 +2,6 @@
 
 disp('      creating thickness');
-md.geometry.surface=-md.x*tan(0.5*pi/180);
-md.geometry.bed=md.geometry.surface-1000+500*sin(md.x*2*pi/max(md.x));
+md.geometry.surface=-md.mesh.x*tan(0.5*pi/180);
+md.geometry.bed=md.geometry.surface-1000+500*sin(md.mesh.x*2*pi/max(md.mesh.x));
 md.geometry.thickness=md.geometry.surface-md.geometry.bed;
 
Index: /issm/trunk/test/Par/ISMIPC.par
===================================================================
--- /issm/trunk/test/Par/ISMIPC.par	(revision 9733)
+++ /issm/trunk/test/Par/ISMIPC.par	(revision 9734)
@@ -2,11 +2,11 @@
 
 disp('      creating thickness');
-md.geometry.surface=2000-md.x*tan(0.1*pi/180); %to have z>0
+md.geometry.surface=2000-md.mesh.x*tan(0.1*pi/180); %to have z>0
 md.geometry.bed=md.geometry.surface-1000;
 md.geometry.thickness=md.geometry.surface-md.geometry.bed;
 
 disp('      creating drag');
-%md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.x*2*pi/max(md.x/2)).*sin(md.y*2*pi/max(md.x/2)))./(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.bed)));
-md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.x*2*pi/max(md.x)).*sin(md.y*2*pi/max(md.x))));
+%md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.mesh.x*2*pi/max(md.mesh.x/2)).*sin(md.mesh.y*2*pi/max(md.mesh.x/2)))./(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.bed)));
+md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.mesh.x*2*pi/max(md.mesh.x)).*sin(md.mesh.y*2*pi/max(md.mesh.x))));
 %Take care of iceshelves: no basal drag
 pos=find(md.mask.elementonfloatingice);
Index: /issm/trunk/test/Par/ISMIPD.par
===================================================================
--- /issm/trunk/test/Par/ISMIPD.par	(revision 9733)
+++ /issm/trunk/test/Par/ISMIPD.par	(revision 9734)
@@ -2,10 +2,10 @@
 
 disp('      creating thickness');
-md.geometry.surface=2000-md.x*tan(0.1*pi/180); %to have z>0
+md.geometry.surface=2000-md.mesh.x*tan(0.1*pi/180); %to have z>0
 md.geometry.bed=md.geometry.surface-1000;
 md.geometry.thickness=md.geometry.surface-md.geometry.bed;
 
 disp('      creating drag');
-md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.x*2*pi/max(md.x))));
+md.friction.coefficient=sqrt(md.constants.yts.*(1000+1000*sin(md.mesh.x*2*pi/max(md.mesh.x))));
 %Take care of iceshelves: no basal drag
 pos=find(md.mask.elementonfloatingice);
Index: /issm/trunk/test/Par/ISMIPE.par
===================================================================
--- /issm/trunk/test/Par/ISMIPE.par	(revision 9733)
+++ /issm/trunk/test/Par/ISMIPE.par	(revision 9734)
@@ -7,5 +7,5 @@
 md.geometry.bed=zeros(md.mesh.numberofvertices,1);
 for i=1:md.mesh.numberofvertices
-	y=md.y(i);
+	y=md.mesh.y(i);
 	point1=floor(y/100)+1;
 	point2=min(point1+1,51);
Index: /issm/trunk/test/Par/ISMIPF.par
===================================================================
--- /issm/trunk/test/Par/ISMIPF.par	(revision 9733)
+++ /issm/trunk/test/Par/ISMIPF.par	(revision 9734)
@@ -3,7 +3,7 @@
 
 disp('      creating thickness');
-md.geometry.surface=-md.x*tan(3*pi/180);
+md.geometry.surface=-md.mesh.x*tan(3*pi/180);
 %md.geometry.bed=md.geometry.surface-1000;
-md.geometry.bed=md.geometry.surface-1000+100*exp(-((md.x-max(md.x)/2).^2+(md.y-max(md.y)/2).^2)/(10000^2));
+md.geometry.bed=md.geometry.surface-1000+100*exp(-((md.mesh.x-max(md.mesh.x)/2).^2+(md.mesh.y-max(md.mesh.y)/2).^2)/(10000^2));
 md.geometry.thickness=md.geometry.surface-md.geometry.bed;
 
@@ -28,5 +28,5 @@
 md.initialization.pressure=zeros(md.mesh.numberofvertices,1);
 md.initialization.temperature=255*ones(md.mesh.numberofvertices,1);
-pos=find(md.x==min(md.x) | md.x==max(md.x) | md.y==min(md.y) | md.y==max(md.y));
+pos=find(md.mesh.x==min(md.mesh.x) | md.mesh.x==max(md.mesh.x) | md.mesh.y==min(md.mesh.y) | md.mesh.y==max(md.mesh.y));
 md.balancethickness.spcthickness=NaN*ones(md.mesh.numberofvertices,1);
 md.balancethickness.spcthickness(pos)=md.geometry.thickness(pos);
Index: /issm/trunk/test/Par/Pig.par
===================================================================
--- /issm/trunk/test/Par/Pig.par	(revision 9733)
+++ /issm/trunk/test/Par/Pig.par	(revision 9734)
@@ -3,8 +3,8 @@
 %Geometry and observation
 load('../Data/Pig.data','-mat');
-md.inversion.vx_obs   =InterpFromMeshToMesh2d(index,x,y,vx_obs,md.x,md.y);
-md.inversion.vy_obs   =InterpFromMeshToMesh2d(index,x,y,vy_obs,md.x,md.y);
-md.geometry.surface  =InterpFromMeshToMesh2d(index,x,y,surface,md.x,md.y);
-md.geometry.thickness=InterpFromMeshToMesh2d(index,x,y,thickness,md.x,md.y);
+md.inversion.vx_obs   =InterpFromMeshToMesh2d(index,x,y,vx_obs,md.mesh.x,md.mesh.y);
+md.inversion.vy_obs   =InterpFromMeshToMesh2d(index,x,y,vy_obs,md.mesh.x,md.mesh.y);
+md.geometry.surface  =InterpFromMeshToMesh2d(index,x,y,surface,md.mesh.x,md.mesh.y);
+md.geometry.thickness=InterpFromMeshToMesh2d(index,x,y,thickness,md.mesh.x,md.mesh.y);
 md.geometry.bed=md.geometry.surface-md.geometry.thickness;
 clear surface thickness vx_obs vy_obs x y index;
Index: /issm/trunk/test/Par/RoundSheetEISMINT.par
===================================================================
--- /issm/trunk/test/Par/RoundSheetEISMINT.par	(revision 9733)
+++ /issm/trunk/test/Par/RoundSheetEISMINT.par	(revision 9734)
@@ -13,5 +13,5 @@
 tmin=238.15; %K
 st=1.67*10^-2/1000; %k/m;
-radius=sqrt((md.x).^2+(md.y).^2);
+radius=sqrt((md.mesh.x).^2+(md.mesh.y).^2);
 md.initialization.temperature=(tmin+st*radius);
 md.basalforcings.geothermalflux=4.2*10^-2*ones(md.mesh.numberofvertices,1);
@@ -29,6 +29,6 @@
 disp('      creating velocities');
 constant=0.3;
-md.inversion.vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
-md.inversion.vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
+md.inversion.vx_obs=constant/2*md.mesh.x.*(md.geometry.thickness).^-1;
+md.inversion.vy_obs=constant/2*md.mesh.y.*(md.geometry.thickness).^-1;
 md.inversion.vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
 md.initialization.vx=zeros(md.mesh.numberofvertices,1);
@@ -41,7 +41,7 @@
 md=SetMarineIceSheetBC(md,'../Exp/RoundFrontEISMINT.exp');
 
-radius=sqrt((md.x).*md.x+(md.y).*md.y);
+radius=sqrt((md.mesh.x).*md.mesh.x+(md.mesh.y).*md.mesh.y);
 pos=find(radius==min(radius));
-md.x(pos)=0; md.y(pos)=0; %the closest node to the center is changed to be exactly at the center
+md.mesh.x(pos)=0; md.mesh.y(pos)=0; %the closest node to the center is changed to be exactly at the center
 
 md.diagnostic.spcvx(pos)=0;
Index: /issm/trunk/test/Par/RoundSheetShelf.par
===================================================================
--- /issm/trunk/test/Par/RoundSheetShelf.par	(revision 9733)
+++ /issm/trunk/test/Par/RoundSheetShelf.par	(revision 9734)
@@ -7,5 +7,5 @@
 hmin=300;
 hmax=1000;
-radius=sqrt((md.x).*md.x+(md.y).*md.y);
+radius=sqrt((md.mesh.x).*md.mesh.x+(md.mesh.y).*md.mesh.y);
 ymin=min(radius);
 ymax=max(radius);
@@ -23,10 +23,10 @@
 
 
-pos=find(md.x<.2*1e6 & md.x>-.2*1e6 & md.y>0);
+pos=find(md.mesh.x<.2*1e6 & md.mesh.x>-.2*1e6 & md.mesh.y>0);
 md.geometry.thickness(pos)=100;
 md.geometry.bed(pos)=-di*md.geometry.thickness(pos)-20;
 md.geometry.surface(pos)=md.geometry.bed(pos)+md.geometry.thickness(pos);
 
-pos=find(md.x<.1*1e6 & md.x>-.1*1e6 & md.y<-.5*1e6 & md.y>-.6*1e6);
+pos=find(md.mesh.x<.1*1e6 & md.mesh.x>-.1*1e6 & md.mesh.y<-.5*1e6 & md.mesh.y>-.6*1e6);
 md.geometry.thickness(pos)=100;
 md.geometry.bed(pos)=-di*md.geometry.thickness(pos)-20;
@@ -79,5 +79,5 @@
 md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1);
 
-pos=find(md.x==0 & md.y==0);
+pos=find(md.mesh.x==0 & md.mesh.y==0);
 md.diagnostic.spcvx(pos)=0;
 md.diagnostic.spcvy(pos)=0;
Index: /issm/trunk/test/Par/RoundSheetStaticEISMINT.par
===================================================================
--- /issm/trunk/test/Par/RoundSheetStaticEISMINT.par	(revision 9733)
+++ /issm/trunk/test/Par/RoundSheetStaticEISMINT.par	(revision 9734)
@@ -2,7 +2,7 @@
 hmin=0.01;
 hmax=2756.7;
-radius=(sqrt((md.x).^2+(md.y).^2));
+radius=(sqrt((md.mesh.x).^2+(md.mesh.y).^2));
 radiusmax=max(radius);
-md.geometry.thickness=hmin*ones(size(md.x,1),1)+hmax*(4*((1/2)^(4/3)*ones(size(md.x,1),1)-((radius)./(2*radiusmax)).^(4/3))).^(3/8);
+md.geometry.thickness=hmin*ones(size(md.mesh.x,1),1)+hmax*(4*((1/2)^(4/3)*ones(size(md.mesh.x,1),1)-((radius)./(2*radiusmax)).^(4/3))).^(3/8);
 md.geometry.bed=0*md.geometry.thickness;
 md.geometry.surface=md.geometry.bed+md.geometry.thickness;
@@ -34,6 +34,6 @@
 disp('      creating velocities');
 constant=0.3;
-md.inversion.vx_obs=constant/2*md.x.*(md.geometry.thickness).^-1;
-md.inversion.vy_obs=constant/2*md.y.*(md.geometry.thickness).^-1;
+md.inversion.vx_obs=constant/2*md.mesh.x.*(md.geometry.thickness).^-1;
+md.inversion.vy_obs=constant/2*md.mesh.y.*(md.geometry.thickness).^-1;
 md.inversion.vel_obs=(sqrt((md.inversion.vx_obs).^2+(md.inversion.vy_obs).^2));
 md.initialization.vx=zeros(md.mesh.numberofvertices,1);
@@ -46,7 +46,7 @@
 md=SetMarineIceSheetBC(md,'../Exp/RoundFrontEISMINT.exp');
 
-radius=sqrt((md.x).*md.x+(md.y).*md.y);
+radius=sqrt((md.mesh.x).*md.mesh.x+(md.mesh.y).*md.mesh.y);
 pos=find(radius==min(radius));
-md.x(pos)=0; md.y(pos)=0; %the closest node to the center is changed to be exactly at the center
+md.mesh.x(pos)=0; md.mesh.y(pos)=0; %the closest node to the center is changed to be exactly at the center
 
 md.diagnostic.spcvx(pos)=0;
Index: /issm/trunk/test/Par/SquareEISMINT.par
===================================================================
--- /issm/trunk/test/Par/SquareEISMINT.par	(revision 9733)
+++ /issm/trunk/test/Par/SquareEISMINT.par	(revision 9734)
@@ -2,6 +2,6 @@
 
 disp('      creating thickness');
-ymin=min(md.y);
-ymax=max(md.y);
+ymin=min(md.mesh.y);
+ymax=max(md.mesh.y);
 md.geometry.thickness=500*ones(md.mesh.numberofvertices,1);
 md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
@@ -31,5 +31,5 @@
 
 %Evolution of the ice shelf
-pos=find(md.y==200000); %nodes on the upper boundary condition
+pos=find(md.mesh.y==200000); %nodes on the upper boundary condition
 md.balancethickness.spcthickness=NaN*ones(md.mesh.numberofvertices,1);
 md.balancethickness.spcthickness(pos)=500;
Index: /issm/trunk/test/Par/SquareSheetConstrained.par
===================================================================
--- /issm/trunk/test/Par/SquareSheetConstrained.par	(revision 9733)
+++ /issm/trunk/test/Par/SquareSheetConstrained.par	(revision 9734)
@@ -4,7 +4,7 @@
 hmin=300;
 hmax=1000;
-ymin=min(md.y);
-ymax=max(md.y);
-md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+ymin=min(md.mesh.y);
+ymax=max(md.mesh.y);
+md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin);
 md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness+20;
 md.geometry.surface=md.geometry.bed+md.geometry.thickness;
@@ -12,6 +12,6 @@
 %Initial velocity 
 load('../Data/SquareSheetConstrained.data','-mat');
-md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.x,md.y);
-md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.x,md.y);
+md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y);
+md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y);
 clear vx vy x y index;
 md.initialization.vz=zeros(md.mesh.numberofvertices,1);
Index: /issm/trunk/test/Par/SquareSheetShelf.par
===================================================================
--- /issm/trunk/test/Par/SquareSheetShelf.par	(revision 9733)
+++ /issm/trunk/test/Par/SquareSheetShelf.par	(revision 9734)
@@ -4,10 +4,10 @@
 hmin=300;
 hmax=1000;
-ymin=min(md.y);
-ymax=max(md.y);
-md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+ymin=min(md.mesh.y);
+ymax=max(md.mesh.y);
+md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin);
 md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
 bed_sheet=-md.materials.rho_ice/md.materials.rho_water*(hmax+(hmin-hmax)*(ymax/2-ymin)/(ymax-ymin));
-pos=find(md.y<=ymax/2);
+pos=find(md.mesh.y<=ymax/2);
 md.geometry.bed(pos)=bed_sheet;
 md.geometry.surface=md.geometry.bed+md.geometry.thickness;
@@ -15,6 +15,6 @@
 %Initial velocity 
 load('../Data/SquareSheetShelf.data','-mat');
-md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.x,md.y);
-md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.x,md.y);
+md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y);
+md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y);
 clear vx vy x y index;
 md.initialization.vz=zeros(md.mesh.numberofvertices,1);
Index: /issm/trunk/test/Par/SquareShelf.par
===================================================================
--- /issm/trunk/test/Par/SquareShelf.par	(revision 9733)
+++ /issm/trunk/test/Par/SquareShelf.par	(revision 9734)
@@ -4,7 +4,7 @@
 hmin=300;
 hmax=1000;
-ymin=min(md.y);
-ymax=max(md.y);
-md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+ymin=min(md.mesh.y);
+ymax=max(md.mesh.y);
+md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin);
 md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
 md.geometry.surface=md.geometry.bed+md.geometry.thickness;
@@ -12,6 +12,6 @@
 %Initial velocity and pressure
 load('../Data/SquareShelf.data','-mat');
-md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.x,md.y);
-md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.x,md.y);
+md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y);
+md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y);
 clear vx vy x y index;
 md.initialization.vz=zeros(md.mesh.numberofvertices,1);
Index: /issm/trunk/test/Par/SquareShelfConstrained.par
===================================================================
--- /issm/trunk/test/Par/SquareShelfConstrained.par	(revision 9733)
+++ /issm/trunk/test/Par/SquareShelfConstrained.par	(revision 9734)
@@ -4,7 +4,7 @@
 hmin=300;
 hmax=1000;
-ymin=min(md.y);
-ymax=max(md.y);
-md.geometry.thickness=hmax+(hmin-hmax)*(md.y-ymin)/(ymax-ymin);
+ymin=min(md.mesh.y);
+ymax=max(md.mesh.y);
+md.geometry.thickness=hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin);
 md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
 md.geometry.surface=md.geometry.bed+md.geometry.thickness;
@@ -12,6 +12,6 @@
 %Initial velocity 
 load('../Data/SquareShelfConstrained.data','-mat');
-md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.x,md.y);
-md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.x,md.y);
+md.initialization.vx=InterpFromMeshToMesh2d(index,x,y,vx,md.mesh.x,md.mesh.y);
+md.initialization.vy=InterpFromMeshToMesh2d(index,x,y,vy,md.mesh.x,md.mesh.y);
 clear vx vy x y index;
 md.initialization.vz=zeros(md.mesh.numberofvertices,1);
