Index: /issm/trunk-jpl/AUTHORS
===================================================================
--- /issm/trunk-jpl/AUTHORS	(revision 11235)
+++ /issm/trunk-jpl/AUTHORS	(revision 11236)
@@ -2,13 +2,13 @@
 multi-purpose finite element framework dedicated to ice sheet modeling
 
-Team manager: 
+Project Scientist: 
    Eric Rignot <eric.rignot@jpl.nasa.gov>
 
-Development manager: 
+Project Manager: 
    Eric Larour <eric.larour@jpl.nasa.gov>
 
 Current core developers:
    * Eric Larour <eric.larour@jpl.nasa.gov>
-	* Helene Seroussi <helene.seroussi@jpl.nasa.gov>
+   * Helene Seroussi <helene.seroussi@jpl.nasa.gov>
    * Mathieu Morlighem <mathieu.morlighem@jpl.nasa.gov>
 
Index: /issm/trunk-jpl/NEWS
===================================================================
--- /issm/trunk-jpl/NEWS	(revision 11235)
+++ /issm/trunk-jpl/NEWS	(revision 11236)
@@ -1,2 +1,3 @@
+
 please go to the ISSM website for the latest news:
 
Index: /issm/trunk-jpl/doc/issmdoc.m
===================================================================
--- /issm/trunk-jpl/doc/issmdoc.m	(revision 11235)
+++ /issm/trunk-jpl/doc/issmdoc.m	(revision 11236)
@@ -9,7 +9,7 @@
 disp(sprintf('%s','	   md=model;                                %creates a new empty model structure'));
 disp(sprintf('%s','	   md=triangle(md,''DomainOutline.exp'',50000);   %creates a mesh of the domain outline with a resolution of 50000m'));
-disp(sprintf('%s','	   md=setmask(md,''all'','''');               %defines the glacier system as an ice shelf (no island)'));
+disp(sprintf('%s','	   md=geography(md,''all'','''');               %defines the glacier system as an ice shelf (no island)'));
 disp(sprintf('%s','	   md=parameterize(md,''Square.par'');        %fills all the other fields of the model'));
-disp(sprintf('%s','	   md=setflowequation(md,''macayeal'',''all''); %defines all elements as MacAyeal''s'));
-disp(sprintf('%s','	   md=solve(md,DiagnosticSolutionEnum);   %generate the velocity field of the ice shelf'));
-disp(sprintf('%s','	   plotmodel(md,''data'',md.results.DiagnosticSolucion.Vel);              %displays the velocity (type plotdoc for plotmodel help)'));
+disp(sprintf('%s','	   md=setelementstype(md,''macayeal'',''all''); %defines all elements as MacAyeal''s'));
+disp(sprintf('%s','	   md=solve(md,DiagnosticSolutionEnum);   %generate the velocity field'));
+disp(sprintf('%s','	   plotmodel(md,''data'',md.results.DiagnosticSolution.Vel);    %displays the velocity (type plotdoc for plotmodel help)'));
Index: /issm/trunk-jpl/examples/SquareIceShelf/Square.par
===================================================================
--- /issm/trunk-jpl/examples/SquareIceShelf/Square.par	(revision 11235)
+++ /issm/trunk-jpl/examples/SquareIceShelf/Square.par	(revision 11236)
@@ -11,7 +11,7 @@
 
 disp('      creating drag');
-pos=find(md.mask.elementonfloatingice);
-md.friction.coefficient=200*ones(md.mesh.numberofvertices,1); %q=1.
-md.friction.coefficient(md.mesh.elements(pos,:))=0;
+pos=find(md.mask.vertexonfloatingice);
+md.friction.coefficient=200*ones(md.mesh.numberofvertices,1);
+md.friction.coefficient(pos)=0;
 md.friction.p=ones(md.mesh.numberofelements,1);
 md.friction.q=ones(md.mesh.numberofelements,1);
Index: /issm/trunk-jpl/src/c/Container/Elements.cpp
===================================================================
--- /issm/trunk-jpl/src/c/Container/Elements.cpp	(revision 11235)
+++ /issm/trunk-jpl/src/c/Container/Elements.cpp	(revision 11236)
@@ -180,6 +180,4 @@
 	int    numberofvertices,numberofelements;
 	int    numberofresults,vectorsize;
-	int    rank;
-	int    minrank;
 
 	/*Recover parameters: */
@@ -192,20 +190,14 @@
 		/*No patch here, we prepare vectors*/
 
-		/*Get rank of first cpu that has results*/
-		if(this->Size()) rank=my_rank;
-		else rank=num_procs;
-		MPI_Allreduce (&rank,&minrank,1,MPI_INT,MPI_MIN,MPI_COMM_WORLD);
-
 		/*see what the first element of this partition has in stock (this is common to all partitions)*/
-		if(my_rank==minrank){
-			if(this->Size()==0) _error_("Cannot write results because there is no element??");
+		if(my_rank==0){
+			if(this->Size()==0) _error_("Cannot write results because first partition has no element. Maybe too many cpus were requested");
 			Element* element=(Element*)this->GetObjectByOffset(0);
 			element->ListResultsInfo(&resultsenums,&resultssizes,&resultstimes,&resultssteps,&numberofresults);
 		}
-		MPI_Bcast(&numberofresults,1,MPI_DOUBLE,minrank,MPI_COMM_WORLD);
-
+		MPI_Bcast(&numberofresults,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
 		/*Get out if there is no results. Otherwise broadcast info*/
 		if(!numberofresults) return;
-		if(my_rank!=minrank){
+		if(my_rank!=0){
 			resultsenums=(int*)xmalloc(numberofresults*sizeof(int));
 			resultssizes=(int*)xmalloc(numberofresults*sizeof(int));
@@ -213,8 +205,8 @@
 			resultssteps=(int*)xmalloc(numberofresults*sizeof(int));
 		}
-		MPI_Bcast(resultsenums,numberofresults,MPI_INT,minrank,MPI_COMM_WORLD);
-		MPI_Bcast(resultssizes,numberofresults,MPI_INT,minrank,MPI_COMM_WORLD);
-		MPI_Bcast(resultstimes,numberofresults,MPI_DOUBLE,minrank,MPI_COMM_WORLD);
-		MPI_Bcast(resultssteps,numberofresults,MPI_INT,minrank,MPI_COMM_WORLD);
+		MPI_Bcast(resultsenums,numberofresults,MPI_INT,0,MPI_COMM_WORLD);
+		MPI_Bcast(resultssizes,numberofresults,MPI_INT,0,MPI_COMM_WORLD);
+		MPI_Bcast(resultstimes,numberofresults,MPI_DOUBLE,0,MPI_COMM_WORLD);
+		MPI_Bcast(resultssteps,numberofresults,MPI_INT,0,MPI_COMM_WORLD);
 
 		/*Loop over all results and get nodal vector*/
Index: /issm/trunk-jpl/src/c/modules/Chacox/chaco_seconds.cpp
===================================================================
--- /issm/trunk-jpl/src/c/modules/Chacox/chaco_seconds.cpp	(revision 11235)
+++ /issm/trunk-jpl/src/c/modules/Chacox/chaco_seconds.cpp	(revision 11236)
@@ -18,5 +18,8 @@
 /* This timer is faster and more robust (if it exists). */
     struct rusage rusage;
-    int getrusage();
+    /*int getrusage(); commenting this out. not sure why it's there anymore
+	 *as it clobbers the prototype int getrusag(int target,rusage* results) which 
+	 *is defined in the <sys/time.h> and <sys/resource.h> header files. Leaving it 
+	 *for reference in case we have a problem here in the future*/
  
     getrusage(RUSAGE_SELF, &rusage);
Index: /issm/trunk-jpl/src/c/objects/Vertex.cpp
===================================================================
--- /issm/trunk-jpl/src/c/objects/Vertex.cpp	(revision 11235)
+++ /issm/trunk-jpl/src/c/objects/Vertex.cpp	(revision 11236)
@@ -71,5 +71,5 @@
 	printf("   z: %g\n",z);
 	printf("   sigma: %g\n",sigma);
-	printf("   connectivity: %i\n",connectivity);
+	printf("   connectivity: %g\n",connectivity);
 	printf("   dof: %i\n",dof);
 	printf("   clone: %i\n",clone);
Index: /issm/trunk-jpl/src/dox/issm.dox
===================================================================
--- /issm/trunk-jpl/src/dox/issm.dox	(revision 11235)
+++ /issm/trunk-jpl/src/dox/issm.dox	(revision 11236)
@@ -46,32 +46,35 @@
 </th>
 <tr>
-<th  bgcolor=#FFFFFF style="text-align:left;"> C++ </th><td  bgcolor=#FFFFFF style="text-align:right;">531</td><td  bgcolor=#FFFFFF style="text-align:right;">15433</td><td  bgcolor=#FFFFFF style="text-align:right;">17169</td><td  bgcolor=#FFFFFF style="text-align:right;">57344</td><td  bgcolor=#FFFFFF style="text-align:right;">89946</td>
+<th  bgcolor=#FFFFFF style="text-align:left;"> C++ </th><td  bgcolor=#FFFFFF style="text-align:right;">533</td><td  bgcolor=#FFFFFF style="text-align:right;">15543</td><td  bgcolor=#FFFFFF style="text-align:right;">17244</td><td  bgcolor=#FFFFFF style="text-align:right;">57848</td><td  bgcolor=#FFFFFF style="text-align:right;">90635</td>
 </tr>
 <tr>
-<th  bgcolor=#C6E2FF style="text-align:left;"> MATLAB </th><td  bgcolor=#C6E2FF style="text-align:right;">970</td><td  bgcolor=#C6E2FF style="text-align:right;">7248</td><td  bgcolor=#C6E2FF style="text-align:right;">13716</td><td  bgcolor=#C6E2FF style="text-align:right;">31608</td><td  bgcolor=#C6E2FF style="text-align:right;">52572</td>
+<th  bgcolor=#C6E2FF style="text-align:left;"> MATLAB </th><td  bgcolor=#C6E2FF style="text-align:right;">970</td><td  bgcolor=#C6E2FF style="text-align:right;">7187</td><td  bgcolor=#C6E2FF style="text-align:right;">13630</td><td  bgcolor=#C6E2FF style="text-align:right;">31601</td><td  bgcolor=#C6E2FF style="text-align:right;">52418</td>
 </tr>
 <tr>
-<th  bgcolor=#FFFFFF style="text-align:left;"> C/C++  Header </th><td  bgcolor=#FFFFFF style="text-align:right;">397</td><td  bgcolor=#FFFFFF style="text-align:right;">3047</td><td  bgcolor=#FFFFFF style="text-align:right;">2706</td><td  bgcolor=#FFFFFF style="text-align:right;">10262</td><td  bgcolor=#FFFFFF style="text-align:right;">16015</td>
+<th  bgcolor=#FFFFFF style="text-align:left;"> C/C++  Header </th><td  bgcolor=#FFFFFF style="text-align:right;">399</td><td  bgcolor=#FFFFFF style="text-align:right;">3064</td><td  bgcolor=#FFFFFF style="text-align:right;">2726</td><td  bgcolor=#FFFFFF style="text-align:right;">10343</td><td  bgcolor=#FFFFFF style="text-align:right;">16133</td>
 </tr>
 <tr>
-<th  bgcolor=#C6E2FF style="text-align:left;"> Objective  C </th><td  bgcolor=#C6E2FF style="text-align:right;">32</td><td  bgcolor=#C6E2FF style="text-align:right;">99</td><td  bgcolor=#C6E2FF style="text-align:right;">0</td><td  bgcolor=#C6E2FF style="text-align:right;">402</td><td  bgcolor=#C6E2FF style="text-align:right;">501</td>
+<th  bgcolor=#C6E2FF style="text-align:left;"> m4 </th><td  bgcolor=#C6E2FF style="text-align:right;">2</td><td  bgcolor=#C6E2FF style="text-align:right;">238</td><td  bgcolor=#C6E2FF style="text-align:right;">163</td><td  bgcolor=#C6E2FF style="text-align:right;">1871</td><td  bgcolor=#C6E2FF style="text-align:right;">2272</td>
 </tr>
 <tr>
-<th  bgcolor=#FFFFFF style="text-align:left;"> Bourne  Shell </th><td  bgcolor=#FFFFFF style="text-align:right;">9</td><td  bgcolor=#FFFFFF style="text-align:right;">59</td><td  bgcolor=#FFFFFF style="text-align:right;">98</td><td  bgcolor=#FFFFFF style="text-align:right;">272</td><td  bgcolor=#FFFFFF style="text-align:right;">429</td>
+<th  bgcolor=#FFFFFF style="text-align:left;"> Objective  C </th><td  bgcolor=#FFFFFF style="text-align:right;">9</td><td  bgcolor=#FFFFFF style="text-align:right;">98</td><td  bgcolor=#FFFFFF style="text-align:right;">0</td><td  bgcolor=#FFFFFF style="text-align:right;">370</td><td  bgcolor=#FFFFFF style="text-align:right;">468</td>
 </tr>
 <tr>
-<th  bgcolor=#C6E2FF style="text-align:left;"> Perl </th><td  bgcolor=#C6E2FF style="text-align:right;">3</td><td  bgcolor=#C6E2FF style="text-align:right;">21</td><td  bgcolor=#C6E2FF style="text-align:right;">23</td><td  bgcolor=#C6E2FF style="text-align:right;">240</td><td  bgcolor=#C6E2FF style="text-align:right;">284</td>
+<th  bgcolor=#C6E2FF style="text-align:left;"> Bourne  Shell </th><td  bgcolor=#C6E2FF style="text-align:right;">8</td><td  bgcolor=#C6E2FF style="text-align:right;">59</td><td  bgcolor=#C6E2FF style="text-align:right;">98</td><td  bgcolor=#C6E2FF style="text-align:right;">262</td><td  bgcolor=#C6E2FF style="text-align:right;">419</td>
 </tr>
 <tr>
-<th  bgcolor=#FFFFFF style="text-align:left;"> IDL </th><td  bgcolor=#FFFFFF style="text-align:right;">1</td><td  bgcolor=#FFFFFF style="text-align:right;">18</td><td  bgcolor=#FFFFFF style="text-align:right;">4</td><td  bgcolor=#FFFFFF style="text-align:right;">124</td><td  bgcolor=#FFFFFF style="text-align:right;">146</td>
+<th  bgcolor=#FFFFFF style="text-align:left;"> Perl </th><td  bgcolor=#FFFFFF style="text-align:right;">3</td><td  bgcolor=#FFFFFF style="text-align:right;">21</td><td  bgcolor=#FFFFFF style="text-align:right;">23</td><td  bgcolor=#FFFFFF style="text-align:right;">240</td><td  bgcolor=#FFFFFF style="text-align:right;">284</td>
 </tr>
 <tr>
-<th  bgcolor=#C6E2FF style="text-align:left;"> C </th><td  bgcolor=#C6E2FF style="text-align:right;">2</td><td  bgcolor=#C6E2FF style="text-align:right;">3</td><td  bgcolor=#C6E2FF style="text-align:right;">3</td><td  bgcolor=#C6E2FF style="text-align:right;">24</td><td  bgcolor=#C6E2FF style="text-align:right;">30</td>
+<th  bgcolor=#C6E2FF style="text-align:left;"> IDL </th><td  bgcolor=#C6E2FF style="text-align:right;">1</td><td  bgcolor=#C6E2FF style="text-align:right;">18</td><td  bgcolor=#C6E2FF style="text-align:right;">4</td><td  bgcolor=#C6E2FF style="text-align:right;">124</td><td  bgcolor=#C6E2FF style="text-align:right;">146</td>
 </tr>
 <tr>
-<th  bgcolor=#FFFFFF style="text-align:left;"> Python </th><td  bgcolor=#FFFFFF style="text-align:right;">2</td><td  bgcolor=#FFFFFF style="text-align:right;">1</td><td  bgcolor=#FFFFFF style="text-align:right;">4</td><td  bgcolor=#FFFFFF style="text-align:right;">13</td><td  bgcolor=#FFFFFF style="text-align:right;">18</td>
+<th  bgcolor=#FFFFFF style="text-align:left;"> C </th><td  bgcolor=#FFFFFF style="text-align:right;">2</td><td  bgcolor=#FFFFFF style="text-align:right;">3</td><td  bgcolor=#FFFFFF style="text-align:right;">3</td><td  bgcolor=#FFFFFF style="text-align:right;">24</td><td  bgcolor=#FFFFFF style="text-align:right;">30</td>
 </tr>
 <tr>
-<th  bgcolor=#C6E2FF style="text-align:left;"> SUM: </th><td  bgcolor=#C6E2FF style="text-align:right;">1947</td><td  bgcolor=#C6E2FF style="text-align:right;">25929</td><td  bgcolor=#C6E2FF style="text-align:right;">33723</td><td  bgcolor=#C6E2FF style="text-align:right;">100289</td><td  bgcolor=#C6E2FF style="text-align:right;">159941</td>
+<th  bgcolor=#C6E2FF style="text-align:left;"> Python </th><td  bgcolor=#C6E2FF style="text-align:right;">2</td><td  bgcolor=#C6E2FF style="text-align:right;">1</td><td  bgcolor=#C6E2FF style="text-align:right;">4</td><td  bgcolor=#C6E2FF style="text-align:right;">13</td><td  bgcolor=#C6E2FF style="text-align:right;">18</td>
+</tr>
+<tr>
+<th  bgcolor=#FFFFFF style="text-align:left;"> SUM: </th><td  bgcolor=#FFFFFF style="text-align:right;">1929</td><td  bgcolor=#FFFFFF style="text-align:right;">26232</td><td  bgcolor=#FFFFFF style="text-align:right;">33895</td><td  bgcolor=#FFFFFF style="text-align:right;">102696</td><td  bgcolor=#FFFFFF style="text-align:right;">162823</td>
 </tr>
 </table>
@@ -79,4 +82,5 @@
 
 
+
 	<I> Copyright (C) 2011 </I>
   */
Index: /issm/trunk-jpl/src/m/classes/inversion.m
===================================================================
--- /issm/trunk-jpl/src/m/classes/inversion.m	(revision 11235)
+++ /issm/trunk-jpl/src/m/classes/inversion.m	(revision 11236)
@@ -108,5 +108,5 @@
 			fielddisplay(obj,'control_parameters','parameter where inverse control is carried out; ex: {''FrictionCoefficient''}, or {''MaterialsRheologyBbar''}');
 			fielddisplay(obj,'nsteps','number of optimization searches');
-			fielddisplay(obj,'cost_functions','indicate the type of response for each optimization step');
+			fielddisplay(obj,'cost_functions','indicate the type of response for each optimization steps');
 			fielddisplay(obj,'cost_functions_coefficients','cost_functions_coefficients applied to the misfit of each vertex and for each control_parameter');
 			fielddisplay(obj,'cost_function_threshold','misfit convergence criterion. Default is 1%, NaN if not applied');
Index: /issm/trunk-jpl/src/m/utils/Geometry/FlagElements.m
===================================================================
--- /issm/trunk-jpl/src/m/utils/Geometry/FlagElements.m	(revision 11235)
+++ /issm/trunk-jpl/src/m/utils/Geometry/FlagElements.m	(revision 11236)
@@ -32,4 +32,7 @@
 			%does the region domain outline exist or do we have to look for xlim,ylim in basinzoom?
 			if ~exist(region,'file'),
+				if (length(region)>3 & ~strcmp(region(end-3),'.exp')),
+					error(['Error: File ' region ' not found!']);
+				end
 				[xlim,ylim]=basinzoom('basin',region);
 				flag_nodes=double(md.mesh.x<xlim(2) & md.mesh.x>xlim(1) &  md.mesh.y<ylim(2) & md.mesh.y>ylim(1));
