Index: /issm/oecreview/Archive/10977-11024/Date.tex
===================================================================
--- /issm/oecreview/Archive/10977-11024/Date.tex	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/Date.tex	(revision 11025)
@@ -0,0 +1,1 @@
+Dec-9-2011
Index: /issm/oecreview/Archive/10977-11024/ISSM-10979-10980.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10979-10980.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10979-10980.diff	(revision 11025)
@@ -0,0 +1,6 @@
+
+Property changes on: /proj/ice/larour/issm-uci/trunk-jpl
+___________________________________________________________________
+Modified: svn:mergeinfo
+   Merged /issm/trunk:r10961-10979
+
Index: /issm/oecreview/Archive/10977-11024/ISSM-10981-10982.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10981-10982.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10981-10982.diff	(revision 11025)
@@ -0,0 +1,6 @@
+
+Property changes on: /proj/ice/larour/issm-uci/trunk-jpl
+___________________________________________________________________
+Modified: svn:mergeinfo
+   Merged /issm/trunk:r10980
+
Index: /issm/oecreview/Archive/10977-11024/ISSM-10983-10984.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10983-10984.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10983-10984.diff	(revision 11025)
@@ -0,0 +1,16 @@
+
+Property changes on: /proj/ice/larour/issm-uci/trunk-jpl/externalpackages/mpich2
+___________________________________________________________________
+Modified: svn:ignore
+   - install*
+src
+configure.sh
+.ignore.txt
+
+   + install*
+src
+configure.sh
+Examples.Makefile.patch
+mpicxx.h.patch
+
+
Index: /issm/oecreview/Archive/10977-11024/ISSM-10984-10985.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10984-10985.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10984-10985.diff	(revision 11025)
@@ -0,0 +1,19 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/externalpackages/vim/addons/vimrc
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/externalpackages/vim/addons/vimrc	(revision 10984)
++++ /proj/ice/larour/issm-uci/trunk-jpl/externalpackages/vim/addons/vimrc	(revision 10985)
+@@ -210,6 +210,14 @@
+ au BufRead,BufNewFile *.tex iab EQ 
+ 			\\begin{equation}
+ 			\<CR>\end{equation}<up><C-R>=Eatchar('\s')<CR>
++au BufRead,BufNewFile *.tex iab IT 
++			\\begin{itemize}
++			\<CR>\item 
++			\<CR>\end{itemize}<up><C-R>=Eatchar('\s')<CR>
++au BufRead,BufNewFile *.tex iab EN 
++			\\begin{enumerate}
++			\<CR>\item 
++			\<CR>\end{enumerate}<up><C-R>=Eatchar('\s')<CR>
+ au BufRead,BufNewFile *.tex ab (()) \left( \right)
+ "}}}
+ " Skeletons {{{1
Index: /issm/oecreview/Archive/10977-11024/ISSM-10985-10986.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10985-10986.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10985-10986.diff	(revision 11025)
@@ -0,0 +1,113 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/cron/cronfiles/linux_cronfile
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/cron/cronfiles/linux_cronfile	(revision 10985)
++++ /proj/ice/larour/issm-uci/trunk-jpl/cron/cronfiles/linux_cronfile	(revision 10986)
+@@ -11,3 +11,4 @@
+ 00 18 * * 1-5 cd /u/astrid-r1b/seroussi/issm/trunk-jpl/cron/ && ./nightlyrun.sh configs/linux64_seroussi_daily
+ 00 23 * * 1-5 cd /u/astrid-r1b/seroussi/issm/trunk-jpl/cron/ && ./nightlyrun.sh configs/linux64_seroussi_nightly
+ 00 23 * * 6   cd /u/astrid-r1b/seroussi/issm/trunk-jpl/cron/ && ./nightlyrun.sh configs/linux64_seroussi_validation
++00 23 * * 7   cd /u/astrid-r1b/seroussi/issm/trunk-jpl/cron/ && ./nightlyrun.sh configs/linux64_seroussi_ucitrunk
+Index: /proj/ice/larour/issm-uci/trunk-jpl/cron/configs/linux64_seroussi_ucitrunk
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/cron/configs/linux64_seroussi_ucitrunk	(revision 0)
++++ /proj/ice/larour/issm-uci/trunk-jpl/cron/configs/linux64_seroussi_ucitrunk	(revision 10986)
+@@ -0,0 +1,93 @@
++#
++########### Configuration file for Mathieu Morlighem's nightly run on Linux ############
++
++#-------------------------------#
++# 1: ISSM general configuration #
++#-------------------------------#
++
++#ISSM main directory (full path)
++ISSM_DIR="/u/astrid-r1b/seroussi/issm"
++ISSM_TIER="/u/astrid-r1b/seroussi/issm/trunk-jpl/cron/trunk"
++#ISSM_TIER="/u/astrid-r1b/seroussi/svn/issm/trunk/cron/issm2.2"
++
++#ISSM Architecture
++ISSM_ARCH="linux-gnu-amd64"
++
++#Machine configuration
++MACHINE="astrid"
++
++#MATLAB path
++MATLAB_PATH="/usr/local/pkgs/matlab-7.6/"
++
++#----------------------#
++# 2: ISSM Installation #
++#----------------------#
++
++#ISSM_INSTALLATION can have 3 values:
++# - "checkout" the existing version of the code will be erased and
++#              the latest version will be checked out
++# - "update"   the directory won't be erased but ISSM will be updated
++#              ->skip to section 3
++# - "none"     leave ISSM as is in its directory
++#              ->skip to section 3
++ISSM_INSTALLATION="checkout"
++
++#SVN repository
++REPOSITORY="https://issm.ess.uci.edu:80/svn/issm/issm/trunk"
++#REPOSITORY="http://s383-rhat/issm/svn/issm/branches/issm2.2"
++
++#execution path used for parallel runs
++EXECUTION_PATH="/u/astrid-r1b/seroussi/ExecutionNightlyRun"
++
++#-----------------------------------#
++# 3: External packages installation #
++#-----------------------------------#
++
++#ISSM_EXTERNALPACKAGES can have 3 values:
++# - "install" install all external packages listed below
++# - "copy"    copy existing directories (EXTERNALPACKAGESDIR)
++# - "none"    leave external packages as is
++#             ->skip to section 4
++ISSM_EXTERNALPACKAGES="install"
++EXTERNALPACKAGESDIR="/u/astrid-r1b/seroussi/issm/trunk-jpl/externalpackages"
++
++#List of external pakages to be installed
++EXTERNALPACKAGES="autoconf automake matlab mpich2 petsc metis triangle dakota chaco"
++
++#---------------------#
++# 4: ISSM Compilation #
++#---------------------#
++
++#ISSM_COMPILATION can have 2 values:
++# - "yes" compile ISSM
++# - "no"  do not compile ISSM
++ISSM_COMPILATION="yes"
++
++#----------------------#
++# 5: Mail notification #
++#----------------------#
++
++#Mail delivery. If SKIPMAIL="no", the html nightly run report will be
++#sent to the adresses present in $ISSM_TIER/cron/mailinglist.
++SKIPMAIL="no"
++
++#Sender email address
++EMAIL_ADRESS="helene.seroussi@jpl.nasa.gov"
++
++#------------------------#
++# 6: Nightly run options #
++#------------------------#
++
++#number of cpus used in ISSM installation and compilation (one is usually
++#safer as some packages are very sensitive to parallel compilation)
++NUMCPUS_INSTALL=1
++
++#number of cpus used in the nightly runs.
++NUMCPUS_RUN=7
++
++#Nightly run options. The matlab routine nightlyrun.m will be called
++#as follows: nightlyrun($NROPTIONS). The options must be understandable
++#by Matlab and nightlyrun.m
++#ex: "'id',[101 102 103]"
++
++NROPTIONS=""
+
+Property changes on: /proj/ice/larour/issm-uci/trunk-jpl/cron/configs/linux64_seroussi_ucitrunk
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/10977-11024/ISSM-10986-10987.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10986-10987.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10986-10987.diff	(revision 11025)
@@ -0,0 +1,42 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/plot/plot_section.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/plot/plot_section.m	(revision 10986)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/plot/plot_section.m	(revision 10987)
+@@ -24,7 +24,7 @@
+ 
+ %Get number of curves and generate random colors
+ numcurves=size(data,2);
+-colorm=getfieldvalue(options,'colormap','line');
++colorm=getfieldvalue(options,'colormap','lines');
+ color=eval([ colorm '(numcurves);']);
+ options=removefield(options,'colormap',0); %back to default colormap
+ 
+@@ -67,16 +67,18 @@
+ 			s=s*unit;
+ 		end
+ 
+-		%plot section value
+-		hold on;
+-		subplot(nlines,ncols,index1)
+-		%subplot(1,3,[2 3])
+-		plot(s,data_s,'color',color(i,:),'LineWidth',getfieldvalue(options,'linewidth',1))
+-		%3D
+-	else
+-		%plot section value
+-		%if user requested view2: 2d plot with curvilinear coordinate
+-		if (getfieldvalue(options,'view',3)==2 )
++		%2D
++		if is2d,
++%		%plot section value
++%		hold on;
++%		subplot(nlines,ncols,index1)
++%		%subplot(1,3,[2 3])
++%		plot(s,data_s,'color',color(i,:),'LineWidth',getfieldvalue(options,'linewidth',1))
++%		%3D
++%	else
++%		%plot section value
++%		%if user requested view2: 2d plot with curvilinear coordinate
++%		if (getfieldvalue(options,'view',3)==2 )
+ 
+ 			%Show Section if requested by user
+ 			if exist(options,'showsection')
Index: /issm/oecreview/Archive/10977-11024/ISSM-10987-10988.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10987-10988.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10987-10988.diff	(revision 11025)
@@ -0,0 +1,15 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/thermal_core.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/thermal_core.cpp	(revision 10987)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/thermal_core.cpp	(revision 10988)
+@@ -59,6 +59,10 @@
+ 			_printf_(VerboseSolution(),"   saving results\n");
+ 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum,i+1,time);
+ 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BasalforcingsMeltingRateEnum,i+1,time);
++
++			/*unload results*/
++			_printf_(VerboseSolution(),"   saving temporary results\n");
++			OutputResultsx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,&femmodel->results,i+1,time);
+ 		}
+ 
+ 	}
Index: /issm/oecreview/Archive/10977-11024/ISSM-10988-10989.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10988-10989.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10988-10989.diff	(revision 11025)
@@ -0,0 +1,521 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/thermal_core.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/thermal_core.cpp	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/thermal_core.cpp	(revision 10989)
+@@ -59,10 +59,6 @@
+ 			_printf_(VerboseSolution(),"   saving results\n");
+ 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum,i+1,time);
+ 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BasalforcingsMeltingRateEnum,i+1,time);
+-
+-			/*unload results*/
+-			_printf_(VerboseSolution(),"   saving temporary results\n");
+-			OutputResultsx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,&femmodel->results,i+1,time);
+ 		}
+ 
+ 	}
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/transient_core.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/transient_core.cpp	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/transient_core.cpp	(revision 10989)
+@@ -140,7 +140,7 @@
+ 
+ 			/*unload results*/
+ 			_printf_(VerboseSolution(),"   saving temporary results\n");
+-			OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,&femmodel->results,step,time);
++			OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,&femmodel->results);
+ 		}
+ 	}
+ 
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/hydrology_core.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/hydrology_core.cpp	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/hydrology_core.cpp	(revision 10989)
+@@ -60,7 +60,7 @@
+ 			
+ 			/*unload results*/
+ 			_printf_(VerboseSolution(),"   saving temporary results\n");
+-			OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,&femmodel->results,i+1,time);
++			OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,&femmodel->results);
+ 
+ 		}
+ 
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Results.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Results.cpp	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Results.cpp	(revision 10989)
+@@ -135,7 +135,7 @@
+ 	dataref=mxCreateStructArray( ndim,onebyone,nfields,fnames);
+ 
+ 	/*Fill each field: */
+-	for(i=0;i<nfields-2;i++){ //do not include the last one used for time
++	for(i=0;i<this->Size();i++){ //do not include the last one used for time
+ 		ExternalResult* result=(ExternalResult*)this->GetObjectByOffset(i);
+ 		result->SetMatlabField(dataref);
+ 	}
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.cpp	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.cpp	(revision 10989)
+@@ -163,39 +163,47 @@
+ }
+ /*}}}*/
+ /*FUNCTION Elements::ToResults{{{1*/
+-void Elements::ToResults(Results* results,Parameters* parameters,int step, double time){
++void Elements::ToResults(Results* results,Parameters* parameters){
+ 
+ 	extern int my_rank;
+ 
+ 	Patch  *patch        = NULL;
+ 	int    *resultsenums = NULL;
++	int    *resultssize  = NULL;
++	int    *resultsstep  = NULL;
++	double *resultstimes = NULL;
+ 	double *vector_serial= NULL;
+ 	Vec     vector       = NULL;
+ 	bool   io_gather;
+ 	bool   results_as_patches;
+-	int    numberofvertices;
+-	int    numberofresults;
++	int    numberofvertices,numberofelements;
++	int    numberofresults,vectorsize;
+ 
+ 	/*Recover parameters: */
+ 	parameters->FindParam(&io_gather,SettingsIoGatherEnum);
+ 	parameters->FindParam(&results_as_patches,SettingsResultsAsPatchesEnum);
+ 	parameters->FindParam(&numberofvertices,MeshNumberofverticesEnum);
++	parameters->FindParam(&numberofelements,MeshNumberofelementsEnum);
+ 
+ 	if(!results_as_patches){
+ 		/*No patch here, we prepare vectors*/
+ 
+ 		/*OK, see what the first element of this partition has in stock (this is common to all partitions)*/
+ 		Element* element=(Element*)this->GetObjectByOffset(0);
+-		element->ListResultsEnums(&resultsenums,&numberofresults);
++		element->ListResultsInfo(&resultsenums,&resultssize,&resultstimes,&resultsstep,&numberofresults);
+ 
+ 		/*Loop over all results and get nodal vector*/
+ 		for(int i=0;i<numberofresults;i++){
+ 
+ 			/*Get vector for result number i*/
+-			vector=NewVec(numberofvertices);
++			if(resultssize[i]==P1Enum)      vectorsize=numberofvertices;
++			else if(resultssize[i]==P0Enum) vectorsize=numberofelements;
++			else _error_("Unkown result size: %s",EnumToStringx(resultssize[i]));
++			vector=NewVec(vectorsize);
++
+ 			for(int j=0;j<this->Size();j++){
+ 				Element* element=(Element*)this->GetObjectByOffset(j);
+-				element->GetVectorFromResults(vector,resultsenums[i]);
++				element->GetVectorFromResults(vector,i);
+ 			}
+ 			VecAssemblyBegin(vector);
+ 			VecAssemblyEnd(vector);
+@@ -204,7 +212,7 @@
+ 			VecToMPISerial(&vector_serial,vector);
+ 			if(my_rank==0){
+ 				/*No need to add this vector for all cpus*/
+-				results->AddObject(new DoubleVecExternalResult(results->Size()+1,resultsenums[i],vector_serial,numberofvertices,step,time));
++				results->AddObject(new DoubleVecExternalResult(results->Size()+1,resultsenums[i],vector_serial,vectorsize,resultsstep[i],resultstimes[i]));
+ 			}
+ 
+ 			/*clean up*/
+@@ -223,14 +231,17 @@
+ 
+ 		/*create result object and add to results dataset:*/
+ 		if (patch->maxvertices && patch->maxnodes){
+-			results->AddObject(new IntExternalResult(results->Size()+1,PatchVerticesEnum,patch->maxvertices,step,time));
+-			results->AddObject(new IntExternalResult(results->Size()+1,PatchNodesEnum,   patch->maxnodes,step,time));
+-			results->AddObject(new DoubleMatExternalResult(results->Size()+1,PatchEnum,patch->values,patch->numrows,patch->numcols,step,time));
++			results->AddObject(new IntExternalResult(results->Size()+1,PatchVerticesEnum,patch->maxvertices,1,0));
++			results->AddObject(new IntExternalResult(results->Size()+1,PatchNodesEnum,   patch->maxnodes,1,0));
++			results->AddObject(new DoubleMatExternalResult(results->Size()+1,PatchEnum,  patch->values,patch->numrows,patch->numcols,1,0));
+ 		}
+ 	}
+ 
+ 	/*Free ressources:*/
+ 	xfree((void**)&resultsenums);
++	xfree((void**)&resultssize);
++	xfree((void**)&resultstimes);
++	xfree((void**)&resultsstep);
+ 	delete patch;
+ }
+ /*}}}*/
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.h	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.h	(revision 10989)
+@@ -29,7 +29,7 @@
+ 		void DeleteResults(void);
+ 		void ProcessResultsUnits(void);
+ 		void SetCurrentConfiguration(Elements* elements,Loads* loads, Nodes* nodes, Vertices* vertices, Materials* materials,Parameters* parameters);
+-		void ToResults(Results* results,Parameters* parameters,int step, double time);
++		void ToResults(Results* results,Parameters* parameters);
+ 		Patch* ResultsToPatch(void);
+ 		int   NumberOfElements(void);
+ 		void InputDuplicate(int input_enum,int output_enum);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.h	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.h	(revision 10989)
+@@ -15,9 +15,9 @@
+ 
+ #ifdef _SERIAL_
+ #include <mex.h>
+-void OutputResultsx(mxArray** pdataref, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads,  Materials* materials, Parameters* parameters, Results** presults,int step=1,double time=0);
++void OutputResultsx(mxArray** pdataref, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads,  Materials* materials, Parameters* parameters, Results** presults);
+ #else
+-void OutputResultsx(Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads,  Materials* materials, Parameters* parameters, Results** presults,int step=1,double time=0);
++void OutputResultsx(Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads,  Materials* materials, Parameters* parameters, Results** presults);
+ #endif
+ 
+ #endif  /* _OUTPUTRESULTS_H */
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp	(revision 10989)
+@@ -16,9 +16,9 @@
+ #include "../../objects/objects.h"
+ 		
+ #ifdef _SERIAL_
+-void OutputResultsx(mxArray** pdataref, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results** presults, int step, double time){
++void OutputResultsx(mxArray** pdataref, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results** presults){
+ #else 
+-void OutputResultsx(                    Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results** presults, int step, double time){
++void OutputResultsx(                    Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results** presults){
+ #endif
+ 
+ 	extern int  my_rank;
+@@ -53,7 +53,7 @@
+ 
+ 	/*We have results inside our elements, loads, etc ... Get them out of there, into the results dataset: */
+ 	elements->ProcessResultsUnits();
+-	elements->ToResults(results,parameters,step,time);
++	elements->ToResults(results,parameters);
+ 	elements->DeleteResults();
+ 
+ 	/*Results do not include the type of solution being run	. In parallel, we output results to a filename, 
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 10989)
+@@ -208,10 +208,10 @@
+ #ifdef _SERIAL_
+ void DoubleVecExternalResult::SetMatlabField(mxArray* dataref){
+ 
+-	mxArray* pfield=NULL;
+-	double* doublemat=NULL;
+-	char* name=NULL;
+-	double* doublevec=NULL;
++	mxArray *pfield    = NULL;
++	double  *doublemat = NULL;
++	char    *name      = NULL;
++	double  *doublevec = NULL;
+ 
+ 	/*Make a copy of the value, to be used by matlab: */
+ 	doublevec=(double*)xmalloc(M*sizeof(double));
+@@ -229,7 +229,6 @@
+ 	mxSetField( dataref, this->step-1, name,pfield);
+ 	mxSetField( dataref, this->step-1, "time",mxCreateDoubleScalar((double)this->time)); 
+ 	mxSetField( dataref, this->step-1, "step",mxCreateDoubleScalar((double)this->step)); 
+-
+ }
+ #endif
+ /*}}}*/
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h	(revision 10989)
+@@ -43,6 +43,8 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{1*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
++		double  GetTime(void){return time;};
++		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+ 		void    PatchFill(int row, Patch* patch);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 10989)
+@@ -44,6 +44,8 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{1*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
++		double  GetTime(void){return time;};
++		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+ 		void    PatchFill(int row, Patch* patch);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 10989)
+@@ -44,6 +44,8 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{1*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
++		double  GetTime(void){return time;};
++		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+ 		void    PatchFill(int row, Patch* patch);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h	(revision 10989)
+@@ -42,6 +42,8 @@
+ 		/*}}}*/
+ 		/*ElementResult virtual functions definitions: {{{1*/
+ 		ElementResult* SpawnTriaElementResult(int* indices);
++		double  GetTime(void){return time;};
++		int     GetStep(void){return step;};
+ 		void    ProcessUnits(Parameters* parameters);
+ 		int     NumberOfNodalValues(void);
+ 		void    PatchFill(int row, Patch* patch);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/ElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/ElementResult.h	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/ElementResult.h	(revision 10989)
+@@ -18,6 +18,8 @@
+ 		virtual        ~ElementResult(){};
+ 		
+ 		virtual         ElementResult* SpawnTriaElementResult(int* indices)=0;
++		virtual double  GetTime(void)=0;
++		virtual int     GetStep(void)=0;
+ 		virtual void    ProcessUnits(Parameters* parameters)=0;
+ 		virtual int     NumberOfNodalValues(void)=0;
+ 		virtual void    PatchFill(int row, Patch* patch)=0;
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Element.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Element.h	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Element.h	(revision 10989)
+@@ -46,7 +46,7 @@
+ 		virtual void   ComputeStrainRate(Vec eps)=0;
+ 		virtual void   PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes)=0;
+ 		virtual void   PatchFill(int* pcount, Patch* patch)=0;
+-		virtual void   ListResultsEnums(int** results_enums,int* num_results)=0;
++		virtual void   ListResultsInfo(int** results_enums,int** results_size,double** results_times,int** results_steps,int* num_results)=0;
+ 		virtual void   DeleteResults(void)=0;
+ 		virtual void   Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type)=0;
+ 		virtual void   InputToResult(int enum_type,int step,double time)=0;
+@@ -58,7 +58,7 @@
+ 		
+ 		virtual void   InputScale(int enum_type,double scale_factor)=0;
+ 		virtual void   GetVectorFromInputs(Vec vector, int name_enum)=0;
+-		virtual void   GetVectorFromResults(Vec vector,int name_enum)=0;
++		virtual void   GetVectorFromResults(Vec vector,int id)=0;
+ 		virtual void   InputArtificialNoise(int enum_type,double min,double max)=0;
+ 		virtual bool   InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums)=0;
+ 		virtual void   AverageOntoPartition(Vec partition_contributions,Vec partition_areas,double* vertex_response,double* qmu_part)=0;
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 10989)
+@@ -1253,23 +1253,16 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::GetVectorFromResults{{{1*/
+-void  Tria::GetVectorFromResults(Vec vector,int result_enum){
++void  Tria::GetVectorFromResults(Vec vector,int offset){
+ 
+-	bool found=false;
+ 	int doflist1[NUMVERTICES];
+ 
+ 	/*Prepare index list*/
+ 	this->GetSidList(&doflist1[0]);
+ 
+-	/*Get result)*/
+-	for(int i=0;i<this->results->Size();i++){
+-		ElementResult* elementresult=(ElementResult*)this->results->GetObjectByOffset(i);
+-		if(elementresult->InstanceEnum()!=result_enum) continue;
+-		elementresult->GetVectorFromResults(vector,&doflist1[0],NUMVERTICES);
+-		return;
+-	}
+-
+-	_error_("Result %s not found in element",EnumToStringx(result_enum));
++	/*Get result*/
++	ElementResult* elementresult=(ElementResult*)this->results->GetObjectByOffset(offset);
++	elementresult->GetVectorFromResults(vector,&doflist1[0],NUMVERTICES);
+ }
+ /*}}}*/
+ /*FUNCTION Tria::Id {{{1*/
+@@ -1896,13 +1889,16 @@
+ 	return water;
+ }
+ /*}}}*/
+-/*FUNCTION Tria::ListResultsEnums{{{*/
+-void Tria::ListResultsEnums(int** in_results_enums,int* in_num_results){
++/*FUNCTION Tria::ListResultsInfo{{{*/
++void Tria::ListResultsInfo(int** in_resultsenums,int** in_resultssizes,double** in_resultstimes,int** in_resultssteps,int* in_num_results){
+ 
+ 	/*Intermediaries*/
+ 	int     i;
+ 	int     numberofresults = 0;
+ 	int     *resultsenums   = NULL;
++	int     *resultssizes   = NULL;
++	double  *resultstimes   = NULL;
++	int     *resultssteps   = NULL;
+ 
+ 	/*Checks*/
+ 	_assert_(in_num_results);
+@@ -1917,17 +1913,31 @@
+ 
+ 		/*Allocate output*/
+ 		resultsenums=(int*)xmalloc(numberofresults*sizeof(int));
++		resultssizes=(int*)xmalloc(numberofresults*sizeof(int));
++		resultstimes=(double*)xmalloc(numberofresults*sizeof(double));
++		resultssteps=(int*)xmalloc(numberofresults*sizeof(int));
+ 
+ 		/*populate enums*/
+ 		for(i=0;i<this->results->Size();i++){
+ 			ElementResult* elementresult=(ElementResult*)this->results->GetObjectByOffset(i);
+ 			resultsenums[i]=elementresult->InstanceEnum();
++			resultstimes[i]=elementresult->GetTime();
++			resultssteps[i]=elementresult->GetStep();
++			if(elementresult->ObjectEnum()==TriaVertexElementResultEnum){
++				resultssizes[i]=P1Enum;
++			}
++			else{
++				resultssizes[i]=P0Enum;
++			}
+ 		}
+ 	}
+ 
+ 	/*Assign output pointers:*/
+ 	*in_num_results=numberofresults;
+-	*in_results_enums=resultsenums;
++	*in_resultsenums=resultsenums;
++	*in_resultssizes=resultssizes;
++	*in_resultstimes=resultstimes;
++	*in_resultssteps=resultssteps;
+ 
+ }/*}}}*/
+ /*FUNCTION Tria::MigrateGroundingLine{{{1*/
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.h	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.h	(revision 10989)
+@@ -91,7 +91,7 @@
+ 		bool   IsOnWater(); 
+ 		void   GetSolutionFromInputs(Vec solution);
+ 		void   GetVectorFromInputs(Vec vector, int name_enum);
+-		void   GetVectorFromResults(Vec vector,int name_enum);
++		void   GetVectorFromResults(Vec vector,int offset);
+ 		void   InputArtificialNoise(int enum_type,double min, double max);
+ 		bool   InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums);
+ 		void   InputCreate(double scalar,int name,int code);
+@@ -105,7 +105,7 @@
+ 		void   MigrateGroundingLine(double* oldfloating,double* sheet_ungrounding);
+ 		void   PotentialSheetUngrounding(Vec potential_sheet_ungrounding);
+ 		void   RequestedOutput(int output_enum,int step,double time);
+-		void   ListResultsEnums(int** results_enums,int* num_results);
++		void   ListResultsInfo(int** results_enums,int** results_size,double** results_times,int** results_steps,int* num_results);
+ 		void   PatchFill(int* pcount, Patch* patch);
+ 		void   PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes);
+ 		void   ProcessResultsUnits(void);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 10989)
+@@ -1138,22 +1138,16 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GetVectorFromResults{{{1*/
+-void  Penta::GetVectorFromResults(Vec vector,int result_enum){
++void  Penta::GetVectorFromResults(Vec vector,int offset){
+ 
+ 	int doflist1[NUMVERTICES];
+ 
+ 	/*Prepare index list*/
+ 	this->GetSidList(&doflist1[0]);
+ 
+-	/*Get result)*/
+-	for(int i=0;i<this->results->Size();i++){
+-		ElementResult* elementresult=(ElementResult*)this->results->GetObjectByOffset(i);
+-		if(elementresult->InstanceEnum()!=result_enum) continue;
+-		elementresult->GetVectorFromResults(vector,&doflist1[0],NUMVERTICES);
+-		return;
+-	}
+-
+-	_error_("Result %s not found in element",EnumToStringx(result_enum));
++	/*Get result*/
++	ElementResult* elementresult=(ElementResult*)this->results->GetObjectByOffset(offset);
++	elementresult->GetVectorFromResults(vector,&doflist1[0],NUMVERTICES);
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GetZcoord {{{1*/
+@@ -2056,13 +2050,16 @@
+ 	return onwater;
+ }
+ /*}}}*/
+-/*FUNCTION Penta::ListResultsEnums{{{*/
+-void Penta::ListResultsEnums(int** in_results_enums,int* in_num_results){
++/*FUNCTION Penta::ListResultsInfo{{{*/
++void Penta::ListResultsInfo(int** in_resultsenums,int** in_resultssizes,double** in_resultstimes,int** in_resultssteps,int* in_num_results){
+ 
+ 	/*Intermediaries*/
+ 	int     i;
+ 	int     numberofresults = 0;
+ 	int     *resultsenums   = NULL;
++	int     *resultssizes   = NULL;
++	double  *resultstimes   = NULL;
++	int     *resultssteps   = NULL;
+ 
+ 	/*Checks*/
+ 	_assert_(in_num_results);
+@@ -2077,17 +2074,31 @@
+ 
+ 		/*Allocate output*/
+ 		resultsenums=(int*)xmalloc(numberofresults*sizeof(int));
++		resultssizes=(int*)xmalloc(numberofresults*sizeof(int));
++		resultstimes=(double*)xmalloc(numberofresults*sizeof(double));
++		resultssteps=(int*)xmalloc(numberofresults*sizeof(int));
+ 
+ 		/*populate enums*/
+ 		for(i=0;i<this->results->Size();i++){
+ 			ElementResult* elementresult=(ElementResult*)this->results->GetObjectByOffset(i);
+ 			resultsenums[i]=elementresult->InstanceEnum();
++			resultstimes[i]=elementresult->GetTime();
++			resultssteps[i]=elementresult->GetStep();
++			if(elementresult->ObjectEnum()==PentaVertexElementResultEnum){
++				resultssizes[i]=P1Enum;
++			}
++			else{
++				resultssizes[i]=P0Enum;
++			}
+ 		}
+ 	}
+ 
+ 	/*Assign output pointers:*/
+ 	*in_num_results=numberofresults;
+-	*in_results_enums=resultsenums;
++	*in_resultsenums=resultsenums;
++	*in_resultssizes=resultssizes;
++	*in_resultstimes=resultstimes;
++	*in_resultssteps=resultssteps;
+ 
+ }/*}}}*/
+ /*FUNCTION Penta::MigrateGroundingLine{{{1*/
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.h	(revision 10988)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.h	(revision 10989)
+@@ -91,7 +91,7 @@
+ 		void   GetSolutionFromInputs(Vec solution);
+ 		double GetZcoord(GaussPenta* gauss);
+ 		void   GetVectorFromInputs(Vec vector,int name_enum);
+-		void   GetVectorFromResults(Vec vector,int name_enum);
++		void   GetVectorFromResults(Vec vector,int offset);
+ 		
+ 		int    Sid();
+ 		void   InputArtificialNoise(int enum_type,double min, double max);
+@@ -106,7 +106,7 @@
+ 		void   MigrateGroundingLine(double* old_floating_ice,double* sheet_ungrounding);
+ 		void   PotentialSheetUngrounding(Vec potential_sheet_ungrounding);
+ 		void   RequestedOutput(int output_enum,int step,double time);
+-		void   ListResultsEnums(int** results_enums,int* num_results);
++		void   ListResultsInfo(int** results_enums,int** results_size,double** results_times,int** results_steps,int* num_results);
+ 		void   PatchFill(int* pcount, Patch* patch);
+ 		void   PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes);
+ 		void   ProcessResultsUnits(void);
Index: /issm/oecreview/Archive/10977-11024/ISSM-10989-10990.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10989-10990.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10989-10990.diff	(revision 11025)
@@ -0,0 +1,224 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.cpp	(revision 10989)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.cpp	(revision 10990)
+@@ -203,7 +203,7 @@
+ 
+ 			for(int j=0;j<this->Size();j++){
+ 				Element* element=(Element*)this->GetObjectByOffset(j);
+-				element->GetVectorFromResults(vector,i);
++				element->GetVectorFromResults(vector,i,resultssize[i]);
+ 			}
+ 			VecAssemblyBegin(vector);
+ 			VecAssemblyEnd(vector);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.cpp	(revision 10989)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.cpp	(revision 10990)
+@@ -200,3 +200,8 @@
+ 	VecSetValues(vector,numdofs,doflist,(const double*)this->values,INSERT_VALUES);
+ 
+ } /*}}}*/
++/*FUNCTION PentaVertexElementResult::GetElementVectorFromResults{{{1*/
++void PentaVertexElementResult::GetElementVectorFromResults(Vec vector,int dof){
++
++	_error_("Result %s is a PentaVertexElementResult and should not write vector of size numberofelemenrs",EnumToStringx(enum_type));
++} /*}}}*/
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h	(revision 10989)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h	(revision 10990)
+@@ -52,6 +52,7 @@
+ 		/*PentaVertexElementResult management: {{{1*/
+ 		int   InstanceEnum();
+ 		void GetVectorFromResults(Vec vector,int* doflist,int numdofs);
++		void GetElementVectorFromResults(Vec vector,int dof);
+ 		/*}}}*/
+ 
+ };
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 10989)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 10990)
+@@ -197,3 +197,8 @@
+ 	/*cleanup*/
+ 	xfree((void**)&doublevalues);
+ } /*}}}*/
++/*FUNCTION BoolElementResult::GetElementVectorFromResults{{{1*/
++void BoolElementResult::GetElementVectorFromResults(Vec vector,int dof){
++
++	VecSetValue(vector,dof,(double)value,INSERT_VALUES);
++} /*}}}*/
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.cpp	(revision 10989)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.cpp	(revision 10990)
+@@ -189,3 +189,8 @@
+ 	VecSetValues(vector,numdofs,doflist,(const double*)this->values,INSERT_VALUES);
+ 
+ } /*}}}*/
++/*FUNCTION TriaVertexElementResult::GetElementVectorFromResults{{{1*/
++void TriaVertexElementResult::GetElementVectorFromResults(Vec vector,int dof){
++
++	_error_("Result %s is a TriaVertexElementResult and should not write vector of size numberofelemenrs",EnumToStringx(enum_type));
++} /*}}}*/
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 10989)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 10990)
+@@ -53,6 +53,7 @@
+ 		/*DoubleElementResult management: {{{1*/
+ 		int   InstanceEnum();
+ 		void GetVectorFromResults(Vec vector,int* doflist,int numdofs){_error_("not implemented");};
++		void GetElementVectorFromResults(Vec vector,int dof){_error_("not implemented");};
+ 		/*}}}*/
+ };
+ #endif  /* _DOUBLEELEMENTRESULT_H */
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 10989)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 10990)
+@@ -53,6 +53,7 @@
+ 		/*BoolElementResult management: {{{1*/
+ 		int   InstanceEnum();
+ 		void GetVectorFromResults(Vec vector,int* doflist,int numdofs);
++		void GetElementVectorFromResults(Vec vector,int dof);
+ 		/*}}}*/
+ };
+ #endif  /* _BOOLELEMENTRESULT_H */
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h	(revision 10989)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h	(revision 10990)
+@@ -51,6 +51,7 @@
+ 		/*TriaVertexElementResult management: {{{1*/
+ 		int   InstanceEnum();
+ 		void GetVectorFromResults(Vec vector,int* doflist,int numdofs);
++		void GetElementVectorFromResults(Vec vector,int dof);
+ 		/*}}}*/
+ 
+ };
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/ElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/ElementResult.h	(revision 10989)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/ElementResult.h	(revision 10990)
+@@ -25,6 +25,7 @@
+ 		virtual void    PatchFill(int row, Patch* patch)=0;
+ 		virtual int     InstanceEnum()=0;
+ 		virtual void    GetVectorFromResults(Vec vector,int* doflist,int numdof)=0;
++		virtual void    GetElementVectorFromResults(Vec vector,int dof)=0;
+ 
+ };
+ 
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Element.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Element.h	(revision 10989)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Element.h	(revision 10990)
+@@ -58,7 +58,7 @@
+ 		
+ 		virtual void   InputScale(int enum_type,double scale_factor)=0;
+ 		virtual void   GetVectorFromInputs(Vec vector, int name_enum)=0;
+-		virtual void   GetVectorFromResults(Vec vector,int id)=0;
++		virtual void   GetVectorFromResults(Vec vector,int id,int interp)=0;
+ 		virtual void   InputArtificialNoise(int enum_type,double min,double max)=0;
+ 		virtual bool   InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums)=0;
+ 		virtual void   AverageOntoPartition(Vec partition_contributions,Vec partition_areas,double* vertex_response,double* qmu_part)=0;
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 10989)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 10990)
+@@ -1239,7 +1239,7 @@
+ 	int doflist1[NUMVERTICES];
+ 
+ 	/*Get out if this is not an element input*/
+-	if (!IsInput(input_enum)) return;
++	if(!IsInput(input_enum)) return;
+ 
+ 	/*Prepare index list*/
+ 	this->GetDofList1(&doflist1[0]);
+@@ -1253,16 +1253,23 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::GetVectorFromResults{{{1*/
+-void  Tria::GetVectorFromResults(Vec vector,int offset){
++void  Tria::GetVectorFromResults(Vec vector,int offset,int interp){
+ 
++	/*Prepare index list*/
+ 	int doflist1[NUMVERTICES];
+-
+-	/*Prepare index list*/
+ 	this->GetSidList(&doflist1[0]);
+ 
+ 	/*Get result*/
+ 	ElementResult* elementresult=(ElementResult*)this->results->GetObjectByOffset(offset);
+-	elementresult->GetVectorFromResults(vector,&doflist1[0],NUMVERTICES);
++	if(interp==P1Enum){
++		elementresult->GetVectorFromResults(vector,&doflist1[0],NUMVERTICES);
++	}
++	else if(interp==P0Enum){
++		elementresult->GetElementVectorFromResults(vector,sid);
++	}
++	else{
++		printf("Interpolation %s not supported\n",EnumToStringx(interp));
++	}
+ }
+ /*}}}*/
+ /*FUNCTION Tria::Id {{{1*/
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.h	(revision 10989)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.h	(revision 10990)
+@@ -91,7 +91,7 @@
+ 		bool   IsOnWater(); 
+ 		void   GetSolutionFromInputs(Vec solution);
+ 		void   GetVectorFromInputs(Vec vector, int name_enum);
+-		void   GetVectorFromResults(Vec vector,int offset);
++		void   GetVectorFromResults(Vec vector,int offset,int interp);
+ 		void   InputArtificialNoise(int enum_type,double min, double max);
+ 		bool   InputConvergence(double* eps, int* enums,int num_enums,int* criterionenums,double* criterionvalues,int num_criterionenums);
+ 		void   InputCreate(double scalar,int name,int code);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 10989)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 10990)
+@@ -1138,16 +1138,23 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GetVectorFromResults{{{1*/
+-void  Penta::GetVectorFromResults(Vec vector,int offset){
++void  Penta::GetVectorFromResults(Vec vector,int offset,int interp){
+ 
++	/*Prepare index list*/
+ 	int doflist1[NUMVERTICES];
+-
+-	/*Prepare index list*/
+ 	this->GetSidList(&doflist1[0]);
+ 
+ 	/*Get result*/
+ 	ElementResult* elementresult=(ElementResult*)this->results->GetObjectByOffset(offset);
+-	elementresult->GetVectorFromResults(vector,&doflist1[0],NUMVERTICES);
++	if(interp==P1Enum){
++		elementresult->GetVectorFromResults(vector,&doflist1[0],NUMVERTICES);
++	}
++	else if(interp==P0Enum){
++		elementresult->GetElementVectorFromResults(vector,sid);
++	}
++	else{
++		printf("Interpolation %s not supported\n",EnumToStringx(interp));
++	}
+ }
+ /*}}}*/
+ /*FUNCTION Penta::GetZcoord {{{1*/
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.h	(revision 10989)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.h	(revision 10990)
+@@ -91,7 +91,7 @@
+ 		void   GetSolutionFromInputs(Vec solution);
+ 		double GetZcoord(GaussPenta* gauss);
+ 		void   GetVectorFromInputs(Vec vector,int name_enum);
+-		void   GetVectorFromResults(Vec vector,int offset);
++		void   GetVectorFromResults(Vec vector,int offset,int interp);
+ 		
+ 		int    Sid();
+ 		void   InputArtificialNoise(int enum_type,double min, double max);
Index: /issm/oecreview/Archive/10977-11024/ISSM-10990-10991.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10990-10991.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10990-10991.diff	(revision 11025)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/runme.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/runme.m	(revision 10990)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/runme.m	(revision 10991)
+@@ -150,7 +150,7 @@
+ 
+ 					%compare to archive
+ 					eval(['archive=' archive_name '_field' num2str(k) ';']);
+-					error_diff=full(max(abs(archive-field))/(max(abs(archive))+eps));
++					error_diff=full(max(abs(archive(:)-field))/(max(abs(archive))+eps));
+ 
+ 					%disp test result
+ 					if (error_diff>tolerance);
Index: /issm/oecreview/Archive/10977-11024/ISSM-10991-10992.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10991-10992.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10991-10992.diff	(revision 11025)
@@ -0,0 +1,54 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/rifts/meshprocessrifts.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/rifts/meshprocessrifts.m	(revision 10991)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/rifts/meshprocessrifts.m	(revision 10992)
+@@ -25,26 +25,23 @@
+ 
+ %Call MEX file
+ [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
+ if ~isstruct(md.rifts.riftstruct),
+ 	error('TriMeshProcessRifts did not find any rift');
+ end
+ 
+ %Fill in rest of fields:
++numrifts=length(md.rifts.riftstruct);
+ md.mesh.numberofelements=length(md.mesh.elements);
+ 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);
+ md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
+ md.mesh.vertexonsurface=ones(md.mesh.numberofvertices,1);
+ md.mesh.elementonbed=ones(md.mesh.numberofelements,1);
+ md.mesh.elementonsurface=ones(md.mesh.numberofelements,1);
+ 
+ %get coordinates of rift tips
+-for i=1:md.rifts.numrifts,
++for i=1:numrifts,
+ 	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
+@@ -52,7 +49,7 @@
+ %In case we have rifts that open up the domain outline, we need to open them: 
+ flags=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,domainoutline,'node',0);
+ found=0;
+-for i=1:md.rifts.numrifts,
++for i=1:numrifts,
+ 	if flags(md.rifts.riftstruct(i).tips(1))==0,
+ 		found=1;
+ 		break;
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/rifts.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/rifts.m	(revision 10991)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/rifts.m	(revision 10992)
+@@ -54,7 +54,6 @@
+ 		function disp(obj) % {{{
+ 			disp(sprintf('   rifts parameters:'));
+ 
+-			fielddisplay(obj,'numrifts','number of of rifts');
+ 			fielddisplay(obj,'riftstruct','structure containing all rift information (vertices coordinates, segments, type of melange, ...)');
+ 			fielddisplay(obj,'riftproperties','');
+ 
Index: /issm/oecreview/Archive/10977-11024/ISSM-10992-10993.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10992-10993.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10992-10993.diff	(revision 11025)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/runme.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/runme.m	(revision 10992)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/runme.m	(revision 10993)
+@@ -150,7 +150,7 @@
+ 
+ 					%compare to archive
+ 					eval(['archive=' archive_name '_field' num2str(k) ';']);
+-					error_diff=full(max(abs(archive(:)-field))/(max(abs(archive))+eps));
++					error_diff=full(max(abs(archive(:)-field(:)))/(max(abs(archive))+eps));
+ 
+ 					%disp test result
+ 					if (error_diff>tolerance);
Index: /issm/oecreview/Archive/10977-11024/ISSM-10993-10994.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10993-10994.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10993-10994.diff	(revision 11025)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test442.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test442.m	(revision 10993)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test442.m	(revision 10994)
+@@ -3,7 +3,7 @@
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,5,1);
+ md=setflowequation(md,'stokes','../Exp/SquareHalfRight.exp','fill','pattyn');
+-md.cluster=generic('name',oshostname(),'np',7);
++md.cluster=generic('name',oshostname(),'np',3);
+ md=solve(md,DiagnosticSolutionEnum);
+ 
+ %Fields and tolerances to track changes
Index: /issm/oecreview/Archive/10977-11024/ISSM-10994-10995.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10994-10995.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10994-10995.diff	(revision 11025)
@@ -0,0 +1,82 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.cpp	(revision 10994)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.cpp	(revision 10995)
+@@ -169,8 +169,8 @@
+ 
+ 	Patch  *patch        = NULL;
+ 	int    *resultsenums = NULL;
+-	int    *resultssize  = NULL;
+-	int    *resultsstep  = NULL;
++	int    *resultssizes  = NULL;
++	int    *resultssteps  = NULL;
+ 	double *resultstimes = NULL;
+ 	double *vector_serial= NULL;
+ 	Vec     vector       = NULL;
+@@ -186,24 +186,37 @@
+ 	parameters->FindParam(&numberofelements,MeshNumberofelementsEnum);
+ 
+ 	if(!results_as_patches){
+-		/*No patch here, we prepare vectors*/
+ 
+-		/*OK, see what the first element of this partition has in stock (this is common to all partitions)*/
+-		Element* element=(Element*)this->GetObjectByOffset(0);
+-		element->ListResultsInfo(&resultsenums,&resultssize,&resultstimes,&resultsstep,&numberofresults);
++		/*see what the first element of this partition has in stock (this is common to all partitions)*/
++		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,0,MPI_COMM_WORLD);
++		if(my_rank!=0){
++			resultsenums=(int*)xmalloc(numberofresults*sizeof(int));
++			resultssizes=(int*)xmalloc(numberofresults*sizeof(int));
++			resultstimes=(double*)xmalloc(numberofresults*sizeof(double));
++			resultssteps=(int*)xmalloc(numberofresults*sizeof(int));
++		}
++		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*/
+ 		for(int i=0;i<numberofresults;i++){
+ 
+ 			/*Get vector for result number i*/
+-			if(resultssize[i]==P1Enum)      vectorsize=numberofvertices;
+-			else if(resultssize[i]==P0Enum) vectorsize=numberofelements;
+-			else _error_("Unkown result size: %s",EnumToStringx(resultssize[i]));
++			if(resultssizes[i]==P1Enum)      vectorsize=numberofvertices;
++			else if(resultssizes[i]==P0Enum) vectorsize=numberofelements;
++			else _error_("Unkown result size: %s",EnumToStringx(resultssizes[i]));
+ 			vector=NewVec(vectorsize);
+ 
+ 			for(int j=0;j<this->Size();j++){
+ 				Element* element=(Element*)this->GetObjectByOffset(j);
+-				element->GetVectorFromResults(vector,i,resultssize[i]);
++				element->GetVectorFromResults(vector,i,resultssizes[i]);
+ 			}
+ 			VecAssemblyBegin(vector);
+ 			VecAssemblyEnd(vector);
+@@ -212,7 +225,7 @@
+ 			VecToMPISerial(&vector_serial,vector);
+ 			if(my_rank==0){
+ 				/*No need to add this vector for all cpus*/
+-				results->AddObject(new DoubleVecExternalResult(results->Size()+1,resultsenums[i],vector_serial,vectorsize,resultsstep[i],resultstimes[i]));
++				results->AddObject(new DoubleVecExternalResult(results->Size()+1,resultsenums[i],vector_serial,vectorsize,resultssteps[i],resultstimes[i]));
+ 			}
+ 
+ 			/*clean up*/
+@@ -239,9 +252,9 @@
+ 
+ 	/*Free ressources:*/
+ 	xfree((void**)&resultsenums);
+-	xfree((void**)&resultssize);
++	xfree((void**)&resultssizes);
+ 	xfree((void**)&resultstimes);
+-	xfree((void**)&resultsstep);
++	xfree((void**)&resultssteps);
+ 	delete patch;
+ }
+ /*}}}*/
Index: /issm/oecreview/Archive/10977-11024/ISSM-10995-10996.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10995-10996.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10995-10996.diff	(revision 11025)
@@ -0,0 +1,79 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp	(revision 10995)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp	(revision 10996)
+@@ -58,8 +58,8 @@
+ 	iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);
+ 	iomodel->FetchDataToInput(elements,MaterialsRheologyBEnum);
+ 	iomodel->FetchDataToInput(elements,MaterialsRheologyNEnum);
+-	iomodel->FetchDataToInput(elements,VxEnum,InversionVxObsEnum,0);
+-	iomodel->FetchDataToInput(elements,VyEnum,InversionVyObsEnum,0);
++	iomodel->FetchDataToInput(elements,VxEnum);
++	iomodel->FetchDataToInput(elements,VyEnum);
+ 	iomodel->FetchDataToInput(elements,BathymetryEnum);
+ 
+ 	if (dim==3){
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 10995)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 10996)
+@@ -2326,24 +2326,18 @@
+ 
+ 			/*default vx,vy and vz: either observation or 0 */
+ 			if(!iomodel->Data(VxEnum)){
+-				if (iomodel->Data(InversionVxObsEnum)) for(i=0;i<3;i++)nodeinputs[i]=iomodel->Data(InversionVxObsEnum)[tria_vertex_ids[i]-1]/yts;
+-				else                 for(i=0;i<3;i++)nodeinputs[i]=0;
++				for(i=0;i<3;i++)nodeinputs[i]=0;
+ 				this->inputs->AddInput(new TriaVertexInput(VxEnum,nodeinputs));
+-				this->inputs->AddInput(new TriaVertexInput(VxPicardEnum,nodeinputs));
+ 				if(dakota_analysis) this->inputs->AddInput(new TriaVertexInput(QmuVxEnum,nodeinputs));
+ 			}
+ 			if(!iomodel->Data(VyEnum)){
+-				if (iomodel->Data(InversionVyObsEnum)) for(i=0;i<3;i++)nodeinputs[i]=iomodel->Data(InversionVyObsEnum)[tria_vertex_ids[i]-1]/yts;
+-				else                 for(i=0;i<3;i++)nodeinputs[i]=0;
++				for(i=0;i<3;i++)nodeinputs[i]=0;
+ 				this->inputs->AddInput(new TriaVertexInput(VyEnum,nodeinputs));
+-				this->inputs->AddInput(new TriaVertexInput(VyPicardEnum,nodeinputs));
+ 				if(dakota_analysis) this->inputs->AddInput(new TriaVertexInput(QmuVyEnum,nodeinputs));
+ 			}
+ 			if(!iomodel->Data(VzEnum)){
+-				if (iomodel->Data(InversionVzObsEnum)) for(i=0;i<3;i++)nodeinputs[i]=iomodel->Data(InversionVzObsEnum)[tria_vertex_ids[i]-1]/yts;
+-				else                 for(i=0;i<3;i++)nodeinputs[i]=0;
++				for(i=0;i<3;i++)nodeinputs[i]=0;
+ 				this->inputs->AddInput(new TriaVertexInput(VzEnum,nodeinputs));
+-				this->inputs->AddInput(new TriaVertexInput(VzPicardEnum,nodeinputs));
+ 				if(dakota_analysis) this->inputs->AddInput(new TriaVertexInput(QmuVzEnum,nodeinputs));
+ 			}
+ 			if(!iomodel->Data(PressureEnum)){
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 10995)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 10996)
+@@ -2691,24 +2691,18 @@
+ 
+ 			/*default vx,vy and vz: either observation or 0 */
+ 			if(!iomodel->Data(VxEnum)){
+-				if (iomodel->Data(InversionVxObsEnum)) for(i=0;i<6;i++)nodeinputs[i]=iomodel->Data(InversionVxObsEnum)[penta_vertex_ids[i]-1]/yts;
+-				else                 for(i=0;i<6;i++)nodeinputs[i]=0;
++				for(i=0;i<6;i++)nodeinputs[i]=0;
+ 				this->inputs->AddInput(new PentaVertexInput(VxEnum,nodeinputs));
+-				this->inputs->AddInput(new PentaVertexInput(VxPicardEnum,nodeinputs));
+ 				if(dakota_analysis) this->inputs->AddInput(new PentaVertexInput(QmuVxEnum,nodeinputs));
+ 			}
+ 			if(!iomodel->Data(VyEnum)){
+-				if (iomodel->Data(InversionVyObsEnum)) for(i=0;i<6;i++)nodeinputs[i]=iomodel->Data(InversionVyObsEnum)[penta_vertex_ids[i]-1]/yts;
+-				else                 for(i=0;i<6;i++)nodeinputs[i]=0;
++				for(i=0;i<6;i++)nodeinputs[i]=0;
+ 				this->inputs->AddInput(new PentaVertexInput(VyEnum,nodeinputs));
+-				this->inputs->AddInput(new PentaVertexInput(VyPicardEnum,nodeinputs));
+ 				if(dakota_analysis) this->inputs->AddInput(new PentaVertexInput(QmuVyEnum,nodeinputs));
+ 			}
+ 			if(!iomodel->Data(VzEnum)){
+-				if (iomodel->Data(InversionVzObsEnum)) for(i=0;i<6;i++)nodeinputs[i]=iomodel->Data(InversionVzObsEnum)[penta_vertex_ids[i]-1]/yts;
+-				else                 for(i=0;i<6;i++)nodeinputs[i]=0;
++				for(i=0;i<6;i++)nodeinputs[i]=0;
+ 				this->inputs->AddInput(new PentaVertexInput(VzEnum,nodeinputs));
+-				this->inputs->AddInput(new PentaVertexInput(VzPicardEnum,nodeinputs));
+ 				if(dakota_analysis) this->inputs->AddInput(new PentaVertexInput(QmuVzEnum,nodeinputs));
+ 			}
+ 			if(!iomodel->Data(PressureEnum)){
Index: /issm/oecreview/Archive/10977-11024/ISSM-10996-10997.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10996-10997.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10996-10997.diff	(revision 11025)
@@ -0,0 +1,12 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp	(revision 10996)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/solvers/solver_stokescoupling_nonlinear.cpp	(revision 10997)
+@@ -53,6 +53,7 @@
+ 	
+ 		//Update once again the solution to make sure that vx and vxold are similar (for next step in transient or steadystate)
+ 		InputUpdateFromSolutionx(femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,ug_horiz);
++		VecFree(&ug_horiz);
+ 
+ 		//save pointer to old velocity
+ 		VecFree(&old_uf_horiz);old_uf_horiz=uf_horiz;
Index: /issm/oecreview/Archive/10977-11024/ISSM-10997-10998.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10997-10998.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10997-10998.diff	(revision 11025)
@@ -0,0 +1,14 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.cpp	(revision 10997)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/Container/Elements.cpp	(revision 10998)
+@@ -194,6 +194,9 @@
+ 			element->ListResultsInfo(&resultsenums,&resultssizes,&resultstimes,&resultssteps,&numberofresults);
+ 		}
+ 		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!=0){
+ 			resultsenums=(int*)xmalloc(numberofresults*sizeof(int));
+ 			resultssizes=(int*)xmalloc(numberofresults*sizeof(int));
Index: /issm/oecreview/Archive/10977-11024/ISSM-10998-10999.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10998-10999.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10998-10999.diff	(revision 11025)
@@ -0,0 +1,121 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/transient_core.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/transient_core.cpp	(revision 10998)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/solutions/transient_core.cpp	(revision 10999)
+@@ -132,7 +132,7 @@
+ 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,ThicknessEnum,step,time);
+ 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceEnum,step,time);
+ 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BedEnum,step,time);
+-			if(dim==3) InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum,step,time);
++			if(dim==3 && isthermal) InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,TemperatureEnum,step,time);
+ 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,BasalforcingsMeltingRateEnum,step,time);
+ 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,SurfaceforcingsMassBalanceEnum,step,time);
+ 			InputToResultx(femmodel->elements,femmodel->nodes,femmodel->vertices,femmodel->loads,femmodel->materials,femmodel->parameters,MaskElementonfloatingiceEnum,step,time);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp	(revision 10998)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp	(revision 10999)
+@@ -22,6 +22,9 @@
+ 	int analysis_type;
+ 	int dim;
+ 	int verbose;
++	bool isthermal;
++	bool isprognostic;
++	bool isdiagnostic;
+ 	
+ 	/*output: */
+ 	Elements    *elements    = NULL;
+@@ -39,6 +42,9 @@
+ 	/*Fetch parameters: */
+ 	iomodel->Constant(&dim,MeshDimensionEnum);
+ 	iomodel->Constant(&verbose,VerboseEnum);
++	iomodel->Constant(&isthermal,TransientIsthermalEnum);
++	iomodel->Constant(&isprognostic,TransientIsprognosticEnum);
++	iomodel->Constant(&isdiagnostic,TransientIsdiagnosticEnum);
+ 	
+ 	SetVerbosityLevel(verbose);
+ 
+@@ -49,6 +55,12 @@
+ 		/*Hack for trasient runs (to be improved)*/
+ 		if(solution_type==TransientSolutionEnum && analysis_type==ThermalAnalysisEnum && dim==2) continue;
+ 		if(solution_type==TransientSolutionEnum && analysis_type==MeltingAnalysisEnum && dim==2) continue;
++		if(solution_type==TransientSolutionEnum && analysis_type==ThermalAnalysisEnum && isthermal==false) continue;
++		if(solution_type==TransientSolutionEnum && analysis_type==MeltingAnalysisEnum && isthermal==false) continue;
++		if(solution_type==TransientSolutionEnum && analysis_type==PrognosticAnalysisEnum && isprognostic==false) continue;
++		if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticHorizAnalysisEnum && isdiagnostic==false) continue;
++		if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticVertAnalysisEnum && isdiagnostic==false) continue;
++		if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticHutterAnalysisEnum && isdiagnostic==false) continue;
+ 	
+ 		_printf_(VerboseMProcessor(),"   create datasets for analysis %s\n",EnumToStringx(analysis_type));
+ 		CreateDataSets(&elements,&nodes,&vertices,&materials,&constraints,&loads,&parameters,iomodel,solution_type,analysis_type,nummodels,i);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/solutions/transient_core.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/solutions/transient_core.m	(revision 10998)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/solutions/transient_core.m	(revision 10999)
+@@ -88,7 +88,7 @@
+ 			femmodel.elements=InputToResult(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters,ThicknessEnum,step,time);
+ 			femmodel.elements=InputToResult(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters,SurfaceEnum,step,time);
+ 			femmodel.elements=InputToResult(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters,BedEnum,step,time);
+-			if (dim==3), femmodel.elements=InputToResult(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters,TemperatureEnum,step,time);end
++			if (dim==3 & isthermal), femmodel.elements=InputToResult(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters,TemperatureEnum,step,time);end
+ 			femmodel.elements=InputToResult(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters,BasalforcingsMeltingRateEnum,step,time);
+ 			femmodel.elements=InputToResult(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters,SurfaceforcingsMassBalanceEnum,step,time);
+ 			femmodel.elements=InputToResult(femmodel.elements,femmodel.nodes,femmodel.vertices,femmodel.loads,femmodel.materials,femmodel.parameters,MaskElementonfloatingiceEnum,step,time);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/prognostic.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/prognostic.m	(revision 10998)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/prognostic.m	(revision 10999)
+@@ -41,7 +41,7 @@
+ 		function checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			%Early return,
+-			if ~ismember(PrognosticAnalysisEnum,analyses), return; end
++			if ~ismember(PrognosticAnalysisEnum,analyses) |  (solution==TransientSolutionEnum & md.transient.isprognostic==0), return; end
+ 
+ 			checkfield(md,'prognostic.spcthickness','forcing',1);
+ 			checkfield(md,'prognostic.hydrostatic_adjustment','values',{'Absolute' 'Incremental'});
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/diagnostic.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/diagnostic.m	(revision 10998)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/diagnostic.m	(revision 10999)
+@@ -73,6 +73,7 @@
+ 
+ 			%Early return
+ 			if ~ismember(DiagnosticHorizAnalysisEnum,analyses), return; end
++			%if ~ismember(DiagnosticHorizAnalysisEnum,analyses) |  (solution==TransientSolutionEnum & md.transient.isdiagnostic==0), return; end
+ 
+ 			checkfield(md,'diagnostic.spcvx','forcing',1);
+ 			checkfield(md,'diagnostic.spcvy','forcing',1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/thermal.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/thermal.m	(revision 10998)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/thermal.m	(revision 10999)
+@@ -45,7 +45,7 @@
+ 		function checkconsistency(obj,md,solution,analyses) % {{{
+ 
+ 			%Early return
+-			if ~ismember(ThermalAnalysisEnum,analyses), return; end
++			if ~ismember(ThermalAnalysisEnum,analyses) | (solution==TransientSolutionEnum & md.transient.isthermal==0), return; end
+ 
+ 			checkfield(md,'thermal.stabilization','numel',1,'values',[0 1 2]);
+ 			checkfield(md,'thermal.spctemperature','forcing',1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/basalforcings.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/basalforcings.m	(revision 10998)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/basalforcings.m	(revision 10999)
+@@ -30,13 +30,13 @@
+ 		end % }}}
+ 		function checkconsistency(obj,md,solution,analyses) % {{{
+ 
+-			if ismember(PrognosticAnalysisEnum,analyses),
++			if ismember(PrognosticAnalysisEnum,analyses) & ~(solution==TransientSolutionEnum & md.transient.isprognostic==0),
+ 				checkfield(md,'basalforcings.melting_rate','NaN',1,'forcing',1);
+ 			end
+ 			if ismember(BalancethicknessAnalysisEnum,analyses),
+ 				checkfield(md,'basalforcings.melting_rate','NaN',1,'size',[md.mesh.numberofvertices 1]);
+ 			end
+-			if ismember(ThermalAnalysisEnum,analyses),
++			if ismember(ThermalAnalysisEnum,analyses) & ~(solution==TransientSolutionEnum & md.transient.isthermal==0),
+ 				checkfield(md,'basalforcings.melting_rate','NaN',1,'forcing',1);
+ 				checkfield(md,'basalforcings.geothermalflux','NaN',1,'forcing',1,'>=',0);
+ 			end
Index: /issm/oecreview/Archive/10977-11024/ISSM-10999-11000.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-10999-11000.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-10999-11000.diff	(revision 11025)
@@ -0,0 +1,61 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp	(revision 10999)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp	(revision 11000)
+@@ -40,6 +40,7 @@
+ 	iomodel->FetchDataToInput(elements,ThicknessEnum);
+ 	iomodel->FetchDataToInput(elements,SurfaceEnum);
+ 	iomodel->FetchDataToInput(elements,BedEnum);
++	iomodel->FetchDataToInput(elements,BathymetryEnum);
+ 	iomodel->FetchDataToInput(elements,MaskElementonfloatingiceEnum);
+ 	iomodel->FetchDataToInput(elements,MaskElementonwaterEnum);
+ 	iomodel->FetchDataToInput(elements,SurfaceforcingsAccumulationRateEnum);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp	(revision 10999)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp	(revision 11000)
+@@ -60,7 +60,6 @@
+ 	iomodel->FetchDataToInput(elements,MaterialsRheologyNEnum);
+ 	iomodel->FetchDataToInput(elements,VxEnum);
+ 	iomodel->FetchDataToInput(elements,VyEnum);
+-	iomodel->FetchDataToInput(elements,BathymetryEnum);
+ 
+ 	if (dim==3){
+ 		iomodel->FetchDataToInput(elements,MeshElementonbedEnum);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp	(revision 10999)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp	(revision 11000)
+@@ -18,13 +18,8 @@
+ 
+ void ModelProcessorx(Elements** pelements, Nodes** pnodes, Vertices** pvertices, Materials** pmaterials, Constraints** pconstraints, Loads** ploads, Parameters** pparameters, FILE* IOMODEL,const int solution_type,const int nummodels,const int* analysis_type_list){
+ 
+-	int i;
+-	int analysis_type;
+-	int dim;
+-	int verbose;
+-	bool isthermal;
+-	bool isprognostic;
+-	bool isdiagnostic;
++	int   i,analysis_type,dim,verbose;
++	bool  isthermal,isprognostic,isdiagnostic,isgroundingline;
+ 	
+ 	/*output: */
+ 	Elements    *elements    = NULL;
+@@ -45,6 +40,7 @@
+ 	iomodel->Constant(&isthermal,TransientIsthermalEnum);
+ 	iomodel->Constant(&isprognostic,TransientIsprognosticEnum);
+ 	iomodel->Constant(&isdiagnostic,TransientIsdiagnosticEnum);
++	iomodel->Constant(&isgroundingline,TransientIsgroundinglineEnum);
+ 	
+ 	SetVerbosityLevel(verbose);
+ 
+@@ -57,7 +53,7 @@
+ 		if(solution_type==TransientSolutionEnum && analysis_type==MeltingAnalysisEnum && dim==2) continue;
+ 		if(solution_type==TransientSolutionEnum && analysis_type==ThermalAnalysisEnum && isthermal==false) continue;
+ 		if(solution_type==TransientSolutionEnum && analysis_type==MeltingAnalysisEnum && isthermal==false) continue;
+-		if(solution_type==TransientSolutionEnum && analysis_type==PrognosticAnalysisEnum && isprognostic==false) continue;
++		if(solution_type==TransientSolutionEnum && analysis_type==PrognosticAnalysisEnum && isprognostic==false && isgroundingline==false) continue;
+ 		if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticHorizAnalysisEnum && isdiagnostic==false) continue;
+ 		if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticVertAnalysisEnum && isdiagnostic==false) continue;
+ 		if(solution_type==TransientSolutionEnum && analysis_type==DiagnosticHutterAnalysisEnum && isdiagnostic==false) continue;
Index: /issm/oecreview/Archive/10977-11024/ISSM-11000-11001.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11000-11001.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11000-11001.diff	(revision 11025)
@@ -0,0 +1,453 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp	(revision 11001)
+@@ -27,6 +27,9 @@
+ 	/*output*/
+ 	int* connectivity=NULL;
+ 
++	/*Check that this has not been done yet*/
++	if(iomodel->numbernodetoelementconnectivity) return;
++
+ 	/*Fetch parameters: */
+ 	iomodel->Constant(&dim,MeshDimensionEnum);
+ 	iomodel->Constant(&numberofelements,MeshNumberofelementsEnum);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp	(revision 11001)
+@@ -44,7 +44,6 @@
+ 
+ 	/*First fetch data: */
+ 	iomodel->FetchData(7,MeshVertexonbedEnum,MeshVertexonsurfaceEnum,MaskVertexongroundediceEnum,MaskVertexonfloatingiceEnum,MeshElementsEnum,FlowequationVertexEquationEnum,MaskVertexonwaterEnum);
+-	CreateNumberNodeToElementConnectivity(iomodel);
+ 
+ 	for (i=0;i<numberofvertices;i++){
+ 		if(iomodel->my_vertices[i]){
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp	(revision 11001)
+@@ -46,7 +46,7 @@
+ 	/*Fetch data needed: */
+ 	iomodel->FetchData(4,MeshElementsEnum,MeshElementconnectivityEnum,MaterialsRheologyBEnum,MaterialsRheologyNEnum);
+ 	#ifdef _HAVE_THREED_
+-	if(dim==3)          iomodel->FetchData(2,MeshUpperelementsEnum,MeshLowerelementsEnum);
++	if(dim==3)iomodel->FetchData(2,MeshUpperelementsEnum,MeshLowerelementsEnum);
+ 	#endif
+ 	if(control_analysis)iomodel->FetchData(3,InversionControlParametersEnum,InversionMinParametersEnum,InversionMaxParametersEnum);
+ 	
+@@ -75,7 +75,8 @@
+ 	/*Create vertices: */
+ 
+ 	/*Fetch data:*/
+-	iomodel->FetchData(5,MeshXEnum,MeshYEnum,MeshZEnum,BedEnum,ThicknessEnum);
++	iomodel->FetchData(6,MeshElementsEnum,MeshXEnum,MeshYEnum,MeshZEnum,BedEnum,ThicknessEnum);
++	CreateNumberNodeToElementConnectivity(iomodel);
+ 	
+ 	for (i=0;i<numberofvertices;i++){
+ 
+@@ -88,7 +89,7 @@
+ 	}
+ 
+ 	/*Free data: */
+-	iomodel->DeleteData(5,MeshXEnum,MeshYEnum,MeshZEnum,BedEnum,ThicknessEnum);
++	iomodel->DeleteData(6,MeshElementsEnum,MeshXEnum,MeshYEnum,MeshZEnum,BedEnum,ThicknessEnum);
+ 
+ 	/*Assign output pointer: */
+ 	*pelements=elements;
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Vertex.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Vertex.cpp	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Vertex.cpp	(revision 11001)
+@@ -23,15 +23,18 @@
+ }
+ /*}}}*/
+ /*FUNCTION Vertex::Vertex(int vertex_id, double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){{{1*/
+-Vertex::Vertex(int vertex_id, int vertex_sid,double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){
+-	this->Init(vertex_id, vertex_sid,vertex_x, vertex_y, vertex_z, vertex_sigma);
++Vertex::Vertex(int vertex_id, int vertex_sid,double vertex_x, double vertex_y, double vertex_z, double vertex_sigma,int vertex_connectivity){
++	this->Init(vertex_id, vertex_sid,vertex_x, vertex_y, vertex_z, vertex_sigma,vertex_connectivity);
+ }
+ /*}}}*/
+ /*FUNCTION Vertex::Vertex(int vertex_id, int vertex_sid,int i, IoModel* iomodel) {{{1*/
+ Vertex::Vertex(int vertex_id, int vertex_sid,int i, IoModel* iomodel){
+ 
+-	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]));
++	_assert_(iomodel->Data(MeshXEnum) && iomodel->Data(MeshYEnum) && iomodel->Data(MeshZEnum));
++	_assert_(iomodel->Data(BedEnum) && iomodel->Data(ThicknessEnum) && iomodel->numbernodetoelementconnectivity);
+ 
++	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]),iomodel->numbernodetoelementconnectivity[i]);
++
+ }
+ /*}}}*/
+ /*FUNCTION Vertex::~Vertex() {{{1*/
+@@ -40,7 +43,7 @@
+ }
+ /*}}}*/
+ /*FUNCTION Vertex::Init{{{1*/
+-void Vertex::Init(int vertex_id, int vertex_sid,double vertex_x, double vertex_y, double vertex_z, double vertex_sigma){
++void Vertex::Init(int vertex_id, int vertex_sid,double vertex_x, double vertex_y, double vertex_z, double vertex_sigma,int vertex_connectivity){
+ 
+ 	/*all the initialization has been done by the initializer, just fill in the id: */
+ 	this->id=vertex_id;
+@@ -49,6 +52,7 @@
+ 	this->y=vertex_y;
+ 	this->z=vertex_z;
+ 	this->sigma=vertex_sigma;
++	this->connectivity=vertex_connectivity;
+ 	this->dof=UNDEF;
+ 
+ 	return;
+@@ -66,6 +70,7 @@
+ 	printf("   y: %g\n",y);
+ 	printf("   z: %g\n",z);
+ 	printf("   sigma: %g\n",sigma);
++	printf("   connectivity: %g\n",connectivity);
+ 	printf("   dof: %i\n",dof);
+ 	printf("   clone: %i\n",clone);
+ 
+@@ -73,7 +78,6 @@
+ }
+ /*}}}*/
+ /*FUNCTION Vertex::DeepEcho{{{1*/
+-
+ void Vertex::DeepEcho(void){
+ 	this->Echo();
+ }
+@@ -110,6 +114,7 @@
+ 	memcpy(marshalled_dataset,&y,sizeof(y));marshalled_dataset+=sizeof(y);
+ 	memcpy(marshalled_dataset,&z,sizeof(z));marshalled_dataset+=sizeof(z);
+ 	memcpy(marshalled_dataset,&sigma,sizeof(sigma));marshalled_dataset+=sizeof(sigma);
++	memcpy(marshalled_dataset,&connectivity,sizeof(connectivity));marshalled_dataset+=sizeof(connectivity);
+ 	memcpy(marshalled_dataset,&dof,sizeof(dof));marshalled_dataset+=sizeof(dof);
+ 	memcpy(marshalled_dataset,&clone,sizeof(clone));marshalled_dataset+=sizeof(clone);
+ 
+@@ -126,6 +131,7 @@
+ 		sizeof(y)+
+ 		sizeof(z)+
+ 		sizeof(sigma)+
++		sizeof(connectivity)+
+ 		sizeof(dof)+
+ 		sizeof(clone)+
+ 		+sizeof(int); //sizeof(int) for enum type
+@@ -149,6 +155,7 @@
+ 	memcpy(&y,marshalled_dataset,sizeof(y));marshalled_dataset+=sizeof(y);
+ 	memcpy(&z,marshalled_dataset,sizeof(z));marshalled_dataset+=sizeof(z);
+ 	memcpy(&sigma,marshalled_dataset,sizeof(sigma));marshalled_dataset+=sizeof(sigma);
++	memcpy(&connectivity,marshalled_dataset,sizeof(connectivity));marshalled_dataset+=sizeof(connectivity);
+ 	memcpy(&dof,marshalled_dataset,sizeof(dof));marshalled_dataset+=sizeof(dof);
+ 	memcpy(&clone,marshalled_dataset,sizeof(clone));marshalled_dataset+=sizeof(clone);
+ 
+@@ -258,6 +265,9 @@
+ /*}}}*/
+ 
+ /*Vertex management: */
++/*FUNCTION Vertex::Connectivity{{{1*/
++int    Vertex::Connectivity(void){return connectivity;}
++/*}}}*/
+ /*FUNCTION Vertex::Sid{{{1*/
+ int    Vertex::Sid(void){ return sid; }
+ /*}}}*/
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.cpp	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.cpp	(revision 11001)
+@@ -194,10 +194,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION PentaVertexElementResult::GetVectorFromResults{{{1*/
+-void PentaVertexElementResult::GetVectorFromResults(Vec vector,int* doflist,int numdofs){
++void PentaVertexElementResult::GetVectorFromResults(Vec vector,int* doflist,int* connectivitylist,int numdofs){
+ 
++	double data[6];
++
+ 	if(numdofs!=6)_error_("Result %s is a PentaVertexElementResult and cannot write vector of %i dofs",numdofs);
+-	VecSetValues(vector,numdofs,doflist,(const double*)this->values,INSERT_VALUES);
++	for(int i=0;i<6;i++) data[i]=this->values[i]/(double)connectivitylist[i];
++	VecSetValues(vector,numdofs,doflist,(const double*)&data,ADD_VALUES);
+ 
+ } /*}}}*/
+ /*FUNCTION PentaVertexElementResult::GetElementVectorFromResults{{{1*/
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h	(revision 11001)
+@@ -51,7 +51,7 @@
+ 		/*}}}*/
+ 		/*PentaVertexElementResult management: {{{1*/
+ 		int   InstanceEnum();
+-		void GetVectorFromResults(Vec vector,int* doflist,int numdofs);
++		void GetVectorFromResults(Vec vector,int* doflist,int* connectivitylist,int numdofs);
+ 		void GetElementVectorFromResults(Vec vector,int dof);
+ 		/*}}}*/
+ 
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 11001)
+@@ -184,18 +184,9 @@
+ }
+ /*}}}*/
+ /*FUNCTION BoolElementResult::GetVectorFromResults{{{1*/
+-void BoolElementResult::GetVectorFromResults(Vec vector,int* doflist,int numdofs){
++void BoolElementResult::GetVectorFromResults(Vec vector,int* doflist,int* connectivitylist,int numdofs){
+ 
+-	double *doublevalues=NULL;
+-
+-	/*Cast value to double vector*/
+-	doublevalues=(double*)xmalloc(numdofs*sizeof(double));
+-	for(int i=0;i<numdofs;i++) doublevalues[i]=double(this->value);
+-
+-	VecSetValues(vector,numdofs,doflist,(const double*)doublevalues,INSERT_VALUES);
+-
+-	/*cleanup*/
+-	xfree((void**)&doublevalues);
++	_error_("cannot return vector on vertices");
+ } /*}}}*/
+ /*FUNCTION BoolElementResult::GetElementVectorFromResults{{{1*/
+ void BoolElementResult::GetElementVectorFromResults(Vec vector,int dof){
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.cpp	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.cpp	(revision 11001)
+@@ -183,10 +183,13 @@
+ }
+ /*}}}*/
+ /*FUNCTION TriaVertexElementResult::GetVectorFromResults{{{1*/
+-void TriaVertexElementResult::GetVectorFromResults(Vec vector,int* doflist,int numdofs){
++void TriaVertexElementResult::GetVectorFromResults(Vec vector,int* doflist,int* connectivitylist,int numdofs){
+ 
++	double data[3];
++
+ 	if(numdofs!=3)_error_("Result %s is a TriaVertexElementResult and cannot write vector of %i dofs",numdofs);
+-	VecSetValues(vector,numdofs,doflist,(const double*)this->values,INSERT_VALUES);
++	for(int i=0;i<3;i++) data[i]=this->values[i]/(double)connectivitylist[i];
++	VecSetValues(vector,numdofs,doflist,(const double*)&data,ADD_VALUES);
+ 
+ } /*}}}*/
+ /*FUNCTION TriaVertexElementResult::GetElementVectorFromResults{{{1*/
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 11001)
+@@ -52,7 +52,7 @@
+ 		/*}}}*/
+ 		/*DoubleElementResult management: {{{1*/
+ 		int   InstanceEnum();
+-		void GetVectorFromResults(Vec vector,int* doflist,int numdofs){_error_("not implemented");};
++		void GetVectorFromResults(Vec vector,int* doflist,int* connectivitylist,int numdofs){_error_("not implemented");};
+ 		void GetElementVectorFromResults(Vec vector,int dof){_error_("not implemented");};
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 11001)
+@@ -52,7 +52,7 @@
+ 		/*}}}*/
+ 		/*BoolElementResult management: {{{1*/
+ 		int   InstanceEnum();
+-		void GetVectorFromResults(Vec vector,int* doflist,int numdofs);
++		void GetVectorFromResults(Vec vector,int* doflist,int* connectivitylist,int numdofs);
+ 		void GetElementVectorFromResults(Vec vector,int dof);
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h	(revision 11001)
+@@ -50,7 +50,7 @@
+ 		/*}}}*/
+ 		/*TriaVertexElementResult management: {{{1*/
+ 		int   InstanceEnum();
+-		void GetVectorFromResults(Vec vector,int* doflist,int numdofs);
++		void GetVectorFromResults(Vec vector,int* doflist,int* connectivitylist,int numdofs);
+ 		void GetElementVectorFromResults(Vec vector,int dof);
+ 		/*}}}*/
+ 
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/ElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/ElementResult.h	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/ElementResults/ElementResult.h	(revision 11001)
+@@ -24,7 +24,7 @@
+ 		virtual int     NumberOfNodalValues(void)=0;
+ 		virtual void    PatchFill(int row, Patch* patch)=0;
+ 		virtual int     InstanceEnum()=0;
+-		virtual void    GetVectorFromResults(Vec vector,int* doflist,int numdof)=0;
++		virtual void    GetVectorFromResults(Vec vector,int* doflist,int* connectivitylist,int numdof)=0;
+ 		virtual void    GetElementVectorFromResults(Vec vector,int dof)=0;
+ 
+ };
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 11001)
+@@ -1177,12 +1177,14 @@
+ /*}}}*/
+ /*FUNCTION Tria::GetSidList {{{1*/
+ void  Tria::GetSidList(int* sidlist){
+-
+-	int i;
+-	for(i=0;i<NUMVERTICES;i++) sidlist[i]=nodes[i]->GetSidList();
+-
++	for(int i=0;i<NUMVERTICES;i++) sidlist[i]=nodes[i]->GetSidList();
+ }
+ /*}}}*/
++/*FUNCTION Tria::GetConnectivityList {{{1*/
++void  Tria::GetConnectivityList(int* connectivity){
++	for(int i=0;i<NUMVERTICES;i++) connectivity[i]=nodes[i]->GetConnectivity();
++}
++/*}}}*/
+ /*FUNCTION Tria::GetSolutionFromInputs{{{1*/
+ void  Tria::GetSolutionFromInputs(Vec solution){
+ 
+@@ -1255,14 +1257,14 @@
+ /*FUNCTION Tria::GetVectorFromResults{{{1*/
+ void  Tria::GetVectorFromResults(Vec vector,int offset,int interp){
+ 
+-	/*Prepare index list*/
+-	int doflist1[NUMVERTICES];
+-	this->GetSidList(&doflist1[0]);
+-
+ 	/*Get result*/
+ 	ElementResult* elementresult=(ElementResult*)this->results->GetObjectByOffset(offset);
+ 	if(interp==P1Enum){
+-		elementresult->GetVectorFromResults(vector,&doflist1[0],NUMVERTICES);
++		int doflist1[NUMVERTICES];
++		int connectivity[NUMVERTICES];
++		this->GetSidList(&doflist1[0]);
++		this->GetConnectivityList(&connectivity[0]);
++		elementresult->GetVectorFromResults(vector,&doflist1[0],&connectivity[0],NUMVERTICES);
+ 	}
+ 	else if(interp==P0Enum){
+ 		elementresult->GetElementVectorFromResults(vector,sid);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.h	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Tria.h	(revision 11001)
+@@ -182,6 +182,7 @@
+ 		void	         GetDofList(int** pdoflist,int approximation_enum,int setenum);
+ 		void	         GetDofList1(int* doflist);
+ 		void           GetSidList(int* sidlist);
++		void           GetConnectivityList(int* connectivity);
+ 		void           GetInputListOnVertices(double* pvalue,int enumtype);
+ 		void           GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue);
+ 		void           GetInputListOnVertices(double* pvalue,int enumtype,double defaultvalue,int index); //TO BE REMOVED
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 11001)
+@@ -816,6 +816,11 @@
+ 
+ }
+ /*}}}*/
++/*FUNCTION Penta::GetConnectivityList {{{1*/
++void  Penta::GetConnectivityList(int* connectivity){
++	for(int i=0;i<NUMVERTICES;i++) connectivity[i]=nodes[i]->GetConnectivity();
++}
++/*}}}*/
+ /*FUNCTION Penta::GetElementType {{{1*/
+ int Penta::GetElementType(){
+ 
+@@ -1140,14 +1145,14 @@
+ /*FUNCTION Penta::GetVectorFromResults{{{1*/
+ void  Penta::GetVectorFromResults(Vec vector,int offset,int interp){
+ 
+-	/*Prepare index list*/
+-	int doflist1[NUMVERTICES];
+-	this->GetSidList(&doflist1[0]);
+-
+ 	/*Get result*/
+ 	ElementResult* elementresult=(ElementResult*)this->results->GetObjectByOffset(offset);
+ 	if(interp==P1Enum){
+-		elementresult->GetVectorFromResults(vector,&doflist1[0],NUMVERTICES);
++		int doflist1[NUMVERTICES];
++		int connectivity[NUMVERTICES];
++		this->GetSidList(&doflist1[0]);
++		this->GetConnectivityList(&connectivity[0]);
++		elementresult->GetVectorFromResults(vector,&doflist1[0],&connectivity[0],NUMVERTICES);
+ 	}
+ 	else if(interp==P0Enum){
+ 		elementresult->GetElementVectorFromResults(vector,sid);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.h	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Elements/Penta.h	(revision 11001)
+@@ -168,6 +168,7 @@
+ 		void	  GetDofList(int** pdoflist,int approximation_enum,int setenum);
+ 		void	  GetDofList1(int* doflist);
+ 		void    GetSidList(int* sidlist);
++		void    GetConnectivityList(int* connectivity);
+ 		int     GetElementType(void);
+ 		void    GetElementSizes(double* hx,double* hy,double* hz);
+ 		void    GetInputListOnVertices(double* pvalue,int enumtype);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Vertex.h
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Vertex.h	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Vertex.h	(revision 11001)
+@@ -20,12 +20,13 @@
+ 
+ 	public: 
+ 
+-		int  id;
+-		int  sid; //sid for "serial" id, ie the rank of this vertex in the vertices dataset, if the dataset was serial on 1 cpu.
++		int    id;
++		int    sid;            //sid for "serial" id, ie the rank of this vertex in the vertices dataset, if the dataset was serial on 1 cpu.
+ 		double x;
+ 		double y;
+ 		double z;
+-		double sigma; //sigma coordinate: (z-bed)/thickness
++		double sigma;          //sigma coordinate: (z-bed)/thickness
++		int    connectivity;   //number of vertices connected to this vertex
+ 
+ 		/*dof management: */
+ 		int    clone;
+@@ -33,8 +34,8 @@
+ 
+ 		/*Vertex constructors, destructors {{{1*/
+ 		Vertex();
+-		Vertex(int id, int sid,double x, double y, double z, double sigma); 
+-		void Init(int id, int sid, double x, double y, double z, double sigma);
++		Vertex(int id, int sid,double x, double y, double z, double sigma, int connectivity); 
++		void Init(int id, int sid, double x, double y, double z, double sigma,int connectivity);
+ 		Vertex(int id, int sid, int i, IoModel* iomodel);
+ 		~Vertex();
+ 		/*}}}*/
+@@ -60,6 +61,7 @@
+ 		/*}}}*/
+ 		/*Vertex management: {{{1*/
+ 		int   Sid(void); 
++		int   Connectivity(void); 
+ 		void  UpdatePosition(double* thickness,double* bed);
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Node.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Node.cpp	(revision 11000)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/c/objects/Node.cpp	(revision 11001)
+@@ -64,8 +64,6 @@
+ 	 this->inputs->AddInput(new BoolInput(MaskVertexonfloatingiceEnum,(IssmBool)iomodel->Data(MaskVertexonfloatingiceEnum)[io_index]));
+ 	if (iomodel->Data(MaskVertexongroundediceEnum))
+ 	 this->inputs->AddInput(new BoolInput(MaskVertexongroundediceEnum,(IssmBool)iomodel->Data(MaskVertexongroundediceEnum)[io_index]));
+-	if (iomodel->numbernodetoelementconnectivity)
+-	 this->inputs->AddInput(new IntInput(NumberNodeToElementConnectivityEnum,(IssmInt)iomodel->numbernodetoelementconnectivity[io_index]));
+ 	if (analysis_type==DiagnosticHorizAnalysisEnum)
+ 	 this->inputs->AddInput(new IntInput(ApproximationEnum,(IssmInt)iomodel->Data(FlowequationVertexEquationEnum)[io_index]));
+ 	
+@@ -663,12 +661,10 @@
+ /*}}}*/
+ /*FUNCTION Node::GetConnectivity {{{1*/
+ int Node::GetConnectivity(){
+-	int connectivity;
+ 
+-	/*recover parameters: */
+-	inputs->GetInputValue(&connectivity,NumberNodeToElementConnectivityEnum);
+-
+-	return connectivity;
++	Vertex*  vertex=NULL;
++	vertex=(Vertex*)hvertex->delivers();
++	return vertex->connectivity;
+ }
+ /*}}}*/
+ /*FUNCTION Node::GetNumberOfDofs{{{1*/
Index: /issm/oecreview/Archive/10977-11024/ISSM-11001-11002.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11001-11002.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11001-11002.diff	(revision 11025)
@@ -0,0 +1,14 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/bamg.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/bamg.m	(revision 11001)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/bamg.m	(revision 11002)
+@@ -339,6 +339,8 @@
+ md.mesh.elementconnectivity(find(isnan(md.mesh.elementconnectivity)))=0;
+ 
+ %Check for orphan
+-if any(~ismember(1:md.mesh.numberofvertices,sort(unique(md.mesh.elements(:)))))
++reshape(md.mesh.elements,3*md.mesh.numberofelements,1);
++(~ismember(1:md.mesh.numberofvertices,sort(unique(reshape(md.mesh.elements,3*md.mesh.numberofelements,1)))));
++if any(~ismember(1:md.mesh.numberofvertices,sort(unique(reshape(md.mesh.elements,3*md.mesh.numberofelements,1)))))
+ 	error('Output mesh has orphans. Decrease MaxCornerAngle to prevent outside points (ex: 0.01)');
+ end
Index: /issm/oecreview/Archive/10977-11024/ISSM-11002-11003.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11002-11003.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11002-11003.diff	(revision 11025)
@@ -0,0 +1,186 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/setflowequation.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/setflowequation.m	(revision 11002)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/setflowequation.m	(revision 11003)
+@@ -66,25 +66,17 @@
+ 	error('setflowequation error message: stokes cannot be used with any other model for now, put stokes everywhere')
+ end
+ 
+-%add in model who is who
+-md.flowequation.element_equation=zeros(md.mesh.numberofelements,1);
+-
+ %1: Hutter elements
+ nodeonhutter=zeros(md.mesh.numberofvertices,1);
+ nodeonhutter(md.mesh.elements(find(hutterflag),:))=1;
+-md.flowequation.element_equation(find(hutterflag))=1;
+ 
+ %2: MacAyeal elements
+ nodeonmacayeal=zeros(md.mesh.numberofvertices,1);
+ nodeonmacayeal(md.mesh.elements(find(macayealflag),:))=1;
+-md.flowequation.bordermacayeal=nodeonmacayeal;
+-md.flowequation.element_equation(find(macayealflag))=2;
+ 
+ %3: Pattyn elements
+ nodeonpattyn=zeros(md.mesh.numberofvertices,1);
+ nodeonpattyn(md.mesh.elements(find(pattynflag),:))=1;
+-md.flowequation.borderpattyn=nodeonpattyn;
+-md.flowequation.element_equation(find(pattynflag))=3;
+ 
+ %4: Stokes elements
+ %First modify stokesflag to get rid of elements contrained everywhere (spc + border with pattyn or macayeal)
+@@ -97,24 +89,20 @@
+ end
+ nodeonstokes=zeros(md.mesh.numberofvertices,1);
+ nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
+-md.flowequation.borderstokes=nodeonstokes;
+-md.flowequation.element_equation(find(stokesflag))=4;
+ 
++%5: None elements
++noneflag=zeros(md.mesh.numberofelements,1);
++
+ %Then complete with NoneApproximation or the other model used if there is no stokes
+ if any(stokesflag), 
+ 	if any(pattynflag), %fill with pattyn
+ 		pattynflag(~stokesflag)=1;
+ 		nodeonpattyn(md.mesh.elements(find(pattynflag),:))=1;
+-		md.flowequation.borderpattyn=nodeonpattyn;
+-		md.flowequation.element_equation(find(~stokesflag))=3;
+ 	elseif any(macayealflag), %fill with macayeal
+ 		macayealflag(~stokesflag)=1;
+ 		nodeonmacayeal(md.mesh.elements(find(macayealflag),:))=1;
+-		md.flowequation.bordermacayeal=nodeonmacayeal;
+-		md.flowequation.element_equation(find(~stokesflag))=2;
+ 	else %fill with none 
+-	%5: None elements (non Stokes)
+-		md.flowequation.element_equation(find(~stokesflag))=0;
++		noneflag(find(~stokesflag))=1;
+ 	end
+ end
+ 
+@@ -123,6 +111,9 @@
+ nodeonmacayealpattyn=zeros(md.mesh.numberofvertices,1);
+ nodeonpattynstokes=zeros(md.mesh.numberofvertices,1);
+ nodeonmacayealstokes=zeros(md.mesh.numberofvertices,1);
++macayealpattynflag=zeros(md.mesh.numberofelements,1);
++macayealstokesflag=zeros(md.mesh.numberofelements,1);
++pattynstokesflag=zeros(md.mesh.numberofelements,1);
+ if strcmpi(coupling_method,'penalties'),
+ 	%Create the border nodes between Pattyn and MacAyeal and extrude them
+ 	numnodes2d=md.mesh.numberofvertices2d;
+@@ -146,17 +137,31 @@
+ 		commonelements=sum(matrixelements,2)~=0;
+ 		commonelements(find(pattynflag))=0; %only one layer: the elements previously in macayeal
+ 		macayealflag(find(commonelements))=0; %these elements are now macayealpattynelements
+-		macayealpattynflag=zeros(md.mesh.numberofelements,1);
+ 		macayealpattynflag(find(commonelements))=1;
+ 		nodeonmacayeal=zeros(md.mesh.numberofvertices,1);
+ 		nodeonmacayeal(md.mesh.elements(find(macayealflag),:))=1;
+-		md.flowequation.bordermacayeal=nodeonmacayeal;
+ 
+-		%Create MacaAyealPattynApproximation where needed
+-		md.flowequation.element_equation(find(macayealpattynflag))=5;
++		%rule out elements that don't touch the 2 boundaries
++		pos=find(macayealpattynflag);
++		list=zeros(length(pos),1);
++		list = list + any(sum(nodeonmacayeal(md.mesh.elements(pos,:)),2),2);
++		list = list - any(sum(nodeonpattyn(md.mesh.elements(pos,:))  ,2),2);
++		pos1=find(list==1);
++		pattynflag(pos(pos1))=0;
++		macayealflag(pos(pos1))=1;
++		macayealpattynflag(pos(pos1))=0;
++		pos2=find(list==-1);
++		pattynflag(pos(pos2))=1;
++		macayealflag(pos(pos2))=0;
++		macayealpattynflag(pos(pos2))=0;
+ 
+-		%Now recreate nodeonmacayeal and nodeonmacayealpattyn
++		nodeonmacayeal(:)=0;
++		nodeonmacayeal(md.mesh.elements(find(macayealflag),:))=1;
++		nodeonpattyn(:)=0;
++		nodeonpattyn(md.mesh.elements(find(pattynflag),:))=1;
++		nodeonmacayealpattyn(:)=0;
+ 		nodeonmacayealpattyn(md.mesh.elements(find(macayealpattynflag),:))=1;
++
+ 	elseif any(pattynflag) & any(stokesflag), %coupling pattyn stokes
+ 		%Find node at the border
+ 		nodeonpattynstokes(find(nodeonpattyn & nodeonstokes))=1;
+@@ -165,15 +170,10 @@
+ 		commonelements=sum(matrixelements,2)~=0;
+ 		commonelements(find(pattynflag))=0; %only one layer: the elements previously in macayeal
+ 		stokesflag(find(commonelements))=0; %these elements are now macayealpattynelements
+-		pattynstokesflag=zeros(md.mesh.numberofelements,1);
+ 		pattynstokesflag(find(commonelements))=1;
+ 		nodeonstokes=zeros(md.mesh.numberofvertices,1);
+ 		nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
+-		md.flowequation.borderstokes=nodeonstokes;
+ 
+-		%Create MacaAyealPattynApproximation where needed
+-		md.flowequation.element_equation(find(pattynstokesflag))=7;
+-
+ 		%Now recreate nodeonpattynstokes
+ 		nodeonpattynstokes=zeros(md.mesh.numberofvertices,1);
+ 		nodeonpattynstokes(md.mesh.elements(find(pattynstokesflag),:))=1;
+@@ -185,15 +185,10 @@
+ 		commonelements=sum(matrixelements,2)~=0;
+ 		commonelements(find(macayealflag))=0; %only one layer: the elements previously in macayeal
+ 		stokesflag(find(commonelements))=0; %these elements are now macayealmacayealelements
+-		macayealstokesflag=zeros(md.mesh.numberofelements,1);
+ 		macayealstokesflag(find(commonelements))=1;
+ 		nodeonstokes=zeros(md.mesh.numberofvertices,1);
+ 		nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
+-		md.flowequation.borderstokes=nodeonstokes;
+ 
+-		%Create MacaAyeal Approximation where needed
+-		md.flowequation.element_equation(find(macayealstokesflag))=6;
+-
+ 		%Now recreate nodeonmacayealstokes
+ 		nodeonmacayealstokes=zeros(md.mesh.numberofvertices,1);
+ 		nodeonmacayealstokes(md.mesh.elements(find(macayealstokesflag),:))=1;
+@@ -202,6 +197,22 @@
+ 	end
+ end
+ 
++%Create MacaAyealPattynApproximation where needed
++md.flowequation.element_equation=zeros(md.mesh.numberofelements,1);
++md.flowequation.element_equation(find(noneflag))=0;
++md.flowequation.element_equation(find(hutterflag))=1;
++md.flowequation.element_equation(find(macayealflag))=2;
++md.flowequation.element_equation(find(pattynflag))=3;
++md.flowequation.element_equation(find(stokesflag))=4;
++md.flowequation.element_equation(find(macayealpattynflag))=5;
++md.flowequation.element_equation(find(macayealstokesflag))=6;
++md.flowequation.element_equation(find(pattynstokesflag))=7;
++
++%border
++md.flowequation.borderpattyn=nodeonpattyn;
++md.flowequation.bordermacayeal=nodeonmacayeal;
++md.flowequation.borderstokes=nodeonstokes;
++
+ %Create vertices_type
+ md.flowequation.vertex_equation=zeros(md.mesh.numberofvertices,1);
+ pos=find(nodeonhutter);
+@@ -212,8 +223,6 @@
+ md.flowequation.vertex_equation(pos)=3;
+ pos=find(nodeonhutter);
+ md.flowequation.vertex_equation(pos)=1;
+-pos=find(nodeonpattyn & nodeonmacayeal);
+-md.flowequation.vertex_equation(pos)=3;
+ pos=find(nodeonmacayealpattyn);
+ md.flowequation.vertex_equation(pos)=5;
+ pos=find(nodeonstokes);
+@@ -234,4 +243,15 @@
+ md.flowequation.ismacayealpattyn=double(any(md.flowequation.element_equation==2 | md.flowequation.element_equation==3));
+ md.flowequation.isstokes=double(any(md.flowequation.element_equation==4));
+ 
++return
++
++%Check that tiling can work:
++if any(md.flowequation.bordermacayeal) & any(md.flowequation.borderpattyn) & any(md.flowequation.borderpattyn + md.flowequation.bordermacayeal ~=1),
++	error('error coupling domain too irregular');
+ end
++if any(md.flowequation.bordermacayeal) & any(md.flowequation.borderstokes) & any(md.flowequation.borderstokes + md.flowequation.bordermacayeal ~=1),
++	error('error coupling domain too irregular');
++end
++if any(md.flowequation.borderstokes) & any(md.flowequation.borderpattyn) & any(md.flowequation.borderpattyn + md.flowequation.borderstokes~=1),
++	error('error coupling domain too irregular');
++end
Index: /issm/oecreview/Archive/10977-11024/ISSM-11003-11004.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11003-11004.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11003-11004.diff	(revision 11025)
@@ -0,0 +1,126 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/setflowequation.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/setflowequation.m	(revision 11003)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/setflowequation.m	(revision 11004)
+@@ -66,33 +66,25 @@
+ 	error('setflowequation error message: stokes cannot be used with any other model for now, put stokes everywhere')
+ end
+ 
+-%1: Hutter elements
++%Initialize node fields
+ nodeonhutter=zeros(md.mesh.numberofvertices,1);
+ nodeonhutter(md.mesh.elements(find(hutterflag),:))=1;
+-
+-%2: MacAyeal elements
+ nodeonmacayeal=zeros(md.mesh.numberofvertices,1);
+ nodeonmacayeal(md.mesh.elements(find(macayealflag),:))=1;
+-
+-%3: Pattyn elements
+ nodeonpattyn=zeros(md.mesh.numberofvertices,1);
+ nodeonpattyn(md.mesh.elements(find(pattynflag),:))=1;
++nodeonstokes=zeros(md.mesh.numberofvertices,1);
++nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
++noneflag=zeros(md.mesh.numberofelements,1);
+ 
+-%4: Stokes elements
+ %First modify stokesflag to get rid of elements contrained everywhere (spc + border with pattyn or macayeal)
+ if any(stokesflag),
+-	nodeonstokes=zeros(md.mesh.numberofvertices,1);
+-	nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
+ 	fullspcnodes=double((~isnan(md.diagnostic.spcvx)+~isnan(md.diagnostic.spcvy)+~isnan(md.diagnostic.spcvz))==3 | (nodeonpattyn & nodeonstokes));         %find all the nodes on the boundary of the domain without icefront
+ 	fullspcelems=double(sum(fullspcnodes(md.mesh.elements),2)==6);         %find all the nodes on the boundary of the domain without icefront
+ 	stokesflag(find(fullspcelems))=0;
++	nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
+ end
+-nodeonstokes=zeros(md.mesh.numberofvertices,1);
+-nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
+ 
+-%5: None elements
+-noneflag=zeros(md.mesh.numberofelements,1);
+-
+ %Then complete with NoneApproximation or the other model used if there is no stokes
+ if any(stokesflag), 
+ 	if any(pattynflag), %fill with pattyn
+@@ -138,7 +130,7 @@
+ 		commonelements(find(pattynflag))=0; %only one layer: the elements previously in macayeal
+ 		macayealflag(find(commonelements))=0; %these elements are now macayealpattynelements
+ 		macayealpattynflag(find(commonelements))=1;
+-		nodeonmacayeal=zeros(md.mesh.numberofvertices,1);
++		nodeonmacayeal(:)=0;
+ 		nodeonmacayeal(md.mesh.elements(find(macayealflag),:))=1;
+ 
+ 		%rule out elements that don't touch the 2 boundaries
+@@ -147,14 +139,13 @@
+ 		list = list + any(sum(nodeonmacayeal(md.mesh.elements(pos,:)),2),2);
+ 		list = list - any(sum(nodeonpattyn(md.mesh.elements(pos,:))  ,2),2);
+ 		pos1=find(list==1);
+-		pattynflag(pos(pos1))=0;
+ 		macayealflag(pos(pos1))=1;
+ 		macayealpattynflag(pos(pos1))=0;
+ 		pos2=find(list==-1);
+ 		pattynflag(pos(pos2))=1;
+-		macayealflag(pos(pos2))=0;
+ 		macayealpattynflag(pos(pos2))=0;
+ 
++		%Recompute nodes associated to these elements
+ 		nodeonmacayeal(:)=0;
+ 		nodeonmacayeal(md.mesh.elements(find(macayealflag),:))=1;
+ 		nodeonpattyn(:)=0;
+@@ -174,9 +165,26 @@
+ 		nodeonstokes=zeros(md.mesh.numberofvertices,1);
+ 		nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
+ 
+-		%Now recreate nodeonpattynstokes
+-		nodeonpattynstokes=zeros(md.mesh.numberofvertices,1);
++		%rule out elements that don't touch the 2 boundaries
++		pos=find(pattynstokesflag);
++		list=zeros(length(pos),1);
++		list = list + any(sum(nodeonstokes(md.mesh.elements(pos,:)),2),2);
++		list = list - any(sum(nodeonpattyn(md.mesh.elements(pos,:)),2),2);
++		pos1=find(list==1);
++		stokesflag(pos(pos1))=1;
++		pattynstokesflag(pos(pos1))=0;
++		pos2=find(list==-1);
++		pattynflag(pos(pos2))=1;
++		pattynstokesflag(pos(pos2))=0;
++
++		%Recompute nodes associated to these elements
++		nodeonstokes(:)=0;
++		nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
++		nodeonpattyn(:)=0;
++		nodeonpattyn(md.mesh.elements(find(pattynflag),:))=1;
++		nodeonpattynstokes(:)=0;
+ 		nodeonpattynstokes(md.mesh.elements(find(pattynstokesflag),:))=1;
++
+ 	elseif any(stokesflag) & any(macayealflag),
+ 		%Find node at the border
+ 		nodeonmacayealstokes(find(nodeonmacayeal & nodeonstokes))=1;
+@@ -189,9 +197,26 @@
+ 		nodeonstokes=zeros(md.mesh.numberofvertices,1);
+ 		nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
+ 
+-		%Now recreate nodeonmacayealstokes
+-		nodeonmacayealstokes=zeros(md.mesh.numberofvertices,1);
++		%rule out elements that don't touch the 2 boundaries
++		pos=find(macayealstokesflag);
++		list=zeros(length(pos),1);
++		list = list + any(sum(nodeonmacayeal(md.mesh.elements(pos,:)),2),2);
++		list = list - any(sum(nodeonstokes(md.mesh.elements(pos,:))  ,2),2);
++		pos1=find(list==1);
++		macayealflag(pos(pos1))=1;
++		macayealstokesflag(pos(pos1))=0;
++		pos2=find(list==-1);
++		stokesflag(pos(pos2))=1;
++		macayealstokesflag(pos(pos2))=0;
++
++		%Recompute nodes associated to these elements
++		nodeonmacayeal(:)=0;
++		nodeonmacayeal(md.mesh.elements(find(macayealflag),:))=1;
++		nodeonstokes(:)=0;
++		nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
++		nodeonmacayealstokes(:)=0;
+ 		nodeonmacayealstokes(md.mesh.elements(find(macayealstokesflag),:))=1;
++
+ 	elseif any(stokesflag) & any(hutterflag),
+ 		error('type of coupling not supported yet');
+ 	end
Index: /issm/oecreview/Archive/10977-11024/ISSM-11004-11005.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11004-11005.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11004-11005.diff	(revision 11025)
@@ -0,0 +1,12 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/setflowequation.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/setflowequation.m	(revision 11004)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/setflowequation.m	(revision 11005)
+@@ -74,7 +74,6 @@
+ nodeonpattyn=zeros(md.mesh.numberofvertices,1);
+ nodeonpattyn(md.mesh.elements(find(pattynflag),:))=1;
+ nodeonstokes=zeros(md.mesh.numberofvertices,1);
+-nodeonstokes(md.mesh.elements(find(stokesflag),:))=1;
+ noneflag=zeros(md.mesh.numberofelements,1);
+ 
+ %First modify stokesflag to get rid of elements contrained everywhere (spc + border with pattyn or macayeal)
Index: /issm/oecreview/Archive/10977-11024/ISSM-11005-11006.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11005-11006.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11005-11006.diff	(revision 11025)
@@ -0,0 +1,8 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/Archives/Archive444.mat
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/Archives/Archive443.mat
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
Index: /issm/oecreview/Archive/10977-11024/ISSM-11006-11007.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11006-11007.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11006-11007.diff	(revision 11025)
@@ -0,0 +1,18 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/inversion.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/inversion.m	(revision 11006)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/inversion.m	(revision 11007)
+@@ -113,11 +113,11 @@
+ 		function disp(obj) % {{{
+ 			fielddisplay(obj,'iscontrol','is inversion activated?');
+ 			fielddisplay(obj,'control_parameters','parameter where inverse control is carried out; ex: {''FrictionCoefficient''}, or {''RheologyBbar''}');
++			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');
+ 			fielddisplay(obj,'nsteps','number of optimization searches');
+ 			fielddisplay(obj,'maxiter_per_step','maximum iterations during each optimization step');
+-			fielddisplay(obj,'cost_functions','indicate the type of response for each optimization steps');
+-			fielddisplay(obj,'cost_function_threshold','misfit convergence criterion. Default is 1%, NaN if not applied');
+ 			fielddisplay(obj,'gradient_scaling','scaling factor on gradient direction during optimization, for each optimization step');
+ 			fielddisplay(obj,'step_threshold','decrease threshold for misfit, default is 30%');
+ 			fielddisplay(obj,'min_parameters','absolute minimum acceptable value of the inversed parameter on each vertex');
Index: /issm/oecreview/Archive/10977-11024/ISSM-11007-11008.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11007-11008.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11007-11008.diff	(revision 11025)
@@ -0,0 +1,18 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/inversion.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/inversion.m	(revision 11007)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/classes/inversion.m	(revision 11008)
+@@ -112,11 +112,11 @@
+ 		end % }}}
+ 		function disp(obj) % {{{
+ 			fielddisplay(obj,'iscontrol','is inversion activated?');
+-			fielddisplay(obj,'control_parameters','parameter where inverse control is carried out; ex: {''FrictionCoefficient''}, or {''RheologyBbar''}');
++			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 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');
+-			fielddisplay(obj,'nsteps','number of optimization searches');
+ 			fielddisplay(obj,'maxiter_per_step','maximum iterations during each optimization step');
+ 			fielddisplay(obj,'gradient_scaling','scaling factor on gradient direction during optimization, for each optimization step');
+ 			fielddisplay(obj,'step_threshold','decrease threshold for misfit, default is 30%');
Index: /issm/oecreview/Archive/10977-11024/ISSM-11008-11009.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11008-11009.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11008-11009.diff	(revision 11025)
@@ -0,0 +1,42 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/plot/plot_gridded.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/plot/plot_gridded.m	(revision 11008)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/plot/plot_gridded.m	(revision 11009)
+@@ -65,7 +65,7 @@
+ %last step: mesh gridded?
+ if exist(options,'edgecolor'),
+ 	A=elements(:,1); B=elements(:,2); C=elements(:,3); 
+-	patch('Faces',[A B C],'Vertices', [x y z],'FaceVertexCData',zeros(size(x)),'FaceColor','none','EdgeColor',getfieldvalue(options,'edgecolor'));
++	patch('Faces',[A B C],'Vertices', [x y z],'FaceVertexCData',data_grid(1)*ones(size(x)),'FaceColor','none','EdgeColor',getfieldvalue(options,'edgecolor'));
+ end
+ 
+ %Apply options
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/bamg.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/bamg.m	(revision 11008)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/bamg.m	(revision 11009)
+@@ -252,21 +252,17 @@
+ 	%process geom
+ 	%bamg_geometry=processgeometry(bamg_geometry,getfieldvalue(options,'tol',NaN),domain(1));
+ 
+-elseif isstruct(md.private.bamg),
+-
+-	bamg_geometry=bamggeom(md.private.bamg.geometry); %TEST
+-
++elseif isstruct(md.private.bamg) & isfield('mesh',md.private.bamg),
++	bamg_geometry=bamggeom(md.private.bamg.geometry); 
+ else
+-
+ 	%do nothing...
+-
+ end
+ %}}}
+ 
+ % Bamg Mesh parameters {{{1
+ if (~exist(options,'domain') & md.mesh.numberofvertices~=0 & md.mesh.dimension==2),
+ 
+-	if isstruct(md.private.bamg),
++	if isstruct(md.private.bamg) & isfield('mesh',md.private.bamg),
+ 		bamg_mesh=bamgmesh(md.private.bamg.mesh);
+ 	else
+ 		bamg_mesh.Vertices=[md.mesh.x md.mesh.y ones(md.mesh.numberofvertices,1)];
Index: /issm/oecreview/Archive/10977-11024/ISSM-11009-11010.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11009-11010.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11009-11010.diff	(revision 11025)
@@ -0,0 +1,694 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/bamg.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/bamg.m	(revision 11009)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/bamg.m	(revision 11010)
+@@ -1,342 +0,0 @@
+-function md=bamg(md,varargin)
+-%BAMG - mesh generation
+-%
+-%   Available options (for more details see ISSM website http://issm.jpl.nasa.gov/):
+-%
+-%   - domain: followed by an ARGUS file that prescribes the domain outline
+-%   - hmin  : minimum edge length (default is 10^-100)
+-%   - hmax  : maximum esge length (default is 10^100)
+-%   - hVertices   : imposed edge length for each vertex (geometry or mesh)
+-%   - hminVertices: minimum edge length for each vertex (mesh)
+-%   - hmaxVertices: maximum edge length for each vertex (mesh)
+-%
+-%   - anisomax    : maximum ration between the smallest and largest edges (default is 10^30)
+-%   - coeff       : coefficient applied to the metric (2-> twice as many elements, default is 1)
+-%   - cutoff      : scalar used to compute the metric when metric type 2 or 3 are applied
+-%   - err         : error used to generate the metric from a field
+-%   - errg        : geometrical error (default is 0.1)
+-%   - field       : field of the model that will be used to compute the metric
+-%                   to apply several fields, use one column per field
+-%   - gradation   : maximum ration between two adjacent edges
+-%   - Hessiantype : 0 -> use double P2 projection (default)
+-%                   1 -> use Green formula
+-%   - KeepVertices: try to keep initial vertices when adaptation is done on an existing mesh (default 1)
+-%   - MaxCornerAngle: maximal angle of corners in degree (default is 10)
+-%   - maxnbv      : maximum number of vertices used to allocate memory (default is 10^6)
+-%   - maxsubdiv   : maximum subdivision of exisiting elements (default is 10)
+-%   - metric      : matrix (numberofnodes x 3) used as a metric
+-%   - Metrictype  : 1 -> absolute error          c/(err coeff^2) * Abs(H)        (default)
+-%                   2 -> relative error          c/(err coeff^2) * Abs(H)/max(s,cutoff*max(s))
+-%                   3 -> rescaled absolute error c/(err coeff^2) * Abs(H)/(smax-smin)
+-%   - nbjacoby    : correction used by Hessiantype=1 (default is 1)
+-%   - nbsmooth    : number of metric smoothing procedure (default is 3)
+-%   - omega       : relaxation parameter of the smoothing procedure (default is 1.8)
+-%   - power       : power applied to the metric (default is 1)
+-%   - splitcorners : split triangles whuch have 3 vertices on the outline (default is 1)
+-%   - geometricalmetric : Take the geometry into account to generate the metric (default is 0)
+-%   - verbose     : level of verbosity (default is 1)
+-%
+-%   - rifts : followed by an ARGUS file that prescribes the rifts
+-%   - toltip: tolerance to move tip on an existing point of the domain outline
+-%   - tracks: followed by an ARGUS file that prescribes the tracks that the mesh will stick to
+-%   - RequiredVertices: mesh vertices that are required. [x,y,ref]; ref is optional
+-%   - tol:    if the distance between 2 points of the domain outline is less than tol, they
+-%             will be merged
+-%
+-%   Examples:
+-%      md=bamg(md,'domain','DomainOutline.exp','hmax',3000);
+-%      md=bamg(md,'field',[md.inversion.vel_obs md.geometry.thickness],'hmax',20000,'hmin',1000);
+-%      md=bamg(md,'metric',A,'hmin',1000,'hmax',20000,'gradation',3,'anisomax',1);
+-
+-%process options
+-options=pairoptions(varargin{:});
+-options=deleteduplicates(options,1);
+-
+-%initialize the structures required as input of Bamg
+-bamg_options=struct();
+-bamg_geometry=bamggeom;
+-bamg_mesh=bamgmesh;
+-
+-% Bamg Geometry parameters {{{1
+-if exist(options,'domain'),
+-
+-	%Check that file exists
+-	domainfile=getfieldvalue(options,'domain');
+-	if ~exist(domainfile,'file') error(['bamg error message: file ' domainfile ' not found ']); end
+-
+-	%Build geometry 
+-	domain=expread(domainfile);
+-	count=0;
+-	for i=1:length(domain),
+-
+-		%Check that the domain is closed
+-		if (domain(i).x(1)~=domain(i).x(end) | domain(i).y(1)~=domain(i).y(end)),
+-			error('bamg error message: all contours provided in ''domain'' should be closed');
+-		end
+-
+-		%Checks that all holes are INSIDE the principle domain outline
+-		if i>1,
+-			flags=ContourToNodes(domain(i).x,domain(i).y,domain(1),0);
+-			if any(~flags),
+-				error('bamg error message: All holes should be stricly inside the principal domain');
+-			end
+-		end
+-
+-		%Add all points to bamg_geometry
+-		nods=domain(i).nods-1; %the domain are closed 1=end;
+-		bamg_geometry.Vertices=[bamg_geometry.Vertices; [domain(i).x(1:nods) domain(i).y(1:nods) ones(nods,1)]];
+-		bamg_geometry.Edges   =[bamg_geometry.Edges;    [transpose(count+1:count+nods) transpose([count+2:count+nods count+1])  1*ones(nods,1)]];
+-		if i>1, bamg_geometry.SubDomains=[bamg_geometry.SubDomains; 2 count+1 1 1]; end
+-
+-		%update counter
+-		count=count+nods;
+-	end
+-
+-	%take care of rifts
+-	if exist(options,'rifts'),
+-
+-		%Check that file exists
+-		riftfile=getfieldvalue(options,'rifts');
+-		if ~exist(riftfile,'file')
+-			error(['bamg error message: file ' riftfile ' not found ']);
+-		end
+-		rift=expread(riftfile);
+-
+-		for i=1:length(rift),
+-
+-			%detect wether all points of the rift are inside the domain
+-			flags=ContourToNodes(rift(i).x,rift(i).y,domain(1),0);
+-			if ~flags,
+-				error('one Rift has all his points outside of the domain outline'),
+-
+-			elseif any(~flags),
+-				%We LOTS of work to do
+-				disp('Rift tip outside of or on the domain has been detected and is being processed...');
+-
+-				%check that only one point is outsie (for now)
+-				if sum(~flags)~=1,
+-					error('bamg error message: only one point outside of the domain is supported yet');
+-				end
+-
+-				%Move tip outside to the first position
+-				if flags(1)==0,
+-					%OK, first point is outside (do nothing),
+-				elseif (flags(end)==0),
+-					rift(i).x=flipud(rift(i).x);
+-					rift(i).y=flipud(rift(i).y);
+-				else
+-					error('bamg error message: only a rift tip can be outside of the domain');
+-				end
+-
+-				%Get cordinate of intersection point
+-				x1=rift(i).x(1); y1=rift(i).y(1);
+-				x2=rift(i).x(2); y2=rift(i).y(2);
+-				for j=1:length(domain(1).x)-1;
+-					if SegIntersect([x1 y1; x2 y2],[domain(1).x(j) domain(1).y(j); domain(1).x(j+1) domain(1).y(j+1)]),
+-
+-						%Get position of the two nodes of the edge in domain
+-						i1=j;
+-						i2=mod(j+1,domain(1).nods);
+-
+-						%rift is crossing edge [i1 i2] of the domain
+-						%Get coordinate of intersection point (http://mathworld.wolfram.com/Line-LineIntersection.html)
+-						x3=domain(1).x(i1); y3=domain(1).y(i1);
+-						x4=domain(1).x(i2); y4=domain(1).y(i2);
+-						x=det([det([x1 y1; x2 y2])  x1-x2;det([x3 y3; x4 y4])  x3-x4])/det([x1-x2 y1-y2;x3-x4 y3-y4]);
+-						y=det([det([x1 y1; x2 y2])  y1-y2;det([x3 y3; x4 y4])  y3-y4])/det([x1-x2 y1-y2;x3-x4 y3-y4]);
+-
+-						segdis= sqrt((x4-x3)^2+(y4-y3)^2);
+-						tipdis=[sqrt((x-x3)^2+(y-y3)^2)  sqrt((x-x4)^2+(y-y4)^2)];
+-
+-						if (min(tipdis)/segdis) < getfieldvalue(options,'toltip',0),
+-							disp('moving tip-domain intersection point');
+-
+-							%Get position of the closest point
+-							if tipdis(1)>tipdis(2),
+-								pos=i2;
+-							else
+-								pos=i1;
+-							end
+-
+-							%This point is only in Vertices (number pos).
+-							%OK, no we can add our own rift
+-							nods=rift(i).nods-1;
+-							bamg_geometry.Vertices=[bamg_geometry.Vertices; [rift(i).x(2:end) rift(i).y(2:end) ones(nods,1)]];
+-							bamg_geometry.Edges=[bamg_geometry.Edges;...
+-								pos count+1  (1+i);...
+-								[transpose(count+1:count+nods-1) transpose([count+2:count+nods])  (1+i)*ones(nods-1,1)]];
+-							count=count+nods;
+-
+-							break;
+-
+-						else
+-							%Add intersection point to Vertices
+-							bamg_geometry.Vertices=[bamg_geometry.Vertices; x y 1];
+-							count=count+1;
+-
+-							%Decompose the crossing edge in 2 subedges
+-							pos=find(bamg_geometry.Edges(:,1)==i1 & bamg_geometry.Edges(:,2)==i2);
+-							if isempty(pos) error('bamg error message: a problem occured...'); end
+-							bamg_geometry.Edges=[bamg_geometry.Edges(1:pos-1,:);...
+-								bamg_geometry.Edges(pos,1) count                           bamg_geometry.Edges(pos,3);...
+-								count                      bamg_geometry.Edges(pos,2)   bamg_geometry.Edges(pos,3);...
+-								bamg_geometry.Edges(pos+1:end,:)];
+-
+-							%OK, no we can add our own rift
+-							nods=rift(i).nods-1;
+-							bamg_geometry.Vertices=[bamg_geometry.Vertices; [rift(i).x(2:end) rift(i).y(2:end) ones(nods,1)]];
+-							bamg_geometry.Edges=[bamg_geometry.Edges;...
+-								count  count+1  2 ;...
+-								[transpose(count+1:count+nods-1) transpose([count+2:count+nods])  (1+i)*ones(nods-1,1)]];
+-							count=count+nods;
+-
+-							break;
+-						end
+-					end
+-				end
+-			else
+-				nods=rift(i).nods-1;
+-				bamg_geometry.Vertices=[bamg_geometry.Vertices; [rift(i).x(:) rift(i).y(:) ones(nods+1,1)]];
+-				bamg_geometry.Edges=[bamg_geometry.Edges; [transpose(count+1:count+nods) transpose([count+2:count+nods+1])  (1+i)*ones(nods,1)]];
+-				count=count+nods+1;
+-			end
+-		end
+-	end
+-
+-	%Deal with tracks
+-	if exist(options,'tracks'),
+-
+-		%read tracks
+-		track=getfieldvalue(options,'tracks');
+-		if all(ischar(track)),
+-			A=expread(track); 
+-			track=[A.x A.y];
+-		else
+-			track=double(track); %for some reason, it is of class "single"
+-		end
+-		if(size(track,2)==2), track=[track 3*ones(size(track,1),1)]; end
+-
+-		%only keep those inside
+-		flags=ContourToNodes(track(:,1),track(:,2),domainfile,0);
+-		track=track(find(flags),:);
+-
+-		%Add all points to bamg_geometry
+-		nods=size(track,1);
+-		bamg_geometry.Vertices=[bamg_geometry.Vertices; track];
+-		bamg_geometry.Edges=[bamg_geometry.Edges; [transpose(count+1:count+nods-1) transpose([count+2:count+nods])  3*ones(nods-1,1)]];
+-
+-		%update counter
+-		count=count+nods;
+-	end
+-
+-	%Deal with vertices that need to be kept by mesher
+-	if exist(options,'RequiredVertices'),
+-
+-		%recover RequiredVertices
+-		requiredvertices=double(getfieldvalue(options,'RequiredVertices')); %for some reason, it is of class "single"
+-		if(size(requiredvertices,2)==2), requiredvertices=[requiredvertices 4*ones(size(requiredvertices,1),1)]; end
+-	
+-		%only keep those inside
+-		flags=ContourToNodes(requiredvertices(:,1),requiredvertices(:,2),domain(1),0);
+-		requiredvertices=requiredvertices(find(flags),:);
+-
+-		%Add all points to bamg_geometry
+-		nods=size(requiredvertices,1);
+-		bamg_geometry.Vertices=[bamg_geometry.Vertices; requiredvertices];
+-
+-		%update counter
+-		count=count+nods;
+-
+-	end
+-
+-	%process geom
+-	%bamg_geometry=processgeometry(bamg_geometry,getfieldvalue(options,'tol',NaN),domain(1));
+-
+-elseif isstruct(md.private.bamg) & isfield('mesh',md.private.bamg),
+-	bamg_geometry=bamggeom(md.private.bamg.geometry); 
+-else
+-	%do nothing...
+-end
+-%}}}
+-
+-% Bamg Mesh parameters {{{1
+-if (~exist(options,'domain') & md.mesh.numberofvertices~=0 & md.mesh.dimension==2),
+-
+-	if isstruct(md.private.bamg) & isfield('mesh',md.private.bamg),
+-		bamg_mesh=bamgmesh(md.private.bamg.mesh);
+-	else
+-		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
+-
+-	if isstruct(md.rifts.riftstruct)
+-		error('bamg error message: rifts not supported yet. Do meshprocessrift AFTER bamg');
+-	end
+-end
+-%}}}
+-
+-% Bamg Options {{{1
+-bamg_options.Crack=getfieldvalue(options,'Crack',0);
+-bamg_options.anisomax=getfieldvalue(options,'anisomax',10^30);
+-bamg_options.coeff=getfieldvalue(options,'coeff',1);
+-bamg_options.cutoff=getfieldvalue(options,'cutoff',10^-5);
+-bamg_options.err=getfieldvalue(options,'err',0.01);
+-bamg_options.errg=getfieldvalue(options,'errg',0.1);
+-bamg_options.field=getfieldvalue(options,'field',[]);
+-bamg_options.gradation=getfieldvalue(options,'gradation',1.5);
+-bamg_options.Hessiantype=getfieldvalue(options,'Hessiantype',0);
+-bamg_options.hmin=getfieldvalue(options,'hmin',10^-100);
+-bamg_options.hmax=getfieldvalue(options,'hmax',10^100);
+-bamg_options.hminVertices=getfieldvalue(options,'hminVertices',[]);
+-bamg_options.hmaxVertices=getfieldvalue(options,'hmaxVertices',[]);
+-bamg_options.hVertices=getfieldvalue(options,'hVertices',[]);
+-bamg_options.KeepVertices=getfieldvalue(options,'KeepVertices',1);
+-bamg_options.MaxCornerAngle=getfieldvalue(options,'MaxCornerAngle',10);
+-bamg_options.maxnbv=getfieldvalue(options,'maxnbv',10^6);
+-bamg_options.maxsubdiv=getfieldvalue(options,'maxsubdiv',10);
+-bamg_options.metric=getfieldvalue(options,'metric',[]);
+-bamg_options.Metrictype=getfieldvalue(options,'Metrictype',0);
+-bamg_options.nbjacobi=getfieldvalue(options,'nbjacobi',1);
+-bamg_options.nbsmooth=getfieldvalue(options,'nbsmooth',3);
+-bamg_options.omega=getfieldvalue(options,'omega',1.8);
+-bamg_options.power=getfieldvalue(options,'power',1);
+-bamg_options.splitcorners=getfieldvalue(options,'splitcorners',1);
+-bamg_options.geometricalmetric=getfieldvalue(options,'geometricalmetric',0);
+-bamg_options.verbose=getfieldvalue(options,'verbose',1);
+-%}}}
+-
+-%call Bamg
+-[bamgmesh_out bamggeom_out]=BamgMesher(bamg_mesh,bamg_geometry,bamg_options);
+-
+-% plug results onto model
+-md.private.bamg=struct();
+-md.private.bamg.mesh=bamgmesh(bamgmesh_out);
+-md.private.bamg.geometry=bamggeom(bamggeom_out);
+-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;
+-md.mesh.segments=bamgmesh_out.IssmSegments(:,1:3);
+-md.mesh.segmentmarkers=bamgmesh_out.IssmSegments(:,4);
+-
+-%Fill in rest of fields:
+-md.mesh.dimension=2;
+-md.mesh.numberofelements=size(md.mesh.elements,1);
+-md.mesh.numberofvertices=length(md.mesh.x);
+-md.mesh.numberofedges=size(md.mesh.edges,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);
+-md.mesh.vertexonsurface=ones(md.mesh.numberofvertices,1);
+-md.mesh.elementonbed=ones(md.mesh.numberofelements,1);
+-md.mesh.elementonsurface=ones(md.mesh.numberofelements,1);
+-md.mesh.vertexonboundary=zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
+-md.mesh.elementconnectivity=md.private.bamg.mesh.ElementConnectivity;
+-md.mesh.elementconnectivity(find(isnan(md.mesh.elementconnectivity)))=0;
+-
+-%Check for orphan
+-reshape(md.mesh.elements,3*md.mesh.numberofelements,1);
+-(~ismember(1:md.mesh.numberofvertices,sort(unique(reshape(md.mesh.elements,3*md.mesh.numberofelements,1)))));
+-if any(~ismember(1:md.mesh.numberofvertices,sort(unique(reshape(md.mesh.elements,3*md.mesh.numberofelements,1)))))
+-	error('Output mesh has orphans. Decrease MaxCornerAngle to prevent outside points (ex: 0.01)');
+-end
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/bamg.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/bamg.m	(revision 0)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/bamg.m	(revision 11010)
+@@ -0,0 +1,342 @@
++function md=bamg(md,varargin)
++%BAMG - mesh generation
++%
++%   Available options (for more details see ISSM website http://issm.jpl.nasa.gov/):
++%
++%   - domain: followed by an ARGUS file that prescribes the domain outline
++%   - hmin  : minimum edge length (default is 10^-100)
++%   - hmax  : maximum esge length (default is 10^100)
++%   - hVertices   : imposed edge length for each vertex (geometry or mesh)
++%   - hminVertices: minimum edge length for each vertex (mesh)
++%   - hmaxVertices: maximum edge length for each vertex (mesh)
++%
++%   - anisomax    : maximum ration between the smallest and largest edges (default is 10^30)
++%   - coeff       : coefficient applied to the metric (2-> twice as many elements, default is 1)
++%   - cutoff      : scalar used to compute the metric when metric type 2 or 3 are applied
++%   - err         : error used to generate the metric from a field
++%   - errg        : geometrical error (default is 0.1)
++%   - field       : field of the model that will be used to compute the metric
++%                   to apply several fields, use one column per field
++%   - gradation   : maximum ration between two adjacent edges
++%   - Hessiantype : 0 -> use double P2 projection (default)
++%                   1 -> use Green formula
++%   - KeepVertices: try to keep initial vertices when adaptation is done on an existing mesh (default 1)
++%   - MaxCornerAngle: maximal angle of corners in degree (default is 10)
++%   - maxnbv      : maximum number of vertices used to allocate memory (default is 10^6)
++%   - maxsubdiv   : maximum subdivision of exisiting elements (default is 10)
++%   - metric      : matrix (numberofnodes x 3) used as a metric
++%   - Metrictype  : 1 -> absolute error          c/(err coeff^2) * Abs(H)        (default)
++%                   2 -> relative error          c/(err coeff^2) * Abs(H)/max(s,cutoff*max(s))
++%                   3 -> rescaled absolute error c/(err coeff^2) * Abs(H)/(smax-smin)
++%   - nbjacoby    : correction used by Hessiantype=1 (default is 1)
++%   - nbsmooth    : number of metric smoothing procedure (default is 3)
++%   - omega       : relaxation parameter of the smoothing procedure (default is 1.8)
++%   - power       : power applied to the metric (default is 1)
++%   - splitcorners : split triangles whuch have 3 vertices on the outline (default is 1)
++%   - geometricalmetric : Take the geometry into account to generate the metric (default is 0)
++%   - verbose     : level of verbosity (default is 1)
++%
++%   - rifts : followed by an ARGUS file that prescribes the rifts
++%   - toltip: tolerance to move tip on an existing point of the domain outline
++%   - tracks: followed by an ARGUS file that prescribes the tracks that the mesh will stick to
++%   - RequiredVertices: mesh vertices that are required. [x,y,ref]; ref is optional
++%   - tol:    if the distance between 2 points of the domain outline is less than tol, they
++%             will be merged
++%
++%   Examples:
++%      md=bamg(md,'domain','DomainOutline.exp','hmax',3000);
++%      md=bamg(md,'field',[md.inversion.vel_obs md.geometry.thickness],'hmax',20000,'hmin',1000);
++%      md=bamg(md,'metric',A,'hmin',1000,'hmax',20000,'gradation',3,'anisomax',1);
++
++%process options
++options=pairoptions(varargin{:});
++options=deleteduplicates(options,1);
++
++%initialize the structures required as input of Bamg
++bamg_options=struct();
++bamg_geometry=bamggeom;
++bamg_mesh=bamgmesh;
++
++% Bamg Geometry parameters {{{1
++if exist(options,'domain'),
++
++	%Check that file exists
++	domainfile=getfieldvalue(options,'domain');
++	if ~exist(domainfile,'file') error(['bamg error message: file ' domainfile ' not found ']); end
++
++	%Build geometry 
++	domain=expread(domainfile);
++	count=0;
++	for i=1:length(domain),
++
++		%Check that the domain is closed
++		if (domain(i).x(1)~=domain(i).x(end) | domain(i).y(1)~=domain(i).y(end)),
++			error('bamg error message: all contours provided in ''domain'' should be closed');
++		end
++
++		%Checks that all holes are INSIDE the principle domain outline
++		if i>1,
++			flags=ContourToNodes(domain(i).x,domain(i).y,domain(1),0);
++			if any(~flags),
++				error('bamg error message: All holes should be stricly inside the principal domain');
++			end
++		end
++
++		%Add all points to bamg_geometry
++		nods=domain(i).nods-1; %the domain are closed 1=end;
++		bamg_geometry.Vertices=[bamg_geometry.Vertices; [domain(i).x(1:nods) domain(i).y(1:nods) ones(nods,1)]];
++		bamg_geometry.Edges   =[bamg_geometry.Edges;    [transpose(count+1:count+nods) transpose([count+2:count+nods count+1])  1*ones(nods,1)]];
++		if i>1, bamg_geometry.SubDomains=[bamg_geometry.SubDomains; 2 count+1 1 1]; end
++
++		%update counter
++		count=count+nods;
++	end
++
++	%take care of rifts
++	if exist(options,'rifts'),
++
++		%Check that file exists
++		riftfile=getfieldvalue(options,'rifts');
++		if ~exist(riftfile,'file')
++			error(['bamg error message: file ' riftfile ' not found ']);
++		end
++		rift=expread(riftfile);
++
++		for i=1:length(rift),
++
++			%detect wether all points of the rift are inside the domain
++			flags=ContourToNodes(rift(i).x,rift(i).y,domain(1),0);
++			if ~flags,
++				error('one Rift has all his points outside of the domain outline'),
++
++			elseif any(~flags),
++				%We LOTS of work to do
++				disp('Rift tip outside of or on the domain has been detected and is being processed...');
++
++				%check that only one point is outsie (for now)
++				if sum(~flags)~=1,
++					error('bamg error message: only one point outside of the domain is supported yet');
++				end
++
++				%Move tip outside to the first position
++				if flags(1)==0,
++					%OK, first point is outside (do nothing),
++				elseif (flags(end)==0),
++					rift(i).x=flipud(rift(i).x);
++					rift(i).y=flipud(rift(i).y);
++				else
++					error('bamg error message: only a rift tip can be outside of the domain');
++				end
++
++				%Get cordinate of intersection point
++				x1=rift(i).x(1); y1=rift(i).y(1);
++				x2=rift(i).x(2); y2=rift(i).y(2);
++				for j=1:length(domain(1).x)-1;
++					if SegIntersect([x1 y1; x2 y2],[domain(1).x(j) domain(1).y(j); domain(1).x(j+1) domain(1).y(j+1)]),
++
++						%Get position of the two nodes of the edge in domain
++						i1=j;
++						i2=mod(j+1,domain(1).nods);
++
++						%rift is crossing edge [i1 i2] of the domain
++						%Get coordinate of intersection point (http://mathworld.wolfram.com/Line-LineIntersection.html)
++						x3=domain(1).x(i1); y3=domain(1).y(i1);
++						x4=domain(1).x(i2); y4=domain(1).y(i2);
++						x=det([det([x1 y1; x2 y2])  x1-x2;det([x3 y3; x4 y4])  x3-x4])/det([x1-x2 y1-y2;x3-x4 y3-y4]);
++						y=det([det([x1 y1; x2 y2])  y1-y2;det([x3 y3; x4 y4])  y3-y4])/det([x1-x2 y1-y2;x3-x4 y3-y4]);
++
++						segdis= sqrt((x4-x3)^2+(y4-y3)^2);
++						tipdis=[sqrt((x-x3)^2+(y-y3)^2)  sqrt((x-x4)^2+(y-y4)^2)];
++
++						if (min(tipdis)/segdis) < getfieldvalue(options,'toltip',0),
++							disp('moving tip-domain intersection point');
++
++							%Get position of the closest point
++							if tipdis(1)>tipdis(2),
++								pos=i2;
++							else
++								pos=i1;
++							end
++
++							%This point is only in Vertices (number pos).
++							%OK, no we can add our own rift
++							nods=rift(i).nods-1;
++							bamg_geometry.Vertices=[bamg_geometry.Vertices; [rift(i).x(2:end) rift(i).y(2:end) ones(nods,1)]];
++							bamg_geometry.Edges=[bamg_geometry.Edges;...
++								pos count+1  (1+i);...
++								[transpose(count+1:count+nods-1) transpose([count+2:count+nods])  (1+i)*ones(nods-1,1)]];
++							count=count+nods;
++
++							break;
++
++						else
++							%Add intersection point to Vertices
++							bamg_geometry.Vertices=[bamg_geometry.Vertices; x y 1];
++							count=count+1;
++
++							%Decompose the crossing edge in 2 subedges
++							pos=find(bamg_geometry.Edges(:,1)==i1 & bamg_geometry.Edges(:,2)==i2);
++							if isempty(pos) error('bamg error message: a problem occured...'); end
++							bamg_geometry.Edges=[bamg_geometry.Edges(1:pos-1,:);...
++								bamg_geometry.Edges(pos,1) count                           bamg_geometry.Edges(pos,3);...
++								count                      bamg_geometry.Edges(pos,2)   bamg_geometry.Edges(pos,3);...
++								bamg_geometry.Edges(pos+1:end,:)];
++
++							%OK, no we can add our own rift
++							nods=rift(i).nods-1;
++							bamg_geometry.Vertices=[bamg_geometry.Vertices; [rift(i).x(2:end) rift(i).y(2:end) ones(nods,1)]];
++							bamg_geometry.Edges=[bamg_geometry.Edges;...
++								count  count+1  2 ;...
++								[transpose(count+1:count+nods-1) transpose([count+2:count+nods])  (1+i)*ones(nods-1,1)]];
++							count=count+nods;
++
++							break;
++						end
++					end
++				end
++			else
++				nods=rift(i).nods-1;
++				bamg_geometry.Vertices=[bamg_geometry.Vertices; [rift(i).x(:) rift(i).y(:) ones(nods+1,1)]];
++				bamg_geometry.Edges=[bamg_geometry.Edges; [transpose(count+1:count+nods) transpose([count+2:count+nods+1])  (1+i)*ones(nods,1)]];
++				count=count+nods+1;
++			end
++		end
++	end
++
++	%Deal with tracks
++	if exist(options,'tracks'),
++
++		%read tracks
++		track=getfieldvalue(options,'tracks');
++		if all(ischar(track)),
++			A=expread(track); 
++			track=[A.x A.y];
++		else
++			track=double(track); %for some reason, it is of class "single"
++		end
++		if(size(track,2)==2), track=[track 3*ones(size(track,1),1)]; end
++
++		%only keep those inside
++		flags=ContourToNodes(track(:,1),track(:,2),domainfile,0);
++		track=track(find(flags),:);
++
++		%Add all points to bamg_geometry
++		nods=size(track,1);
++		bamg_geometry.Vertices=[bamg_geometry.Vertices; track];
++		bamg_geometry.Edges=[bamg_geometry.Edges; [transpose(count+1:count+nods-1) transpose([count+2:count+nods])  3*ones(nods-1,1)]];
++
++		%update counter
++		count=count+nods;
++	end
++
++	%Deal with vertices that need to be kept by mesher
++	if exist(options,'RequiredVertices'),
++
++		%recover RequiredVertices
++		requiredvertices=double(getfieldvalue(options,'RequiredVertices')); %for some reason, it is of class "single"
++		if(size(requiredvertices,2)==2), requiredvertices=[requiredvertices 4*ones(size(requiredvertices,1),1)]; end
++	
++		%only keep those inside
++		flags=ContourToNodes(requiredvertices(:,1),requiredvertices(:,2),domain(1),0);
++		requiredvertices=requiredvertices(find(flags),:);
++
++		%Add all points to bamg_geometry
++		nods=size(requiredvertices,1);
++		bamg_geometry.Vertices=[bamg_geometry.Vertices; requiredvertices];
++
++		%update counter
++		count=count+nods;
++
++	end
++
++	%process geom
++	%bamg_geometry=processgeometry(bamg_geometry,getfieldvalue(options,'tol',NaN),domain(1));
++
++elseif isstruct(md.private.bamg) & isfield('mesh',md.private.bamg),
++	bamg_geometry=bamggeom(md.private.bamg.geometry); 
++else
++	%do nothing...
++end
++%}}}
++
++% Bamg Mesh parameters {{{1
++if (~exist(options,'domain') & md.mesh.numberofvertices~=0 & md.mesh.dimension==2),
++
++	if isstruct(md.private.bamg) & isfield('mesh',md.private.bamg),
++		bamg_mesh=bamgmesh(md.private.bamg.mesh);
++	else
++		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
++
++	if isstruct(md.rifts.riftstruct)
++		error('bamg error message: rifts not supported yet. Do meshprocessrift AFTER bamg');
++	end
++end
++%}}}
++
++% Bamg Options {{{1
++bamg_options.Crack=getfieldvalue(options,'Crack',0);
++bamg_options.anisomax=getfieldvalue(options,'anisomax',10^30);
++bamg_options.coeff=getfieldvalue(options,'coeff',1);
++bamg_options.cutoff=getfieldvalue(options,'cutoff',10^-5);
++bamg_options.err=getfieldvalue(options,'err',0.01);
++bamg_options.errg=getfieldvalue(options,'errg',0.1);
++bamg_options.field=getfieldvalue(options,'field',[]);
++bamg_options.gradation=getfieldvalue(options,'gradation',1.5);
++bamg_options.Hessiantype=getfieldvalue(options,'Hessiantype',0);
++bamg_options.hmin=getfieldvalue(options,'hmin',10^-100);
++bamg_options.hmax=getfieldvalue(options,'hmax',10^100);
++bamg_options.hminVertices=getfieldvalue(options,'hminVertices',[]);
++bamg_options.hmaxVertices=getfieldvalue(options,'hmaxVertices',[]);
++bamg_options.hVertices=getfieldvalue(options,'hVertices',[]);
++bamg_options.KeepVertices=getfieldvalue(options,'KeepVertices',1);
++bamg_options.MaxCornerAngle=getfieldvalue(options,'MaxCornerAngle',10);
++bamg_options.maxnbv=getfieldvalue(options,'maxnbv',10^6);
++bamg_options.maxsubdiv=getfieldvalue(options,'maxsubdiv',10);
++bamg_options.metric=getfieldvalue(options,'metric',[]);
++bamg_options.Metrictype=getfieldvalue(options,'Metrictype',0);
++bamg_options.nbjacobi=getfieldvalue(options,'nbjacobi',1);
++bamg_options.nbsmooth=getfieldvalue(options,'nbsmooth',3);
++bamg_options.omega=getfieldvalue(options,'omega',1.8);
++bamg_options.power=getfieldvalue(options,'power',1);
++bamg_options.splitcorners=getfieldvalue(options,'splitcorners',1);
++bamg_options.geometricalmetric=getfieldvalue(options,'geometricalmetric',0);
++bamg_options.verbose=getfieldvalue(options,'verbose',1);
++%}}}
++
++%call Bamg
++[bamgmesh_out bamggeom_out]=BamgMesher(bamg_mesh,bamg_geometry,bamg_options);
++
++% plug results onto model
++md.private.bamg=struct();
++md.private.bamg.mesh=bamgmesh(bamgmesh_out);
++md.private.bamg.geometry=bamggeom(bamggeom_out);
++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;
++md.mesh.segments=bamgmesh_out.IssmSegments(:,1:3);
++md.mesh.segmentmarkers=bamgmesh_out.IssmSegments(:,4);
++
++%Fill in rest of fields:
++md.mesh.dimension=2;
++md.mesh.numberofelements=size(md.mesh.elements,1);
++md.mesh.numberofvertices=length(md.mesh.x);
++md.mesh.numberofedges=size(md.mesh.edges,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);
++md.mesh.vertexonsurface=ones(md.mesh.numberofvertices,1);
++md.mesh.elementonbed=ones(md.mesh.numberofelements,1);
++md.mesh.elementonsurface=ones(md.mesh.numberofelements,1);
++md.mesh.vertexonboundary=zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
++md.mesh.elementconnectivity=md.private.bamg.mesh.ElementConnectivity;
++md.mesh.elementconnectivity(find(isnan(md.mesh.elementconnectivity)))=0;
++
++%Check for orphan
++reshape(md.mesh.elements,3*md.mesh.numberofelements,1);
++(~ismember(1:md.mesh.numberofvertices,sort(unique(reshape(md.mesh.elements,3*md.mesh.numberofelements,1)))));
++if any(~ismember(1:md.mesh.numberofvertices,sort(unique(reshape(md.mesh.elements,3*md.mesh.numberofelements,1)))))
++	error('Output mesh has orphans. Decrease MaxCornerAngle to prevent outside points (ex: 0.01)');
++end
Index: /issm/oecreview/Archive/10977-11024/ISSM-11010-11011.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11010-11011.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11010-11011.diff	(revision 11025)
@@ -0,0 +1,214 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/setmesh.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/setmesh.m	(revision 11010)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/setmesh.m	(revision 11011)
+@@ -1,85 +0,0 @@
+-function md=setmesh(md,domainname,varargin)
+-%MESH - create model mesh
+-%
+-%   This routine creates a model mesh using TriMesh and a domain outline, to within a certain resolution
+-%   where md is a @model object, domainname is the name of an Argus domain outline file, 
+-%   and resolution is a characteristic length for the mesh (same unit as the domain outline
+-%   unit). Riftname is an optional argument (Argus domain outline) describing rifts.
+-%
+-%   Usage:
+-%      md=setmesh(md,domainname,resolution)
+-%   or md=setmesh(md,domainname,riftname, resolution)
+-%
+-%   Examples:
+-%      md=setmesh(md,'DomainOutline.exp',1000);
+-%      md=setmesh(md,'DomainOutline.exp','Rifts.exp',1500);
+-
+-%Figure out a characteristic area. Resolution is a node oriented concept (ex a 1000m  resolution node would 
+-%be made of 1000*1000 area squares). 
+-if (nargin==3),
+-	resolution=varargin{1};
+-	riftname='';
+-end
+-if (nargin==4),
+-	riftname=varargin{1};
+-	resolution=varargin{2};
+-end
+-
+-%Check that mesh was not already run, and warn user: 
+-if md.mesh.numberofelements~=0,
+-	choice=input('This model already has a mesh. Are you sure you want to go ahead? (y/n)','s');
+-	if ~strcmp(choice,'y')
+-		disp('no meshing done ... exiting');
+-		return
+-	end
+-end
+-
+-area=resolution^2;
+-
+-%Mesh using TriMesh
+-if strcmp(riftname,''),
+-	[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');
+-
+-	%check that all the created nodes belong to at least one element
+-	orphan=find(~ismember([1:length(x)],sort(unique(elements(:)))));
+-	for i=1:length(orphan),
+-		%get rid of the orphan node i
+-		%update x and y
+-		x=[x(1:orphan(i)-(i-1)-1); x(orphan(i)-(i-1)+1:end)];
+-		y=[y(1:orphan(i)-(i-1)-1); y(orphan(i)-(i-1)+1:end)];
+-		%update elements
+-		pos=find(elements>orphan(i)-(i-1));
+-		elements(pos)=elements(pos)-1;
+-		%update segments
+-		pos1=find(segments(:,1)>orphan(i)-(i-1));
+-		pos2=find(segments(:,2)>orphan(i)-(i-1));
+-		segments(pos1,1)=segments(pos1,1)-1;
+-		segments(pos2,2)=segments(pos2,2)-1;
+-	end
+-
+-	%plug into md
+-	md.mesh.x=x;
+-	md.mesh.y=y;
+-	md.mesh.elements=elements;
+-	md.mesh.segments=segments;
+-	md.mesh.segmentmarkers=segmentmarkers;
+-end
+-
+-%Fill in rest of fields:
+-md.mesh.numberofelements=length(md.mesh.elements);
+-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);
+-md.mesh.vertexonsurface=ones(md.mesh.numberofvertices,1);
+-md.mesh.elementonbed=ones(md.mesh.numberofelements,1);
+-md.mesh.elementonsurface=ones(md.mesh.numberofelements,1);
+-
+-%Now, build the connectivity tables for this mesh.
+-md.mesh.vertexconnectivity=NodeConnectivity(md.mesh.elements,md.mesh.numberofvertices);
+-md.mesh.elementconnectivity=ElementConnectivity(md.mesh.elements,md.mesh.vertexconnectivity);
+-
+-%type of model
+-md.mesh.dimension=2;
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/triangle.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/triangle.m	(revision 0)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/triangle.m	(revision 11011)
+@@ -0,0 +1,85 @@
++function md=triangle(md,domainname,varargin)
++%TRIANGLE - create model mesh using the triangle package
++%
++%   This routine creates a model mesh using TriMesh and a domain outline, to within a certain resolution
++%   where md is a @model object, domainname is the name of an Argus domain outline file, 
++%   and resolution is a characteristic length for the mesh (same unit as the domain outline
++%   unit). Riftname is an optional argument (Argus domain outline) describing rifts.
++%
++%   Usage:
++%      md=triangle(md,domainname,resolution)
++%   or md=triangle(md,domainname,riftname, resolution)
++%
++%   Examples:
++%      md=triangle(md,'DomainOutline.exp',1000);
++%      md=triangle(md,'DomainOutline.exp','Rifts.exp',1500);
++
++%Figure out a characteristic area. Resolution is a node oriented concept (ex a 1000m  resolution node would 
++%be made of 1000*1000 area squares). 
++if (nargin==3),
++	resolution=varargin{1};
++	riftname='';
++end
++if (nargin==4),
++	riftname=varargin{1};
++	resolution=varargin{2};
++end
++
++%Check that mesh was not already run, and warn user: 
++if md.mesh.numberofelements~=0,
++	choice=input('This model already has a mesh. Are you sure you want to go ahead? (y/n)','s');
++	if ~strcmp(choice,'y')
++		disp('no meshing done ... exiting');
++		return
++	end
++end
++
++area=resolution^2;
++
++%Mesh using TriMesh
++if strcmp(riftname,''),
++	[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');
++
++	%check that all the created nodes belong to at least one element
++	orphan=find(~ismember([1:length(x)],sort(unique(elements(:)))));
++	for i=1:length(orphan),
++		%get rid of the orphan node i
++		%update x and y
++		x=[x(1:orphan(i)-(i-1)-1); x(orphan(i)-(i-1)+1:end)];
++		y=[y(1:orphan(i)-(i-1)-1); y(orphan(i)-(i-1)+1:end)];
++		%update elements
++		pos=find(elements>orphan(i)-(i-1));
++		elements(pos)=elements(pos)-1;
++		%update segments
++		pos1=find(segments(:,1)>orphan(i)-(i-1));
++		pos2=find(segments(:,2)>orphan(i)-(i-1));
++		segments(pos1,1)=segments(pos1,1)-1;
++		segments(pos2,2)=segments(pos2,2)-1;
++	end
++
++	%plug into md
++	md.mesh.x=x;
++	md.mesh.y=y;
++	md.mesh.elements=elements;
++	md.mesh.segments=segments;
++	md.mesh.segmentmarkers=segmentmarkers;
++end
++
++%Fill in rest of fields:
++md.mesh.numberofelements=length(md.mesh.elements);
++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);
++md.mesh.vertexonsurface=ones(md.mesh.numberofvertices,1);
++md.mesh.elementonbed=ones(md.mesh.numberofelements,1);
++md.mesh.elementonsurface=ones(md.mesh.numberofelements,1);
++
++%Now, build the connectivity tables for this mesh.
++md.mesh.vertexconnectivity=NodeConnectivity(md.mesh.elements,md.mesh.numberofvertices);
++md.mesh.elementconnectivity=ElementConnectivity(md.mesh.elements,md.mesh.vertexconnectivity);
++
++%type of model
++md.mesh.dimension=2;
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshnodensity.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshnodensity.m	(revision 11010)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshnodensity.m	(revision 11011)
+@@ -8,12 +8,12 @@
+ %   outline and the riftoutline
+ %
+ %   Usage:
+-%      md=setmesh(md,domainname)
+-%   or md=setmesh(md,domainname,riftname);
++%      md=meshnodensity(md,domainname)
++%   or md=meshnodensity(md,domainname,riftname);
+ %
+ %   Examples:
+-%      md=setmesh(md,'DomainOutline.exp');
+-%      md=setmesh(md,'DomainOutline.exp','Rifts.exp');
++%      md=meshnodensity(md,'DomainOutline.exp');
++%      md=meshnodensity(md,'DomainOutline.exp','Rifts.exp');
+ 
+ if (nargin==2),
+ 	riftname='';
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/utils/Mesh/roundmesh.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/utils/Mesh/roundmesh.m	(revision 11010)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/utils/Mesh/roundmesh.m	(revision 11011)
+@@ -22,7 +22,7 @@
+ expgen('RoundDomainOutline.exp',A,1);
+ 
+ %Call Bamg
+-md=setmesh(md,'RoundDomainOutline.exp',resolution);
++md=triangle(md,'RoundDomainOutline.exp',resolution);
+ %md=bamg(md,'domain','RoundDomainOutline.exp','hmin',resolution);
+ 
+ %move the closest node to the center
Index: /issm/oecreview/Archive/10977-11024/ISSM-11011-11012.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11011-11012.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11011-11012.diff	(revision 11025)
@@ -0,0 +1,11 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/examples/SquareIceShelf/runme.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/examples/SquareIceShelf/runme.m	(revision 11011)
++++ /proj/ice/larour/issm-uci/trunk-jpl/examples/SquareIceShelf/runme.m	(revision 11012)
+@@ -1,5 +1,5 @@
+ md=model;
+-md=setmesh(md,'DomainOutline.exp',100000);
++md=triangle(md,'DomainOutline.exp',100000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'Square.par');
+ md=setflowequation(md,'macayeal','all');
Index: /issm/oecreview/Archive/10977-11024/ISSM-11013-11014.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11013-11014.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11013-11014.diff	(revision 11025)
@@ -0,0 +1,2712 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test320.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test320.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test320.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=meshconvert(md);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test401.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test401.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test401.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test222.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test222.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test222.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test303.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test303.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test303.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'hutter','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test205.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test205.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test205.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test124.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test124.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test124.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test107.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test107.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test107.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test622.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test622.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test622.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test605.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test605.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test605.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=extrude(md,6,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test524.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test524.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test524.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',20000);
++md=triangle(model,'../Exp/Pig.exp',20000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test443.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test443.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test443.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test264.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test264.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test264.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test345.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test345.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test345.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test426.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test426.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test426.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test507.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test507.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test507.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',20000);
++md=triangle(model,'../Exp/Pig.exp',20000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test409.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test409.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test409.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test328.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test328.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test328.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'hutter','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test247.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test247.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test247.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1202.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1202.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1202.m	(revision 11014)
+@@ -3,7 +3,7 @@
+ 
+ %tests 3 and 4: using Glen's flow law
+ md=model;
+-md=setmesh(md,'../Exp/SquareEISMINT.exp',3550);
++md=triangle(md,'../Exp/SquareEISMINT.exp',3550);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareEISMINT.par');
+ md=setflowequation(md,'macayeal','all'); %MacAyeal's model and 2d
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1602.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1602.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1602.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test410.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test410.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test410.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test312.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test312.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test312.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,4,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test133.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test133.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test133.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test214.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test214.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test214.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test116.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test116.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test116.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test452.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test452.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test452.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',350000);
++md=triangle(model,'../Exp/Square.exp',350000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md.cluster=none;
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test614.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test614.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test614.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=extrude(md,2,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test516.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test516.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test516.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,4,1.1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test435.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test435.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test435.m	(revision 11014)
+@@ -1,5 +1,5 @@
+ %test partitioning, and partition averaging
+-md=setmesh(model,'../Exp/Square.exp',30000);
++md=triangle(model,'../Exp/Square.exp',30000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test256.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test256.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test256.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test418.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test418.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test418.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test337.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test337.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test337.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test239.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test239.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test239.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',120000);
++md=triangle(model,'../Exp/Square.exp',120000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,2,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test240.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test240.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test240.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',120000);
++md=triangle(model,'../Exp/Square.exp',120000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,2,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test321.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test321.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test321.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test402.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test402.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test402.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test223.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test223.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test223.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test304.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test304.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test304.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'hutter','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test206.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test206.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test206.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test125.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test125.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test125.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test108.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test108.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test108.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test623.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test623.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test623.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=meshconvert(md);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test606.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test606.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test606.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=extrude(md,6,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test525.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test525.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test525.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test444.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test444.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test444.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test265.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test265.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test265.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test346.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test346.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test346.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test427.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test427.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test427.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test508.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test508.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test508.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',20000);
++md=triangle(model,'../Exp/Pig.exp',20000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test248.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test248.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test248.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test329.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test329.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test329.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,5,1.2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1301.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1301.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1301.m	(revision 11014)
+@@ -5,7 +5,7 @@
+ printingflag=false;
+ 
+ md=model;
+-md=setmesh(md,'../Exp/Square.exp',100000);
++md=triangle(md,'../Exp/Square.exp',100000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareThermal.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1203.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1203.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1203.m	(revision 11014)
+@@ -3,7 +3,7 @@
+ 
+ %test 5 and 6 : 
+ md=model;
+-md=setmesh(md,'../Exp/SquareEISMINT.exp',5100); %test3
++md=triangle(md,'../Exp/SquareEISMINT.exp',5100); %test3
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareEISMINT.par');
+ md=setflowequation(md,'macayeal','all'); %MacAyeal's model and 2d
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1603.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1603.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1603.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test330.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test330.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test330.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,5,1.2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test411.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test411.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test411.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,4,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test232.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test232.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test232.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/SquareHole.exp','../Exp/Rifts.exp',50000);
++md=triangle(model,'../Exp/SquareHole.exp','../Exp/Rifts.exp',50000);
+ md=meshprocessrifts(md,'../Exp/Square.exp');
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test313.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test313.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test313.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test215.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test215.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test215.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test134.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test134.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test134.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test117.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test117.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test117.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test453.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test453.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test453.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md.initialization.vx(:)=0;
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test615.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test615.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test615.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test517.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test517.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test517.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test419.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test419.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test419.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test338.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test338.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test338.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test257.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test257.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test257.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test101.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test101.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test101.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test501.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test501.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test501.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',20000);
++md=triangle(model,'../Exp/Pig.exp',20000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test420.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test420.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test420.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test403.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test403.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test403.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,4,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test322.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test322.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test322.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test241.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test241.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test241.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',120000);
++md=triangle(model,'../Exp/Square.exp',120000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,2,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test305.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test305.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test305.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'hutter','../Exp/SquareHalfRight.exp','fill','macayeal');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test224.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test224.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test224.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test126.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test126.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test126.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test207.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test207.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test207.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test109.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test109.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test109.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test624.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test624.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test624.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=meshconvert(md);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test526.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test526.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test526.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test607.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test607.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test607.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test509.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test509.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test509.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test428.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test428.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test428.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test347.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test347.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test347.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,4,1.2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test266.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test266.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test266.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test249.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test249.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test249.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1302.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1302.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1302.m	(revision 11014)
+@@ -4,7 +4,7 @@
+ printingflag=false;
+ 
+ md=model;
+-md=setmesh(md,'../Exp/Square.exp',100000);
++md=triangle(md,'../Exp/Square.exp',100000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareThermal.par');
+ md=extrude(md,30,1);   %NB: the more one extrudes, the better (10-> relative~0.35%, 20->0.1%, 30->0.05%)
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1204.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1204.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1204.m	(revision 11014)
+@@ -3,7 +3,7 @@
+ 
+ %tests 3 and 4: using Glen's flow law
+ md=model;
+-md=setmesh(md,'../Exp/SquareEISMINT.exp',3550);
++md=triangle(md,'../Exp/SquareEISMINT.exp',3550);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareEISMINT.par');
+ md=setflowequation(md,'macayeal','all'); %MacAyeal's model and 2d
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/dak.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/dak.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/dak.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test110.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test110.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test110.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test510.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test510.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test510.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test412.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test412.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test412.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,4,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test331.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test331.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test331.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test250.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test250.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test250.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test314.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test314.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test314.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test233.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test233.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test233.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test135.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test135.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test135.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=meshconvert(md);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test216.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test216.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test216.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test118.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test118.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test118.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test454.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test454.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test454.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md.initialization.vx(:)=0;
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test616.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test616.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test616.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test518.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test518.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test518.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test437.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test437.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test437.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test339.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test339.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test339.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test258.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test258.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test258.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test102.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test102.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test102.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test502.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test502.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test502.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',20000);
++md=triangle(model,'../Exp/Pig.exp',20000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test421.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test421.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test421.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test340.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test340.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test340.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test404.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test404.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test404.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,4,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test323.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test323.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test323.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test242.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test242.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test242.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',120000);
++md=triangle(model,'../Exp/Square.exp',120000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,2,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test306.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test306.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test306.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'hutter','../Exp/SquareHalfRight.exp','fill','macayeal');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test225.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test225.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test225.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test127.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test127.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test127.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test208.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test208.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test208.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test625.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test625.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test625.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=meshconvert(md);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test608.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test608.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test608.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test348.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test348.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test348.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,5,1.2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test429.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test429.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test429.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',170000);
++md=triangle(model,'../Exp/Square.exp',170000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1303.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1303.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1303.m	(revision 11014)
+@@ -5,7 +5,7 @@
+ printingflag=false;
+ 
+ md=model;
+-md=setmesh(md,'../Exp/Square.exp',100000);
++md=triangle(md,'../Exp/Square.exp',100000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareThermal.par');
+ md=extrude(md,11,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test111.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test111.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test111.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=meshconvert(md);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test430.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test430.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test430.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',170000);
++md=triangle(model,'../Exp/Square.exp',170000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test511.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test511.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test511.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,2,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test251.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test251.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test251.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test332.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test332.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test332.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test413.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test413.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test413.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,4,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test234.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test234.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test234.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test315.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test315.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test315.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test217.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test217.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test217.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test136.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test136.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test136.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=meshconvert(md);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test119.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test119.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test119.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test617.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test617.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test617.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=meshconvert(md);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test438.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test438.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test438.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test519.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test519.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test519.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',20000);
++md=triangle(model,'../Exp/Pig.exp',20000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,2,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test259.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test259.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test259.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',350000);
++md=triangle(model,'../Exp/Square.exp',350000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test201.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test201.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test201.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test120.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test120.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test120.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test103.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test103.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test103.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test601.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test601.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test601.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test520.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test520.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test520.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',20000);
++md=triangle(model,'../Exp/Pig.exp',20000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,2,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test260.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test260.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test260.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',350000);
++md=triangle(model,'../Exp/Square.exp',350000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test341.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test341.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test341.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test422.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test422.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test422.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test503.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test503.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test503.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',20000);
++md=triangle(model,'../Exp/Pig.exp',20000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,0.9);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test243.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test243.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test243.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test324.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test324.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test324.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test405.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test405.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test405.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test226.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test226.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test226.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test307.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test307.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test307.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test209.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test209.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test209.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test128.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test128.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test128.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test626.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test626.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test626.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=meshconvert(md);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test609.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test609.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test609.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=extrude(md,5,1.5);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test447.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test447.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test447.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1304.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1304.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1304.m	(revision 11014)
+@@ -5,7 +5,7 @@
+ printingflag=false;
+ 
+ md=model;
+-md=setmesh(md,'../Exp/Square.exp',100000);
++md=triangle(md,'../Exp/Square.exp',100000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareThermal.par');
+ md=extrude(md,11,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test210.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test210.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test210.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test112.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test112.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test112.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=meshconvert(md);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test610.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test610.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test610.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=extrude(md,5,1.5);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test431.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test431.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test431.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',170000);
++md=triangle(model,'../Exp/Square.exp',170000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test512.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test512.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test512.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,2,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test252.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test252.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test252.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test333.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test333.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test333.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test414.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test414.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test414.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,4,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test316.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test316.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test316.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test218.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test218.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test218.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test618.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test618.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test618.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=meshconvert(md);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test439.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test439.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test439.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test202.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test202.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test202.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test121.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test121.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test121.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test104.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test104.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test104.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test602.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test602.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test602.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test521.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test521.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test521.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',10000);
++md=triangle(model,'../Exp/Pig.exp',10000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ 
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test440.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test440.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test440.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test261.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test261.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test261.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',350000);
++md=triangle(model,'../Exp/Square.exp',350000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test342.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test342.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test342.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test423.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test423.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test423.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',300000);
++md=triangle(model,'../Exp/Square.exp',300000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test504.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test504.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test504.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',20000);
++md=triangle(model,'../Exp/Pig.exp',20000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,0.9);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test244.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test244.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test244.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test325.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test325.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test325.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test406.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test406.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test406.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test227.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test227.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test227.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test308.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test308.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test308.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test129.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test129.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test129.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test529.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test529.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test529.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test448.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test448.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test448.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1501.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1501.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1501.m	(revision 11014)
+@@ -1,6 +1,6 @@
+ printingflag = false;
+ 
+-md=setmesh(model,'../Exp/Square.exp',350000);
++md=triangle(model,'../Exp/Square.exp',350000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test211.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test211.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test211.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test130.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test130.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test130.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test113.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test113.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test113.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test611.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test611.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test611.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test530.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test530.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test530.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test432.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test432.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test432.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',170000);
++md=triangle(model,'../Exp/Square.exp',170000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test513.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test513.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test513.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,2,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test253.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test253.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test253.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test334.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test334.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test334.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test415.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test415.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test415.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test317.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test317.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test317.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test219.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test219.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test219.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test619.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test619.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test619.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1110.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1110.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1110.m	(revision 11014)
+@@ -8,7 +8,7 @@
+ 	ny=30;
+ 	md=model;
+ 	md=squaremesh(md,L,L,nx,ny);
+-	%md=setmesh(md,'../Exp/SquareISMIP.exp',5500);
++	%md=triangle(md,'../Exp/SquareISMIP.exp',5500);
+ 	md=setmask(md,'',''); %ice sheet test
+ 	md=parameterize(md,'../Par/ISMIPF.par');
+ 	md=extrude(md,4,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test220.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test220.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test220.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test301.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test301.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test301.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test203.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test203.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test203.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test122.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test122.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test122.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test105.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test105.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test105.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test620.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test620.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test620.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test603.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test603.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test603.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=meshconvert(md);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test522.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test522.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test522.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',10000);
++md=triangle(model,'../Exp/Pig.exp',10000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ 
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test441.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test441.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test441.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test262.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test262.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test262.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',350000);
++md=triangle(model,'../Exp/Square.exp',350000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test343.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test343.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test343.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test424.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test424.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test424.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',300000);
++md=triangle(model,'../Exp/Square.exp',300000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test505.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test505.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test505.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',20000);
++md=triangle(model,'../Exp/Pig.exp',20000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,0.9);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test245.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test245.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test245.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test326.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test326.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test326.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test407.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test407.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test407.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test228.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test228.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test228.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test309.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test309.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test309.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,5,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test449.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test449.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test449.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1502.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1502.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1502.m	(revision 11014)
+@@ -1,6 +1,6 @@
+ printingflag = false;
+ 
+-md=setmesh(model,'../Exp/Square.exp',700000);
++md=triangle(model,'../Exp/Square.exp',700000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1208.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1208.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1208.m	(revision 11014)
+@@ -3,7 +3,7 @@
+ resolution=40000;
+ 
+ %To begin with the numerical model
+-md=setmesh(model,'../Exp/SquareEISMINT750000.exp',resolution);
++md=triangle(model,'../Exp/SquareEISMINT750000.exp',resolution);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/RoundSheetEISMINT.par');
+ 
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test310.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test310.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test310.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,5,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test212.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test212.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test212.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test131.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test131.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test131.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ %Add boundary conditions on thickness on the border
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test114.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test114.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test114.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test612.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test612.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test612.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test531.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test531.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test531.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test450.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test450.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test450.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test514.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test514.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test514.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,2,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test335.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test335.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test335.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,4,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test416.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test416.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test416.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test254.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test254.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test254.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test318.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test318.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test318.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test237.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test237.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test237.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test302.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test302.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test302.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test221.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test221.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test221.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test123.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test123.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test123.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test204.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test204.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test204.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test106.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test106.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test106.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,3,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test621.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test621.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test621.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test442.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test442.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test442.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,5,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test523.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test523.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test523.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',20000);
++md=triangle(model,'../Exp/Pig.exp',20000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test604.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test604.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test604.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=meshconvert(md);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test506.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test506.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test506.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',20000);
++md=triangle(model,'../Exp/Pig.exp',20000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,0.9);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test425.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test425.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test425.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test344.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test344.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test344.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test263.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test263.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test263.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test408.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test408.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test408.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test327.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test327.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test327.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=setflowequation(md,'hutter','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test246.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test246.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test246.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test229.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test229.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test229.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1601.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1601.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1601.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test311.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test311.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test311.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,4,2);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test230.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test230.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test230.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',200000);
++md=triangle(model,'../Exp/Square.exp',200000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test132.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test132.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test132.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ %Add boundary conditions on thickness on the border
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test213.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test213.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test213.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test115.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test115.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test115.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelfConstrained.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test451.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test451.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test451.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',350000);
++md=triangle(model,'../Exp/Square.exp',350000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md.cluster=none;
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test532.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test532.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test532.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test613.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test613.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test613.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/79North.exp',10000);
++md=triangle(model,'../Exp/79North.exp',10000);
+ md=setmask(md,'../Exp/79NorthShelf.exp','');
+ md=parameterize(md,'../Par/79North.par');
+ md=extrude(md,2,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test515.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test515.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test515.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Pig.exp',30000);
++md=triangle(model,'../Exp/Pig.exp',30000);
+ md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+ md=parameterize(md,'../Par/Pig.par');
+ md=extrude(md,4,1.1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test434.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test434.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test434.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test417.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test417.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test417.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=extrude(md,3,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test336.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test336.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test336.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',180000);
++md=triangle(model,'../Exp/Square.exp',180000);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+ md=extrude(md,4,1);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test255.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test255.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test255.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test319.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test319.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test319.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=meshconvert(md);
+ md=setmask(md,'','');
+ md=parameterize(md,'../Par/SquareSheetConstrained.par');
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test238.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test238.m	(revision 11013)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test238.m	(revision 11014)
+@@ -1,4 +1,4 @@
+-md=setmesh(model,'../Exp/Square.exp',150000);
++md=triangle(model,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=extrude(md,3,2);
Index: /issm/oecreview/Archive/10977-11024/ISSM-11014-11015.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11014-11015.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11014-11015.diff	(revision 11025)
@@ -0,0 +1,661 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshyams.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshyams.m	(revision 11014)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshyams.m	(revision 11015)
+@@ -1,172 +0,0 @@
+-function md=meshyams(md,varargin);
+-%MESHYAMS - Build model of Antarctica by refining according to observed velocity error estimator
+-%
+-%   Usage:
+-%      md=meshyams(md,varargin);
+-%      where varargin is a lit of paired arguments. 
+-%      arguments can be: 'domainoutline': Argus file containing the outline of the domain to be meshed
+-%      arguments can be: 'velocities': matlab file containing the velocities [m/yr]
+-%      optional arguments: 'groundeddomain': Argus file containing the outline of the grounded ice
+-%                          this option is used to minimize the metric on water (no refinement)
+-%      optional arguments: 'resolution': initial mesh resolution [m]
+-%      optional arguments: 'nsteps': number of steps of mesh adaptation
+-%      optional arguments: 'epsilon': average interpolation error wished [m/yr]
+-%      optional arguments: 'hmin': minimum edge length
+-%      optional arguments: 'hmanx': maximum edge
+-%      optional arguments: 'riftoutline': if rifts are present, specifies rift outline file.
+-%      
+-%
+-%   Examples:
+-%      md=meshyams(md,'domainoutline','Domain.exp','velocities','vel.mat');
+-%      md=meshyams(md,'domainoutline','Domain.exp','velocities','vel.mat','groundeddomain','ground.exp');
+-%      md=meshyams(md,'domainoutline','Domain.exp','velocities','vel.mat','groundeddomain','ground.exp','nsteps',6,'epsilon',2,'hmin',500,'hmax',30000);
+-
+-%recover options
+-options=pairoptions(varargin{:});
+-options=deleteduplicates(options,1);
+-
+-%recover some fields
+-disp('MeshYams Options:')
+-domainoutline=getfieldvalue(options,'domainoutline');
+-disp(sprintf('   %-15s: ''%s''','DomainOutline',domainoutline));
+-riftoutline=getfieldvalue(options,'riftoutline','N/A');
+-disp(sprintf('   %-15s: ''%s''','riftoutline',riftoutline));
+-groundeddomain=getfieldvalue(options,'groundeddomain','N/A');
+-disp(sprintf('   %-15s: ''%s''','GroundedDomain',groundeddomain));
+-velocities=getfieldvalue(options,'velocities');
+-disp(sprintf('   %-15s: ''%s''','Velocities',velocities));
+-resolution=getfieldvalue(options,'resolution',5000);
+-disp(sprintf('   %-15s: %f','Resolution',resolution));
+-nsteps=getfieldvalue(options,'nsteps',6);
+-disp(sprintf('   %-15s: %i','nsteps',nsteps));
+-gradation=getfieldvalue(options,'gradation',2*ones(nsteps,1));
+-disp(sprintf('   %-15s: %g','gradation',gradation(1)));
+-epsilon=getfieldvalue(options,'epsilon',3);
+-disp(sprintf('   %-15s: %f','epsilon',epsilon));
+-hmin=getfieldvalue(options,'hmin',500);
+-disp(sprintf('   %-15s: %f','hmin',hmin));
+-hmax=getfieldvalue(options,'hmax',150*10^3);
+-disp(sprintf('   %-15s: %f\n','hmax',hmax));
+-
+-%mesh with initial resolution
+-disp('Initial mesh generation...');
+-if strcmpi(riftoutline,'N/A');
+-	md=setmesh(md,domainoutline,resolution);
+-else
+-	md=setmesh(md,domainoutline,riftoutline,resolution);
+-	md=meshprocessrifts(md,domainoutline);
+-end
+-disp(['Initial mesh, number of elements: ' num2str(md.mesh.numberofelements)]);
+-
+-%load velocities 
+-disp('loading velocities...');
+-Names=VelFindVarNames(velocities);
+-Vel=load(velocities);
+-
+-%start mesh adaptation
+-for i=1:nsteps,
+-	disp(['Iteration #' num2str(i) '/' num2str(nsteps)]);
+-
+-	%interpolate velocities onto mesh
+-	disp('   interpolating velocities...');
+-	if strcmpi(Names.interp,'node'),
+-		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.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);
+-
+-	%set mask.vertexonwater  field
+-	if ~strcmp(groundeddomain,'N/A'),
+-		nodeground=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,groundeddomain,'node',2);
+-		md.mask.vertexonwater=ones(md.mesh.numberofvertices,1);
+-		md.mask.vertexonwater(find(nodeground))=0;
+-	else
+-		md.mask.vertexonwater=zeros(md.mesh.numberofvertices,1);
+-	end
+-
+-	%adapt according to velocities
+-	disp('   adapting...');
+-	md=YamsCall(md,field,hmin,hmax,gradation(i),epsilon);
+-
+-	%if we have rifts, we just messed them up, we need to recreate the segments that constitute those 
+-	%rifts, because the segments are used in YamsCall to freeze the rifts elements during refinement.
+-	if md.rifts.numrifts, 
+-		md.mesh.vertexconnectivity=NodeConnectivity(md.mesh.elements,md.mesh.numberofvertices);
+-		md.mesh.elementconnectivity=ElementConnectivity(md.mesh.elements,md.mesh.vertexconnectivity);
+-		md.mesh.segments=findsegments(md);
+-		md=meshyamsrecreateriftsegments(md);
+-	end
+-
+-end
+-	
+-disp(['Final mesh, number of elements: ' num2str(md.mesh.numberofelements)]);
+-
+-%Now, build the connectivity tables for this mesh.
+-md.mesh.vertexconnectivity=NodeConnectivity(md.mesh.elements,md.mesh.numberofvertices);
+-md.mesh.elementconnectivity=ElementConnectivity(md.mesh.elements,md.mesh.vertexconnectivity);
+-
+-%recreate segments
+-md.mesh.segments=findsegments(md);
+-md.mesh.vertexonboundary=zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
+-
+-%Fill in rest of fields:
+-md.mesh.z=zeros(md.mesh.numberofvertices,1);
+-md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
+-md.mesh.vertexonsurface=ones(md.mesh.numberofvertices,1);
+-md.mesh.elementonbed=ones(md.mesh.numberofelements,1);
+-md.mesh.elementonsurface=ones(md.mesh.numberofelements,1);
+-if ~strcmp(groundeddomain,'N/A'),
+-	nodeground=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,groundeddomain,'node',2);
+-	md.mask.vertexonwater=ones(md.mesh.numberofvertices,1);
+-	md.mask.vertexonwater(find(nodeground))=0;
+-else
+-	md.mask.vertexonwater=zeros(md.mesh.numberofvertices,1);
+-end
+-if strcmpi(Names.interp,'node'),
+-	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.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);
+-
+-%deal with rifts 
+-if md.rifts.numrifts,
+-	%first, recreate rift segments
+-	md=meshyamsrecreateriftsegments(md);
+-
+-	%using the segments, recreate the penaltypairs
+-	for j=1:md.rifts.numrifts,
+-		rift=md.rifts.riftstruct(j);
+-
+-		%build normals and lengths of segments:
+-		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: 
+-		numpenaltypairs=length(rift.segments)/2-1;
+-		rift.penaltypairs=zeros(numpenaltypairs,7);
+-
+-		for i=1:numpenaltypairs,
+-			rift.penaltypairs(i,1)=rift.segments(i,2);
+-			rift.penaltypairs(i,2)=rift.segments(end-i,2);
+-			rift.penaltypairs(i,3)=rift.segments(i,3);
+-			rift.penaltypairs(i,4)=rift.segments(end-i,3);
+-			rift.penaltypairs(i,5)=normalsx(i)+normalsx(i+1);
+-			rift.penaltypairs(i,6)=normalsy(i)+normalsy(i+1);
+-			rift.penaltypairs(i,7)=(lengths(i)+lengths(i+1))/2;
+-		end
+-		%renormalize norms: 
+-		norms=sqrt(rift.penaltypairs(:,5).^2+rift.penaltypairs(:,6).^2);
+-		rift.penaltypairs(:,5)=rift.penaltypairs(:,5)./norms;
+-		rift.penaltypairs(:,6)=rift.penaltypairs(:,6)./norms;
+-
+-		md.rifts.riftstruct(j)=rift;
+-	end
+-
+-end
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshadaptation.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshadaptation.m	(revision 11014)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshadaptation.m	(revision 11015)
+@@ -1,94 +0,0 @@
+-function md2=meshadaptation(md,field,scale,epsilon,threshold)
+-%MESHADAPTATION - remesh a model for a given field
+-%
+-%   remesh a model for a given field, use the hessian computation to spread the error on the element
+-%   scale: 1.2 large scale leads to higher refining.
+-%   epsilon: .5  large epsilon will refine fewer elements
+-%   threshold: value under which no refinement is done.
+-%
+-%   Usage:
+-%      md2=meshadaptation(md,field,scale,epsilon,threshold)
+-%
+-%   Example:
+-%      md2=meshadaptation(md,md.initialization.vel,1.2,0.5,1);
+-
+-%some checks
+-if ~(md.mesh.dimension==2)
+-	error('meshadaptation error message: adaptation for 3d meshes not implemented yet')
+-end
+-if length(field)~=md.mesh.numberofvertices
+-	error('meshadaptation error message: input field length shoud be numberofnodes')
+-end
+-
+-disp(sprintf('      metric computation') )
+-
+-%initialization
+-index=md.mesh.elements;
+-numberofnodes=md.mesh.numberofvertices;
+-numberofelements=md.mesh.numberofelements;
+-gradx=zeros(numberofnodes,1);
+-grady=zeros(numberofnodes,1);
+-metric=zeros(numberofelements,1);
+-
+-%take the threshold, a characteristic length, and get the area equivalent threshold:
+-threshold=threshold^2/2;
+-
+-%build some usefull variables
+-field=field(:);
+-line=index(:);
+-summation=1/3*ones(3,1);
+-linesize=3*numberofelements;
+-
+-%get areas and  nodal functions coefficients N(x,y)=alpha x + beta y + gamma 
+-[alpha beta]=GetNodalFunctionsCoeff(index,md.mesh.x,md.mesh.y);
+-areas=GetAreas(index,md.mesh.x,md.mesh.y);
+-
+-%Compute gradient for each element
+-grad_elx=sum(field(index).*alpha,2); 
+-grad_ely=sum(field(index).*beta,2);
+-
+-%update weights that holds the volume of all the element holding the node i
+-weights=sparse(line,ones(linesize,1),repmat(areas,3,1),numberofnodes,1);
+-
+-%Compute gradient for each node (average of the elements around)
+-gradx=sparse(line,ones(linesize,1),repmat(areas.*grad_elx,3,1),numberofnodes,1);
+-grady=sparse(line,ones(linesize,1),repmat(areas.*grad_ely,3,1),numberofnodes,1);
+-gradx=gradx./weights;
+-grady=grady./weights;
+-
+-%Compute hessian for each element
+-hessian=[sum(gradx(index).*alpha,2) sum(grady(index).*beta,2) sum(grady(index).*alpha,2)];
+-
+-%Compute the new metric
+-hmin=min(sqrt(areas))/scale;
+-hmax=max(sqrt(areas));
+-
+-%first, find the eigen values of eah line of H=[hessian(i,1) hessian(i,3); hessian(i,3)  hessian(i,2)]
+-a=hessian(:,1); b=hessian(:,3); d=hessian(:,2);
+-lambda1=0.5*((a+d)+sqrt(4*b.^2+(a-d).^2));
+-lambda2=0.5*((a+d)-sqrt(4*b.^2+(a-d).^2));
+-
+-%Modify the eigen values to control the shape of the elements
+-lambda1=min(max(abs(lambda1)/epsilon,1/hmax^2),1/hmin^2);
+-lambda2=min(max(abs(lambda2)/epsilon,1/hmax^2),1/hmin^2);
+-
+-%find the corresponding eigen vectors of the initial eigen values
+-%NOT USED FOR NOW
+-%div1=sqrt(1+(b./(lambda1-d)).^2);
+-%div2=sqrt(1+(b./(lambda2-d)).^2);
+-%vector1=[1./div1 (b./(lambda1-d))./div1];
+-%vector2=[1./div2 (b./(lambda2-d))./div2];
+-
+-%compute the metric
+-%R=[vector1(:,1) vector2(:,1) vector1(:,2) vector2(:,2)];
+-%det=vector1(:,1).*vector2(:,2)-vector1(:,2).*vector1(:,2);
+-%Rinv=[vector2(:,2)./det   -vector2(:,1)./det   -vector1(:,2)./det   vector1(:,1)./det];
+-metric=20*1./sqrt(lambda1.^2+lambda2.^2);
+-
+-%ok, metric can't go under 1km resolution.
+-metric(find(metric<threshold))=threshold;
+-
+-%Remesh with this new metric
+-disp(sprintf('      initial number of element: %i', md.mesh.numberofelements))
+-md2=meshrefine(md,full(metric));
+-disp(sprintf('      new number of elements:    %i', md2.mesh.numberofelements))
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshexprefine.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshexprefine.m	(revision 11014)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshexprefine.m	(revision 11015)
+@@ -1,55 +0,0 @@
+-function md=meshexprefine(md,domainname,newresolution)
+-%MESHEXPREFINE - refine mesh from a model
+-%
+-%   This routine refines a mesh for a given area using an Argus domain outline 
+-%   and a new resolution for this domain.
+-%   Appending ~ at the beginning of domainname will make this routine refine
+-%   the elements which are not in the domain outline. 
+-%   newresolution is the resolution to which the flagged elements must be refined.
+-%
+-%   Usage:
+-%      md=meshexprefine(md,domainname,newresolution)
+-%
+-%   Example:
+-%      md=meshexprefine(md,'RefineAreas.exp',1000)
+-
+-%some checks on list of arguments
+-if ((nargin~=3) | (nargout~=1)),
+-	meshexprefineusage();
+-	error('meshexprefine error message');
+-end
+-
+-if ~ischar(domainname) 
+-	meshexprefineusage();
+-	error('meshexprefine error message');
+-end
+-
+-%Check the first letter of domainname, if it is ~, then we need to strip it away from 
+-%domainname. The subsequent refinement will be done on the mask of the domain outline.
+-if strcmpi(domainname(1),'~'),
+-	mask=1;
+-	domainname=domainname(2:length(domainname));
+-else
+-	mask=0;
+-end
+-
+-%Read domainame file into a matlab array (x,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
+-if mask==1,
+-	pos=find(~refinearea);
+-else
+-	pos=find(refinearea);
+-end
+-aires(pos)=newresolution*newresolution/2; %triangle area
+-
+-pos=find(refinearea);
+-aires(pos)=2*aires(pos); %be sure this does not get refined.
+-
+-%refine using the new area vector
+-md=meshrefine(md,aires);
+-
+-%return model
+-end
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/reorder.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/reorder.m	(revision 11014)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/reorder.m	(revision 11015)
+@@ -1,27 +0,0 @@
+-function md=reorder(md)
+-%REORDER - reorder nodes and elements of a model
+-%
+-%   Usage: 
+-%      md=reorder(md)
+-
+-%some checks
+-if md.mesh.dimension==3,
+-	error('reorder error message: 3d models not supported yet, exiting...')
+-end
+-disp('reorder warning: only the mesh fields are reorder. The model needs to be reparameterized');
+-
+-%reorder elements
+-newelements=randperm(md.mesh.numberofelements)';
+-tnewelements=zeros(md.mesh.numberofelements,1);tnewelements(newelements)=[1:md.mesh.numberofelements]';
+-
+-%reorder nodes
+-newnodes=randperm(md.mesh.numberofvertices)';
+-tnewnodes=zeros(md.mesh.numberofvertices,1);tnewnodes(newnodes)=[1:md.mesh.numberofvertices]';
+-
+-%update all fields
+-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.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: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshbamg.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshbamg.m	(revision 11014)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/meshbamg.m	(revision 11015)
+@@ -1,112 +0,0 @@
+-function md=meshbamg(md,varargin);
+-%MESHYAMS - Build model of Antarctica by refining according to observed velocity error estimator
+-%
+-%   Usage:
+-%      md=meshyams(md,varargin);
+-%      where varargin is a lit of paired arguments. 
+-%      arguments can be: 'domainoutline': Argus file containing the outline of the domain to be meshed
+-%      arguments can be: 'domainoutline': Argus file containing the outline of the domain to be meshed
+-%      arguments can be: 'thickness': matlab file containing the thickness [m]
+-%      optional arguments: 'groundeddomain': Argus file containing the outline of the grounded ice
+-%                          this option is used to minimize the metric on water (no refinement)
+-%      optional arguments: 'resolution': initial mesh resolution [m]
+-%      optional arguments: 'nsteps': number of steps of mesh adaptation
+-%      optional arguments: 'epsilon': average interpolation error wished [m/yr [m]]
+-%      optional arguments: 'hmin': minimum edge length
+-%      optional arguments: 'hmanx': maximum edge
+-%      
+-%
+-%   Examples:
+-%      md=meshyams(md,'domainoutline','Domain.exp','velocities','vel.mat');
+-%      md=meshyams(md,'domainoutline','Domain.exp','velocities','vel.mat','groundeddomain','ground.exp');
+-%      md=meshyams(md,'domainoutline','Domain.exp','velocities','vel.mat','groundeddomain','ground.exp','nsteps',6,'epsilon',2,'hmin',500,'hmax',30000);
+-%      md=meshyams(md,'domainoutline','Domain.exp','velocities','vel.mat','thickness','groundeddomain','ground.exp','nsteps',6,'epsilon',2,'hmin',500,'hmax',30000);
+-
+-%recover options
+-options=pairoptions(varargin{:});
+-options=deleteduplicates(options,1);
+-
+-%recover some fields
+-disp('MeshBamg Options:')
+-domainoutline=getfieldvalue(options,'domainoutline');
+-disp(sprintf('   %-15s: ''%s''','DomainOutline',domainoutline));
+-groundeddomain=getfieldvalue(options,'groundeddomain','N/A');
+-disp(sprintf('   %-15s: ''%s''','GroundedDomain',groundeddomain));
+-velocities=getfieldvalue(options,'velocities');
+-disp(sprintf('   %-15s: ''%s''','Velocities',velocities));
+-thickness=getfieldvalue(options,'thickness','none');
+-disp(sprintf('   %-15s: ''%s''','Thickness',thickness));
+-resolution=getfieldvalue(options,'resolution',5000);
+-disp(sprintf('   %-15s: %f','Resolution',resolution));
+-nsteps=getfieldvalue(options,'nsteps',6);
+-disp(sprintf('   %-15s: %i','nsteps',nsteps));
+-gradation=getfieldvalue(options,'gradation',2*ones(nsteps,1));
+-disp(sprintf('   %-15s: %g','gradation',gradation(1)));
+-epsilon=getfieldvalue(options,'epsilon',3);
+-disp(sprintf('   %-15s: %f','epsilon',epsilon));
+-hmin=getfieldvalue(options,'hmin',500);
+-disp(sprintf('   %-15s: %f','hmin',hmin));
+-hmax=getfieldvalue(options,'hmax',150*10^3);
+-disp(sprintf('   %-15s: %f\n','hmax',hmax));
+-
+-%mesh with initial resolution
+-disp('Initial mesh generation...');
+-md=setmesh(md,domainoutline,resolution);
+-disp(['Initial mesh, number of elements: ' num2str(md.mesh.numberofelements)]);
+-
+-%load velocities 
+-disp('loading velocities...');
+-NamesV=VelFindVarNames(velocities);
+-Vel=load(velocities);
+-
+-%compute thickness?
+-if ~strcmpi(thickness,'none'),
+-	disp('loading thickness...');
+-	NamesH=FieldFindVarNames(thickness);
+-	Thi=load(thickness);
+-	thicknesspresent=1;
+-else
+-	thicknesspresent=0;
+-end
+-
+-%start mesh adaptation
+-for i=1:nsteps,
+-	disp(['Iteration #' num2str(i) '/' num2str(nsteps)]);
+-
+-	%interpolate velocities onto mesh
+-	disp('   interpolating velocities...');
+-	if strcmpi(NamesV.interp,'node'),
+-		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.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);
+-	
+-	if thicknesspresent,
+-		disp('   interpolating thickness...');
+-		if strcmpi(NamesH.interp,'node'),
+-			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.mesh.x,md.mesh.y,0);
+-		end
+-		field=[field h];
+-	end
+-	
+-	%set nodeonwater field
+-	if ~strcmp(groundeddomain,'N/A'),
+-		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;
+-	else
+-		md.nodeonwater=zeros(md.mesh.numberofvertices,1);
+-	end
+-
+-	%adapt according to velocities
+-	disp('   adapting...');
+-	md=bamg(md,'field',field,'hmin',hmin,'hmax',hmax,'gradation',gradation(i),'err',epsilon);
+-
+-end
+-	
+-disp(['Final mesh, number of elements: ' num2str(md.mesh.numberofelements)]);
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/yams.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/yams.m	(revision 0)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/yams.m	(revision 11015)
+@@ -0,0 +1,171 @@
++function md=yams(md,varargin);
++%MESHYAMS - Build model of Antarctica by refining according to observed velocity error estimator
++%
++%   Usage:
++%      md=yams(md,varargin);
++%      where varargin is a lit of paired arguments. 
++%      arguments can be: 'domainoutline': Argus file containing the outline of the domain to be meshed
++%      arguments can be: 'velocities': matlab file containing the velocities [m/yr]
++%      optional arguments: 'groundeddomain': Argus file containing the outline of the grounded ice
++%                          this option is used to minimize the metric on water (no refinement)
++%      optional arguments: 'resolution': initial mesh resolution [m]
++%      optional arguments: 'nsteps': number of steps of mesh adaptation
++%      optional arguments: 'epsilon': average interpolation error wished [m/yr]
++%      optional arguments: 'hmin': minimum edge length
++%      optional arguments: 'hmanx': maximum edge
++%      optional arguments: 'riftoutline': if rifts are present, specifies rift outline file.
++%      
++%
++%   Examples:
++%      md=yams(md,'domainoutline','Domain.exp','velocities','vel.mat');
++%      md=yams(md,'domainoutline','Domain.exp','velocities','vel.mat','groundeddomain','ground.exp');
++%      md=yams(md,'domainoutline','Domain.exp','velocities','vel.mat','groundeddomain','ground.exp','nsteps',6,'epsilon',2,'hmin',500,'hmax',30000);
++
++%recover options
++options=pairoptions(varargin{:});
++options=deleteduplicates(options,1);
++
++%recover some fields
++disp('MeshYams Options:')
++domainoutline=getfieldvalue(options,'domainoutline');
++disp(sprintf('   %-15s: ''%s''','DomainOutline',domainoutline));
++riftoutline=getfieldvalue(options,'riftoutline','N/A');
++disp(sprintf('   %-15s: ''%s''','riftoutline',riftoutline));
++groundeddomain=getfieldvalue(options,'groundeddomain','N/A');
++disp(sprintf('   %-15s: ''%s''','GroundedDomain',groundeddomain));
++velocities=getfieldvalue(options,'velocities');
++disp(sprintf('   %-15s: ''%s''','Velocities',velocities));
++resolution=getfieldvalue(options,'resolution',5000);
++disp(sprintf('   %-15s: %f','Resolution',resolution));
++nsteps=getfieldvalue(options,'nsteps',6);
++disp(sprintf('   %-15s: %i','nsteps',nsteps));
++gradation=getfieldvalue(options,'gradation',2*ones(nsteps,1));
++disp(sprintf('   %-15s: %g','gradation',gradation(1)));
++epsilon=getfieldvalue(options,'epsilon',3);
++disp(sprintf('   %-15s: %f','epsilon',epsilon));
++hmin=getfieldvalue(options,'hmin',500);
++disp(sprintf('   %-15s: %f','hmin',hmin));
++hmax=getfieldvalue(options,'hmax',150*10^3);
++disp(sprintf('   %-15s: %f\n','hmax',hmax));
++
++%mesh with initial resolution
++disp('Initial mesh generation...');
++if strcmpi(riftoutline,'N/A');
++	md=setmesh(md,domainoutline,resolution);
++else
++	md=setmesh(md,domainoutline,riftoutline,resolution);
++	md=meshprocessrifts(md,domainoutline);
++end
++disp(['Initial mesh, number of elements: ' num2str(md.mesh.numberofelements)]);
++
++%load velocities 
++disp('loading velocities...');
++Names=VelFindVarNames(velocities);
++Vel=load(velocities);
++
++%start mesh adaptation
++for i=1:nsteps,
++	disp(['Iteration #' num2str(i) '/' num2str(nsteps)]);
++
++	%interpolate velocities onto mesh
++	disp('   interpolating velocities...');
++	if strcmpi(Names.interp,'node'),
++		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.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);
++
++	%set mask.vertexonwater  field
++	if ~strcmp(groundeddomain,'N/A'),
++		nodeground=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,groundeddomain,'node',2);
++		md.mask.vertexonwater=ones(md.mesh.numberofvertices,1);
++		md.mask.vertexonwater(find(nodeground))=0;
++	else
++		md.mask.vertexonwater=zeros(md.mesh.numberofvertices,1);
++	end
++
++	%adapt according to velocities
++	disp('   adapting...');
++	md=YamsCall(md,field,hmin,hmax,gradation(i),epsilon);
++
++	%if we have rifts, we just messed them up, we need to recreate the segments that constitute those 
++	%rifts, because the segments are used in YamsCall to freeze the rifts elements during refinement.
++	if md.rifts.numrifts, 
++		md.mesh.vertexconnectivity=NodeConnectivity(md.mesh.elements,md.mesh.numberofvertices);
++		md.mesh.elementconnectivity=ElementConnectivity(md.mesh.elements,md.mesh.vertexconnectivity);
++		md.mesh.segments=findsegments(md);
++		md=yamsrecreateriftsegments(md);
++	end
++
++end
++	
++disp(['Final mesh, number of elements: ' num2str(md.mesh.numberofelements)]);
++
++%Now, build the connectivity tables for this mesh.
++md.mesh.vertexconnectivity=NodeConnectivity(md.mesh.elements,md.mesh.numberofvertices);
++md.mesh.elementconnectivity=ElementConnectivity(md.mesh.elements,md.mesh.vertexconnectivity);
++
++%recreate segments
++md.mesh.segments=findsegments(md);
++md.mesh.vertexonboundary=zeros(md.mesh.numberofvertices,1); md.mesh.vertexonboundary(md.mesh.segments(:,1:2))=1;
++
++%Fill in rest of fields:
++md.mesh.z=zeros(md.mesh.numberofvertices,1);
++md.mesh.vertexonbed=ones(md.mesh.numberofvertices,1);
++md.mesh.vertexonsurface=ones(md.mesh.numberofvertices,1);
++md.mesh.elementonbed=ones(md.mesh.numberofelements,1);
++md.mesh.elementonsurface=ones(md.mesh.numberofelements,1);
++if ~strcmp(groundeddomain,'N/A'),
++	nodeground=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,groundeddomain,'node',2);
++	md.mask.vertexonwater=ones(md.mesh.numberofvertices,1);
++	md.mask.vertexonwater(find(nodeground))=0;
++else
++	md.mask.vertexonwater=zeros(md.mesh.numberofvertices,1);
++end
++if strcmpi(Names.interp,'node'),
++	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.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);
++
++%deal with rifts 
++if md.rifts.numrifts,
++	%first, recreate rift segments
++	md=meshyamsrecreateriftsegments(md);
++
++	%using the segments, recreate the penaltypairs
++	for j=1:md.rifts.numrifts,
++		rift=md.rifts.riftstruct(j);
++
++		%build normals and lengths of segments:
++		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: 
++		numpenaltypairs=length(rift.segments)/2-1;
++		rift.penaltypairs=zeros(numpenaltypairs,7);
++
++		for i=1:numpenaltypairs,
++			rift.penaltypairs(i,1)=rift.segments(i,2);
++			rift.penaltypairs(i,2)=rift.segments(end-i,2);
++			rift.penaltypairs(i,3)=rift.segments(i,3);
++			rift.penaltypairs(i,4)=rift.segments(end-i,3);
++			rift.penaltypairs(i,5)=normalsx(i)+normalsx(i+1);
++			rift.penaltypairs(i,6)=normalsy(i)+normalsy(i+1);
++			rift.penaltypairs(i,7)=(lengths(i)+lengths(i+1))/2;
++		end
++		%renormalize norms: 
++		norms=sqrt(rift.penaltypairs(:,5).^2+rift.penaltypairs(:,6).^2);
++		rift.penaltypairs(:,5)=rift.penaltypairs(:,5)./norms;
++		rift.penaltypairs(:,6)=rift.penaltypairs(:,6)./norms;
++
++		md.rifts.riftstruct(j)=rift;
++	end
++end
Index: /issm/oecreview/Archive/10977-11024/ISSM-11015-11016.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11015-11016.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11015-11016.diff	(revision 11025)
@@ -0,0 +1,32 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/bamg.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/bamg.m	(revision 11015)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/mesh/bamg.m	(revision 11016)
+@@ -252,17 +252,16 @@
+ 	%process geom
+ 	%bamg_geometry=processgeometry(bamg_geometry,getfieldvalue(options,'tol',NaN),domain(1));
+ 
+-elseif isstruct(md.private.bamg) & isfield('mesh',md.private.bamg),
++elseif isstruct(md.private.bamg) & isfield(md.private.bamg,'geometry'),
+ 	bamg_geometry=bamggeom(md.private.bamg.geometry); 
+ else
+ 	%do nothing...
+ end
+ %}}}
+-
+ % Bamg Mesh parameters {{{1
+ if (~exist(options,'domain') & md.mesh.numberofvertices~=0 & md.mesh.dimension==2),
+ 
+-	if isstruct(md.private.bamg) & isfield('mesh',md.private.bamg),
++	if isstruct(md.private.bamg) & isfield(md.private.bamg,'mesh'),
+ 		bamg_mesh=bamgmesh(md.private.bamg.mesh);
+ 	else
+ 		bamg_mesh.Vertices=[md.mesh.x md.mesh.y ones(md.mesh.numberofvertices,1)];
+@@ -274,7 +273,6 @@
+ 	end
+ end
+ %}}}
+-
+ % Bamg Options {{{1
+ bamg_options.Crack=getfieldvalue(options,'Crack',0);
+ bamg_options.anisomax=getfieldvalue(options,'anisomax',10^30);
Index: /issm/oecreview/Archive/10977-11024/ISSM-11016-11017.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11016-11017.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11016-11017.diff	(revision 11025)
@@ -0,0 +1,20 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/Archives/Archive267.mat
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: /proj/ice/larour/issm-uci/trunk-jpl/test/Archives/Archive267.mat
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/Archives/Archive268.mat
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: /proj/ice/larour/issm-uci/trunk-jpl/test/Archives/Archive268.mat
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
Index: /issm/oecreview/Archive/10977-11024/ISSM-11017-11018.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11017-11018.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11017-11018.diff	(revision 11025)
@@ -0,0 +1,167 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test267.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test267.m	(revision 0)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test267.m	(revision 11018)
+@@ -0,0 +1,72 @@
++md=triangle(model,'../Exp/Square.exp',180000);
++md=setmask(md,'all','');
++md=parameterize(md,'../Par/SquareShelf.par');
++md=setflowequation(md,'macayeal','all');
++md.cluster=generic('name',oshostname(),'np',3);
++
++md.timestepping.time_step=1;
++md.settings.output_frequency=1;
++md.timestepping.final_time=4;
++
++smb = ones(md.mesh.numberofvertices,1)*3.6;
++smb=[ smb smb*-1 ];
++
++md.surfaceforcings.mass_balance= smb;
++md.surfaceforcings.mass_balance(end+1,:)=[1.5 3];
++md.transient.isthermal=0;
++%Dakota options
++
++%partitioning
++md.qmu.numberofpartitions=20;
++md=partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on');
++md.qmu.partition=md.qmu.partition-1;
++
++%variables
++md.qmu.variables.surface_mass_balance=normal_uncertain('scaled_SurfaceforcingsMassBalance',1,0.1);
++
++%responses
++md.qmu.responses.MaxVel=response_function('MaxVel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.IceVolume=response_function('IceVolume',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux1=response_function('indexed_MassFlux_1',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux2=response_function('indexed_MassFlux_2',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux3=response_function('indexed_MassFlux_3',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux4=response_function('indexed_MassFlux_4',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux5=response_function('indexed_MassFlux_5',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.massFlux6=response_function('indexed_MassFlux_6',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++
++%mass flux profiles
++md.qmu.mass_flux_profiles={'../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp'};
++md.qmu.mass_flux_profile_directory=pwd;
++
++%%  nond_sampling study
++md.qmu.method=dakota_method('nond_samp');
++md.qmu.method(end)=dmeth_params_set(md.qmu.method(end),'seed',1234,'samples',20,'sample_type','lhs');
++
++%parameters
++md.qmu.params.direct=true;
++md.qmu.params.analysis_driver='';
++md.qmu.params.analysis_components='';
++md.qmu.params.evaluation_concurrency=1;
++md.qmu.params.interval_type='forward';
++md.qmu.isdakota=1;
++
++md.diagnostic.reltol=10^-5; %tighten for qmu analyses
++md.transient.requested_outputs=IceVolumeEnum();
++
++%solve
++md=solve(md,TransientSolutionEnum,'overwrite','y');
++md=tres(md,'dakota');
++
++%Fields and tolerances to track changes
++md.results.dakota.importancefactors=[];
++for i=1:8,
++	md.results.dakota.importancefactors=[md.results.dakota.importancefactors md.results.dakota.dresp_out(i).mean];
++end
++for i=1:8,
++	md.results.dakota.importancefactors=[md.results.dakota.importancefactors md.results.dakota.dresp_out(i).stddev];
++end
++field_names     ={'importancefactors'};
++field_tolerances={1e-11};
++field_values={...
++         md.results.dakota.importancefactors,...
++	};
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test268.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test268.m	(revision 0)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test268.m	(revision 11018)
+@@ -0,0 +1,72 @@
++md=triangle(model,'../Exp/Square.exp',180000);
++md=setmask(md,'all','');
++md=parameterize(md,'../Par/SquareShelf.par');
++md=setflowequation(md,'macayeal','all');
++md.cluster=generic('name',oshostname(),'np',3);
++
++md.timestepping.time_step=1;
++md.settings.output_frequency=1;
++md.timestepping.final_time=4;
++
++smb = ones(md.mesh.numberofvertices,1)*3.6;
++smb=[ smb smb*-1 ];
++
++md.surfaceforcings.mass_balance= smb;
++md.surfaceforcings.mass_balance(end+1,:)=[1.5 3];
++md.transient.isthermal=0;
++%Dakota options
++
++%partitioning
++md.qmu.numberofpartitions=20;
++md=partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions,'weighting','on');
++md.qmu.partition=md.qmu.partition-1;
++
++%variables
++md.qmu.variables.surface_mass_balance=normal_uncertain('scaled_SurfaceforcingsMassBalance',1,100);
++
++%responses
++md.qmu.responses.MaxVel=response_function('MaxVel',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.IceVolume=response_function('IceVolume',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux1=response_function('indexed_MassFlux_1',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux2=response_function('indexed_MassFlux_2',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux3=response_function('indexed_MassFlux_3',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux4=response_function('indexed_MassFlux_4',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.MassFlux5=response_function('indexed_MassFlux_5',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++md.qmu.responses.massFlux6=response_function('indexed_MassFlux_6',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
++
++%mass flux profiles
++md.qmu.mass_flux_profiles={'../Exp/MassFlux1.exp','../Exp/MassFlux2.exp','../Exp/MassFlux3.exp','../Exp/MassFlux4.exp','../Exp/MassFlux5.exp','../Exp/MassFlux6.exp'};
++md.qmu.mass_flux_profile_directory=pwd;
++
++%method
++md.qmu.method     =dakota_method('nond_l');
++
++%parameters
++md.qmu.params.direct=true;
++md.qmu.params.analysis_driver='';
++md.qmu.params.analysis_components='';
++md.qmu.params.evaluation_concurrency=1;
++md.qmu.params.interval_type='forward';
++md.qmu.params.fd_gradient_step_size='0.1';
++md.qmu.isdakota=1;
++
++md.diagnostic.reltol=10^-5; %tighten for qmu analyses
++md.transient.requested_outputs=IceVolumeEnum();
++
++%solve
++md=solve(md,TransientSolutionEnum,'overwrite','y');
++md=tres(md,'dakota');
++
++%Fields and tolerances to track changes
++md.results.dakota.importancefactors=[];
++for i=1:8,
++	md.results.dakota.importancefactors=[md.results.dakota.importancefactors md.results.dakota.dresp_out(i).mean];
++end
++for i=1:8,
++	md.results.dakota.importancefactors=[md.results.dakota.importancefactors md.results.dakota.dresp_out(i).stddev];
++end
++field_names     ={'importancefactors'};
++field_tolerances={1e-11};
++field_values={...
++         md.results.dakota.importancefactors,...
++	};
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/IdToName.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/IdToName.m	(revision 11017)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/IdToName.m	(revision 11018)
+@@ -109,6 +109,8 @@
+ 	case 264, name='SquareShelfTherTranForcTempParallel';
+ 	case 265, name='SquareShelfTranP3dForcTempSerial';
+ 	case 266, name='SquareShelfTranP3dForcTempParallel';
++	case 267, name='SquareShelfTranForceNeg2dDakotaSamp';
++   case 268, name='SquareShelfTranForceNeg2dDakotaLocal';
+ 	case 301, name='SquareSheetConstrainedDiagM2dSerial';
+ 	case 302, name='SquareSheetConstrainedDiagM2dParallel';
+ 	case 303, name='SquareSheetConstrainedDiagH2dSerial';
Index: /issm/oecreview/Archive/10977-11024/ISSM-11020-11021.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11020-11021.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11020-11021.diff	(revision 11025)
@@ -0,0 +1,15 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/petscversion.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/petscversion.m	(revision 11020)
++++ /proj/ice/larour/issm-uci/trunk-jpl/src/m/model/petscversion.m	(revision 11021)
+@@ -12,7 +12,9 @@
+ 
+ %go through the file, and recover the line we want
+ fid=fopen(configfile,'r');
+-while(1),
++if(fid==-1), error(['could not open file: ' configfile]); end
++
++while(true),
+ 	tline=fgets(fid);
+ 	if ~ischar(tline), break, end
+ 	if  strncmp(tline,'#define _PETSC_MAJOR_',21),
Index: /issm/oecreview/Archive/10977-11024/ISSM-11023-11024.diff
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-11023-11024.diff	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-11023-11024.diff	(revision 11025)
@@ -0,0 +1,105 @@
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1602.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1602.m	(revision 11023)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1602.m	(revision 11024)
+@@ -8,7 +8,6 @@
+ md.initialization.vy(:)=0;
+ md.initialization.vel(:)=0;
+ 
+-md.settings.results_on_vertices=1;
+ md.cluster=generic('name',oshostname,'np',3);
+ md=solve(md,DiagnosticSolutionEnum);
+ vel0=md.results.DiagnosticSolution.Vel;
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1301.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1301.m	(revision 11023)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1301.m	(revision 11024)
+@@ -28,8 +28,7 @@
+ md=solve(md,ThermalSolutionEnum);
+ 
+ %plot results
+-comp_melting=zeros(md.mesh.numberofvertices,1);
+-comp_melting(md.results.ThermalSolution.BasalforcingsMeltingRate.index)=md.results.ThermalSolution.BasalforcingsMeltingRate.value;
++comp_melting=md.results.ThermalSolution.BasalforcingsMeltingRate;
+ relative=abs((comp_melting-melting)./melting)*100;
+ relative(find(comp_melting==melting))=0;
+ plotmodel(md,'data',comp_melting,'title','Modeled melting','data',melting,'title','Analytical melting',...
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1603.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1603.m	(revision 11023)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1603.m	(revision 11024)
+@@ -8,7 +8,6 @@
+ md.initialization.vy(:)=0;
+ md.initialization.vel(:)=0;
+ 
+-md.settings.results_on_vertices=1;
+ md.cluster=generic('name',oshostname,'np',3);
+ md=solve(md,DiagnosticSolutionEnum);
+ vel0=md.results.DiagnosticSolution.Vel;
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1302.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1302.m	(revision 11023)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1302.m	(revision 11024)
+@@ -29,8 +29,7 @@
+ md=solve(md,ThermalSolutionEnum);
+ 
+ %plot results
+-comp_temp=zeros(md.mesh.numberofvertices,1);
+-comp_temp(md.results.ThermalSolution.Temperature.index)=md.results.ThermalSolution.Temperature.value;
++comp_temp=md.results.ThermalSolution.Temperature;
+ relative=abs((comp_temp-md.initialization.temperature)./md.initialization.temperature)*100;
+ relative(find(comp_temp==md.initialization.temperature))=0;
+ plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,...
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1303.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1303.m	(revision 11023)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1303.m	(revision 11024)
+@@ -24,8 +24,7 @@
+ md=solve(md,ThermalSolutionEnum);
+ 
+ %plot results
+-comp_temp=zeros(md.mesh.numberofvertices,1);
+-comp_temp(md.results.ThermalSolution.Temperature.index)=md.results.ThermalSolution.Temperature.value;
++comp_temp=md.results.ThermalSolution.Temperature;
+ relative=abs((comp_temp-md.initialization.temperature)./md.initialization.temperature)*100;
+ relative(find(comp_temp==md.initialization.temperature))=0;
+ plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,...
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1304.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1304.m	(revision 11023)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1304.m	(revision 11024)
+@@ -25,8 +25,7 @@
+ md=solve(md,ThermalSolutionEnum);
+ 
+ %plot results
+-comp_temp=zeros(md.mesh.numberofvertices,1);
+-comp_temp(md.results.ThermalSolution.Temperature.index)=md.results.ThermalSolution.Temperature.value;
++comp_temp=md.results.ThermalSolution.Temperature;
+ relative=abs((comp_temp-md.initialization.temperature)./md.initialization.temperature)*100;
+ relative(find(comp_temp==md.initialization.temperature))=0;
+ plotmodel(md,'data',comp_temp,'title','Modeled temperature [K]','data',md.initialization.temperature,'view',3,...
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1502.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1502.m	(revision 11023)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1502.m	(revision 11024)
+@@ -5,7 +5,7 @@
+ md=parameterize(md,'../Par/SquareShelf.par');
+ md=setflowequation(md,'macayeal','all');
+ md=extrude(md,3,1);
+-md.cluster=generic('name',oshostname(),'np',3);
++md.cluster=generic('name',oshostname(),'np',1);
+ md.transient.isthermal=0;
+ 
+ md.timestepping.time_step=1;
+Index: /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1601.m
+===================================================================
+--- /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1601.m	(revision 11023)
++++ /proj/ice/larour/issm-uci/trunk-jpl/test/NightlyRun/test1601.m	(revision 11024)
+@@ -7,7 +7,6 @@
+ md.initialization.vy(:)=0;
+ md.initialization.vel(:)=0;
+ 
+-md.settings.results_on_vertices=1;
+ md.cluster=generic('name',oshostname,'np',2);
+ md=solve(md,DiagnosticSolutionEnum);
+ vel0=md.results.DiagnosticSolution.Vel;
Index: /issm/oecreview/Archive/10977-11024/ISSM-DocReview-10977-11024.tex
===================================================================
--- /issm/oecreview/Archive/10977-11024/ISSM-DocReview-10977-11024.tex	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/ISSM-DocReview-10977-11024.tex	(revision 11025)
@@ -0,0 +1,67 @@
+\documentclass[]{report}   % list options between brackets
+\usepackage{graphicx}              % list packages between braces
+
+% type user-defined commands here
+
+\begin{document}
+
+\title{JPL EXPORT ADMINISTRATION \\ DOCUMENT REVIEW RECORD}   % type title between braces
+\author{Tom Scavo}         % type author(s) between braces
+\date{October 27, 1995}    % type date between braces
+%\maketitle
+
+
+\begin{center}
+\begin{tabular}{ |c|c| }
+\hline
+JPL EXPORT ADMINISTRATION \\
+\textit{ DOCUMENT REVIEW RECORD} \\
+\hline
+\end{tabular}
+\end{center}
+
+\hfill Log \#: \underline{\input{LogNumber}}
+
+\vspace{1cm}
+\noindent (Note: This form and process do not replace the procedures described in JPL Policy relating to review and approval of proposals and contractual 
+documents. This process is intended to document the review and coordination of requests to ascertain the export control ramifications relating to specific 
+documents. Export Administration signature does not convey authority to export or release the "Exporter of Record" from any export laws or regulations.)\\
+
+\noindent \textbf{Program:} \underline{ISSM: Ice Sheet System Model} \\ \\
+\noindent \textbf{Person Requesting or Initiating Export}: \underline{Dr. Eric Larour}\\ \\
+\noindent \textbf{Date Received}: \underline{\input{Date}}\\ \\
+\noindent \textbf{Document Title/Description}: ISSM changes from revision \input{r1} to revision \input{r2} \\ \\
+\noindent \textbf{Release to:} \underline{http://issm.ess.uci.edu/svn/issm/issm/trunk on ISSM svn repository}\\ \\
+\noindent \textbf{JPL Intranet:} \underline{murdo.jpl.nasa.gov/proj/ice/larour/issm-uci/trunk-jpl}\\ \\
+
+\noindent \textbf{Disposition: 6 } 
+Does not contain export-controlled information. May be released/disclosed as requested subject to 
+Company guidelines on protection of proprietary information (if applicable). \\
+
+\noindent \textbf{Comments:}  see table of changes below. \\ \\
+\noindent \textbf{Reviewed by ISSM Export Transfer Liaison:} Dr. Eric Larour \hfill \textbf{Date:} \input{Date} \\ 
+\includegraphics[scale=1]{signature.eps}
+
+\noindent JPL Export Administration Form TBS – June 29, 2011
+
+\begin{center}
+\line(1,0){250}
+\end{center}
+
+\noindent \textbf{Disposition:} \\
+1:	  Public Domain Information (Ref ITAR Section 120.11) \\
+2:	  Qualifies for ITAR Exemption				 \\
+3:	  Covered by Department of State License/Agreement Number					  \\
+4:	  Covered by Department of Commerce validated license or exception				 \\
+5:	  New License Required \\
+6:	  Does not contain export-controlled information.  May be released/disclosed as requested subject
+   to Company guidelines on protection of proprietary information (if applicable). \\
+7:	 Other (specify)   
+\begin{center}
+\line(1,0){250}
+\end{center}
+
+
+\input{log}
+
+\end{document}
Index: /issm/oecreview/Archive/10977-11024/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/10977-11024/LogNumber.tex	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/LogNumber.tex	(revision 11025)
@@ -0,0 +1,1 @@
+10977-11024
Index: /issm/oecreview/Archive/10977-11024/Makefile
===================================================================
--- /issm/oecreview/Archive/10977-11024/Makefile	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/Makefile	(revision 11025)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-10977-11024
+
+
+all: 
+	latex $(name).tex
+	dvips $(name).dvi
+	ps2pdf $(name).ps  $(name).pdf
+	rm -rf *.dvi *.log *.aux *.ps
+
+clean:
+	rm -rf *.dvi *.log *.aux
Index: /issm/oecreview/Archive/10977-11024/log.tex
===================================================================
--- /issm/oecreview/Archive/10977-11024/log.tex	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/log.tex	(revision 11025)
@@ -0,0 +1,77 @@
+\noindent \textbf{Change \#1} with diff file ISSM-10979-10980.diff: \\ Function name: \\M /issm/trunk-jpl \\ Export determination: 6. \\Rationale: merged trunk and trunk-jpl \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-10980-10981.diff: \\ Function name: \\M /issm/trunk-jpl \\ Export determination: 6. \\Rationale: merged trunk and trunk-jpl \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-10981-10982.diff: \\ Function name: \\M /issm/trunk-jpl \\ Export determination: 6. \\Rationale: Block revision 10980 from being merged into trunk-jpl \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-10982-10983.diff: \\ Function name: \\M /issm/trunk-jpl \\ Export determination: 6. \\Rationale: Block revision 10980 from being merged into trunk-jpl \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-10983-10984.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/mpich2 \\ Export determination: 6. \\Rationale: New properties to ignore some files \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-10984-10985.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/mpich2 \\ Export determination: 6. \\Rationale: New properties to ignore some files
+M /issm/trunk-jpl/externalpackages/vim/addons/vimrc Added abbreviation in vimrc EN and IT \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-10985-10986.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/vim/addons/vimrc \\ Export determination: 6. \\Rationale: Added abbreviation in vimrc EN and IT
+A /issm/trunk-jpl/cron/configs/linux64\_seroussi\_ucitrunk M /issm/trunk-jpl/cron/cronfiles/linux\_cronfile added nightly run for uci trunk on sunday nights \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-10986-10987.diff: \\ Function name: \\A /issm/trunk-jpl/cron/configs/linux64\_seroussi\_ucitrunk M /issm/trunk-jpl/cron/cronfiles/linux\_cronfile \\ Export determination: 6. \\Rationale: added nightly run for uci trunk on sunday nights
+M /issm/trunk-jpl/src/m/model/plot/plot\_section.m revert plot\_section to previous version as it does not work in 2d \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-10987-10988.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/plot/plot\_section.m \\ Export determination: 6. \\Rationale: revert plot\_section to previous version as it does not work in 2d
+M /issm/trunk-jpl/src/c/solutions/thermal\_core.cpp Fixed thermal\_transient for results\_as\_patches = 0 \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-10988-10989.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/solutions/thermal\_core.cpp \\ Export determination: 6. \\Rationale: Fixed thermal\_transient for results\_as\_patches = 0
+M /issm/trunk-jpl/src/c/Container/Elements.cpp M /issm/trunk-jpl/src/c/Container/Elements.h M /issm/trunk-jpl/src/c/Container/Results.cpp M /issm/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp M /issm/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.h M /issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/ElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h M /issm/trunk-jpl/src/c/objects/Elements/Element.h M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/Penta.h M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.h M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp M /issm/trunk-jpl/src/c/solutions/hydrology\_core.cpp M /issm/trunk-jpl/src/c/solutions/thermal\_core.cpp M /issm/trunk-jpl/src/c/solutions/transient\_core.cpp Fixed many bugs in OutputResult for results\_as\_patches = 0 \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-10989-10990.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Elements.cpp M /issm/trunk-jpl/src/c/Container/Elements.h M /issm/trunk-jpl/src/c/Container/Results.cpp M /issm/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp M /issm/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.h M /issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/ElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h M /issm/trunk-jpl/src/c/objects/Elements/Element.h M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/Penta.h M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.h M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp M /issm/trunk-jpl/src/c/solutions/hydrology\_core.cpp M /issm/trunk-jpl/src/c/solutions/thermal\_core.cpp M /issm/trunk-jpl/src/c/solutions/transient\_core.cpp \\ Export determination: 6. \\Rationale: Fixed many bugs in OutputResult for results\_as\_patches = 0
+M /issm/trunk-jpl/src/c/Container/Elements.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/ElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h M /issm/trunk-jpl/src/c/objects/Elements/Element.h M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/Penta.h M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.h Added support for results on elements \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-10990-10991.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Elements.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/ElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h M /issm/trunk-jpl/src/c/objects/Elements/Element.h M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/Penta.h M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.h \\ Export determination: 6. \\Rationale: Added support for results on elements
+M /issm/trunk-jpl/test/NightlyRun/runme.m archive were not done correctly: patchToVec was generating lines and not columns \\\\
+\noindent \textbf{Change \#13} with diff file ISSM-10991-10992.diff: \\ Function name: \\M /issm/trunk-jpl/test/NightlyRun/runme.m \\ Export determination: 6. \\Rationale: archive were not done correctly: patchToVec was generating lines and not columns
+M /issm/trunk-jpl/src/m/classes/rifts.m M /issm/trunk-jpl/src/m/model/mesh/rifts/meshprocessrifts.m Fixed meshprocessrifts (numrifts does not exist anymore) \\\\
+\noindent \textbf{Change \#14} with diff file ISSM-10992-10993.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/classes/rifts.m M /issm/trunk-jpl/src/m/model/mesh/rifts/meshprocessrifts.m \\ Export determination: 6. \\Rationale: Fixed meshprocessrifts (numrifts does not exist anymore)
+M /issm/trunk-jpl/test/NightlyRun/runme.m fixed runme for dakota \\\\
+\noindent \textbf{Change \#15} with diff file ISSM-10993-10994.diff: \\ Function name: \\M /issm/trunk-jpl/test/NightlyRun/runme.m \\ Export determination: 6. \\Rationale: fixed runme for dakota
+M /issm/trunk-jpl/test/NightlyRun/test442.m too many cpus \\\\
+\noindent \textbf{Change \#16} with diff file ISSM-10994-10995.diff: \\ Function name: \\M /issm/trunk-jpl/test/NightlyRun/test442.m \\ Export determination: 6. \\Rationale: too many cpus
+M /issm/trunk-jpl/src/c/Container/Elements.cpp Better error message if first cpu has no element (results cannot be written) \\\\
+\noindent \textbf{Change \#17} with diff file ISSM-10995-10996.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Elements.cpp \\ Export determination: 6. \\Rationale: Better error message if first cpu has no element (results cannot be written)
+M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp removed defaulting to observed velocities in diagnostic \\\\
+\noindent \textbf{Change \#18} with diff file ISSM-10996-10997.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp \\ Export determination: 6. \\Rationale: removed defaulting to observed velocities in diagnostic
+M /issm/trunk-jpl/src/c/solvers/solver\_stokescoupling\_nonlinear.cpp Fixed leak in tiling \\\\
+\noindent \textbf{Change \#19} with diff file ISSM-10997-10998.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/solvers/solver\_stokescoupling\_nonlinear.cpp \\ Export determination: 6. \\Rationale: Fixed leak in tiling
+M /issm/trunk-jpl/src/c/Container/Elements.cpp in outputresult exit if there is no result \\\\
+\noindent \textbf{Change \#20} with diff file ISSM-10998-10999.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Elements.cpp \\ Export determination: 6. \\Rationale: in outputresult exit if there is no result
+M /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp M /issm/trunk-jpl/src/c/solutions/transient\_core.cpp M /issm/trunk-jpl/src/m/classes/basalforcings.m M /issm/trunk-jpl/src/m/classes/diagnostic.m M /issm/trunk-jpl/src/m/classes/prognostic.m M /issm/trunk-jpl/src/m/classes/thermal.m M /issm/trunk-jpl/src/m/solutions/transient\_core.m cleaned transient for cases where isthermal=0 \\\\
+\noindent \textbf{Change \#21} with diff file ISSM-10999-11000.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp M /issm/trunk-jpl/src/c/solutions/transient\_core.cpp M /issm/trunk-jpl/src/m/classes/basalforcings.m M /issm/trunk-jpl/src/m/classes/diagnostic.m M /issm/trunk-jpl/src/m/classes/prognostic.m M /issm/trunk-jpl/src/m/classes/thermal.m M /issm/trunk-jpl/src/m/solutions/transient\_core.m \\ Export determination: 6. \\Rationale: cleaned transient for cases where isthermal=0
+M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp fixed bathymetry problem for grounding line only in transient \\\\
+\noindent \textbf{Change \#22} with diff file ISSM-11000-11001.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/ModelProcessorx.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp \\ Export determination: 6. \\Rationale: fixed bathymetry problem for grounding line only in transient
+M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/ElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/Penta.h M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.h M /issm/trunk-jpl/src/c/objects/Node.cpp M /issm/trunk-jpl/src/c/objects/Vertex.cpp M /issm/trunk-jpl/src/c/objects/Vertex.h Results on vertices are now averaged using node connectivity as in PatchToVec \\\\
+\noindent \textbf{Change \#23} with diff file ISSM-11001-11002.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/ElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/PentaVertexElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/TriaVertexElementResult.h M /issm/trunk-jpl/src/c/objects/Elements/Penta.cpp M /issm/trunk-jpl/src/c/objects/Elements/Penta.h M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp M /issm/trunk-jpl/src/c/objects/Elements/Tria.h M /issm/trunk-jpl/src/c/objects/Node.cpp M /issm/trunk-jpl/src/c/objects/Vertex.cpp M /issm/trunk-jpl/src/c/objects/Vertex.h \\ Export determination: 6. \\Rationale: Results on vertices are now averaged using node connectivity as in PatchToVec
+M /issm/trunk-jpl/src/m/model/bamg.m quick fix for test527 \\\\
+\noindent \textbf{Change \#24} with diff file ISSM-11002-11003.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/bamg.m \\ Export determination: 6. \\Rationale: quick fix for test527
+M /issm/trunk-jpl/src/m/model/setflowequation.m cleaning up setflowequations \\\\
+\noindent \textbf{Change \#25} with diff file ISSM-11003-11004.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/setflowequation.m \\ Export determination: 6. \\Rationale: cleaning up setflowequations
+M /issm/trunk-jpl/src/m/model/setflowequation.m extended better setflowequation to macayealstokes and pattynstokes coupling \\\\
+\noindent \textbf{Change \#26} with diff file ISSM-11004-11005.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/setflowequation.m \\ Export determination: 6. \\Rationale: extended better setflowequation to macayealstokes and pattynstokes coupling
+M /issm/trunk-jpl/src/m/model/setflowequation.m minor \\\\
+\noindent \textbf{Change \#27} with diff file ISSM-11005-11006.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/setflowequation.m \\ Export determination: 6. \\Rationale: minor
+M /issm/trunk-jpl/test/Archives/Archive443.mat M /issm/trunk-jpl/test/Archives/Archive444.mat changed to archive after improving setflowequation \\\\
+\noindent \textbf{Change \#28} with diff file ISSM-11006-11007.diff: \\ Function name: \\M /issm/trunk-jpl/test/Archives/Archive443.mat M /issm/trunk-jpl/test/Archives/Archive444.mat \\ Export determination: 6. \\Rationale: changed to archive after improving setflowequation
+M /issm/trunk-jpl/src/m/classes/inversion.m Chnaged ordering of display \\\\
+\noindent \textbf{Change \#29} with diff file ISSM-11007-11008.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/classes/inversion.m \\ Export determination: 6. \\Rationale: Chnaged ordering of display
+M /issm/trunk-jpl/src/m/classes/inversion.m Chnaged ordering of display \\\\
+\noindent \textbf{Change \#30} with diff file ISSM-11008-11009.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/classes/inversion.m \\ Export determination: 6. \\Rationale: Chnaged ordering of display
+M /issm/trunk-jpl/src/m/model/bamg.m M /issm/trunk-jpl/src/m/model/plot/plot\_gridded.m Fixed some error messages on bamg \\\\
+\noindent \textbf{Change \#31} with diff file ISSM-11009-11010.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/bamg.m M /issm/trunk-jpl/src/m/model/plot/plot\_gridded.m \\ Export determination: 6. \\Rationale: Fixed some error messages on bamg
+D /issm/trunk-jpl/src/m/model/bamg.m A /issm/trunk-jpl/src/m/model/mesh/bamg.m (from /issm/trunk-jpl/src/m/model/bamg.m:11009) moved bamg to mesh directory \\\\
+\noindent \textbf{Change \#32} with diff file ISSM-11010-11011.diff: \\ Function name: \\D /issm/trunk-jpl/src/m/model/bamg.m A /issm/trunk-jpl/src/m/model/mesh/bamg.m (from /issm/trunk-jpl/src/m/model/bamg.m:11009) \\ Export determination: 6. \\Rationale: moved bamg to mesh directory
+M /issm/trunk-jpl/src/m/model/mesh/meshnodensity.m D /issm/trunk-jpl/src/m/model/mesh/setmesh.m A /issm/trunk-jpl/src/m/model/mesh/triangle.m (from /issm/trunk-jpl/src/m/model/mesh/setmesh.m:11008) M /issm/trunk-jpl/src/m/utils/Mesh/roundmesh.m moved setmesh to triangle \\\\
+\noindent \textbf{Change \#33} with diff file ISSM-11011-11012.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/mesh/meshnodensity.m D /issm/trunk-jpl/src/m/model/mesh/setmesh.m A /issm/trunk-jpl/src/m/model/mesh/triangle.m (from /issm/trunk-jpl/src/m/model/mesh/setmesh.m:11008) M /issm/trunk-jpl/src/m/utils/Mesh/roundmesh.m \\ Export determination: 6. \\Rationale: moved setmesh to triangle
+M /issm/trunk-jpl/examples/SquareIceShelf/runme.m moved setmesh to triangle \\\\
+\noindent \textbf{Change \#34} with diff file ISSM-11012-11013.diff: \\ Function name: \\M /issm/trunk-jpl/examples/SquareIceShelf/runme.m \\ Export determination: 6. \\Rationale: moved setmesh to triangle
+D /issm/trunk-jpl/test/Miscellaneous not needed anymore \\\\
+\noindent \textbf{Change \#35} with diff file ISSM-11013-11014.diff: \\ Function name: \\D /issm/trunk-jpl/test/Miscellaneous \\ Export determination: 6. \\Rationale: not needed anymore
+M /issm/trunk-jpl/test/NightlyRun/dak.m M /issm/trunk-jpl/test/NightlyRun/test101.m M /issm/trunk-jpl/test/NightlyRun/test102.m M /issm/trunk-jpl/test/NightlyRun/test103.m M /issm/trunk-jpl/test/NightlyRun/test104.m M /issm/trunk-jpl/test/NightlyRun/test105.m M /issm/trunk-jpl/test/NightlyRun/test106.m M /issm/trunk-jpl/test/NightlyRun/test107.m M /issm/trunk-jpl/test/NightlyRun/test108.m M /issm/trunk-jpl/test/NightlyRun/test109.m M /issm/trunk-jpl/test/NightlyRun/test110.m M /issm/trunk-jpl/test/NightlyRun/test111.m M /issm/trunk-jpl/test/NightlyRun/test1110.m M /issm/trunk-jpl/test/NightlyRun/test112.m M /issm/trunk-jpl/test/NightlyRun/test113.m M /issm/trunk-jpl/test/NightlyRun/test114.m M /issm/trunk-jpl/test/NightlyRun/test115.m M /issm/trunk-jpl/test/NightlyRun/test116.m M /issm/trunk-jpl/test/NightlyRun/test117.m M /issm/trunk-jpl/test/NightlyRun/test118.m M /issm/trunk-jpl/test/NightlyRun/test119.m M /issm/trunk-jpl/test/NightlyRun/test120.m M /issm/trunk-jpl/test/NightlyRun/test1202.m M /issm/trunk-jpl/test/NightlyRun/test1203.m M /issm/trunk-jpl/test/NightlyRun/test1204.m M /issm/trunk-jpl/test/NightlyRun/test1208.m M /issm/trunk-jpl/test/NightlyRun/test121.m M /issm/trunk-jpl/test/NightlyRun/test122.m M /issm/trunk-jpl/test/NightlyRun/test123.m M /issm/trunk-jpl/test/NightlyRun/test124.m M /issm/trunk-jpl/test/NightlyRun/test125.m M /issm/trunk-jpl/test/NightlyRun/test126.m M /issm/trunk-jpl/test/NightlyRun/test127.m M /issm/trunk-jpl/test/NightlyRun/test128.m M /issm/trunk-jpl/test/NightlyRun/test129.m M /issm/trunk-jpl/test/NightlyRun/test130.m M /issm/trunk-jpl/test/NightlyRun/test1301.m M /issm/trunk-jpl/test/NightlyRun/test1302.m M /issm/trunk-jpl/test/NightlyRun/test1303.m M /issm/trunk-jpl/test/NightlyRun/test1304.m M /issm/trunk-jpl/test/NightlyRun/test131.m M /issm/trunk-jpl/test/NightlyRun/test132.m M /issm/trunk-jpl/test/NightlyRun/test133.m M /issm/trunk-jpl/test/NightlyRun/test134.m M /issm/trunk-jpl/test/NightlyRun/test135.m M /issm/trunk-jpl/test/NightlyRun/test136.m M /issm/trunk-jpl/test/NightlyRun/test1501.m M /issm/trunk-jpl/test/NightlyRun/test1502.m M /issm/trunk-jpl/test/NightlyRun/test1601.m M /issm/trunk-jpl/test/NightlyRun/test1602.m M /issm/trunk-jpl/test/NightlyRun/test1603.m M /issm/trunk-jpl/test/NightlyRun/test201.m M /issm/trunk-jpl/test/NightlyRun/test202.m M /issm/trunk-jpl/test/NightlyRun/test203.m M /issm/trunk-jpl/test/NightlyRun/test204.m M /issm/trunk-jpl/test/NightlyRun/test205.m M /issm/trunk-jpl/test/NightlyRun/test206.m M /issm/trunk-jpl/test/NightlyRun/test207.m M /issm/trunk-jpl/test/NightlyRun/test208.m M /issm/trunk-jpl/test/NightlyRun/test209.m M /issm/trunk-jpl/test/NightlyRun/test210.m M /issm/trunk-jpl/test/NightlyRun/test211.m M /issm/trunk-jpl/test/NightlyRun/test212.m M /issm/trunk-jpl/test/NightlyRun/test213.m M /issm/trunk-jpl/test/NightlyRun/test214.m M /issm/trunk-jpl/test/NightlyRun/test215.m M /issm/trunk-jpl/test/NightlyRun/test216.m M /issm/trunk-jpl/test/NightlyRun/test217.m M /issm/trunk-jpl/test/NightlyRun/test218.m M /issm/trunk-jpl/test/NightlyRun/test219.m M /issm/trunk-jpl/test/NightlyRun/test220.m M /issm/trunk-jpl/test/NightlyRun/test221.m M /issm/trunk-jpl/test/NightlyRun/test222.m M /issm/trunk-jpl/test/NightlyRun/test223.m M /issm/trunk-jpl/test/NightlyRun/test224.m M /issm/trunk-jpl/test/NightlyRun/test225.m M /issm/trunk-jpl/test/NightlyRun/test226.m M /issm/trunk-jpl/test/NightlyRun/test227.m M /issm/trunk-jpl/test/NightlyRun/test228.m M /issm/trunk-jpl/test/NightlyRun/test229.m M /issm/trunk-jpl/test/NightlyRun/test230.m M /issm/trunk-jpl/test/NightlyRun/test232.m M /issm/trunk-jpl/test/NightlyRun/test233.m M /issm/trunk-jpl/test/NightlyRun/test234.m M /issm/trunk-jpl/test/NightlyRun/test237.m M /issm/trunk-jpl/test/NightlyRun/test238.m M /issm/trunk-jpl/test/NightlyRun/test239.m M /issm/trunk-jpl/test/NightlyRun/test240.m M /issm/trunk-jpl/test/NightlyRun/test241.m M /issm/trunk-jpl/test/NightlyRun/test242.m M /issm/trunk-jpl/test/NightlyRun/test243.m M /issm/trunk-jpl/test/NightlyRun/test244.m M /issm/trunk-jpl/test/NightlyRun/test245.m M /issm/trunk-jpl/test/NightlyRun/test246.m M /issm/trunk-jpl/test/NightlyRun/test247.m M /issm/trunk-jpl/test/NightlyRun/test248.m M /issm/trunk-jpl/test/NightlyRun/test249.m M /issm/trunk-jpl/test/NightlyRun/test250.m M /issm/trunk-jpl/test/NightlyRun/test251.m M /issm/trunk-jpl/test/NightlyRun/test252.m M /issm/trunk-jpl/test/NightlyRun/test253.m M /issm/trunk-jpl/test/NightlyRun/test254.m M /issm/trunk-jpl/test/NightlyRun/test255.m M /issm/trunk-jpl/test/NightlyRun/test256.m M /issm/trunk-jpl/test/NightlyRun/test257.m M /issm/trunk-jpl/test/NightlyRun/test258.m M /issm/trunk-jpl/test/NightlyRun/test259.m M /issm/trunk-jpl/test/NightlyRun/test260.m M /issm/trunk-jpl/test/NightlyRun/test261.m M /issm/trunk-jpl/test/NightlyRun/test262.m M /issm/trunk-jpl/test/NightlyRun/test263.m M /issm/trunk-jpl/test/NightlyRun/test264.m M /issm/trunk-jpl/test/NightlyRun/test265.m M /issm/trunk-jpl/test/NightlyRun/test266.m M /issm/trunk-jpl/test/NightlyRun/test301.m M /issm/trunk-jpl/test/NightlyRun/test302.m M /issm/trunk-jpl/test/NightlyRun/test303.m M /issm/trunk-jpl/test/NightlyRun/test304.m M /issm/trunk-jpl/test/NightlyRun/test305.m M /issm/trunk-jpl/test/NightlyRun/test306.m M /issm/trunk-jpl/test/NightlyRun/test307.m M /issm/trunk-jpl/test/NightlyRun/test308.m M /issm/trunk-jpl/test/NightlyRun/test309.m M /issm/trunk-jpl/test/NightlyRun/test310.m M /issm/trunk-jpl/test/NightlyRun/test311.m M /issm/trunk-jpl/test/NightlyRun/test312.m M /issm/trunk-jpl/test/NightlyRun/test313.m M /issm/trunk-jpl/test/NightlyRun/test314.m M /issm/trunk-jpl/test/NightlyRun/test315.m M /issm/trunk-jpl/test/NightlyRun/test316.m M /issm/trunk-jpl/test/NightlyRun/test317.m M /issm/trunk-jpl/test/NightlyRun/test318.m M /issm/trunk-jpl/test/NightlyRun/test319.m M /issm/trunk-jpl/test/NightlyRun/test320.m M /issm/trunk-jpl/test/NightlyRun/test321.m M /issm/trunk-jpl/test/NightlyRun/test322.m M /issm/trunk-jpl/test/NightlyRun/test323.m M /issm/trunk-jpl/test/NightlyRun/test324.m M /issm/trunk-jpl/test/NightlyRun/test325.m M /issm/trunk-jpl/test/NightlyRun/test326.m M /issm/trunk-jpl/test/NightlyRun/test327.m M /issm/trunk-jpl/test/NightlyRun/test328.m M /issm/trunk-jpl/test/NightlyRun/test329.m M /issm/trunk-jpl/test/NightlyRun/test330.m M /issm/trunk-jpl/test/NightlyRun/test331.m M /issm/trunk-jpl/test/NightlyRun/test332.m M /issm/trunk-jpl/test/NightlyRun/test333.m M /issm/trunk-jpl/test/NightlyRun/test334.m M /issm/trunk-jpl/test/NightlyRun/test335.m M /issm/trunk-jpl/test/NightlyRun/test336.m M /issm/trunk-jpl/test/NightlyRun/test337.m M /issm/trunk-jpl/test/NightlyRun/test338.m M /issm/trunk-jpl/test/NightlyRun/test339.m M /issm/trunk-jpl/test/NightlyRun/test340.m M /issm/trunk-jpl/test/NightlyRun/test341.m M /issm/trunk-jpl/test/NightlyRun/test342.m M /issm/trunk-jpl/test/NightlyRun/test343.m M /issm/trunk-jpl/test/NightlyRun/test344.m M /issm/trunk-jpl/test/NightlyRun/test345.m M /issm/trunk-jpl/test/NightlyRun/test346.m M /issm/trunk-jpl/test/NightlyRun/test347.m M /issm/trunk-jpl/test/NightlyRun/test348.m M /issm/trunk-jpl/test/NightlyRun/test401.m M /issm/trunk-jpl/test/NightlyRun/test402.m M /issm/trunk-jpl/test/NightlyRun/test403.m M /issm/trunk-jpl/test/NightlyRun/test404.m M /issm/trunk-jpl/test/NightlyRun/test405.m M /issm/trunk-jpl/test/NightlyRun/test406.m M /issm/trunk-jpl/test/NightlyRun/test407.m M /issm/trunk-jpl/test/NightlyRun/test408.m M /issm/trunk-jpl/test/NightlyRun/test409.m M /issm/trunk-jpl/test/NightlyRun/test410.m M /issm/trunk-jpl/test/NightlyRun/test411.m M /issm/trunk-jpl/test/NightlyRun/test412.m M /issm/trunk-jpl/test/NightlyRun/test413.m M /issm/trunk-jpl/test/NightlyRun/test414.m M /issm/trunk-jpl/test/NightlyRun/test415.m M /issm/trunk-jpl/test/NightlyRun/test416.m M /issm/trunk-jpl/test/NightlyRun/test417.m M /issm/trunk-jpl/test/NightlyRun/test418.m M /issm/trunk-jpl/test/NightlyRun/test419.m M /issm/trunk-jpl/test/NightlyRun/test420.m M /issm/trunk-jpl/test/NightlyRun/test421.m M /issm/trunk-jpl/test/NightlyRun/test422.m M /issm/trunk-jpl/test/NightlyRun/test423.m M /issm/trunk-jpl/test/NightlyRun/test424.m M /issm/trunk-jpl/test/NightlyRun/test425.m M /issm/trunk-jpl/test/NightlyRun/test426.m M /issm/trunk-jpl/test/NightlyRun/test427.m M /issm/trunk-jpl/test/NightlyRun/test428.m M /issm/trunk-jpl/test/NightlyRun/test429.m M /issm/trunk-jpl/test/NightlyRun/test430.m M /issm/trunk-jpl/test/NightlyRun/test431.m M /issm/trunk-jpl/test/NightlyRun/test432.m M /issm/trunk-jpl/test/NightlyRun/test434.m M /issm/trunk-jpl/test/NightlyRun/test435.m M /issm/trunk-jpl/test/NightlyRun/test437.m M /issm/trunk-jpl/test/NightlyRun/test438.m M /issm/trunk-jpl/test/NightlyRun/test439.m M /issm/trunk-jpl/test/NightlyRun/test440.m M /issm/trunk-jpl/test/NightlyRun/test441.m M /issm/trunk-jpl/test/NightlyRun/test442.m M /issm/trunk-jpl/test/NightlyRun/test443.m M /issm/trunk-jpl/test/NightlyRun/test444.m M /issm/trunk-jpl/test/NightlyRun/test447.m M /issm/trunk-jpl/test/NightlyRun/test448.m M /issm/trunk-jpl/test/NightlyRun/test449.m M /issm/trunk-jpl/test/NightlyRun/test450.m M /issm/trunk-jpl/test/NightlyRun/test451.m M /issm/trunk-jpl/test/NightlyRun/test452.m M /issm/trunk-jpl/test/NightlyRun/test453.m M /issm/trunk-jpl/test/NightlyRun/test454.m M /issm/trunk-jpl/test/NightlyRun/test501.m M /issm/trunk-jpl/test/NightlyRun/test502.m M /issm/trunk-jpl/test/NightlyRun/test503.m M /issm/trunk-jpl/test/NightlyRun/test504.m M /issm/trunk-jpl/test/NightlyRun/test505.m M /issm/trunk-jpl/test/NightlyRun/test506.m M /issm/trunk-jpl/test/NightlyRun/test507.m M /issm/trunk-jpl/test/NightlyRun/test508.m M /issm/trunk-jpl/test/NightlyRun/test509.m M /issm/trunk-jpl/test/NightlyRun/test510.m M /issm/trunk-jpl/test/NightlyRun/test511.m M /issm/trunk-jpl/test/NightlyRun/test512.m M /issm/trunk-jpl/test/NightlyRun/test513.m M /issm/trunk-jpl/test/NightlyRun/test514.m M /issm/trunk-jpl/test/NightlyRun/test515.m M /issm/trunk-jpl/test/NightlyRun/test516.m M /issm/trunk-jpl/test/NightlyRun/test517.m M /issm/trunk-jpl/test/NightlyRun/test518.m M /issm/trunk-jpl/test/NightlyRun/test519.m M /issm/trunk-jpl/test/NightlyRun/test520.m M /issm/trunk-jpl/test/NightlyRun/test521.m M /issm/trunk-jpl/test/NightlyRun/test522.m M /issm/trunk-jpl/test/NightlyRun/test523.m M /issm/trunk-jpl/test/NightlyRun/test524.m M /issm/trunk-jpl/test/NightlyRun/test525.m M /issm/trunk-jpl/test/NightlyRun/test526.m M /issm/trunk-jpl/test/NightlyRun/test529.m M /issm/trunk-jpl/test/NightlyRun/test530.m M /issm/trunk-jpl/test/NightlyRun/test531.m M /issm/trunk-jpl/test/NightlyRun/test532.m M /issm/trunk-jpl/test/NightlyRun/test601.m M /issm/trunk-jpl/test/NightlyRun/test602.m M /issm/trunk-jpl/test/NightlyRun/test603.m M /issm/trunk-jpl/test/NightlyRun/test604.m M /issm/trunk-jpl/test/NightlyRun/test605.m M /issm/trunk-jpl/test/NightlyRun/test606.m M /issm/trunk-jpl/test/NightlyRun/test607.m M /issm/trunk-jpl/test/NightlyRun/test608.m M /issm/trunk-jpl/test/NightlyRun/test609.m M /issm/trunk-jpl/test/NightlyRun/test610.m M /issm/trunk-jpl/test/NightlyRun/test611.m M /issm/trunk-jpl/test/NightlyRun/test612.m M /issm/trunk-jpl/test/NightlyRun/test613.m M /issm/trunk-jpl/test/NightlyRun/test614.m M /issm/trunk-jpl/test/NightlyRun/test615.m M /issm/trunk-jpl/test/NightlyRun/test616.m M /issm/trunk-jpl/test/NightlyRun/test617.m M /issm/trunk-jpl/test/NightlyRun/test618.m M /issm/trunk-jpl/test/NightlyRun/test619.m M /issm/trunk-jpl/test/NightlyRun/test620.m M /issm/trunk-jpl/test/NightlyRun/test621.m M /issm/trunk-jpl/test/NightlyRun/test622.m M /issm/trunk-jpl/test/NightlyRun/test623.m M /issm/trunk-jpl/test/NightlyRun/test624.m M /issm/trunk-jpl/test/NightlyRun/test625.m M /issm/trunk-jpl/test/NightlyRun/test626.m moved setmesh to triangle in all nightly runs \\\\
+\noindent \textbf{Change \#36} with diff file ISSM-11014-11015.diff: \\ Function name: \\M /issm/trunk-jpl/test/NightlyRun/dak.m M /issm/trunk-jpl/test/NightlyRun/test101.m M /issm/trunk-jpl/test/NightlyRun/test102.m M /issm/trunk-jpl/test/NightlyRun/test103.m M /issm/trunk-jpl/test/NightlyRun/test104.m M /issm/trunk-jpl/test/NightlyRun/test105.m M /issm/trunk-jpl/test/NightlyRun/test106.m M /issm/trunk-jpl/test/NightlyRun/test107.m M /issm/trunk-jpl/test/NightlyRun/test108.m M /issm/trunk-jpl/test/NightlyRun/test109.m M /issm/trunk-jpl/test/NightlyRun/test110.m M /issm/trunk-jpl/test/NightlyRun/test111.m M /issm/trunk-jpl/test/NightlyRun/test1110.m M /issm/trunk-jpl/test/NightlyRun/test112.m M /issm/trunk-jpl/test/NightlyRun/test113.m M /issm/trunk-jpl/test/NightlyRun/test114.m M /issm/trunk-jpl/test/NightlyRun/test115.m M /issm/trunk-jpl/test/NightlyRun/test116.m M /issm/trunk-jpl/test/NightlyRun/test117.m M /issm/trunk-jpl/test/NightlyRun/test118.m M /issm/trunk-jpl/test/NightlyRun/test119.m M /issm/trunk-jpl/test/NightlyRun/test120.m M /issm/trunk-jpl/test/NightlyRun/test1202.m M /issm/trunk-jpl/test/NightlyRun/test1203.m M /issm/trunk-jpl/test/NightlyRun/test1204.m M /issm/trunk-jpl/test/NightlyRun/test1208.m M /issm/trunk-jpl/test/NightlyRun/test121.m M /issm/trunk-jpl/test/NightlyRun/test122.m M /issm/trunk-jpl/test/NightlyRun/test123.m M /issm/trunk-jpl/test/NightlyRun/test124.m M /issm/trunk-jpl/test/NightlyRun/test125.m M /issm/trunk-jpl/test/NightlyRun/test126.m M /issm/trunk-jpl/test/NightlyRun/test127.m M /issm/trunk-jpl/test/NightlyRun/test128.m M /issm/trunk-jpl/test/NightlyRun/test129.m M /issm/trunk-jpl/test/NightlyRun/test130.m M /issm/trunk-jpl/test/NightlyRun/test1301.m M /issm/trunk-jpl/test/NightlyRun/test1302.m M /issm/trunk-jpl/test/NightlyRun/test1303.m M /issm/trunk-jpl/test/NightlyRun/test1304.m M /issm/trunk-jpl/test/NightlyRun/test131.m M /issm/trunk-jpl/test/NightlyRun/test132.m M /issm/trunk-jpl/test/NightlyRun/test133.m M /issm/trunk-jpl/test/NightlyRun/test134.m M /issm/trunk-jpl/test/NightlyRun/test135.m M /issm/trunk-jpl/test/NightlyRun/test136.m M /issm/trunk-jpl/test/NightlyRun/test1501.m M /issm/trunk-jpl/test/NightlyRun/test1502.m M /issm/trunk-jpl/test/NightlyRun/test1601.m M /issm/trunk-jpl/test/NightlyRun/test1602.m M /issm/trunk-jpl/test/NightlyRun/test1603.m M /issm/trunk-jpl/test/NightlyRun/test201.m M /issm/trunk-jpl/test/NightlyRun/test202.m M /issm/trunk-jpl/test/NightlyRun/test203.m M /issm/trunk-jpl/test/NightlyRun/test204.m M /issm/trunk-jpl/test/NightlyRun/test205.m M /issm/trunk-jpl/test/NightlyRun/test206.m M /issm/trunk-jpl/test/NightlyRun/test207.m M /issm/trunk-jpl/test/NightlyRun/test208.m M /issm/trunk-jpl/test/NightlyRun/test209.m M /issm/trunk-jpl/test/NightlyRun/test210.m M /issm/trunk-jpl/test/NightlyRun/test211.m M /issm/trunk-jpl/test/NightlyRun/test212.m M /issm/trunk-jpl/test/NightlyRun/test213.m M /issm/trunk-jpl/test/NightlyRun/test214.m M /issm/trunk-jpl/test/NightlyRun/test215.m M /issm/trunk-jpl/test/NightlyRun/test216.m M /issm/trunk-jpl/test/NightlyRun/test217.m M /issm/trunk-jpl/test/NightlyRun/test218.m M /issm/trunk-jpl/test/NightlyRun/test219.m M /issm/trunk-jpl/test/NightlyRun/test220.m M /issm/trunk-jpl/test/NightlyRun/test221.m M /issm/trunk-jpl/test/NightlyRun/test222.m M /issm/trunk-jpl/test/NightlyRun/test223.m M /issm/trunk-jpl/test/NightlyRun/test224.m M /issm/trunk-jpl/test/NightlyRun/test225.m M /issm/trunk-jpl/test/NightlyRun/test226.m M /issm/trunk-jpl/test/NightlyRun/test227.m M /issm/trunk-jpl/test/NightlyRun/test228.m M /issm/trunk-jpl/test/NightlyRun/test229.m M /issm/trunk-jpl/test/NightlyRun/test230.m M /issm/trunk-jpl/test/NightlyRun/test232.m M /issm/trunk-jpl/test/NightlyRun/test233.m M /issm/trunk-jpl/test/NightlyRun/test234.m M /issm/trunk-jpl/test/NightlyRun/test237.m M /issm/trunk-jpl/test/NightlyRun/test238.m M /issm/trunk-jpl/test/NightlyRun/test239.m M /issm/trunk-jpl/test/NightlyRun/test240.m M /issm/trunk-jpl/test/NightlyRun/test241.m M /issm/trunk-jpl/test/NightlyRun/test242.m M /issm/trunk-jpl/test/NightlyRun/test243.m M /issm/trunk-jpl/test/NightlyRun/test244.m M /issm/trunk-jpl/test/NightlyRun/test245.m M /issm/trunk-jpl/test/NightlyRun/test246.m M /issm/trunk-jpl/test/NightlyRun/test247.m M /issm/trunk-jpl/test/NightlyRun/test248.m M /issm/trunk-jpl/test/NightlyRun/test249.m M /issm/trunk-jpl/test/NightlyRun/test250.m M /issm/trunk-jpl/test/NightlyRun/test251.m M /issm/trunk-jpl/test/NightlyRun/test252.m M /issm/trunk-jpl/test/NightlyRun/test253.m M /issm/trunk-jpl/test/NightlyRun/test254.m M /issm/trunk-jpl/test/NightlyRun/test255.m M /issm/trunk-jpl/test/NightlyRun/test256.m M /issm/trunk-jpl/test/NightlyRun/test257.m M /issm/trunk-jpl/test/NightlyRun/test258.m M /issm/trunk-jpl/test/NightlyRun/test259.m M /issm/trunk-jpl/test/NightlyRun/test260.m M /issm/trunk-jpl/test/NightlyRun/test261.m M /issm/trunk-jpl/test/NightlyRun/test262.m M /issm/trunk-jpl/test/NightlyRun/test263.m M /issm/trunk-jpl/test/NightlyRun/test264.m M /issm/trunk-jpl/test/NightlyRun/test265.m M /issm/trunk-jpl/test/NightlyRun/test266.m M /issm/trunk-jpl/test/NightlyRun/test301.m M /issm/trunk-jpl/test/NightlyRun/test302.m M /issm/trunk-jpl/test/NightlyRun/test303.m M /issm/trunk-jpl/test/NightlyRun/test304.m M /issm/trunk-jpl/test/NightlyRun/test305.m M /issm/trunk-jpl/test/NightlyRun/test306.m M /issm/trunk-jpl/test/NightlyRun/test307.m M /issm/trunk-jpl/test/NightlyRun/test308.m M /issm/trunk-jpl/test/NightlyRun/test309.m M /issm/trunk-jpl/test/NightlyRun/test310.m M /issm/trunk-jpl/test/NightlyRun/test311.m M /issm/trunk-jpl/test/NightlyRun/test312.m M /issm/trunk-jpl/test/NightlyRun/test313.m M /issm/trunk-jpl/test/NightlyRun/test314.m M /issm/trunk-jpl/test/NightlyRun/test315.m M /issm/trunk-jpl/test/NightlyRun/test316.m M /issm/trunk-jpl/test/NightlyRun/test317.m M /issm/trunk-jpl/test/NightlyRun/test318.m M /issm/trunk-jpl/test/NightlyRun/test319.m M /issm/trunk-jpl/test/NightlyRun/test320.m M /issm/trunk-jpl/test/NightlyRun/test321.m M /issm/trunk-jpl/test/NightlyRun/test322.m M /issm/trunk-jpl/test/NightlyRun/test323.m M /issm/trunk-jpl/test/NightlyRun/test324.m M /issm/trunk-jpl/test/NightlyRun/test325.m M /issm/trunk-jpl/test/NightlyRun/test326.m M /issm/trunk-jpl/test/NightlyRun/test327.m M /issm/trunk-jpl/test/NightlyRun/test328.m M /issm/trunk-jpl/test/NightlyRun/test329.m M /issm/trunk-jpl/test/NightlyRun/test330.m M /issm/trunk-jpl/test/NightlyRun/test331.m M /issm/trunk-jpl/test/NightlyRun/test332.m M /issm/trunk-jpl/test/NightlyRun/test333.m M /issm/trunk-jpl/test/NightlyRun/test334.m M /issm/trunk-jpl/test/NightlyRun/test335.m M /issm/trunk-jpl/test/NightlyRun/test336.m M /issm/trunk-jpl/test/NightlyRun/test337.m M /issm/trunk-jpl/test/NightlyRun/test338.m M /issm/trunk-jpl/test/NightlyRun/test339.m M /issm/trunk-jpl/test/NightlyRun/test340.m M /issm/trunk-jpl/test/NightlyRun/test341.m M /issm/trunk-jpl/test/NightlyRun/test342.m M /issm/trunk-jpl/test/NightlyRun/test343.m M /issm/trunk-jpl/test/NightlyRun/test344.m M /issm/trunk-jpl/test/NightlyRun/test345.m M /issm/trunk-jpl/test/NightlyRun/test346.m M /issm/trunk-jpl/test/NightlyRun/test347.m M /issm/trunk-jpl/test/NightlyRun/test348.m M /issm/trunk-jpl/test/NightlyRun/test401.m M /issm/trunk-jpl/test/NightlyRun/test402.m M /issm/trunk-jpl/test/NightlyRun/test403.m M /issm/trunk-jpl/test/NightlyRun/test404.m M /issm/trunk-jpl/test/NightlyRun/test405.m M /issm/trunk-jpl/test/NightlyRun/test406.m M /issm/trunk-jpl/test/NightlyRun/test407.m M /issm/trunk-jpl/test/NightlyRun/test408.m M /issm/trunk-jpl/test/NightlyRun/test409.m M /issm/trunk-jpl/test/NightlyRun/test410.m M /issm/trunk-jpl/test/NightlyRun/test411.m M /issm/trunk-jpl/test/NightlyRun/test412.m M /issm/trunk-jpl/test/NightlyRun/test413.m M /issm/trunk-jpl/test/NightlyRun/test414.m M /issm/trunk-jpl/test/NightlyRun/test415.m M /issm/trunk-jpl/test/NightlyRun/test416.m M /issm/trunk-jpl/test/NightlyRun/test417.m M /issm/trunk-jpl/test/NightlyRun/test418.m M /issm/trunk-jpl/test/NightlyRun/test419.m M /issm/trunk-jpl/test/NightlyRun/test420.m M /issm/trunk-jpl/test/NightlyRun/test421.m M /issm/trunk-jpl/test/NightlyRun/test422.m M /issm/trunk-jpl/test/NightlyRun/test423.m M /issm/trunk-jpl/test/NightlyRun/test424.m M /issm/trunk-jpl/test/NightlyRun/test425.m M /issm/trunk-jpl/test/NightlyRun/test426.m M /issm/trunk-jpl/test/NightlyRun/test427.m M /issm/trunk-jpl/test/NightlyRun/test428.m M /issm/trunk-jpl/test/NightlyRun/test429.m M /issm/trunk-jpl/test/NightlyRun/test430.m M /issm/trunk-jpl/test/NightlyRun/test431.m M /issm/trunk-jpl/test/NightlyRun/test432.m M /issm/trunk-jpl/test/NightlyRun/test434.m M /issm/trunk-jpl/test/NightlyRun/test435.m M /issm/trunk-jpl/test/NightlyRun/test437.m M /issm/trunk-jpl/test/NightlyRun/test438.m M /issm/trunk-jpl/test/NightlyRun/test439.m M /issm/trunk-jpl/test/NightlyRun/test440.m M /issm/trunk-jpl/test/NightlyRun/test441.m M /issm/trunk-jpl/test/NightlyRun/test442.m M /issm/trunk-jpl/test/NightlyRun/test443.m M /issm/trunk-jpl/test/NightlyRun/test444.m M /issm/trunk-jpl/test/NightlyRun/test447.m M /issm/trunk-jpl/test/NightlyRun/test448.m M /issm/trunk-jpl/test/NightlyRun/test449.m M /issm/trunk-jpl/test/NightlyRun/test450.m M /issm/trunk-jpl/test/NightlyRun/test451.m M /issm/trunk-jpl/test/NightlyRun/test452.m M /issm/trunk-jpl/test/NightlyRun/test453.m M /issm/trunk-jpl/test/NightlyRun/test454.m M /issm/trunk-jpl/test/NightlyRun/test501.m M /issm/trunk-jpl/test/NightlyRun/test502.m M /issm/trunk-jpl/test/NightlyRun/test503.m M /issm/trunk-jpl/test/NightlyRun/test504.m M /issm/trunk-jpl/test/NightlyRun/test505.m M /issm/trunk-jpl/test/NightlyRun/test506.m M /issm/trunk-jpl/test/NightlyRun/test507.m M /issm/trunk-jpl/test/NightlyRun/test508.m M /issm/trunk-jpl/test/NightlyRun/test509.m M /issm/trunk-jpl/test/NightlyRun/test510.m M /issm/trunk-jpl/test/NightlyRun/test511.m M /issm/trunk-jpl/test/NightlyRun/test512.m M /issm/trunk-jpl/test/NightlyRun/test513.m M /issm/trunk-jpl/test/NightlyRun/test514.m M /issm/trunk-jpl/test/NightlyRun/test515.m M /issm/trunk-jpl/test/NightlyRun/test516.m M /issm/trunk-jpl/test/NightlyRun/test517.m M /issm/trunk-jpl/test/NightlyRun/test518.m M /issm/trunk-jpl/test/NightlyRun/test519.m M /issm/trunk-jpl/test/NightlyRun/test520.m M /issm/trunk-jpl/test/NightlyRun/test521.m M /issm/trunk-jpl/test/NightlyRun/test522.m M /issm/trunk-jpl/test/NightlyRun/test523.m M /issm/trunk-jpl/test/NightlyRun/test524.m M /issm/trunk-jpl/test/NightlyRun/test525.m M /issm/trunk-jpl/test/NightlyRun/test526.m M /issm/trunk-jpl/test/NightlyRun/test529.m M /issm/trunk-jpl/test/NightlyRun/test530.m M /issm/trunk-jpl/test/NightlyRun/test531.m M /issm/trunk-jpl/test/NightlyRun/test532.m M /issm/trunk-jpl/test/NightlyRun/test601.m M /issm/trunk-jpl/test/NightlyRun/test602.m M /issm/trunk-jpl/test/NightlyRun/test603.m M /issm/trunk-jpl/test/NightlyRun/test604.m M /issm/trunk-jpl/test/NightlyRun/test605.m M /issm/trunk-jpl/test/NightlyRun/test606.m M /issm/trunk-jpl/test/NightlyRun/test607.m M /issm/trunk-jpl/test/NightlyRun/test608.m M /issm/trunk-jpl/test/NightlyRun/test609.m M /issm/trunk-jpl/test/NightlyRun/test610.m M /issm/trunk-jpl/test/NightlyRun/test611.m M /issm/trunk-jpl/test/NightlyRun/test612.m M /issm/trunk-jpl/test/NightlyRun/test613.m M /issm/trunk-jpl/test/NightlyRun/test614.m M /issm/trunk-jpl/test/NightlyRun/test615.m M /issm/trunk-jpl/test/NightlyRun/test616.m M /issm/trunk-jpl/test/NightlyRun/test617.m M /issm/trunk-jpl/test/NightlyRun/test618.m M /issm/trunk-jpl/test/NightlyRun/test619.m M /issm/trunk-jpl/test/NightlyRun/test620.m M /issm/trunk-jpl/test/NightlyRun/test621.m M /issm/trunk-jpl/test/NightlyRun/test622.m M /issm/trunk-jpl/test/NightlyRun/test623.m M /issm/trunk-jpl/test/NightlyRun/test624.m M /issm/trunk-jpl/test/NightlyRun/test625.m M /issm/trunk-jpl/test/NightlyRun/test626.m \\ Export determination: 6. \\Rationale: moved setmesh to triangle in all nightly runs
+D /issm/trunk-jpl/src/m/model/mesh/meshadaptation.m D /issm/trunk-jpl/src/m/model/mesh/meshbamg.m D /issm/trunk-jpl/src/m/model/mesh/meshexprefine.m D /issm/trunk-jpl/src/m/model/mesh/meshyams.m D /issm/trunk-jpl/src/m/model/mesh/reorder.m A /issm/trunk-jpl/src/m/model/mesh/yams.m (from /issm/trunk-jpl/src/m/model/mesh/meshyams.m:11008) moved meshyams to yams and removed old meshers \\\\
+\noindent \textbf{Change \#37} with diff file ISSM-11015-11016.diff: \\ Function name: \\D /issm/trunk-jpl/src/m/model/mesh/meshadaptation.m D /issm/trunk-jpl/src/m/model/mesh/meshbamg.m D /issm/trunk-jpl/src/m/model/mesh/meshexprefine.m D /issm/trunk-jpl/src/m/model/mesh/meshyams.m D /issm/trunk-jpl/src/m/model/mesh/reorder.m A /issm/trunk-jpl/src/m/model/mesh/yams.m (from /issm/trunk-jpl/src/m/model/mesh/meshyams.m:11008) \\ Export determination: 6. \\Rationale: moved meshyams to yams and removed old meshers
+M /issm/trunk-jpl/src/m/model/mesh/bamg.m Fixed nightly run: bamg objects were not properly loaded \\\\
+\noindent \textbf{Change \#38} with diff file ISSM-11016-11017.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/mesh/bamg.m \\ Export determination: 6. \\Rationale: Fixed nightly run: bamg objects were not properly loaded
+A /issm/trunk-jpl/test/Archives/Archive267.mat A /issm/trunk-jpl/test/Archives/Archive268.mat New transient dakota tests \\\\
+\noindent \textbf{Change \#39} with diff file ISSM-11017-11018.diff: \\ Function name: \\A /issm/trunk-jpl/test/Archives/Archive267.mat A /issm/trunk-jpl/test/Archives/Archive268.mat \\ Export determination: 6. \\Rationale: New transient dakota tests
+M /issm/trunk-jpl/test/NightlyRun/IdToName.m A /issm/trunk-jpl/test/NightlyRun/test267.m A /issm/trunk-jpl/test/NightlyRun/test268.m New transient dakota tests \\\\
+\noindent \textbf{Change \#40} with diff file ISSM-11018-11019.diff: \\ Function name: \\M /issm/trunk-jpl/test/NightlyRun/IdToName.m A /issm/trunk-jpl/test/NightlyRun/test267.m A /issm/trunk-jpl/test/NightlyRun/test268.m \\ Export determination: 6. \\Rationale: New transient dakota tests \\\\
+\noindent \textbf{Change \#41} with diff file ISSM-11020-11021.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/petscversion.m \\ Export determination: 6. \\Rationale: Added error message if config file could not be open \\\\
+\noindent \textbf{Change \#42} with diff file ISSM-11021-11022.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/petscversion.m \\ Export determination: 6. \\Rationale: Added error message if config file could not be open \\\\
+\noindent \textbf{Change \#43} with diff file ISSM-11023-11024.diff: \\ Function name: \\M /issm/trunk-jpl/test/NightlyRun/test1301.m M /issm/trunk-jpl/test/NightlyRun/test1302.m M /issm/trunk-jpl/test/NightlyRun/test1303.m M /issm/trunk-jpl/test/NightlyRun/test1304.m M /issm/trunk-jpl/test/NightlyRun/test1502.m M /issm/trunk-jpl/test/NightlyRun/test1601.m M /issm/trunk-jpl/test/NightlyRun/test1602.m M /issm/trunk-jpl/test/NightlyRun/test1603.m \\ Export determination: 6. \\Rationale: nightly run: fixed a couple problems with PatchToVec/results\_on\_vertices \\\\
Index: /issm/oecreview/Archive/10977-11024/r1.tex
===================================================================
--- /issm/oecreview/Archive/10977-11024/r1.tex	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/r1.tex	(revision 11025)
@@ -0,0 +1,1 @@
+10977
Index: /issm/oecreview/Archive/10977-11024/r2.tex
===================================================================
--- /issm/oecreview/Archive/10977-11024/r2.tex	(revision 11025)
+++ /issm/oecreview/Archive/10977-11024/r2.tex	(revision 11025)
@@ -0,0 +1,1 @@
+11024
