Index: issm/trunk-jpl/src/m/classes/mesh2d.m
===================================================================
--- issm/trunk-jpl/src/m/classes/mesh2d.m	(revision 18563)
+++ issm/trunk-jpl/src/m/classes/mesh2d.m	(revision 19040)
@@ -70,5 +70,5 @@
 			end
 		end % }}}
-		function obj = setdefaultparameters(obj) % {{{
+		function self = setdefaultparameters(self) % {{{
 
 			%the connectivity is the averaged number of nodes linked to a
@@ -77,7 +77,7 @@
 			%give a good memory/time ration. This value can be checked in
 			%trunk/test/Miscellaneous/runme.m
-			obj.average_vertex_connectivity=25;
+			self.average_vertex_connectivity=25;
 		end % }}}
-		function md = checkconsistency(obj,md,solution,analyses) % {{{
+		function md = checkconsistency(self,md,solution,analyses) % {{{
 
 			md = checkfield(md,'fieldname','mesh.x','NaN',1,'size',[md.mesh.numberofvertices 1]);
@@ -97,67 +97,67 @@
 			end
 		end % }}}
-		function disp(obj) % {{{
+		function disp(self) % {{{
 			disp(sprintf('   2D tria Mesh (horizontal):')); 
 
 			disp(sprintf('\n      Elements and vertices:'));
-			fielddisplay(obj,'numberofelements','number of elements');
-			fielddisplay(obj,'numberofvertices','number of vertices');
-			fielddisplay(obj,'elements','vertex indices of the mesh elements');
-			fielddisplay(obj,'x','vertices x coordinate [m]');
-			fielddisplay(obj,'y','vertices y coordinate [m]');
-			fielddisplay(obj,'edges','edges of the 2d mesh (vertex1 vertex2 element1 element2)');
-			fielddisplay(obj,'numberofedges','number of edges of the 2d mesh');
+			fielddisplay(self,'numberofelements','number of elements');
+			fielddisplay(self,'numberofvertices','number of vertices');
+			fielddisplay(self,'elements','vertex indices of the mesh elements');
+			fielddisplay(self,'x','vertices x coordinate [m]');
+			fielddisplay(self,'y','vertices y coordinate [m]');
+			fielddisplay(self,'edges','edges of the 2d mesh (vertex1 vertex2 element1 element2)');
+			fielddisplay(self,'numberofedges','number of edges of the 2d mesh');
 
 			disp(sprintf('\n      Properties:'));
-			fielddisplay(obj,'vertexonboundary','vertices on the boundary of the domain flag list');
-			fielddisplay(obj,'segments','edges on domain boundary (vertex1 vertex2 element)');
-			fielddisplay(obj,'segmentmarkers','number associated to each segment');
-			fielddisplay(obj,'vertexconnectivity','list of vertices connected to vertex_i');
-			fielddisplay(obj,'elementconnectivity','list of vertices connected to element_i');
-			fielddisplay(obj,'average_vertex_connectivity','average number of vertices connected to one vertex');
+			fielddisplay(self,'vertexonboundary','vertices on the boundary of the domain flag list');
+			fielddisplay(self,'segments','edges on domain boundary (vertex1 vertex2 element)');
+			fielddisplay(self,'segmentmarkers','number associated to each segment');
+			fielddisplay(self,'vertexconnectivity','list of vertices connected to vertex_i');
+			fielddisplay(self,'elementconnectivity','list of vertices connected to element_i');
+			fielddisplay(self,'average_vertex_connectivity','average number of vertices connected to one vertex');
 
 			disp(sprintf('\n      Extracted model:'));
-			fielddisplay(obj,'extractedvertices','vertices extracted from the model');
-			fielddisplay(obj,'extractedelements','elements extracted from the model');
+			fielddisplay(self,'extractedvertices','vertices extracted from the model');
+			fielddisplay(self,'extractedelements','elements extracted from the model');
 
 			disp(sprintf('\n      Projection:'));
-			fielddisplay(obj,'lat','vertices latitude [degrees]');
-			fielddisplay(obj,'long','vertices longitude [degrees]');
-			fielddisplay(obj,'epsg','EPSG code (ex: 3413 for UPS Greenland, 3031 for UPS Antarctica)');
+			fielddisplay(self,'lat','vertices latitude [degrees]');
+			fielddisplay(self,'long','vertices longitude [degrees]');
+			fielddisplay(self,'epsg','EPSG code (ex: 3413 for UPS Greenland, 3031 for UPS Antarctica)');
 		end % }}}
-		function createxml(obj,fid) % {{{
+		function createxml(self,fid) % {{{
 			fprintf(fid, '<!-- 2D tria Mesh (horizontal) -->\n');
 
 			%elements and vertices
 			fprintf(fid,'%s\n%s\n%s\n','<frame key="1" label="Elements and vertices">','<section name="mesh" />');
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n','  <parameter key ="numberofelements" type="',class(obj.numberofelements),'" default="',convert2str(obj.numberofelements),'">','     <section name="mesh" />','     <help> number of elements </help>','  </parameter>');
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n','  <parameter key ="numberofvertices" type="',class(obj.numberofvertices),'" default="',convert2str(obj.numberofvertices),'">','     <section name="mesh" />','     <help> number of vertices </help>','  </parameter>');
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n','  <parameter key ="elements" type="',class(obj.elements),'" default="',convert2str(obj.elements),'">','     <section name="mesh" />','     <help> vertex indices of the mesh elements </help>','  </parameter>');
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="x" type="',class(obj.x),'" default="',convert2str(obj.x),'">','     <section name="mesh" />','     <help> vertices x coordinate [m] </help>','  </parameter>');
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="y" type="',class(obj.y),'" default="',convert2str(obj.y),'">','     <section name="mesh" />','     <help> vertices y coordinate [m] </help>','  </parameter>');
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="edges" type="',class(obj.edges),'" default="',convert2str(obj.edges),'">','     <section name="mesh" />','     <help> edges of the 2d mesh (vertex1 vertex2 element1 element2) </help>','  </parameter>');
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="numberofedges" type="',class(obj.numberofedges),'" default="',convert2str(obj.numberofedges),'">','     <section name="mesh" />','     <help> number of edges of the 2d mesh </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n','  <parameter key ="numberofelements" type="',class(self.numberofelements),'" default="',convert2str(self.numberofelements),'">','     <section name="mesh" />','     <help> number of elements </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n','  <parameter key ="numberofvertices" type="',class(self.numberofvertices),'" default="',convert2str(self.numberofvertices),'">','     <section name="mesh" />','     <help> number of vertices </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n','  <parameter key ="elements" type="',class(self.elements),'" default="',convert2str(self.elements),'">','     <section name="mesh" />','     <help> vertex indices of the mesh elements </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="x" type="',class(self.x),'" default="',convert2str(self.x),'">','     <section name="mesh" />','     <help> vertices x coordinate [m] </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="y" type="',class(self.y),'" default="',convert2str(self.y),'">','     <section name="mesh" />','     <help> vertices y coordinate [m] </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="edges" type="',class(self.edges),'" default="',convert2str(self.edges),'">','     <section name="mesh" />','     <help> edges of the 2d mesh (vertex1 vertex2 element1 element2) </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="numberofedges" type="',class(self.numberofedges),'" default="',convert2str(self.numberofedges),'">','     <section name="mesh" />','     <help> number of edges of the 2d mesh </help>','  </parameter>');
 			fprintf(fid,'%s\n%s\n','</frame>');
 
 			% properties
 			fprintf(fid,'%s\n%s\n%s\n','<frame key="2" label="Properties">','<section name="mesh" />');             
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="vertexonboundary" type="',class(obj.vertexonboundary),'" default="',convert2str(obj.vertexonboundary),'">','     <section name="mesh" />','     <help> vertices on the boundary of the domain flag list </help>','  </parameter>');
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="segments" type="',class(obj.segments),'" default="',convert2str(obj.segments),'">','     <section name="mesh" />','     <help> edges on domain boundary (vertex1 vertex2 element) </help>','  </parameter>');
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="segmentmarkers" type="',class(obj.segmentmarkers),'" default="',convert2str(obj.segmentmarkers),'">','     <section name="mesh" />','     <help> number associated to each segment </help>','  </parameter>');
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="vertexconnectivity" type="',class(obj.vertexconnectivity),'" default="',convert2str(obj.vertexconnectivity),'">','     <section name="mesh" />','     <help> list of vertices connected to vertex_i </help>','  </parameter>');
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="elementconnectivity" type="',class(obj.elementconnectivity),'" default="',convert2str(obj.elementconnectivity),'">','     <section name="mesh" />','     <help> list of vertices connected to element_i </help>','  </parameter>');
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="average_vertex_connectivity" type="',class(obj.average_vertex_connectivity),'" default="',convert2str(obj.average_vertex_connectivity),'">','     <section name="mesh" />','     <help> average number of vertices connected to one vertex </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="vertexonboundary" type="',class(self.vertexonboundary),'" default="',convert2str(self.vertexonboundary),'">','     <section name="mesh" />','     <help> vertices on the boundary of the domain flag list </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="segments" type="',class(self.segments),'" default="',convert2str(self.segments),'">','     <section name="mesh" />','     <help> edges on domain boundary (vertex1 vertex2 element) </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="segmentmarkers" type="',class(self.segmentmarkers),'" default="',convert2str(self.segmentmarkers),'">','     <section name="mesh" />','     <help> number associated to each segment </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="vertexconnectivity" type="',class(self.vertexconnectivity),'" default="',convert2str(self.vertexconnectivity),'">','     <section name="mesh" />','     <help> list of vertices connected to vertex_i </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="elementconnectivity" type="',class(self.elementconnectivity),'" default="',convert2str(self.elementconnectivity),'">','     <section name="mesh" />','     <help> list of vertices connected to element_i </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="average_vertex_connectivity" type="',class(self.average_vertex_connectivity),'" default="',convert2str(self.average_vertex_connectivity),'">','     <section name="mesh" />','     <help> average number of vertices connected to one vertex </help>','  </parameter>');
 			fprintf(fid,'%s\n%s\n','</frame>');
 
 			%extracted model
 			fprintf(fid,'%s\n%s\n%s\n','<frame key="3" label="Extracted Model">','<section name="mesh" />'); 
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="extractedvertices" type="',class(obj.extractedvertices),'" default="',convert2str(obj.extractedvertices),'">','     <section name="mesh" />','     <help> vertices extracted from the model </help>','  </parameter>');
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="extractedelements" type="',class(obj.extractedelements),'" default="',convert2str(obj.extractedelements),'">','     <section name="mesh" />','     <help> elements extracted from the model </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="extractedvertices" type="',class(self.extractedvertices),'" default="',convert2str(self.extractedvertices),'">','     <section name="mesh" />','     <help> vertices extracted from the model </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="extractedelements" type="',class(self.extractedelements),'" default="',convert2str(self.extractedelements),'">','     <section name="mesh" />','     <help> elements extracted from the model </help>','  </parameter>');
 			fprintf(fid,'%s\n%s\n','</frame>');
 
 			%projection
 			fprintf(fid,'%s\n%s\n%s\n','<frame key="4" label="Projection">','<section name="mesh" />'); 
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="lat" type="',class(obj.lat),'" default="',convert2str(obj.lat),'">','     <section name="mesh" />','     <help> vertices latitude [degrees] </help>','  </parameter>');
-			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="long" type="',class(obj.long),'" default="',convert2str(obj.long),'">','     <section name="mesh" />','     <help> verticies longitude [degrees] </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="lat" type="',class(self.lat),'" default="',convert2str(self.lat),'">','     <section name="mesh" />','     <help> vertices latitude [degrees] </help>','  </parameter>');
+			fprintf(fid,'%s%s%s%s%s\n%s\n%s\n%s\n','  <parameter key ="long" type="',class(self.long),'" default="',convert2str(self.long),'">','     <section name="mesh" />','     <help> verticies longitude [degrees] </help>','  </parameter>');
 			% choice (epsg) 'n' or 's'
 			fprintf(fid,'%s\n%s\n%s\n','  <parameter key ="epsg" type="alternative" optional="false">','     <section name="mesh" />','     <help> Indicate epsg ''n'' or ''s'' </help>');
@@ -168,24 +168,24 @@
 
 		end % }}}
-		function marshall(obj,md,fid) % {{{
-			WriteData(fid,'enum',DomainTypeEnum(),'data',StringToEnum(['Domain' domaintype(obj)]),'format','Integer');
-			WriteData(fid,'enum',DomainDimensionEnum(),'data',dimension(obj),'format','Integer');
-			WriteData(fid,'enum',MeshElementtypeEnum(),'data',StringToEnum(elementtype(obj)),'format','Integer');
-			WriteData(fid,'object',obj,'class','mesh','fieldname','x','format','DoubleMat','mattype',1);
-			WriteData(fid,'object',obj,'class','mesh','fieldname','y','format','DoubleMat','mattype',1);
-			WriteData(fid,'enum',MeshZEnum(),'data',zeros(obj.numberofvertices,1),'format','DoubleMat','mattype',1);
-			WriteData(fid,'object',obj,'class','mesh','fieldname','elements','format','DoubleMat','mattype',2);
-			WriteData(fid,'object',obj,'class','mesh','fieldname','numberofelements','format','Integer');
-			WriteData(fid,'object',obj,'class','mesh','fieldname','numberofvertices','format','Integer');
-			WriteData(fid,'object',obj,'class','mesh','fieldname','average_vertex_connectivity','format','Integer');
-			WriteData(fid,'object',obj,'class','mesh','fieldname','vertexonboundary','format','DoubleMat','mattype',1);
+		function marshall(self,md,fid) % {{{
+			WriteData(fid,'enum',DomainTypeEnum(),'data',StringToEnum(['Domain' domaintype(self)]),'format','Integer');
+			WriteData(fid,'enum',DomainDimensionEnum(),'data',dimension(self),'format','Integer');
+			WriteData(fid,'enum',MeshElementtypeEnum(),'data',StringToEnum(elementtype(self)),'format','Integer');
+			WriteData(fid,'object',self,'class','mesh','fieldname','x','format','DoubleMat','mattype',1);
+			WriteData(fid,'object',self,'class','mesh','fieldname','y','format','DoubleMat','mattype',1);
+			WriteData(fid,'enum',MeshZEnum(),'data',zeros(self.numberofvertices,1),'format','DoubleMat','mattype',1);
+			WriteData(fid,'object',self,'class','mesh','fieldname','elements','format','DoubleMat','mattype',2);
+			WriteData(fid,'object',self,'class','mesh','fieldname','numberofelements','format','Integer');
+			WriteData(fid,'object',self,'class','mesh','fieldname','numberofvertices','format','Integer');
+			WriteData(fid,'object',self,'class','mesh','fieldname','average_vertex_connectivity','format','Integer');
+			WriteData(fid,'object',self,'class','mesh','fieldname','vertexonboundary','format','DoubleMat','mattype',1);
 		end % }}}
-		function t = domaintype(obj) % {{{
+		function t = domaintype(self) % {{{
 			t = '2Dhorizontal';
 		end % }}}
-		function d = dimension(obj) % {{{
+		function d = dimension(self) % {{{
 			d = 2;
 		end % }}}
-		function s = elementtype(obj) % {{{
+		function s = elementtype(self) % {{{
 			s = 'Tria';
 		end % }}}
