Index: /issm/oecreview/Archive/11991-12009/Date.tex
===================================================================
--- /issm/oecreview/Archive/11991-12009/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/11991-12009/ISSM-11991-11992.diff
===================================================================
--- /issm/oecreview/Archive/11991-12009/ISSM-11991-11992.diff	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/ISSM-11991-11992.diff	(revision 12325)
@@ -0,0 +1,22 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matlab/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matlab/install.sh	(revision 11991)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matlab/install.sh	(revision 11992)
+@@ -4,15 +4,14 @@
+ rm -rf install
+ 
+ #Select or create a new simlink
+-#ln -s /usr/local/pkgs/matlab-7.6/ install
++ln -s /usr/local/pkgs/matlab-7.6/ install
+ #ln -s /usr/local/matlab704/ install
+ #ln -s /usr/local/matlab711/ install
+ #ln -s /usr/local/matlab712/ install
+-#ln -s /usr/local/pkgs/matlab-7.6/ install
+ 
+ # Macintosh (OSX) simlink 
+ #ln -s /Applications/MATLAB_R2008a/ install
+ #ln -s /Applications/MATLAB_R2009a.app/ install
+ #ln -s /Applications/MATLAB_R2010a.app/ install
+ #ln -s /Applications/MATLAB_R2012a.app/ install
+-ln -s /Applications/MATLAB*.app/ install
++#ln -s /Applications/MATLAB*.app/ install
Index: /issm/oecreview/Archive/11991-12009/ISSM-11992-11993.diff
===================================================================
--- /issm/oecreview/Archive/11991-12009/ISSM-11992-11993.diff	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/ISSM-11992-11993.diff	(revision 12325)
@@ -0,0 +1,7 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/README
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/README	(revision 11992)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/README	(revision 11993)
+@@ -1,2 +0,0 @@
+-Go pick up the correct configure.make  file in the config directory (according to your platform), 
+-copy it to the top triangle directory, and run install.sh
Index: /issm/oecreview/Archive/11991-12009/ISSM-11993-11994.diff
===================================================================
--- /issm/oecreview/Archive/11991-12009/ISSM-11993-11994.diff	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/ISSM-11993-11994.diff	(revision 12325)
@@ -0,0 +1,693 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 11993)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 11994)
+@@ -190,11 +190,11 @@
+ 			;;
+ 			*darwin*)
+ 				dnl mex -v gives all the flags for compilation of mex files
+-				dnl if matlab version is 7.10 or more, we must use mexmaci64 (64 bits)
++				dnl if matlab version is 7.9 or more, we must use mexmaci64 (64 bits)
+ 				MEXLINK="-O -Wl,-flat_namespace -undefined suppress -arch i386 -bundle -Wl,-exported_symbols_list,$MATLAB_ROOT/extern/lib/maci/mexFunction.map"
+ 				MEXLIB=" -L$MATLAB_ROOT/bin/maci/ -lmx -lmex -lmat -lstdc++ -largeArrayDims"
+ 				if test $MATLAB_MAJOR -ge 7; then 
+-					 if test $MATLAB_MINOR -ge 10; then 
++					 if test $MATLAB_MINOR -ge 9; then 
+ 						  MEXLINK="-O -Wl,-flat_namespace -undefined suppress -bundle -Wl,-exported_symbols_list,$MATLAB_ROOT/extern/lib/maci64/mexFunction.map"
+ 							 MEXLIB=" -L$MATLAB_ROOT/bin/maci64/ -lmx -lmex -lmat -lstdc++"
+ 					 fi
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 11993)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp	(revision 11994)
+@@ -10,12 +10,101 @@
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+ 
+ void PositiveDegreeDayx(Elements* elements,Nodes* nodes, Vertices* vertices,Loads* loads,Materials* materials, Parameters* parameters){
+-	
+-	Element* element = NULL;
+ 
+-	for(int i=0;i<elements->Size();i++){
+-		element=(Element*)elements->GetObjectByOffset(i);
+-		element->PositiveDegreeDay();
+-	}
++// void PositiveDegreeDayx(hd,vTempsea,vPrec,agd,Tsurf,ni){
++//    note "v" prefix means 12 monthly means, ie time dimension
++//    INPUT parameters: ni: working size of arrays
++//    INPUT: surface elevation (m): hd(NA)
++//    monthly mean surface sealevel temperature (degrees C): vTempsea(NA
++//    ,NTIME) 
++//    monthly mean precip rate (m/yr water equivalent): vPrec(NA,NTIME)
++//    OUTPUT: mass-balance (m/yr ice): agd(NA)
++//    mean annual surface temperature (degrees C): Tsurf(NA)
+ 
++  int    i, it, jj, itm;
++  double DT = 0.02, sigfac, snormfac;
++  double signorm = 5.5;      // signorm : sigma of the temperature distribution for a normal day 
++  double siglim;       // sigma limit for the integration which is equal to 2.5 sigmanorm
++  double signormc;     // sigma of the temperature distribution for cloudy day
++  double siglimc=0, siglim0, siglim0c;
++  double tstep, tsint, tint, tstepc;
++  int    NPDMAX = 1504, NPDCMAX = 1454;
++  //double pdds[NPDMAX]={0}; 
++  //double pds[NPDCMAX]={0};
++  double pddt, pd ; // pd : snow/precip fraction, precipitation falling as snow
++  double PDup, PDCUT = 2.0;    // PDcut: rain/snow cutoff temperature (C)
++  double tstar; // monthly mean surface temp
++  
++  double* pdds=NULL; 
++  double* pds=NULL; 
++  Element* element = NULL;
++  
++  pdds=(double*)xmalloc(NPDMAX*sizeof(double)+1); 
++  pds=(double*)xmalloc(NPDCMAX*sizeof(double)+1); 
++  
++  
++  // PDD constant
++  siglim = 2.5*signorm; 
++  
++  // initialize PDD (creation of a lookup table)
++  tstep = 0.1;
++  tsint = tstep*0.5;
++  sigfac = -1.0/(2.0*pow(signorm,2));
++  snormfac = 1.0/(signorm*sqrt(2.0*acos(-1.0)));
++  siglim = 2.5*signorm;
++  itm = (int)(2*siglim/DT + 1.5);
++  
++  if (itm >= NPDMAX){
++    printf("increase NPDMAX in massBalance.cpp\n");
++    exit (1);
++      }
++  for (it = 0; it < itm; it++){  
++    //    tstar = REAL(it)*DT-siglim;
++    tstar = it*DT-siglim;
++    tint = tsint;
++    pddt = 0;
++    for ( jj = 0; jj < 600; jj++){
++      if (tint > (tstar+siglim)){break;}
++      pddt = pddt + tint*exp(sigfac*(pow((tint-tstar),2)))*tstep;
++      tint = tint+tstep;
++    }
++    pdds[it] = pddt*snormfac;
++  }
++  pdds[itm+1] = siglim + DT;
++  
++  //*********compute PD(T) : snow/precip fraction. precipitation falling as snow
++  tstepc = 0.1;
++  tsint = PDCUT-tstepc*0.5;
++  signormc = signorm - 0.5;
++  sigfac = -1.0/(2.0*pow(signormc,2));
++  snormfac = 1.0/(signormc*sqrt(2.0*acos(-1.0)));
++  siglimc = 2.5*signormc ;
++  itm = (int)((PDCUT+2.*siglimc)/DT + 1.5);
++  if (itm >= NPDCMAX){
++    printf("'increase NPDCMAX in p35com'\n");
++    exit (1);
++      }
++  for (it = 0; it < itm; it++ ){
++    tstar = it*DT-siglimc;
++    //    tstar = REAL(it)*DT-siglimc;
++    tint = tsint;          // start against upper bound
++    pd = 0;
++    for (jj = 0; jj < 600; jj++){
++      if (tint<(tstar-siglimc)) {break;}
++      pd = pd + exp(sigfac*(pow((tint-tstar),2)))*tstepc;
++      tint = tint-tstepc;
++    }
++    pds[it] = pd*snormfac;  // gaussian integral lookup table for snow fraction
++  }
++  pds[itm+1] = 0;
++  //     *******END initialize PDD
++  
++  for(i=0;i<elements->Size();i++){
++    element=(Element*)elements->GetObjectByOffset(i);
++    element->PositiveDegreeDay(pdds,pds,signorm);
++  }
++  /*free ressouces: */
++  xfree((void**)&pdds);
++  xfree((void**)&pds);
++  
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Element.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Element.h	(revision 11993)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Element.h	(revision 11994)
+@@ -70,7 +70,7 @@
+ 		virtual double TimeAdapt()=0;
+ 		virtual void   MigrateGroundingLine(double* old_floating_ice,double* sheet_ungrounding)=0;
+ 		virtual void   PotentialSheetUngrounding(Vector* potential_sheet_ungrounding)=0;
+-		virtual void   PositiveDegreeDay(void)=0;
++		virtual void   PositiveDegreeDay(double* pdds,double* pds,double signorm)=0;
+ 		virtual int    UpdatePotentialSheetUngrounding(double* potential_sheet_ungrounding,Vector* vec_nodes_on_iceshelf,double* nodes_on_iceshelf)=0;
+ 		virtual void   ResetCoordinateSystem()=0;
+ 		virtual void   SmearFunction(Vector* smearedvector,double (*WeightFunction)(double distance,double radius),double radius)=0;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 11993)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 11994)
+@@ -2234,9 +2234,226 @@
+ }
+ /*}}}*/
+ /*FUNCTION Tria::PositiveDegreeDay{{{1*/
+-void  Tria::PositiveDegreeDay(){
++void  Tria::PositiveDegreeDay(double* pdds,double* pds,double signorm){
+ 
+-	_error_("Not implemented yet");
++   int    i,iqj,imonth;
++   double agd[NUMVERTICES];  // surface and basal
++   double saccu[NUMVERTICES] = {0};     // yearly surface accumulation
++   double smelt[NUMVERTICES] = {0};     // yearly melt
++   double precrunoff[NUMVERTICES];      // yearly runoff
++   double prect; // total precipitation during 1 year taking into account des. ef.
++   double water; //water=rain + snowmelt 
++   double runoff; //meltwater only, does not include rain 
++   double sconv; //rhow_rain/rhoi / 12 months
++
++   double  rho_water,rho_ice,density;
++   double lapser=6.5/1000, sealev=0;    // lapse rate. degrees per meter.
++   double desfac = 0.5;                 //desert elevation factor
++   double s0p[NUMVERTICES]={0};         //should be set to elevation from precip source
++   double s0t[NUMVERTICES]={0};         //should be set to elevation from temperature source
++   double st;             // elevation between altitude of the temp record and current altitude
++   double sp;             // elevation between altitude of the prec record and current altitude
++
++
++   // PDD and PD constants and variables
++   double siglim;          // sigma limit for the integration which is equal to 2.5 sigmanorm
++   double siglimc=0, siglim0, siglim0c;
++   double PDup, pddsig, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C)
++   double DT = 0.02;
++   double pddt, pd; // pd: snow/precip fraction, precipitation falling as snow
++   
++   double q, qmpt; // q is desert/elev. fact, hnpfac is huybrect fact, and pd is normal dist.
++   double qm[NUMVERTICES] = {0};        // snow part of the precipitation 
++   double qmt[NUMVERTICES] = {0};       // precipitation without desertification effect adjustment
++   double qmp[NUMVERTICES] = {0};       // desertification taken into account
++   double pdd[NUMVERTICES] = {0};     
++   double frzndd[NUMVERTICES] = {0};  
++
++   double tstar;                        // monthly mean surface temp
++   double Tsum[NUMVERTICES]= {0};       // average summer (JJA) temperature
++   double Tsurf[NUMVERTICES] = {0};     // average annual temperature    
++   
++   double h[NUMVERTICES],s[NUMVERTICES],ttmp[NUMVERTICES],prectmp[NUMVERTICES]; // ,b[NUMVERTICES]
++   double t[NUMVERTICES][12],prec[NUMVERTICES][12];
++   double deltm=1/12;
++   int    ismon[12]={12,1,2,3,4,5,6,7,8,9,10,11};
++
++   double snwm;  // snow that could have been melted in a year.
++   double snwmf; //  ablation factor for snow per positive degree day.
++   double smf;   //  ablation factor for ice per pdd (Braithwaite 1995 from tarasov 2002).
++
++   double dfrz=1.5, CovrLm=2009./3.35e+5, dCovrLm=dfrz*CovrLm; //m*J kg^-1 C^-1 /(J kg^-1)=m/C yr
++   double supice,supcap,diffndd;
++   double fsupT=0.5,  fsupndd=0.5;  // Tsurf mode factors for supice
++   double pddtj[NUMVERTICES], hmx2;
++
++   /*Recover info at the vertices: */
++   GetInputListOnVertices(&h[0],ThicknessEnum);
++   GetInputListOnVertices(&s[0],SurfaceEnum);
++   GetInputListOnVertices(&ttmp[0],ThermalSpctemperatureEnum);
++   GetInputListOnVertices(&prectmp[0],SurfaceforcingsPrecipitationEnum);
++
++   for(i=0;i<NUMVERTICES;i++) ttmp[i]=ttmp[i]-273.15; // convertion from Kelvin to celcius
++
++   for(i=0;i<NUMVERTICES;i++)
++     for(imonth=0;imonth<12;imonth++){
++       t[i][imonth]=ttmp[i];
++       prec[i][imonth]=prectmp[i];
++   }
++
++   /*Get material parameters :*/
++   rho_ice=matpar->GetRhoIce();
++   rho_water=matpar->GetRhoWater();
++   density=rho_ice/rho_water;
++   
++   sconv=(rho_water/rho_ice)/12.; //rhow_rain/rhoi / 12 months
++     
++     /*PDD constant*/
++   siglim = 2.5*signorm; 
++   siglim0 =  siglim/DT + 0.5;
++   siglim0c =  siglimc/DT + 0.5;
++   PDup = siglimc+PDCUT;
++   
++   // seasonal loop
++   for (iqj = 0; iqj < 12; iqj++){
++     imonth =  ismon[iqj];
++     for (i = 0; i < NUMVERTICES; i++){
++       st=(s[i]-s0t[i])/1000;
++       tstar = t[i][imonth] - lapser *max(st,sealev);
++       Tsurf[i] = tstar*deltm+Tsurf[i];        
++       
++       /*********compute PD ****************/
++       if (tstar < PDup){
++	 pd = 1;
++	 if (tstar >= -siglimc){ pd = pds[int(tstar/DT + siglim0c)];}}
++       else { 
++	 pd = 0;}
++       
++       /******exp des/elev precip reduction*******/
++       sp=(s[i]-s0p[i])/1000; // deselev effect is wrt chng in topo
++       if (sp>0.0){q = exp(-desfac*sp);}
++       else {q = 1.0;}
++       
++       qmt[i]= qmt[i] + prec[i][imonth]*sconv;  //*sconv to convert in m of ice equivalent 
++       qmpt= q*prec[i][imonth]*sconv;           
++       qmp[i]= qmp[i] + qmpt;
++       qm[i]= qm[i] + qmpt*pd;
++       
++       /*********compute PDD************/
++       // ndd(month)=-(tstar-pdd(month)) since ndd+pdd gives expectation of
++       // gaussian=T_m, so ndd=-(Tsurf-pdd)
++       if (iqj>6 &&  iqj<10){ Tsum[i]=Tsum[i]+tstar;} 
++       if (tstar >= siglim) {pdd[i] = pdd[i] + tstar*deltm;}
++       else if (tstar> -siglim){
++	 pddsig=pdds[int(tstar/DT + siglim0)];
++	 pdd[i] = pdd[i] + pddsig*deltm;
++	 frzndd[i] = frzndd[i] - (tstar-pddsig)*deltm;}
++       else{frzndd[i] = frzndd[i] - tstar*deltm; }
++     }
++   } // end of seasonal loop 
++   
++   //******************************************************************
++   for(i=0;i<NUMVERTICES;i++){
++     saccu[i] = qm[i];
++     prect = qmp[i];     // total precipitation during 1 year taking into account des. ef.
++     Tsum[i]=Tsum[i]/3;
++     
++     /***** determine PDD factors *****/
++     if(Tsum[i]< -1.) {
++       snwmf=2.65*0.001;   //  ablation factor for snow per positive degree day.*0.001 to go from mm to m/ppd
++       smf=17.22*0.001;    //  ablation factor for ice per pdd (Braithwaite 1995 from tarasov 2002)
++     }
++     else if(Tsum[i]< 10){
++       snwmf = (0.15*Tsum[i] + 2.8)*0.001;
++       smf = (0.0067*pow((10.-Tsum[i]),3) + 8.3)*0.001;
++     }
++     else{
++       snwmf=4.3*0.001;
++       smf=8.3*0.001;
++     }
++     snwmf=0.95*snwmf;
++     smf=0.95*smf;
++     
++     /*****  compute PDD ablation and refreezing *****/
++     pddt = pdd[i] *365;
++     snwm = snwmf*pddt;       // snow that could have been melted in a year
++     hmx2 = min(h[i],dfrz);   // refreeze active layer max depth: dfrz
++     
++     if(snwm < saccu[i]) {
++       water=prect-saccu[i] + snwm; //water=rain + snowmelt
++       //     l 2.2= capillary factor
++       //     Should refreezing be controlled by frzndd or by mean annual Tsurf?
++       //     dCovrLm concept is of warming of active layer (thickness =d@=1-
++       //     >2m)
++       //     problem with water seepage into ice: should be sealed after
++       //     refreezing
++       //     so everything needs to be predicated on 1 year scale, except for
++       //     thermal
++       //     conductivity through ice
++       //     also, need to account that melt season has low accum, so what's
++       //     going to
++       //     hold the meltwater around for refreezing? And melt-time will have
++       //     low seasonal frzndd
++       
++       //      Superimposed ice :  Pfeffer et al. 1991, Tarasov 2002
++       
++       supice= min(hmx2*CovrLm*frzndd[i]+2.2*(saccu[i]-snwm), water); // superimposed ice
++       supcap=min(2.2*(saccu[i]-snwm),water);
++       runoff=snwm - supice;  //meltwater only, does not include rain
++     }
++     else {  //all snow melted
++       supice= min(hmx2*CovrLm*frzndd[i], prect );
++       runoff= saccu[i] + smf*(pddt-saccu[i]/snwmf) - supice;
++       supcap=0;
++     }
++     //     pdd melting doesn't cool Tsurf, so ndd refreeze shouldn't warm it
++     //     except pdd melt heat source is atmosphere, while refreeze is
++     //     ground/ice stored interim
++     //     assume pdd=ndd, then melt should equal refreeze and Tsurf should=0
++     //     assume ndd=2*pdd, then all supice is refrozen, but Tsurf should be
++     //     <0
++     //     assume ndd>pdd, little melt => little supice 
++     //     bottom line: compare for Tsurf<0 : supice and no supice case,
++     //     expect Tsurf difference
++     //     except some of cooling flux comes from atmosphere//
++     //     1 dm supice should not raise Tsurf by 1/dCovrLm = 16.675C
++     //     does supice make sense when H< 0.1m? then d=thermoactive ice layer ////
++     //     < 0.1 
++     
++     //     make more sense to just use residual pdd-ndd except that pdd
++     //     residual not clear yet
++     //     frzndd should not be used up by refreezing in snow, so stick in
++     //     supcap.
++     diffndd=0;
++     if (frzndd[i]>0) {
++       diffndd=fsupndd*min((supice-supcap)/dCovrLm ,frzndd[i]);
++       frzndd[i]=frzndd[i]-diffndd;
++     }
++     if(runoff<0){
++       saccu[i]= saccu[i] -runoff;
++       smelt[i] = 0;
++       precrunoff[i]=prect-saccu[i];
++       //here assume pdd residual is 0, => 
++       Tsurf[i]= max(Tsurf[i],-frzndd[i]);
++     }
++     else {
++       smelt[i] = runoff;
++       precrunoff[i]=prect-max(0.,supice)-saccu[i];}
++     //here really need pdd balance, try 0.5 fudge factor?
++     //at least runoff>0 => it's fairly warm, so Tsurf is !<<0,
++     //yet from site plots, can be ice free with Tsurf=-5.5C
++     if(Tsurf[i]<0) {
++       Tsurf[i]= min(Tsurf[i]+fsupT*diffndd , 0.);}
++     
++     agd[i] = -smelt[i]+saccu[i];
++     pddtj[i]=pddt;
++     
++     /*Update inputs*/    
++     this->inputs->AddInput(new TriaP1Input(SurfaceforcingsMassBalanceEnum,&agd[0])); ////////verifier le nom
++     // this->inputs->AddInput(new TriaVertexInput(ThermalSpcTemperatureEnum,&Tsurf[0]));
++     this->inputs->AddInput(new TriaP1Input(ThermalSpctemperatureEnum,&Tsurf[0]));
++     
++   }       //end of the for loop over the vertices
+ }
+ /*}}}*/
+ /*FUNCTION Tria::ProcessResultsUnits{{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.h	(revision 11993)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.h	(revision 11994)
+@@ -107,7 +107,7 @@
+ 		void   MigrateGroundingLine(double* oldfloating,double* sheet_ungrounding);
+ 		int    NodalValue(double* pvalue, int index, int natureofdataenum,bool process_units);
+ 		void   PotentialSheetUngrounding(Vector* potential_sheet_ungrounding);
+-		void   PositiveDegreeDay(void);
++		void   PositiveDegreeDay(double* pdds,double* pds,double signorm);
+ 		void   RequestedOutput(int output_enum,int step,double time);
+ 		void   ListResultsInfo(int** results_enums,int** results_size,double** results_times,int** results_steps,int* num_results);
+ 		void   PatchFill(int* pcount, Patch* patch);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 11993)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 11994)
+@@ -2409,9 +2409,227 @@
+ }
+ /*}}}*/
+ /*FUNCTION Penta::PositiveDegreeDay{{{1*/
+-void  Penta::PositiveDegreeDay(){
++void  Penta::PositiveDegreeDay(double* pdds,double* pds,double signorm){
+ 
+-	_error_("Not implemented yet");
++
++   int    i,iqj,imonth;
++   double agd[NUMVERTICES];  // surface and basal
++   double saccu[NUMVERTICES] = {0};     // yearly surface accumulation
++   double smelt[NUMVERTICES] = {0};     // yearly melt
++   double precrunoff[NUMVERTICES];      // yearly runoff
++   double prect; // total precipitation during 1 year taking into account des. ef.
++   double water; //water=rain + snowmelt 
++   double runoff; //meltwater only, does not include rain 
++   double sconv; //rhow_rain/rhoi / 12 months
++
++   double  rho_water,rho_ice,density;
++   double lapser=6.5/1000, sealev=0;    // lapse rate. degrees per meter.
++   double desfac = 0.5;                 //desert elevation factor
++   double s0p[NUMVERTICES]={0};         //should be set to elevation from precip source
++   double s0t[NUMVERTICES]={0};         //should be set to elevation from temperature source
++   double st;             // elevation between altitude of the temp record and current altitude
++   double sp;             // elevation between altitude of the prec record and current altitude
++
++
++   // PDD and PD constants and variables
++   double siglim;          // sigma limit for the integration which is equal to 2.5 sigmanorm
++   double siglimc=0, siglim0, siglim0c;
++   double PDup, pddsig, PDCUT = 2.0; // PDcut: rain/snow cutoff temperature (C)
++   double DT = 0.02;
++   double pddt, pd; // pd: snow/precip fraction, precipitation falling as snow
++   
++   double q, qmpt; // q is desert/elev. fact, hnpfac is huybrect fact, and pd is normal dist.
++   double qm[NUMVERTICES] = {0};        // snow part of the precipitation 
++   double qmt[NUMVERTICES] = {0};       // precipitation without desertification effect adjustment
++   double qmp[NUMVERTICES] = {0};       // desertification taken into account
++   double pdd[NUMVERTICES] = {0};     
++   double frzndd[NUMVERTICES] = {0};  
++
++   double tstar;                        // monthly mean surface temp
++   double Tsum[NUMVERTICES]= {0};       // average summer (JJA) temperature
++   double Tsurf[NUMVERTICES] = {0};     // average annual temperature    
++   
++   double h[NUMVERTICES],s[NUMVERTICES],ttmp[NUMVERTICES],prectmp[NUMVERTICES]; // ,b[NUMVERTICES]
++   double t[NUMVERTICES][12],prec[NUMVERTICES][12];
++   double deltm=1/12;
++   int    ismon[12]={12,1,2,3,4,5,6,7,8,9,10,11};
++
++   double snwm;  // snow that could have been melted in a year.
++   double snwmf; //  ablation factor for snow per positive degree day.
++   double smf;   //  ablation factor for ice per pdd (Braithwaite 1995 from tarasov 2002).
++
++   double dfrz=1.5, CovrLm=2009./3.35e+5, dCovrLm=dfrz*CovrLm; //m*J kg^-1 C^-1 /(J kg^-1)=m/C yr
++   double supice,supcap,diffndd;
++   double fsupT=0.5,  fsupndd=0.5;  // Tsurf mode factors for supice
++   double pddtj[NUMVERTICES], hmx2;
++
++   /*Recover info at the vertices: */
++   GetInputListOnVertices(&h[0],ThicknessEnum);
++   GetInputListOnVertices(&s[0],SurfaceEnum);
++   GetInputListOnVertices(&ttmp[0],ThermalSpctemperatureEnum);
++   GetInputListOnVertices(&prectmp[0],SurfaceforcingsPrecipitationEnum);
++
++   for(i=0;i<NUMVERTICES;i++) ttmp[i]=ttmp[i]-273.15; // convertion from Kelvin to celcius
++
++   for(i=0;i<NUMVERTICES;i++)
++     for(imonth=0;imonth<12;imonth++){
++       t[i][imonth]=ttmp[i];
++       prec[i][imonth]=prectmp[i];
++   }
++
++   /*Get material parameters :*/
++   rho_ice=matpar->GetRhoIce();
++   rho_water=matpar->GetRhoWater();
++   density=rho_ice/rho_water;
++   
++   sconv=(rho_water/rho_ice)/12.; //rhow_rain/rhoi / 12 months
++     
++     /*PDD constant*/
++   siglim = 2.5*signorm; 
++   siglim0 =  siglim/DT + 0.5;
++   siglim0c =  siglimc/DT + 0.5;
++   PDup = siglimc+PDCUT;
++   
++   // seasonal loop
++   for (iqj = 0; iqj < 12; iqj++){
++     imonth =  ismon[iqj];
++     for (i = 0; i < NUMVERTICES; i++){
++       st=(s[i]-s0t[i])/1000;
++       tstar = t[i][imonth] - lapser *max(st,sealev);
++       Tsurf[i] = tstar*deltm+Tsurf[i];        
++       
++       /*********compute PD ****************/
++       if (tstar < PDup){
++	 pd = 1;
++	 if (tstar >= -siglimc){ pd = pds[int(tstar/DT + siglim0c)];}}
++       else { 
++	 pd = 0;}
++       
++       /******exp des/elev precip reduction*******/
++       sp=(s[i]-s0p[i])/1000; // deselev effect is wrt chng in topo
++       if (sp>0.0){q = exp(-desfac*sp);}
++       else {q = 1.0;}
++       
++       qmt[i]= qmt[i] + prec[i][imonth]*sconv;  //*sconv to convert in m of ice equivalent 
++       qmpt= q*prec[i][imonth]*sconv;           
++       qmp[i]= qmp[i] + qmpt;
++       qm[i]= qm[i] + qmpt*pd;
++       
++       /*********compute PDD************/
++       // ndd(month)=-(tstar-pdd(month)) since ndd+pdd gives expectation of
++       // gaussian=T_m, so ndd=-(Tsurf-pdd)
++       if (iqj>6 &&  iqj<10){ Tsum[i]=Tsum[i]+tstar;} 
++       if (tstar >= siglim) {pdd[i] = pdd[i] + tstar*deltm;}
++       else if (tstar> -siglim){
++	 pddsig=pdds[int(tstar/DT + siglim0)];
++	 pdd[i] = pdd[i] + pddsig*deltm;
++	 frzndd[i] = frzndd[i] - (tstar-pddsig)*deltm;}
++       else{frzndd[i] = frzndd[i] - tstar*deltm; }
++     }
++   } // end of seasonal loop 
++   
++   //******************************************************************
++   for(i=0;i<NUMVERTICES;i++){
++     saccu[i] = qm[i];
++     prect = qmp[i];     // total precipitation during 1 year taking into account des. ef.
++     Tsum[i]=Tsum[i]/3;
++     
++     /***** determine PDD factors *****/
++     if(Tsum[i]< -1.) {
++       snwmf=2.65*0.001;   //  ablation factor for snow per positive degree day.*0.001 to go from mm to m/ppd
++       smf=17.22*0.001;    //  ablation factor for ice per pdd (Braithwaite 1995 from tarasov 2002)
++     }
++     else if(Tsum[i]< 10){
++       snwmf = (0.15*Tsum[i] + 2.8)*0.001;
++       smf = (0.0067*pow((10.-Tsum[i]),3) + 8.3)*0.001;
++     }
++     else{
++       snwmf=4.3*0.001;
++       smf=8.3*0.001;
++     }
++     snwmf=0.95*snwmf;
++     smf=0.95*smf;
++     
++     /*****  compute PDD ablation and refreezing *****/
++     pddt = pdd[i] *365;
++     snwm = snwmf*pddt;       // snow that could have been melted in a year
++     hmx2 = min(h[i],dfrz);   // refreeze active layer max depth: dfrz
++     
++     if(snwm < saccu[i]) {
++       water=prect-saccu[i] + snwm; //water=rain + snowmelt
++       //     l 2.2= capillary factor
++       //     Should refreezing be controlled by frzndd or by mean annual Tsurf?
++       //     dCovrLm concept is of warming of active layer (thickness =d@=1-
++       //     >2m)
++       //     problem with water seepage into ice: should be sealed after
++       //     refreezing
++       //     so everything needs to be predicated on 1 year scale, except for
++       //     thermal
++       //     conductivity through ice
++       //     also, need to account that melt season has low accum, so what's
++       //     going to
++       //     hold the meltwater around for refreezing? And melt-time will have
++       //     low seasonal frzndd
++       
++       //      Superimposed ice :  Pfeffer et al. 1991, Tarasov 2002
++       
++       supice= min(hmx2*CovrLm*frzndd[i]+2.2*(saccu[i]-snwm), water); // superimposed ice
++       supcap=min(2.2*(saccu[i]-snwm),water);
++       runoff=snwm - supice;  //meltwater only, does not include rain
++     }
++     else {  //all snow melted
++       supice= min(hmx2*CovrLm*frzndd[i], prect );
++       runoff= saccu[i] + smf*(pddt-saccu[i]/snwmf) - supice;
++       supcap=0;
++     }
++     //     pdd melting doesn't cool Tsurf, so ndd refreeze shouldn't warm it
++     //     except pdd melt heat source is atmosphere, while refreeze is
++     //     ground/ice stored interim
++     //     assume pdd=ndd, then melt should equal refreeze and Tsurf should=0
++     //     assume ndd=2*pdd, then all supice is refrozen, but Tsurf should be
++     //     <0
++     //     assume ndd>pdd, little melt => little supice 
++     //     bottom line: compare for Tsurf<0 : supice and no supice case,
++     //     expect Tsurf difference
++     //     except some of cooling flux comes from atmosphere//
++     //     1 dm supice should not raise Tsurf by 1/dCovrLm = 16.675C
++     //     does supice make sense when H< 0.1m? then d=thermoactive ice layer ////
++     //     < 0.1 
++     
++     //     make more sense to just use residual pdd-ndd except that pdd
++     //     residual not clear yet
++     //     frzndd should not be used up by refreezing in snow, so stick in
++     //     supcap.
++     diffndd=0;
++     if (frzndd[i]>0) {
++       diffndd=fsupndd*min((supice-supcap)/dCovrLm ,frzndd[i]);
++       frzndd[i]=frzndd[i]-diffndd;
++     }
++     if(runoff<0){
++       saccu[i]= saccu[i] -runoff;
++       smelt[i] = 0;
++       precrunoff[i]=prect-saccu[i];
++       //here assume pdd residual is 0, => 
++       Tsurf[i]= max(Tsurf[i],-frzndd[i]);
++     }
++     else {
++       smelt[i] = runoff;
++       precrunoff[i]=prect-max(0.,supice)-saccu[i];}
++     //here really need pdd balance, try 0.5 fudge factor?
++     //at least runoff>0 => it's fairly warm, so Tsurf is !<<0,
++     //yet from site plots, can be ice free with Tsurf=-5.5C
++     if(Tsurf[i]<0) {
++       Tsurf[i]= min(Tsurf[i]+fsupT*diffndd , 0.);}
++     
++     agd[i] = -smelt[i]+saccu[i];
++     pddtj[i]=pddt;
++     
++     /*Update inputs*/    
++     this->inputs->AddInput(new PentaP1Input(SurfaceforcingsMassBalanceEnum,&agd[0])); ////////verifier le nom
++     // this->inputs->AddInput(new TriaVertexInput(ThermalSpcTemperatureEnum,&Tsurf[0]));
++     this->inputs->AddInput(new PentaP1Input(ThermalSpctemperatureEnum,&Tsurf[0]));
++     
++   }       //end of the for loop over the vertices
+ }
+ /*}}}*/
+ /*FUNCTION Penta::PotentialSheetUngrounding{{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.h	(revision 11993)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.h	(revision 11994)
+@@ -111,7 +111,7 @@
+ 		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   PositiveDegreeDay(void);
++		void   PositiveDegreeDay(double* pdds,double* pds,double signorm);
+ 		void   ProcessResultsUnits(void);
+ 		void   ResetCoordinateSystem(void);
+ 		double SurfaceArea(void);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/diagnostic.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/diagnostic.m	(revision 11993)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/diagnostic.m	(revision 11994)
+@@ -129,7 +129,7 @@
+ 			fielddisplay(obj,'spcvx','x-axis velocity constraint (NaN means no constraint)');
+ 			fielddisplay(obj,'spcvy','y-axis velocity constraint (NaN means no constraint)');
+ 			fielddisplay(obj,'spcvz','z-axis velocity constraint (NaN means no constraint)');
+-			fielddisplay(obj,'icefront','segments on ice front list (last column 0-> Air, 1-> Water, 2->Ice');
++			fielddisplay(obj,'icefront','segments on ice front list (last column 0-> Air, 1-> Water, 2->Ice)');
+ 
+ 			disp(sprintf('\n      %s','Rift options:'));
+ 			fielddisplay(obj,'rift_penalty_threshold','threshold for instability of mechanical constraints');
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl
+___________________________________________________________________
+Modified: svn:mergeinfo
+   Merged /issm/trunk:r11525-11526,11528-11993
+Modified: svn:ignore
+   - autom4te.cache
+aclocal.m4
+bin
+config.log
+config.h
+config.h.in
+config.status
+configure
+doxygen
+ISSM.paf
+ISSM.ppf
+ISSM.ppf_cache
+libtool
+list
+Makefile
+Makefile.in
+stamp-h1
+svn-commit*
+nightlylog
+
+   + autom4te.cache
+aclocal.m4
+bin
+config.log
+config.h
+config.h.in
+config.status
+configure
+ISSM.paf
+ISSM.ppf
+ISSM.ppf_cache
+libtool
+Makefile
+Makefile.in
+stamp-h1
+svn-commit*
+
+
Index: /issm/oecreview/Archive/11991-12009/ISSM-11995-11996.diff
===================================================================
--- /issm/oecreview/Archive/11991-12009/ISSM-11995-11996.diff	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/ISSM-11995-11996.diff	(revision 12325)
@@ -0,0 +1,6 @@
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl
+___________________________________________________________________
+Modified: svn:mergeinfo
+   Merged /issm/trunk:r11995
+
Index: /issm/oecreview/Archive/11991-12009/ISSM-11996-11997.diff
===================================================================
--- /issm/oecreview/Archive/11991-12009/ISSM-11996-11997.diff	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/ISSM-11996-11997.diff	(revision 12325)
@@ -0,0 +1,408 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am	(revision 11996)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am	(revision 11997)
+@@ -2,41 +2,19 @@
+ EXEEXT=$(WRAPPEREXT)
+ #Bin programs {{{1
+ 
+-if NOSERIAL
+-bin_PROGRAMS = 
+-else
++if MODULES
+ if MATLAB
+-bin_PROGRAMS = AverageFilter\
+-				AddExternalResult\
++bin_PROGRAMS =  AverageFilter\
+ 				BamgMesher\
+ 				BamgConvertMesh\
+ 				BamgTriangulate\
+ 				Chaco\
+-				ComputeBasalStress\
+-				ConfigureObjects \
+-				ControlOptimization\
+-				ControlInputGetGradient\
+-				ControlInputScaleGradient\
+-				ControlInputSetGradient\
+ 				ContourToMesh \
+ 				ContourToNodes \
+-				CostFunction \
+-				CreateNodalConstraints\
+-				CreateJacobianMatrix\
+-				Echo\
+ 				ElementConnectivity\
+ 				EnumToString\
+ 				StringToEnum\
+-				InputControlUpdate \
+-				InputConvergence\
+-				GetSolutionFromInputs\
+-				GetVectorFromInputs\
+-				Gradj\
+-				GroundinglineMigration\
+ 				HoleFiller \
+-				InputDuplicate\
+-				InputScale\
+-				InputToResult\
+ 				InternalFront\
+ 				InterpFromGridToMesh \
+ 				InterpFromMeshToMesh2d \
+@@ -50,93 +28,50 @@
+ 				Ll2xy \
+ 				Exp2Kml \
+ 				Kml2Exp \
+-				Mergesolutionfromftog\
+ 				MeshPartition\
+ 				MeshProfileIntersection\
+-				ModelProcessor \
+-				NodeConnectivity\
+-				NodesDof\
+-				Orth\
+-				OutputResults\
+-				ParsePetscOptions\
+-				ConstraintsState\
+ 				PointCloudFindNeighbors\
+ 				PropagateFlagsFromConnectivity\
+-				ProcessParams\
+-				Reduceload\
+-				Reducevectorgtos\
+-				Reducevectorgtof\
+-				Response\
+-				ResetCoordinateSystem\
+ 				Scotch\
+-				Solver\
+-				SparseToVector\
+-				SpcNodes\
+ 				Shp2Kml\
+-				UpdateConstraints\
+-				SurfaceArea\
+-				SystemMatrices\
+-				TimeAdapt\
+ 				TriaSearch\
+ 				TriMesh\
+ 				TriMeshRifts\
+ 				TriMeshNoDensity\
+ 				TriMeshProcessRifts\
+-				TriMeshRefine\
+-				InputUpdateFromConstant\
+-				InputUpdateFromSolution\
+-				InputUpdateFromVector\
+-				UpdateVertexPositions\
+-				UpdateDynamicConstraints\
+-				VerticesDof
++				TriMeshRefine
+ endif
+ if PYTHON
+ bin_PROGRAMS = TriMesh
+ endif
+ endif 
+ #}}}
+-#Dakota programs {{{1
+-if NOSERIAL
+-bin_PROGRAMS += 
+-else
+-if DAKOTA
+-if MATLAB
+-bin_PROGRAMS += DakotaResponses\
+-				Dakota\
+-				InputUpdateFromDakota
+-endif 
+-endif 
+-endif
+-#}}}
+ #Flags and libraries {{{1
+-LDADD = ../c/libISSM.a $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
++LDADD = ../c/libISSMCore.a ../c/libISSMModules.a $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
+ 
+-#Initialize
+-AM_CXXFLAGS = -D_SERIAL_
++#Triangle library
++AM_CXXFLAGS =  -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
+ 
+ if MATLAB
+-AM_LDFLAGS   = $(MEXLINK)
++AM_LDFLAGS  = $(MEXLINK)
+ AM_CXXFLAGS +=  -DMATLAB  -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread 
+-LDADD       += $(MEXLIB) 
++LDADD       += $(MEXLIB) ../c/libISSMMatlab.a
+ 
+ endif
+ 
+ if PYTHON
+ AM_LDFLAGS  = $(PYTHONLINK)
+-AM_CXXFLAGS+=  -DNPY_NO_DEPRECATED_API 
+-LDADD      += $(BOOSTLIB) $(PYTHONLIB)
++AM_CXXFLAGS +=  -DNPY_NO_DEPRECATED_API 
++LDADD       += $(BOOSTLIB) $(PYTHONLIB) ../c/libISSMPython.a
+ endif
+ 
+ 
+-#Triangle library
+-AM_CXXFLAGS +=  -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
+-
+ #Optimization flags:
+ AM_CXXFLAGS += $(CXXOPTFLAGS) 
+ #}}}
+ #Bin sources {{{1
+-AddExternalResult_SOURCES = AddExternalResult/AddExternalResult.cpp\
+-					AddExternalResult/AddExternalResult.h
++AverageFilter_SOURCES = AverageFilter/AverageFilter.cpp\
++			  AverageFilter/AverageFilter.h
+ 
+ BamgMesher_SOURCES = BamgMesher/BamgMesher.cpp\
+ 					BamgMesher/BamgMesher.h
+@@ -150,48 +85,12 @@
+ Chaco_SOURCES = Chaco/Chaco.cpp\
+ 					Chaco/Chaco.h
+ 
+-ComputeBasalStress_SOURCES = ComputeBasalStress/ComputeBasalStress.cpp\
+-								  ComputeBasalStress/ComputeBasalStress.h
+-
+-ConfigureObjects_SOURCES = ConfigureObjects/ConfigureObjects.cpp\
+-			  ConfigureObjects/ConfigureObjects.h
+-
+ ContourToMesh_SOURCES = ContourToMesh/ContourToMesh.cpp\
+ 			  ContourToMesh/ContourToMesh.h
+ 
+ ContourToNodes_SOURCES = ContourToNodes/ContourToNodes.cpp\
+ 			  ContourToNodes/ContourToNodes.h
+ 
+-ControlOptimization_SOURCES = ControlOptimization/ControlOptimization.cpp\
+-			  ControlOptimization/ControlOptimization.h
+-
+-ControlInputGetGradient_SOURCES = ControlInputGetGradient/ControlInputGetGradient.cpp\
+-										ControlInputGetGradient/ControlInputGetGradient.h
+-
+-ControlInputScaleGradient_SOURCES = ControlInputScaleGradient/ControlInputScaleGradient.cpp\
+-											 ControlInputScaleGradient/ControlInputScaleGradient.h
+-
+-ControlInputSetGradient_SOURCES = ControlInputSetGradient/ControlInputSetGradient.cpp\
+-			  ControlInputSetGradient/ControlInputSetGradient.h
+-
+-InputControlUpdate_SOURCES = InputControlUpdate/InputControlUpdate.cpp\
+-										  InputControlUpdate/InputControlUpdate.h
+-
+-InputConvergence_SOURCES = InputConvergence/InputConvergence.cpp\
+-			  InputConvergence/InputConvergence.h
+-
+-CostFunction_SOURCES =  CostFunction/CostFunction.cpp \
+-						CostFunction/CostFunction.h
+-
+-CreateNodalConstraints_SOURCES =  CreateNodalConstraints/CreateNodalConstraints.cpp \
+-								CreateNodalConstraints/CreateNodalConstraints.h
+-
+-NodesDof_SOURCES = NodesDof/NodesDof.cpp\
+-			  NodesDof/NodesDof.h
+-
+-Echo_SOURCES = Echo/Echo.cpp\
+-			  Echo/Echo.h
+-
+ ElementConnectivity_SOURCES = ElementConnectivity/ElementConnectivity.cpp\
+ 			  ElementConnectivity/ElementConnectivity.h
+ 
+@@ -201,30 +100,9 @@
+ StringToEnum_SOURCES = StringToEnum/StringToEnum.cpp\
+ 			  StringToEnum/StringToEnum.h
+ 
+-GetSolutionFromInputs_SOURCES = GetSolutionFromInputs/GetSolutionFromInputs.cpp\
+-			  GetSolutionFromInputs/GetSolutionFromInputs.h
+-
+-GetVectorFromInputs_SOURCES = GetVectorFromInputs/GetVectorFromInputs.cpp\
+-			  GetVectorFromInputs/GetVectorFromInputs.h
+-
+-Gradj_SOURCES = Gradj/Gradj.cpp\
+-			  Gradj/Gradj.h
+-
+-GroundinglineMigration_SOURCES = GroundinglineMigration/GroundinglineMigration.cpp\
+-			  GroundinglineMigration/GroundinglineMigration.h
+-
+ HoleFiller_SOURCES = HoleFiller/HoleFiller.cpp\
+ 			  HoleFiller/HoleFiller.h
+ 
+-InputDuplicate_SOURCES = InputDuplicate/InputDuplicate.cpp\
+-			  InputDuplicate/InputDuplicate.h
+-
+-InputScale_SOURCES = InputScale/InputScale.cpp\
+-			  InputScale/InputScale.h
+-
+-InputToResult_SOURCES = InputToResult/InputToResult.cpp\
+-			  InputToResult/InputToResult.h
+-
+ InternalFront_SOURCES = InternalFront/InternalFront.cpp\
+ 										 InternalFront/InternalFront.h
+ 
+@@ -264,88 +142,24 @@
+ Kml2Exp_SOURCES = Kml2Exp/Kml2Exp.cpp\
+ 			  Kml2Exp/Kml2Exp.h
+ 
+-AverageFilter_SOURCES = AverageFilter/AverageFilter.cpp\
+-			  AverageFilter/AverageFilter.h
+-
+-Mergesolutionfromftog_SOURCES = Mergesolutionfromftog/Mergesolutionfromftog.cpp\
+-			  Mergesolutionfromftog/Mergesolutionfromftog.h
+-
+ MeshPartition_SOURCES = MeshPartition/MeshPartition.cpp\
+ 			  MeshPartition/MeshPartition.h
+ 
+ MeshProfileIntersection_SOURCES = MeshProfileIntersection/MeshProfileIntersection.cpp\
+ 			  MeshProfileIntersection/MeshProfileIntersection.h
+ 
+-ModelProcessor_SOURCES =  ModelProcessor/ModelProcessor.cpp \
+-						  ModelProcessor/ModelProcessor.h
+-
+-NodeConnectivity_SOURCES = NodeConnectivity/NodeConnectivity.cpp\
+-			  NodeConnectivity/NodeConnectivity.h
+-
+-Orth_SOURCES = Orth/Orth.cpp\
+-			  Orth/Orth.h
+-
+-OutputResults_SOURCES = OutputResults/OutputResults.cpp\
+-			  OutputResults/OutputResults.h
+-
+-ConstraintsState_SOURCES = ConstraintsState/ConstraintsState.cpp\
+-			  ConstraintsState/ConstraintsState.h
+-
+ PointCloudFindNeighbors_SOURCES = PointCloudFindNeighbors/PointCloudFindNeighbors.cpp\
+ 			  PointCloudFindNeighbors/PointCloudFindNeighbors.h
+ 
+-ProcessParams_SOURCES = ProcessParams/ProcessParams.cpp\
+-			  ProcessParams/ProcessParams.h
+-
+ PropagateFlagsFromConnectivity_SOURCES = PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp\
+ 			  PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h
+ 
+-Reduceload_SOURCES = Reduceload/Reduceload.cpp\
+-			  Reduceload/Reduceload.h
+-
+-Reducevectorgtos_SOURCES = Reducevectorgtos/Reducevectorgtos.cpp\
+-			  Reducevectorgtos/Reducevectorgtos.h
+-
+-Reducevectorgtof_SOURCES = Reducevectorgtof/Reducevectorgtof.cpp\
+-									Reducevectorgtof/Reducevectorgtof.h
+-
+-Response_SOURCES = Response/Response.cpp\
+-									Response/Response.h
+-
+-ResetCoordinateSystem_SOURCES = ResetCoordinateSystem/ResetCoordinateSystem.cpp\
+-						 ResetCoordinateSystem/ResetCoordinateSystem.h
+-
+ Scotch_SOURCES = Scotch/Scotch.cpp\
+ 			  Scotch/Scotch.h
+ 
+-Solver_SOURCES = Solver/Solver.cpp\
+-			  Solver/Solver.h
+-
+-SparseToVector_SOURCES = SparseToVector/SparseToVector.cpp\
+-			  SparseToVector/SparseToVector.h
+-
+-SpcNodes_SOURCES = SpcNodes/SpcNodes.cpp\
+-			  SpcNodes/SpcNodes.h
+-
+ Shp2Kml_SOURCES = Shp2Kml/Shp2Kml.cpp\
+ 			  Shp2Kml/Shp2Kml.h
+ 
+-UpdateConstraints_SOURCES = UpdateConstraints/UpdateConstraints.cpp\
+-			  UpdateConstraints/UpdateConstraints.h
+-
+-SystemMatrices_SOURCES = SystemMatrices/SystemMatrices.cpp\
+-			  SystemMatrices/SystemMatrices.h
+-
+-
+-CreateJacobianMatrix_SOURCES = CreateJacobianMatrix/CreateJacobianMatrix.cpp\
+-								 CreateJacobianMatrix/CreateJacobianMatrix.h
+-
+-SurfaceArea_SOURCES = SurfaceArea/SurfaceArea.cpp\
+-								 SurfaceArea/SurfaceArea.h
+-
+-TimeAdapt_SOURCES = TimeAdapt/TimeAdapt.cpp\
+-			  TimeAdapt/TimeAdapt.h
+-
+ TriaSearch_SOURCES = TriaSearch/TriaSearch.cpp\
+ 			  TriaSearch/TriaSearch.h
+ 
+@@ -364,33 +178,4 @@
+ TriMeshRefine_SOURCES = TriMeshRefine/TriMeshRefine.cpp\
+ 			  TriMeshRefine/TriMeshRefine.h
+ 
+-InputUpdateFromConstant_SOURCES = InputUpdateFromConstant/InputUpdateFromConstant.cpp\
+-			  InputUpdateFromConstant/InputUpdateFromConstant.h
+-
+-InputUpdateFromSolution_SOURCES = InputUpdateFromSolution/InputUpdateFromSolution.cpp\
+-			  InputUpdateFromSolution/InputUpdateFromSolution.h
+-
+-InputUpdateFromVector_SOURCES = InputUpdateFromVector/InputUpdateFromVector.cpp\
+-			  InputUpdateFromVector/InputUpdateFromVector.h
+-
+-UpdateVertexPositions_SOURCES = UpdateVertexPositions/UpdateVertexPositions.cpp\
+-			  UpdateVertexPositions/UpdateVertexPositions.h
+-
+-UpdateDynamicConstraints_SOURCES = UpdateDynamicConstraints/UpdateDynamicConstraints.cpp\
+-			  UpdateDynamicConstraints/UpdateDynamicConstraints.h
+-
+-ParsePetscOptions_SOURCES = ParsePetscOptions/ParsePetscOptions.cpp\
+-			  ParsePetscOptions/ParsePetscOptions.h
+-
+-VerticesDof_SOURCES = VerticesDof/VerticesDof.cpp\
+-			  VerticesDof/VerticesDof.h
+-
+ #}}}
+-#Dakota sources {{{1
+-DakotaResponses_SOURCES = DakotaResponses/DakotaResponses.cpp\
+-			  DakotaResponses/DakotaResponses.h
+-Dakota_SOURCES = Dakota/Dakota.cpp\
+-			  Dakota/Dakota.h
+-InputUpdateFromDakota_SOURCES = InputUpdateFromDakota/InputUpdateFromDakota.cpp\
+-			  InputUpdateFromDakota/InputUpdateFromDakota.h
+-#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.h	(revision 11996)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.h	(revision 11997)
+@@ -17,6 +17,7 @@
+ #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
+ #endif
+ 
++/*Header files: */
+ #include "../../c/include/globals.h"
+ #include "../../c/toolkits/toolkits.h"
+ #include "../../c/include/include.h"
+@@ -31,21 +32,19 @@
+ #define DOMAINOUTLINE     (mxArray *)prhs[0]
+ #define AREA        (mxArray *)prhs[1]
+ #define ORDER     (mxArray *)prhs[2]
+-
+ /* serial output macros: */
+ #define INDEX  (mxArray**)&plhs[0]
+ #define X  (mxArray**)&plhs[1]
+ #define Y   (mxArray**)&plhs[2]
+ #define SEGMENTS   (mxArray**)&plhs[3]
+ #define SEGMENTMARKERLIST (mxArray**)&plhs[4]
+-
+ #endif
++
+ #ifdef _HAVE_PYTHON_
+ /* serial input macros: */
+ #define DOMAINOUTLINE     PyTuple_GetItem(args,0)
+ #define AREA        PyTuple_GetItem(args,1)
+ #define ORDER     PyTuple_GetItem(args,2)
+-
+ /* serial output macros: */
+ #define INDEX  output,0
+ #define X  output,1
+@@ -54,9 +53,6 @@
+ #define SEGMENTMARKERLIST output,4
+ #endif
+ 
+-/* local prototypes: */
+-void TriMeshUsage(void);
+-
+ #undef __FUNCT__ 
+ #define __FUNCT__  "TriMesh"
+ 
+@@ -66,4 +62,7 @@
+ #undef NRHS
+ #define NRHS  3
+ 
++/* local prototypes: */
++void TriMeshUsage(void);
++
+ #endif  /* _TRIMESH_H */
Index: /issm/oecreview/Archive/11991-12009/ISSM-11999-12000.diff
===================================================================
--- /issm/oecreview/Archive/11991-12009/ISSM-11999-12000.diff	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/ISSM-11999-12000.diff	(revision 12325)
@@ -0,0 +1,14 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/Makefile.am	(revision 11999)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/Makefile.am	(revision 12000)
+@@ -12,9 +12,6 @@
+ 				./model/solvers/*.m \
+ 				./planet/*.m \
+ 				./qmu/*.m \
+-				./shared/*.m \
+-				./solutions/*.m \
+-				./solvers/*.m \
+ 				./utils/*.m \
+ 				./utils/Analysis/*.m \
+ 				./utils/Array/*.m \
Index: /issm/oecreview/Archive/11991-12009/ISSM-12002-12003.diff
===================================================================
--- /issm/oecreview/Archive/11991-12009/ISSM-12002-12003.diff	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/ISSM-12002-12003.diff	(revision 12325)
@@ -0,0 +1,19 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/io/io.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/io/io.h	(revision 12002)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/io/io.h	(revision 12003)
+@@ -14,14 +14,6 @@
+ 
+ #include "./Disk/diskio.h"
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include "./Matlab/matlabio.h"
+-#endif
+-
+-#if defined(_HAVE_PYTHON_) && defined(_SERIAL_)
+-#include "./Python/pythonio.h"
+-#endif
+-
+ /*printf: */
+ int PrintfFunction(const char* format,...);
+ 
Index: /issm/oecreview/Archive/11991-12009/ISSM-12005-12006.diff
===================================================================
--- /issm/oecreview/Archive/11991-12009/ISSM-12005-12006.diff	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/ISSM-12005-12006.diff	(revision 12325)
@@ -0,0 +1,12 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/toolkits.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/toolkits.h	(revision 12005)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/toolkits.h	(revision 12006)
+@@ -27,7 +27,6 @@
+ #include "./mpi/mpiincludes.h"
+ #include "./metis/metisincludes.h"
+ #include "./triangle/triangleincludes.h"
+-#include "./double/double.h"
+ #include "./toolkitsenums.h"
+ #include "./issm/issmtoolkit.h"
+ 
Index: /issm/oecreview/Archive/11991-12009/ISSM-12006-12007.diff
===================================================================
--- /issm/oecreview/Archive/11991-12009/ISSM-12006-12007.diff	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/ISSM-12006-12007.diff	(revision 12325)
@@ -0,0 +1,107 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12006)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12007)
+@@ -12,34 +12,18 @@
+ 		AC_DEFINE([_ISSM_DEBUG_],[1],[Macro to enable debugging in ISSM])
+ 	fi
+ 	dnl }}}
+-	dnl Serial build {{{
+-	AC_ARG_WITH([serial],
+-		AS_HELP_STRING([--with-serial = value],[serial compilation. ]),
+-		[SERIAL_VALUE=$withval],[SERIAL_VALUE="yes"])
+-	AC_MSG_CHECKING(for serial compilation)
+-	AM_CONDITIONAL([NOSERIAL], [test $SERIAL_VALUE = no])
+-	AM_CONDITIONAL([SERIAL], [test $SERIAL_VALUE = yes])
+-	AC_MSG_RESULT($SERIAL_VALUE) 
++	dnl Modules build {{{
++	AC_ARG_WITH([modules],
++		AS_HELP_STRING([--with-modules = value],[modules compilation. ]),
++		[MODULES_VALUE=$withval],[MODULES_VALUE="yes"])
++	AC_MSG_CHECKING(for modules compilation)
++	AM_CONDITIONAL([NOMODULES], [test $MODULES_VALUE = no])
++	AM_CONDITIONAL([MODULES], [test $MODULES_VALUE = yes])
++	AC_MSG_RESULT($MODULES_VALUE) 
+ 	dnl }}}
+-	dnl Parallel build {{{
+-	AC_ARG_WITH([parallel],
+-		AS_HELP_STRING([--with-parallel = value], [parallel compilation. ]),
+-		[PARALLEL_VALUE=$withval],[PARALLEL_VALUE="yes"])
+-	AC_MSG_CHECKING(for parallel compilation)
+-	AM_CONDITIONAL([NOPARALLEL], [test $PARALLEL_VALUE = no])
+-	AM_CONDITIONAL([PARALLEL], [test $PARALLEL_VALUE = yes])
+-	AC_MSG_RESULT($PARALLEL_VALUE) 
+-	ISSMEXT=".exe"
++	dnl Extensions{{{
+ 	AC_SUBST([ISSMEXT])
+ 	dnl }}}
+-	dnl Serial or Parallel check {{{
+-	dnl Check that at least serial or parallel builds have been requested!
+-	if test "$SERIAL_VALUE" != "yes" ; then
+-		if test "$PARALLEL_VALUE" != "yes"; then
+-			AC_MSG_ERROR([cannot request --with-serial=no and --with-parallel=no at the same time!])
+-		fi
+-	fi
+-	dnl }}}
+ 
+ 	dnl ISSM's externalpackages
+ 	dnl vendor{{{
+@@ -688,29 +672,6 @@
+ 	fi
+ 	AC_MSG_RESULT($HAVE_TAO)
+ 	dnl }}}
+-	dnl mpiuni{{{
+-	dnl when running in serial mode, MPI must be ignored, and set to internal petsc mpiuni: 
+-	if test "$PARALLEL_VALUE" = "no" ; then
+-		HAVE_MPI=yes
+-		MPIINCL=-I"$PETSC_ROOT/include/mpiuni"
+-
+-		case "${host_os}" in
+-			*cygwin*)
+-			dnl MPILIB="-link -LIBPATH:\"$PETSC_ROOT/$PETSC_ARCH/lib\" -LIBPATH:\"$PETSC_ROOT/lib\" -LIBPATH:\"$PETSC_ROOT/lib/$PETSC_ARCH\" libmpiuni.lib"
+-			;;
+-			*linux*)
+-			MPILIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"
+-			;;
+-			*darwin*)
+-			MPILIB="-L$PETSC_ROOT/$PETSC_ARCH/lib -L$PETSC_ROOT/lib -L$PETSC_ROOT/lib/$PETSC_ARCH -lmpiuni"
+-			;;
+-		esac
+-								  
+-		AC_DEFINE([_HAVE_MPI_],[1],[with Mpi in ISSM src])
+-		AC_SUBST([MPIINCL])
+-		AC_SUBST([MPILIB])
+-	fi
+-	dnl }}}
+ 	dnl slepc{{{
+ 	AC_ARG_WITH([slepc-dir],
+ 	  AS_HELP_STRING([--with-slepc-dir = DIR],[slepc root directory]),
+@@ -1228,25 +1189,18 @@
+ 	dnl checks{{{
+ 	AC_MSG_CHECKING(consistency between all libraries)
+ 	
+-	dnl check that if petsc is requested in parallel, mpi should be specified
++	dnl check that if petsc is requested , mpi should be specified
+ 	if test "$HAVE_PETSC" = "yes" ; then
+ 		if test "$HAVE_MPI" = "NO";  then
+ 			AC_MSG_ERROR([petsc requires mpi!]);
+ 		fi
+ 	fi
+ 
+-	dnl check that we have either python or matlab support if we only compile serially
+-	if test "$PARALLEL_VALUE" = "no"  && test "$HAVE_MATLAB" = "no" && test "$HAVE_PYTHON" = "no"; then
++	dnl check that we have either python or matlab support if we compile the modules
++	if test "$MODULES_VALUE" = "yes"  && test "$HAVE_MATLAB" = "no" && test "$HAVE_PYTHON" = "no"; then
+ 		AC_MSG_ERROR([need at least python or matlab support to compile only in serial mode!]);
+ 	fi
+ 
+-	dnl check that we don't have with-matlab and with-python at the same time
+-	if test "$HAVE_PYTHON" = "yes" ; then
+-		if test "$HAVE_MATLAB" = "yes";  then
+-			AC_MSG_ERROR([cannot create matlab and python wrappers simultaneously! Please choose one or the other.]);
+-		fi
+-	fi
+-
+ 	AC_MSG_RESULT(done)
+ 	dnl }}}
+ 
Index: /issm/oecreview/Archive/11991-12009/ISSM-12008-12009.diff
===================================================================
--- /issm/oecreview/Archive/11991-12009/ISSM-12008-12009.diff	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/ISSM-12008-12009.diff	(revision 12325)
@@ -0,0 +1,16 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/toolkits.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/toolkits.h	(revision 12008)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/toolkits.h	(revision 12009)
+@@ -19,11 +19,6 @@
+ #include "./petsc/petscincludes.h"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include "./matlab/matlabincludes.h"
+-#endif
+-
+-
+ #include "./mpi/mpiincludes.h"
+ #include "./metis/metisincludes.h"
+ #include "./triangle/triangleincludes.h"
Index: /issm/oecreview/Archive/11991-12009/ISSM-DocReview-11991-12009.tex
===================================================================
--- /issm/oecreview/Archive/11991-12009/ISSM-DocReview-11991-12009.tex	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/ISSM-DocReview-11991-12009.tex	(revision 12325)
@@ -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/11991-12009/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/11991-12009/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+11991-12009
Index: /issm/oecreview/Archive/11991-12009/Makefile
===================================================================
--- /issm/oecreview/Archive/11991-12009/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-11991-12009
+
+
+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/11991-12009/log.tex
===================================================================
--- /issm/oecreview/Archive/11991-12009/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/log.tex	(revision 12325)
@@ -0,0 +1,31 @@
+\noindent \textbf{Change \#1} with diff file ISSM-11991-11992.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/matlab/install.sh \\ Export determination: 6. \\Rationale: reverted back to previous revision \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-11992-11993.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/matlab/install.sh \\ Export determination: 6. \\Rationale: reverted back to previous revision
+D /issm/trunk-jpl/externalpackages/triangle/README not needed anymore \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-11993-11994.diff: \\ Function name: \\D /issm/trunk-jpl/externalpackages/triangle/README \\ Export determination: 6. \\Rationale: not needed anymore
+M /issm/trunk-jpl M /issm/trunk-jpl/m4/issm\_options.m4 M /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp 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/m/classes/diagnostic.m merged trunk and trunk-jpl \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-11994-11995.diff: \\ Function name: \\M /issm/trunk-jpl M /issm/trunk-jpl/m4/issm\_options.m4 M /issm/trunk-jpl/src/c/modules/PositiveDegreeDayx/PositiveDegreeDayx.cpp 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/m/classes/diagnostic.m \\ Export determination: 6. \\Rationale: merged trunk and trunk-jpl \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-11995-11996.diff: \\ Function name: \\M /issm/trunk-jpl \\ Export determination: 6. \\Rationale: Block revision 11995 from being merged into trunk-jpl \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-11996-11997.diff: \\ Function name: \\M /issm/trunk-jpl \\ Export determination: 6. \\Rationale: Block revision 11995 from being merged into trunk-jpl
+D /issm/trunk-jpl/src/mex/AddExternalResult D /issm/trunk-jpl/src/mex/ComputeBasalStress D /issm/trunk-jpl/src/mex/ConfigureObjects D /issm/trunk-jpl/src/mex/ConstraintsState D /issm/trunk-jpl/src/mex/ControlInputGetGradient D /issm/trunk-jpl/src/mex/ControlInputScaleGradient D /issm/trunk-jpl/src/mex/ControlInputSetGradient D /issm/trunk-jpl/src/mex/ControlOptimization D /issm/trunk-jpl/src/mex/CostFunction D /issm/trunk-jpl/src/mex/CreateJacobianMatrix D /issm/trunk-jpl/src/mex/CreateNodalConstraints D /issm/trunk-jpl/src/mex/Dakota D /issm/trunk-jpl/src/mex/DakotaResponses D /issm/trunk-jpl/src/mex/Echo D /issm/trunk-jpl/src/mex/GetSolutionFromInputs D /issm/trunk-jpl/src/mex/GetVectorFromInputs D /issm/trunk-jpl/src/mex/Gradj D /issm/trunk-jpl/src/mex/GroundinglineMigration D /issm/trunk-jpl/src/mex/InputControlUpdate D /issm/trunk-jpl/src/mex/InputConvergence D /issm/trunk-jpl/src/mex/InputDuplicate D /issm/trunk-jpl/src/mex/InputScale D /issm/trunk-jpl/src/mex/InputToResult D /issm/trunk-jpl/src/mex/InputUpdateFromConstant D /issm/trunk-jpl/src/mex/InputUpdateFromDakota D /issm/trunk-jpl/src/mex/InputUpdateFromSolution D /issm/trunk-jpl/src/mex/InputUpdateFromVector M /issm/trunk-jpl/src/mex/Makefile.am D /issm/trunk-jpl/src/mex/Mergesolutionfromftog D /issm/trunk-jpl/src/mex/ModelProcessor D /issm/trunk-jpl/src/mex/NodeConnectivity D /issm/trunk-jpl/src/mex/NodesDof D /issm/trunk-jpl/src/mex/Orth D /issm/trunk-jpl/src/mex/OutputResults D /issm/trunk-jpl/src/mex/OutputRifts D /issm/trunk-jpl/src/mex/ParameterOutput D /issm/trunk-jpl/src/mex/ParsePetscOptions D /issm/trunk-jpl/src/mex/ProcessParams D /issm/trunk-jpl/src/mex/Reduceload D /issm/trunk-jpl/src/mex/Reducevectorgtof D /issm/trunk-jpl/src/mex/Reducevectorgtos D /issm/trunk-jpl/src/mex/ResetCoordinateSystem D /issm/trunk-jpl/src/mex/Response D /issm/trunk-jpl/src/mex/Solver D /issm/trunk-jpl/src/mex/SparseToVector D /issm/trunk-jpl/src/mex/SpcNodes D /issm/trunk-jpl/src/mex/SurfaceArea D /issm/trunk-jpl/src/mex/SystemMatrices D /issm/trunk-jpl/src/mex/TimeAdapt M /issm/trunk-jpl/src/mex/TriMesh/TriMesh.h D /issm/trunk-jpl/src/mex/UpdateConstraints D /issm/trunk-jpl/src/mex/UpdateDynamicConstraints D /issm/trunk-jpl/src/mex/UpdateVertexPositions D /issm/trunk-jpl/src/mex/VerticesDof Starting to get rid of serial modules \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-11997-11998.diff: \\ Function name: \\D /issm/trunk-jpl/src/mex/AddExternalResult D /issm/trunk-jpl/src/mex/ComputeBasalStress D /issm/trunk-jpl/src/mex/ConfigureObjects D /issm/trunk-jpl/src/mex/ConstraintsState D /issm/trunk-jpl/src/mex/ControlInputGetGradient D /issm/trunk-jpl/src/mex/ControlInputScaleGradient D /issm/trunk-jpl/src/mex/ControlInputSetGradient D /issm/trunk-jpl/src/mex/ControlOptimization D /issm/trunk-jpl/src/mex/CostFunction D /issm/trunk-jpl/src/mex/CreateJacobianMatrix D /issm/trunk-jpl/src/mex/CreateNodalConstraints D /issm/trunk-jpl/src/mex/Dakota D /issm/trunk-jpl/src/mex/DakotaResponses D /issm/trunk-jpl/src/mex/Echo D /issm/trunk-jpl/src/mex/GetSolutionFromInputs D /issm/trunk-jpl/src/mex/GetVectorFromInputs D /issm/trunk-jpl/src/mex/Gradj D /issm/trunk-jpl/src/mex/GroundinglineMigration D /issm/trunk-jpl/src/mex/InputControlUpdate D /issm/trunk-jpl/src/mex/InputConvergence D /issm/trunk-jpl/src/mex/InputDuplicate D /issm/trunk-jpl/src/mex/InputScale D /issm/trunk-jpl/src/mex/InputToResult D /issm/trunk-jpl/src/mex/InputUpdateFromConstant D /issm/trunk-jpl/src/mex/InputUpdateFromDakota D /issm/trunk-jpl/src/mex/InputUpdateFromSolution D /issm/trunk-jpl/src/mex/InputUpdateFromVector M /issm/trunk-jpl/src/mex/Makefile.am D /issm/trunk-jpl/src/mex/Mergesolutionfromftog D /issm/trunk-jpl/src/mex/ModelProcessor D /issm/trunk-jpl/src/mex/NodeConnectivity D /issm/trunk-jpl/src/mex/NodesDof D /issm/trunk-jpl/src/mex/Orth D /issm/trunk-jpl/src/mex/OutputResults D /issm/trunk-jpl/src/mex/OutputRifts D /issm/trunk-jpl/src/mex/ParameterOutput D /issm/trunk-jpl/src/mex/ParsePetscOptions D /issm/trunk-jpl/src/mex/ProcessParams D /issm/trunk-jpl/src/mex/Reduceload D /issm/trunk-jpl/src/mex/Reducevectorgtof D /issm/trunk-jpl/src/mex/Reducevectorgtos D /issm/trunk-jpl/src/mex/ResetCoordinateSystem D /issm/trunk-jpl/src/mex/Response D /issm/trunk-jpl/src/mex/Solver D /issm/trunk-jpl/src/mex/SparseToVector D /issm/trunk-jpl/src/mex/SpcNodes D /issm/trunk-jpl/src/mex/SurfaceArea D /issm/trunk-jpl/src/mex/SystemMatrices D /issm/trunk-jpl/src/mex/TimeAdapt M /issm/trunk-jpl/src/mex/TriMesh/TriMesh.h D /issm/trunk-jpl/src/mex/UpdateConstraints D /issm/trunk-jpl/src/mex/UpdateDynamicConstraints D /issm/trunk-jpl/src/mex/UpdateVertexPositions D /issm/trunk-jpl/src/mex/VerticesDof \\ Export determination: 6. \\Rationale: Starting to get rid of serial modules
+D /issm/trunk-jpl/src/m/solutions Getting rid of serial capability \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-11998-11999.diff: \\ Function name: \\D /issm/trunk-jpl/src/m/solutions \\ Export determination: 6. \\Rationale: Getting rid of serial capability
+D /issm/trunk-jpl/src/m/shared D /issm/trunk-jpl/src/m/solvers Getting rid of serial capability \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-11999-12000.diff: \\ Function name: \\D /issm/trunk-jpl/src/m/shared D /issm/trunk-jpl/src/m/solvers \\ Export determination: 6. \\Rationale: Getting rid of serial capability
+M /issm/trunk-jpl/src/m/Makefile.am Getting rid of serial capability \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12000-12001.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/Makefile.am \\ Export determination: 6. \\Rationale: Getting rid of serial capability
+D /issm/trunk-jpl/src/c/io/Matlab Moved to src/matlab \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12001-12002.diff: \\ Function name: \\D /issm/trunk-jpl/src/c/io/Matlab \\ Export determination: 6. \\Rationale: Moved to src/matlab
+D /issm/trunk-jpl/src/c/io/Python Moved to src/python/io \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-12002-12003.diff: \\ Function name: \\D /issm/trunk-jpl/src/c/io/Python \\ Export determination: 6. \\Rationale: Moved to src/python/io
+M /issm/trunk-jpl/src/c/io/io.h Moved to src/python/io \\\\
+\noindent \textbf{Change \#13} with diff file ISSM-12003-12004.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/io/io.h \\ Export determination: 6. \\Rationale: Moved to src/python/io \\\\
+\noindent \textbf{Change \#14} with diff file ISSM-12004-12005.diff: \\ Function name: \\D /issm/trunk-jpl/src/c/toolkits/double \\ Export determination: 6. \\Rationale: Gone to src/matlab/io \\\\
+\noindent \textbf{Change \#15} with diff file ISSM-12005-12006.diff: \\ Function name: \\D /issm/trunk-jpl/src/c/toolkits/double \\ Export determination: 6. \\Rationale: Gone to src/matlab/io
+M /issm/trunk-jpl/src/c/toolkits/toolkits.h Gone to src/matlab/io \\\\
+\noindent \textbf{Change \#16} with diff file ISSM-12006-12007.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/toolkits/toolkits.h \\ Export determination: 6. \\Rationale: Gone to src/matlab/io
+M /issm/trunk-jpl/m4/issm\_options.m4 New architecture where serial and parallel are replaced by module or not module \\\\
+\noindent \textbf{Change \#17} with diff file ISSM-12007-12008.diff: \\ Function name: \\M /issm/trunk-jpl/m4/issm\_options.m4 \\ Export determination: 6. \\Rationale: New architecture where serial and parallel are replaced by module or not module
+D /issm/trunk-jpl/src/c/toolkits/matlab Moved to src/matlab/io \\\\
+\noindent \textbf{Change \#18} with diff file ISSM-12008-12009.diff: \\ Function name: \\D /issm/trunk-jpl/src/c/toolkits/matlab \\ Export determination: 6. \\Rationale: Moved to src/matlab/io
+M /issm/trunk-jpl/src/c/toolkits/toolkits.h Moved to src/matlab/io \\\\
Index: /issm/oecreview/Archive/11991-12009/r1.tex
===================================================================
--- /issm/oecreview/Archive/11991-12009/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+11991
Index: /issm/oecreview/Archive/11991-12009/r2.tex
===================================================================
--- /issm/oecreview/Archive/11991-12009/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/11991-12009/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12009
Index: /issm/oecreview/Archive/12010-12040/Date.tex
===================================================================
--- /issm/oecreview/Archive/12010-12040/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12010-12040/ISSM-12010-12011.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12010-12011.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12010-12011.diff	(revision 12325)
@@ -0,0 +1,5861 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py	(revision 12011)
+@@ -1,6 +1,8 @@
+ from model import *
+-from TriMesh import *
++from TriMesh.Python import *
+ 
+-md=model()
++#md=model()
++#md=triangle(md,'../Exp/Square.exp',150000);
++
+ [a,b,c,d,e]=TriMesh('../Exp/Square.exp',15000.0**2.0,True)
+ print(a,b,c,d,e)
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh	(revision 12011)
+@@ -25,6 +25,8 @@
+ 	--with-python=python3.2 \
+ 	--with-python-root="$ISSM_TIER/externalpackages/python/install" 
+ 
++exit
++
+ #Compile boost
+ ./bjam install
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/Container/Options.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/Container/Options.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/Container/Options.cpp	(revision 12011)
+@@ -0,0 +1,55 @@
++/*
++ * \file Options.c
++ * \brief: implementation of the Options class methods that depend on Matlab
++ */
++
++/*Headers: {{{1*/
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include <vector>
++#include <algorithm>
++
++#include "./DataSet.h"
++#include "../shared/shared.h"
++#include "../io/io.h"
++#include "../include/include.h"
++#include "../shared/shared.h"
++#include "../EnumDefinitions/EnumDefinitions.h"
++#if _SERIAL_
++#include "../io/io.h"
++#endif
++/*}}}*/
++
++/*Object constructors and destructor*/
++/*FUNCTION Options::Options(int istart, int nrhs, const mxArray* prhs[]){{{1*/
++Options::Options(int istart, int nrhs, void* module_references){
++
++	const mxArray** prhs = NULL;
++	int            i;
++	char          *name    = NULL;
++	Option *option = NULL;
++
++	/*Recover matlab references: */
++	prhs=(const mxArray**)module_references;
++
++	/*loop over each name and value*/
++	for (i=istart; i<nrhs; i=i+2){
++		if (!mxIsClass(prhs[i],"char")) _error_("Argument %d must be name of option.",i+1);
++
++		FetchData(&name,prhs[i]);
++		if (i+1 == nrhs) _error_("Argument %d must exist and be value of option \"%s\".",i+2,name);
++
++		//_printf_(true,"  Processing option \"%s\" of class \"%s\".\n",name,mxGetClassName(prhs[i+1]));
++		option=(Option*)OptionParse(name,&prhs[i+1]);
++		this->AddOption(option);
++		option=NULL;
++	}
++
++	/*echo the dataset  */
++	//if (this->Size()) for(i=0;i<this->Size();i++) ((Option*)this->GetObjectByOffset(i))->Echo();
++}
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12011)
+@@ -0,0 +1,50 @@
++/* \file macros.h
++ * \brief: global macros used in the whole code
++ */
++
++/*Header {{{1*/
++#ifndef _MATLAB_MACROS_H_
++#define _MATLAB_MACROS_H_
++
++#include "./typedefs.h"
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++/*}}}*/
++
++/* MODULEBOOT/MODULEEND {{{1*/
++
++/*The following macros hide the error exception handling in a matlab module. Just put 
++ * MODULEBOOT(); and MODULEEND(); at the beginning and end of a module, and c++ exceptions 
++ * will be trapped. Really nifty!*/
++
++//Module Boot //{{{
++#define MODULEBOOT(); ModuleBoot(); \
++	try{
++
++#define MODULEEND(); ModuleEnd(); }\
++	catch(ErrorException &exception){\
++		exception.Report(); \
++		mexErrMsgTxt(""); \
++	}\
++	catch (exception& e) {\
++		_printf_(true,"Standard exception: %s\n",e.what());\
++		mexErrMsgTxt(" ");\
++	}
++//}}}
++/* WRAPPER {{{1*/
++#ifdef _HAVE_MATLAB_
++#define WRAPPER(modulename,...) void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) 
++#endif
++
++/*}}}*/
++/* CHECKARGUMENTS {{{1*/
++#ifdef _HAVE_MATLAB_
++#define CHECKARGUMENTS(NLHS,NRHS,functionpointer) CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,functionpointer)
++#endif
++/*}}}*/
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToSeqMat.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToSeqMat.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToSeqMat.cpp	(revision 12011)
+@@ -0,0 +1,9 @@
++SeqMat* MatlabMatrixToSeqMat(const mxArray* dataref){
++
++	SeqMat* output=NULL;
++
++	output=new SeqMat();
++	MatlabMatrixToDoubleMatrix(&output->matrix,&output->M,&output->N,dataref);
++	return output;
++
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/OptionParse.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12011)
+@@ -0,0 +1,194 @@
++/*\file OptionParse.c
++ *\brief: functions to parse the mex options.
++ */
++#ifdef HAVE_CONFIG_H
++    #include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include "../../shared/shared.h"
++#include "../../io/io.h"
++#include "../../include/include.h"
++#include "./matlabio.h"
++
++#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
++#include <mex.h>
++
++/*FUNCTION OptionDoubleParse {{{1*/
++OptionDouble* OptionDoubleParse( char* name, const mxArray* prhs[]){
++
++	OptionDouble *odouble = NULL;
++
++	/*check and parse the name  */
++	odouble=new OptionDouble;
++	odouble->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
++	memcpy(odouble->name,name,(strlen(name)+1)*sizeof(char));
++
++	/*check and parse the value  */
++	if (!mxIsClass(prhs[0],"double")){
++		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",odouble->name,"double",odouble->name,mxGetClassName(prhs[0]));
++	}
++
++	FetchData(&odouble->values,&odouble->numel,&odouble->ndims,&odouble->size,prhs[0]);
++
++	return(odouble);
++}/*}}}*/
++/*FUNCTION OptionLogicalParse {{{1*/
++OptionLogical* OptionLogicalParse( char* name, const mxArray* prhs[]){
++
++	OptionLogical *ological = NULL;
++
++	/*check and parse the name  */
++	ological=new OptionLogical;
++	ological->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
++	memcpy(ological->name,name,(strlen(name)+1)*sizeof(char));
++
++	/*check and parse the value  */
++	if (!mxIsClass(prhs[0],"logical")){
++		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ological->name,"logical",ological->name,mxGetClassName(prhs[0]));
++	}
++
++	FetchData(&ological->values,&ological->numel,&ological->ndims,&ological->size,prhs[0]);
++
++	return(ological);
++}/*}}}*/
++/*FUNCTION OptionCharParse {{{1*/
++OptionChar* OptionCharParse( char* name, const mxArray* prhs[]){
++
++	OptionChar  *ochar = NULL;
++
++	/*check and parse the name  */
++	ochar=new OptionChar;
++	ochar->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
++	memcpy(ochar->name,name,(strlen(name)+1)*sizeof(char));
++
++	/*check and parse the value  */
++	if (!mxIsClass(prhs[0],"char")){
++		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ochar->name,"char",ochar->name,mxGetClassName(prhs[0]));
++	}
++
++	FetchData(&ochar->values,&ochar->numel,&ochar->ndims,&ochar->size,prhs[0]);
++
++	return(ochar);
++}/*}}}*/
++/*FUNCTION OptionStructParse {{{1*/
++OptionStruct* OptionStructParse( char* name, const mxArray* prhs[]){
++
++	int            i;
++	char           namei[161];
++	OptionStruct  *ostruct    = NULL;
++	Option        *option     = NULL;
++	const mwSize  *ipt        = NULL;
++	const mxArray *structi;
++	mwIndex        sindex;
++
++	/*check and parse the name  */
++	ostruct=new OptionStruct;
++	ostruct->name =(char*)xmalloc((strlen(name)+1)*sizeof(char));
++	memcpy(ostruct->name,name,(strlen(name)+1)*sizeof(char));
++
++	/*check and parse the value  */
++	if (!mxIsClass(prhs[0],"struct")){
++		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ostruct->name,"struct",ostruct->name,mxGetClassName(prhs[0]));
++	}
++
++	ostruct->numel=mxGetNumberOfElements(prhs[0]);
++	ostruct->ndims=mxGetNumberOfDimensions(prhs[0]);
++	ipt           =mxGetDimensions(prhs[0]);
++	ostruct->size =(int *) xmalloc(ostruct->ndims*sizeof(int));
++	for (i=0; i<ostruct->ndims; i++) ostruct->size[i]=(int)ipt[i];
++	if (ostruct->numel) ostruct->values=(Options**) xmalloc(ostruct->numel*sizeof(Options *));
++
++	/*loop through and process each element of the struct array  */
++	for (sindex=0; sindex<ostruct->numel; sindex++) {
++		ostruct->values[sindex]=new Options;
++
++		/*loop through and process each field for the element  */
++		for (i=0; i<mxGetNumberOfFields(prhs[0]); i++) {
++			sprintf(namei,"%s.%s",name,mxGetFieldNameByNumber(prhs[0],i));
++			structi=mxGetFieldByNumber(prhs[0],sindex,i);
++
++			option=(Option*)OptionParse(namei,&structi);
++			ostruct->values[sindex]->AddObject((Object*)option);
++			option=NULL;
++		}
++	}
++
++	return(ostruct);
++}/*}}}*/
++/*FUNCTION OptionCellParse {{{1*/
++OptionCell* OptionCellParse( char* name, const mxArray* prhs[]){
++
++	int            i;
++	int           *dims;
++	char           namei[161];
++	char           cstr[81];
++	OptionCell    *ocell      = NULL;
++	Option        *option     = NULL;
++	const mwSize  *ipt        = NULL;
++	const mxArray *celli;
++	mwIndex        cindex;
++
++	/*check and parse the name  */
++	ocell=new OptionCell;
++	ocell->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
++	memcpy(ocell->name,name,(strlen(name)+1)*sizeof(char));
++
++	/*check and parse the value  */
++	if (!mxIsClass(prhs[0],"cell")){
++		_error_("Value of option \"%s\" must be class \"%s\", not class \"%s\".",ocell->name,"cell",ocell->name,mxGetClassName(prhs[0]));
++	}
++
++	ocell->numel=mxGetNumberOfElements(prhs[0]);
++	ocell->ndims=mxGetNumberOfDimensions(prhs[0]);
++	ipt         =mxGetDimensions(prhs[0]);
++	ocell->size =(int *) xmalloc(ocell->ndims*sizeof(int));
++	for (i=0; i<ocell->ndims; i++) ocell->size[i]=(int)ipt[i];
++	ocell->values=new Options;
++
++	/*loop through and process each element of the cell array  */
++	dims=(int *) xmalloc(ocell->ndims*sizeof(int));
++	for (cindex=0; cindex<ocell->numel; cindex++) {
++		ColumnWiseDimsFromIndex(dims,(int)cindex,ocell->size,ocell->ndims);
++		StringFromDims(cstr,dims,ocell->ndims);
++		#ifdef _INTEL_WIN_
++			_snprintf(namei,161,"%s%s",name,cstr);
++		#else
++			snprintf(namei,161,"%s%s",name,cstr);
++		#endif
++		celli=mxGetCell(prhs[0],cindex);
++
++		option=(Option*)OptionParse(namei,&celli);
++		ocell->values->AddObject((Object*)option);
++		option=NULL;
++	}
++	xfree((void**)&dims);
++
++	return(ocell);
++}/*}}}*/
++/*FUNCTION OptionParse{{{1*/
++Option* OptionParse(char* name, const mxArray* prhs[]){
++
++	Option *option = NULL;
++	mxArray       *lhs[1];
++
++	/*parse the value according to the matlab data type  */
++	if     (mxIsClass(prhs[0],"double"))  option=(Option*)OptionDoubleParse(name,prhs);
++	else if(mxIsClass(prhs[0],"logical")) option=(Option*)OptionLogicalParse(name,prhs);
++	else if(mxIsClass(prhs[0],"char"))    option=(Option*)OptionCharParse(name,prhs);
++	else if(mxIsClass(prhs[0],"struct"))  option=(Option*)OptionStructParse(name,prhs);
++	else if(mxIsClass(prhs[0],"cell"))    option=(Option*)OptionCellParse(name,prhs);
++	else {
++		_printf_(true,"  Converting value of option \"%s\" from unrecognized class \"%s\" to class \"%s\".\n",name,mxGetClassName(prhs[0]),"struct");
++		if (!mexCallMATLAB(1,lhs,1,(mxArray**)prhs,"struct")) {
++			option=(Option*)OptionStructParse(name,(const mxArray**)lhs);
++			mxDestroyArray(lhs[0]);
++		}
++		else _error_("Second argument value of option \"%s\" is of unrecognized class \"%s\".",name,mxGetClassName(prhs[0]));
++	}
++
++	return(option);
++}/*}}}*/
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp	(revision 12011)
+@@ -0,0 +1,35 @@
++/*!\file CheckNumMatlabArguments.cpp:
++ * \brief: check number of arguments and report an usage error message.
++ */
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++
++#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
++
++#include "../../shared/Exceptions/exceptions.h"
++#include "../../include/include.h"
++#include "mex.h"
++
++int CheckNumMatlabArguments(int nlhs,int NLHS, int nrhs,int NRHS, const char* __FUNCT__, void (*function)( void )){
++	
++	/*checks on arguments on the matlab side: */
++	if (nrhs==0 && nlhs==0) {
++		/*unless NLHS=0 and NRHS=0, we are just asking for documentation: */
++		if (NRHS==0 && NLHS==0)return 1;
++		/* special case: */
++		function();
++		_error_("usage: see above");
++	}
++	else if (nlhs!=NLHS || nrhs!=NRHS ) {
++		function(); 
++		_error_("usage error.");
++	}
++	return 1;
++}
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12011)
+@@ -0,0 +1,744 @@
++/*\file FetchData.cpp:
++ * \brief: general I/O interface to fetch data in matlab
++ */
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include "../../shared/shared.h"
++#include "../../include/include.h"
++
++#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
++#include <mex.h>
++/*FUNCTION FetchData(DataSet** pdataset,const mxArray* dataref){{{1*/
++void FetchData(DataSet** pdataset,const mxArray* dataref){
++
++	/*output*/
++	DataSet* outdataset=NULL;
++	char*    outdataset_buffer=NULL;
++	int      outdataset_size;
++
++	/*First, check that our reference is a double, otherwise, error out: */
++	if (mxIsClass(dataref,"double")){
++			
++		/*We need to copy the data pointed by dataref, so that our dataset is not actually a pointer!:*/
++		if (!mxIsEmpty(dataref)){
++			outdataset_buffer=(char*)mxGetPr(dataref);
++			outdataset_size=mxGetM(dataref)*mxGetN(dataref);
++			if(outdataset_size)outdataset=DataSetDemarshall(outdataset_buffer);
++		}
++	}
++	else{
++		if (mxIsEmpty(dataref)){
++			/*Nothing to pick up. Just initialize pointer to NULL, and warn the server we are not uploading anything: */
++			outdataset_size=0;
++			outdataset=NULL;
++		}
++		else{
++			/*This is an error: we don't have the correct input!: */
++			_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++		}
++	}
++
++	/*Assign output pointers:*/
++	*pdataset=outdataset;
++}
++/*}}}*/
++/*FUNCTION FetchData(double** pmatrix,int* pM,int *pN,const mxArray* dataref){{{1*/
++void FetchData(double** pmatrix,int* pM,int *pN,const mxArray* dataref){
++
++	double*  outmatrix=NULL;
++	int      outmatrix_rows,outmatrix_cols;
++
++	if(mxIsEmpty(dataref) ){
++		/*Nothing to pick up. Just initialize matrix pointer to NULL: */
++		outmatrix_rows=0;
++		outmatrix_cols=0;
++		outmatrix=NULL;
++	}
++	else if(mxIsClass(dataref,"double") || mxIsClass(dataref,"single")){
++		/*Check dataref is not pointing to NaN: */
++		if ( mxIsNaN(*(mxGetPr(dataref))) && (mxGetM(dataref)==1) && (mxGetN(dataref)==1) ){
++			outmatrix_rows=0;
++			outmatrix_cols=0;
++			outmatrix=NULL;
++		}
++		else{
++			/*Convert matlab matrix to double* matrix: */
++			MatlabMatrixToDoubleMatrix(&outmatrix,&outmatrix_rows,&outmatrix_cols,dataref);
++		}
++	}
++	else{
++		/*This is an error: we don't have the correct input!: */
++		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++	}
++			
++	/*Assign output pointers:*/
++	*pmatrix=outmatrix;
++	if (pM)*pM=outmatrix_rows;
++	if (pN)*pN=outmatrix_cols;
++
++}
++/*}}}*/
++/*FUNCTION FetchData(double** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){{{1*/
++void FetchData(double** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){
++
++	double*  outmatrix=NULL;
++	int      outmatrix_numel,outmatrix_ndims;
++	int*     outmatrix_size=NULL;
++
++	if(mxIsEmpty(dataref) ){
++		/*Nothing to pick up. Just initialize matrix pointer to NULL: */
++		outmatrix_numel=0;
++		outmatrix_ndims=0;
++		outmatrix_size =NULL;
++		outmatrix=NULL;
++	}
++	else if (mxIsClass(dataref,"double") ){
++
++		/*Check dataref is not pointing to NaN: */
++		if ( mxIsNaN(*(mxGetPr(dataref))) && (mxGetNumberOfElements(dataref)==1) ){
++			outmatrix_numel=0;
++			outmatrix_ndims=0;
++			outmatrix_size =NULL;
++			outmatrix=NULL;
++		}
++		else{
++
++			/*Convert matlab n-dim array to double* matrix: */
++			MatlabNArrayToNArray(&outmatrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
++		}
++	}
++	else{
++		/*This is an error: we don't have the correct input!: */
++		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++	}
++			
++	/*Assign output pointers:*/
++	*pmatrix=outmatrix;
++	if (pnumel)*pnumel=outmatrix_numel;
++	if (pndims)*pndims=outmatrix_ndims;
++	if (psize )*psize =outmatrix_size;
++	else xfree((void**)&outmatrix_size);
++
++}
++/*}}}*/
++/*FUNCTION FetchData(int** pmatrix,int* pM,int *pN,const mxArray* dataref){{{1*/
++void FetchData(int** pmatrix,int* pM,int *pN,const mxArray* dataref){
++
++	int     i,outmatrix_rows,outmatrix_cols;
++	double *doublematrix=NULL;
++	int    *outmatrix=NULL;
++
++	if(mxIsEmpty(dataref) ){
++		/*Nothing to pick up. Just initialize matrix pointer to NULL: */
++		outmatrix_rows=0;
++		outmatrix_cols=0;
++		outmatrix=NULL;
++	}
++	else if (mxIsClass(dataref,"double") ){
++
++		/*Check dataref is not pointing to NaN: */
++		if ( mxIsNaN(*(mxGetPr(dataref))) && (mxGetM(dataref)==1) && (mxGetN(dataref)==1) ){
++			outmatrix_rows=0;
++			outmatrix_cols=0;
++			outmatrix=NULL;
++		}
++		else{
++
++			/*Convert matlab matrix to double* matrix: */
++			MatlabMatrixToDoubleMatrix(&doublematrix,&outmatrix_rows,&outmatrix_cols,dataref);
++
++			/*Convert double matrix into integer matrix: */
++			outmatrix=(int*)xmalloc(outmatrix_rows*outmatrix_cols*sizeof(int));
++			for(i=0;i<outmatrix_rows*outmatrix_cols;i++)outmatrix[i]=(int)doublematrix[i];
++		}
++	}
++	else{
++		/*This is an error: we don't have the correct input!: */
++		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++	}
++
++	/*Assign output pointers:*/
++	*pmatrix=outmatrix;
++	if (pM)*pM=outmatrix_rows;
++	if (pN)*pN=outmatrix_cols;
++}
++/*}}}*/
++/*FUNCTION FetchData(bool** pmatrix,int* pM,int *pN,const mxArray* dataref){{{1*/
++void FetchData(bool** pmatrix,int* pM,int *pN,const mxArray* dataref){
++
++	int     i,outmatrix_rows,outmatrix_cols;
++	double *doublematrix=NULL;
++	bool   *outmatrix=NULL;
++
++	if(mxIsEmpty(dataref) ){
++		/*Nothing to pick up. Just initialize matrix pointer to NULL: */
++		outmatrix_rows=0;
++		outmatrix_cols=0;
++		outmatrix=NULL;
++	}
++	else if (mxIsClass(dataref,"double") ){
++
++		/*Check dataref is not pointing to NaN: */
++		if ( mxIsNaN(*(mxGetPr(dataref))) && (mxGetM(dataref)==1) && (mxGetN(dataref)==1) ){
++			outmatrix_rows=0;
++			outmatrix_cols=0;
++			outmatrix=NULL;
++		}
++		else{
++
++			/*Convert matlab matrix to double* matrix: */
++			MatlabMatrixToDoubleMatrix(&doublematrix,&outmatrix_rows,&outmatrix_cols,dataref);
++
++			/*Convert double matrix into integer matrix: */
++			outmatrix=(bool*)xmalloc(outmatrix_rows*outmatrix_cols*sizeof(bool));
++			for(i=0;i<outmatrix_rows;i++)outmatrix[i]=(bool)doublematrix[i];
++		}
++	}
++	else{
++		/*This is an error: we don't have the correct input!: */
++		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++	}
++
++	/*Assign output pointers:*/
++	*pmatrix=outmatrix;
++	if (pM)*pM=outmatrix_rows;
++	if (pN)*pN=outmatrix_cols;
++}
++/*}}}*/
++/*FUNCTION FetchData(bool** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){{{1*/
++void FetchData(bool** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){
++
++	int      i;
++	int      outmatrix_numel,outmatrix_ndims;
++	int*     outmatrix_size=NULL;
++	double*  doublematrix=NULL;
++	bool*    outmatrix=NULL;
++
++	if(mxIsEmpty(dataref) ){
++		/*Nothing to pick up. Just initialize matrix pointer to NULL: */
++		outmatrix_numel=0;
++		outmatrix_ndims=0;
++		outmatrix_size =NULL;
++		outmatrix=NULL;
++	}
++	else if (mxIsClass(dataref,"logical") ){
++
++		/*Check dataref is not pointing to NaN: */
++		if ( mxIsNaN(*((bool*)mxGetData(dataref))) && (mxGetNumberOfElements(dataref)==1) ){
++			outmatrix_numel=0;
++			outmatrix_ndims=0;
++			outmatrix_size =NULL;
++			outmatrix=NULL;
++		}
++		else{
++
++			/*Convert matlab n-dim array to bool* matrix: */
++			MatlabNArrayToNArray(&outmatrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
++		}
++	}
++	else if (mxIsClass(dataref,"double") ){
++
++		/*Check dataref is not pointing to NaN: */
++		if ( mxIsNaN(*(mxGetPr(dataref))) && (mxGetNumberOfElements(dataref)==1) ){
++			outmatrix_numel=0;
++			outmatrix_ndims=0;
++			outmatrix_size =NULL;
++			outmatrix=NULL;
++		}
++		else{
++
++			/*Convert matlab n-dim array to double* matrix: */
++			MatlabNArrayToNArray(&doublematrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
++
++			/*Convert double matrix into bool matrix: */
++			outmatrix=(bool*)xmalloc(outmatrix_numel*sizeof(bool));
++			for(i=0;i<outmatrix_numel;i++)outmatrix[i]=(bool)doublematrix[i];
++			xfree((void**)&doublematrix);
++		}
++	}
++	else{
++		/*This is an error: we don't have the correct input!: */
++		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++	}
++			
++	/*Assign output pointers:*/
++	*pmatrix=outmatrix;
++	if (pnumel)*pnumel=outmatrix_numel;
++	if (pndims)*pndims=outmatrix_ndims;
++	if (psize )*psize =outmatrix_size;
++	else xfree((void**)&outmatrix_size);
++
++}
++/*}}}*/
++/*FUNCTION FetchData(Matrix** pmatrix,const mxArray* dataref){{{1*/
++void FetchData(Matrix** pmatrix,const mxArray* dataref){
++	
++	Matrix* outmatrix=NULL;
++	int dummy=0;
++
++	if (mxIsClass(dataref,"double") ){
++			
++		/*Convert matlab matrix to matrix: */
++		outmatrix=MatlabMatrixToMatrix(dataref);
++
++	}
++	else{
++		/*This is an error: we don't have the correct input!: */
++		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++	}
++
++	/*Assign output pointers:*/
++	*pmatrix=outmatrix;
++}
++/*}}}*/
++/*FUNCTION FetchData(double** pvector,int* pM,const mxArray* dataref){{{1*/
++void FetchData(double** pvector,int* pM,const mxArray* dataref){
++
++	double* outvector=NULL;
++	int outvector_rows;
++
++	if(mxIsEmpty(dataref)){
++		/*Nothing to pick up. Just initialize matrix pointer to NULL: */
++		outvector_rows=0;
++		outvector=NULL;
++	}
++	else if (mxIsClass(dataref,"double") ){
++
++		/*Convert matlab vector to double*  vector: */
++		MatlabVectorToDoubleVector(&outvector,&outvector_rows,dataref);
++
++	}
++	else{
++		/*This is an error: we don't have the correct input!: */
++		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++	}
++
++	/*Assign output pointers:*/
++	*pvector=outvector;
++	if (pM)*pM=outvector_rows;
++}
++/*}}}*/
++/*FUNCTION FetchData(int** pvector,int* pM,const mxArray* dataref){{{1*/
++void FetchData(int** pvector,int* pM,const mxArray* dataref){
++
++	int    i;
++	double *doublevector   = NULL;
++	int    *outvector      = NULL;
++	int     outvector_rows;
++
++	if(mxIsEmpty(dataref)){
++		/*Nothing to pick up. Just initialize matrix pointer to NULL: */
++		outvector_rows=0;
++		outvector=NULL;
++	}
++	else if (mxIsClass(dataref,"double") ){
++
++		/*Convert matlab vector to double*  vector: */
++		MatlabVectorToDoubleVector(&doublevector,&outvector_rows,dataref);
++
++		/*Convert double vector into integer vector: */
++		outvector=(int*)xmalloc(outvector_rows*sizeof(int));
++		for(i=0;i<outvector_rows;i++)outvector[i]=(int)doublevector[i];
++	}
++	else{
++		/*This is an error: we don't have the correct input!: */
++		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++	}
++
++	/*Assign output pointers:*/
++	*pvector=outvector;
++	if (pM)*pM=outvector_rows;
++}
++/*}}}*/
++/*FUNCTION FetchData(bool** pvector,int* pM,const mxArray* dataref){{{1*/
++void FetchData(bool** pvector,int* pM,const mxArray* dataref){
++
++	int    i;
++	double *doublevector   = NULL;
++	bool   *outvector      = NULL;
++	int     outvector_rows;
++
++	if(mxIsEmpty(dataref)){
++		/*Nothing to pick up. Just initialize matrix pointer to NULL: */
++		outvector_rows=0;
++		outvector=NULL;
++	}
++	else if (mxIsClass(dataref,"double") ){
++
++		/*Convert matlab vector to double*  vector: */
++		MatlabVectorToDoubleVector(&doublevector,&outvector_rows,dataref);
++
++		/*Convert double vector into integer vector: */
++		outvector=(bool*)xmalloc(outvector_rows*sizeof(bool));
++		for(i=0;i<outvector_rows;i++)outvector[i]=(bool)doublevector[i];
++	}
++	else{
++		/*This is an error: we don't have the correct input!: */
++		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++	}
++
++	/*Assign output pointers:*/
++	*pvector=outvector;
++	if (pM)*pM=outvector_rows;
++}
++/*}}}*/
++/*FUNCTION FetchData(float** pvector,int* pM,const mxArray* dataref){{{1*/
++void FetchData(float** pvector,int* pM,const mxArray* dataref){
++
++	int    i;
++	double *doublevector   = NULL;
++	float  *outvector      = NULL;
++	int     outvector_rows;
++
++	if(mxIsEmpty(dataref)){
++		/*Nothing to pick up. Just initialize matrix pointer to NULL: */
++		outvector_rows=0;
++		outvector=NULL;
++	}
++	else if (mxIsClass(dataref,"double") ){
++
++		/*Convert matlab vector to double*  vector: */
++		MatlabVectorToDoubleVector(&doublevector,&outvector_rows,dataref);
++
++		/*Convert double vector into float vector: */
++		outvector=(float*)xmalloc(outvector_rows*sizeof(float));
++		for(i=0;i<outvector_rows;i++)outvector[i]=(float)doublevector[i];
++	}
++	else{
++		/*This is an error: we don't have the correct input!: */
++		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++	}
++
++	/*Assign output pointers:*/
++	*pvector=outvector;
++	if (pM)*pM=outvector_rows;
++}
++/*}}}*/
++/*FUNCTION FetchData(Vector** pvector,const mxArray* dataref){{{1*/
++void FetchData(Vector** pvector,const mxArray* dataref){
++	
++	Vector* vector=NULL;
++	int dummy;
++
++	if(mxIsEmpty(dataref)){
++		/*Nothing to pick up. Just initialize matrix pointer to NULL: */
++		vector=new Vector(0);
++	}
++	else if (mxIsClass(dataref,"double") ){
++
++		/*Convert matlab vector to petsc vector: */
++		vector=MatlabVectorToVector(dataref);
++	}
++	else{
++		/*This is an error: we don't have the correct input!: */
++		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++	}
++
++	/*Assign output pointers:*/
++	*pvector=vector;
++}
++/*}}}*/
++/*FUNCTION FetchData(char** pstring,const mxArray* dataref){{{1*/
++void FetchData(char** pstring,const mxArray* dataref){
++
++	char* outstring=NULL;
++
++
++	/*Ok, the string should be coming directly from the matlab workspace: */
++	if (!mxIsClass(dataref,"char")){
++		_error_("input data_type is not a string!");
++	}
++	else{
++		/*Recover the string:*/
++		int stringlen;
++		
++		stringlen = mxGetM(dataref)*mxGetN(dataref)+1;
++		outstring = (char*)xmalloc(sizeof(mxChar)*stringlen);
++		mxGetString(dataref,outstring,stringlen);
++	}
++
++	/*Assign output pointers:*/
++	*pstring=outstring;
++}
++/*FUNCTION FetchData(char** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){{{1*/
++void FetchData(char** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref){
++
++	int      outmatrix_numel,outmatrix_ndims;
++	int*     outmatrix_size=NULL;
++	char*    outmatrix=NULL;
++
++	if(mxIsEmpty(dataref) ){
++		/*Nothing to pick up. Just initialize matrix pointer to NULL: */
++		outmatrix_numel=0;
++		outmatrix_ndims=0;
++		outmatrix_size =NULL;
++		outmatrix=NULL;
++	}
++	else if (mxIsClass(dataref,"char") ){
++
++		/*Check dataref is not pointing to NaN: */
++		if ( mxIsNaN(*(mxGetPr(dataref))) && (mxGetNumberOfElements(dataref)==1) ){
++			outmatrix_numel=0;
++			outmatrix_ndims=0;
++			outmatrix_size =NULL;
++			outmatrix=NULL;
++		}
++		else{
++
++			/*Convert matlab n-dim array to char* matrix: */
++			MatlabNArrayToNArray(&outmatrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
++		}
++	}
++	else{
++		/*This is an error: we don't have the correct input!: */
++		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++	}
++			
++	/*Assign output pointers:*/
++	*pmatrix=outmatrix;
++	if (pnumel)*pnumel=outmatrix_numel;
++	if (pndims)*pndims=outmatrix_ndims;
++	if (psize )*psize =outmatrix_size;
++	else xfree((void**)&outmatrix_size);
++
++}
++/*}}}*/
++/*FUNCTION FetchData(double* pscalar,const mxArray* dataref){{{1*/
++void FetchData(double* pscalar,const mxArray* dataref){
++
++	double scalar;
++
++	if (!mxIsClass(dataref,"double")){
++		_error_("input data_type is not a double!");
++	}
++	else{
++		/*Recover the double: */
++		scalar=mxGetScalar(dataref);
++	}
++
++	/*Assign output pointers:*/
++	*pscalar=scalar;
++}
++/*}}}*/
++/*FUNCTION FetchData(int* pinteger,const mxArray* dataref){{{1*/
++void FetchData(int* pinteger,const mxArray* dataref){
++
++	int integer;
++
++	if (!mxIsClass(dataref,"double")){
++		_error_("input data_type is not a scalar!");
++	}
++	else{
++		/*Recover the double: */
++		integer=(int)mxGetScalar(dataref);
++	}
++
++	/*Assign output pointers:*/
++	*pinteger=integer;
++}
++/*}}}*/
++/*FUNCTION FetchData(bool* pboolean,const mxArray* dataref){{{1*/
++void FetchData(bool* pboolean,const mxArray* dataref){
++
++	bool* mxbool_ptr=NULL;
++
++	if (mxIsClass(dataref,"logical")){
++		if(mxGetM(dataref)!=1) _error_("input data is not of size 1x1");
++		if(mxGetN(dataref)!=1) _error_("input data is not of size 1x1");
++		mxbool_ptr=mxGetLogicals(dataref);
++	}
++	else{
++		_error_("input data_type is not a bool!");
++	}
++
++	*pboolean=*mxbool_ptr;
++}
++/*}}}*/
++/*FUNCTION FetchData(Parameters** pparameters, DataHandle dataref){{{1*/
++void FetchData(Parameters** pparameters, DataHandle dataref){
++
++	int i,j;
++	int count;
++
++	/*output: */
++	Param* param=NULL;
++	Parameters* parameters=NULL;
++
++	/*intermediary: */
++	int M,N;
++	double* tmatrix=NULL;
++	double* matrix=NULL;
++	char**  stringarray=NULL;
++	double** array=NULL;
++	int*     mdims_array=NULL;
++	int*     ndims_array=NULL;
++	int nfields;
++	char* name=NULL;
++	mxArray* pfield=NULL;
++	mxArray* pfield2=NULL;
++	int enum_type;
++
++
++	/*First, create parameters : */
++	parameters=new Parameters();
++
++	/*go through matlab params structure, and create Param object for each field: */
++
++	nfields=mxGetNumberOfFields(dataref);
++
++	for(count=0;count<nfields;count++){
++
++		/*Get i'th field: */
++		name=(char*)mxGetFieldNameByNumber(dataref,count);
++		enum_type=StringToEnumx(name);
++		pfield=mxGetFieldByNumber(dataref,0,count);
++		_assert_(pfield);
++		
++		/*Check type of field: */
++		if (mxIsClass(pfield,"double")){
++			
++			M=mxGetM(pfield);
++			N=mxGetN(pfield);
++
++			if (M==0 | N==0){
++				_error_("array in parameters structure field %s is of size 0",name);
++			}
++			if (M==1 && N==1){
++				/*we have a simple scalar: */
++				param= new DoubleParam(enum_type,*mxGetPr(pfield));
++				parameters->AddObject(param);
++
++			}
++			else{
++				if (N==1){
++					
++					/*vector: */
++					param= new DoubleVecParam(enum_type,mxGetPr(pfield),M);
++					parameters->AddObject(param);
++
++				}
++				else{
++					/*matrix: first, transpose, then plug into Param */
++					matrix=mxGetPr(pfield);
++					tmatrix=(double*)xmalloc(M*N*sizeof(double));
++					for (i=0;i<M;i++){
++						for(j=0;j<N;j++){
++							*(tmatrix+N*i+j)=*(matrix+M*j+i);
++						}
++					}
++
++					param= new DoubleMatParam(enum_type,tmatrix,M,N);
++					parameters->AddObject(param);
++	
++					/*Free ressources:*/
++					xfree((void**)&tmatrix);
++				}
++			}
++
++		}
++		else if (mxIsClass(pfield,"logical")){
++
++			M=mxGetM(pfield);
++			N=mxGetN(pfield);
++
++			if (M==0 | N==0){
++				_error_("array in parameters structure field %s is of size 0",name);
++			}
++			if (M==1 && N==1){
++				/*we have a simple bool: */
++				param= new BoolParam(enum_type,*mxGetLogicals(pfield));
++				parameters->AddObject(param);
++
++			}
++			else{
++				_error_("Matrices of Booleans not supported yet in parameters");
++			}
++		}
++		else if (mxIsClass(pfield,"char")){
++			/* we have a string parameter:*/
++			
++			int stringlen;
++			char* string=NULL;
++			
++			stringlen = mxGetM(pfield)*mxGetN(pfield)+1;
++			string = (char*)xmalloc(sizeof(mxChar)*stringlen);
++			mxGetString(pfield,string,stringlen);
++
++			param= new StringParam(enum_type,string);
++			parameters->AddObject(param);
++
++			xfree((void**)&string);
++		}
++		else if (mxIsClass(pfield,"cell")){
++
++			/*This can be a string array, or a matrix array. Check the first 
++			 *element type to decide: */
++			pfield2=mxGetCell(pfield,0);
++			if (mxIsClass(pfield2,"char")){
++				
++				/*string array: */
++				M=mxGetM(pfield);
++				stringarray=(char**)xmalloc(M*sizeof(char*));
++
++				for(i=0;i<M;i++){
++					char* descriptor=NULL;
++					pfield2=mxGetCell(pfield,i);
++					FetchData(&descriptor,pfield2);
++					stringarray[i]=descriptor;
++				}
++
++				param= new StringArrayParam(enum_type,stringarray,M);
++				parameters->AddObject(param);
++
++				/*Free ressources:*/
++				for(i=0;i<M;i++){
++					char* descriptor=stringarray[i];
++					xfree((void**)&descriptor);
++				}
++				xfree((void**)&stringarray);
++
++			}
++			else{
++				
++				/*matrix array: */
++				M=mxGetM(pfield);
++				array=(double**)xmalloc(M*sizeof(double*));
++				mdims_array=(int*)xmalloc(M*sizeof(int));
++				ndims_array=(int*)xmalloc(M*sizeof(int));
++
++				for(i=0;i<M;i++){
++					double* matrix=NULL;
++					int     m,n;
++					pfield2=mxGetCell(pfield,i);
++					FetchData(&matrix,&m,&n,pfield2);
++					array[i]=matrix;
++					mdims_array[i]=m;
++					ndims_array[i]=n;
++				}
++
++				param= new DoubleMatArrayParam(enum_type,array,M,mdims_array,ndims_array);
++				parameters->AddObject(param);
++
++				/*Free ressources:*/
++				for(i=0;i<M;i++){
++					double* matrix=array[i];
++					xfree((void**)&matrix);
++				}
++				xfree((void**)&array);
++				xfree((void**)&mdims_array);
++				xfree((void**)&ndims_array);
++			}
++		}
++		else _error_("Parameters structure field %s has a format that is not supported: %s",name,mxGetClassName(pfield));
++	}
++
++	/*Assign output pointers:*/
++	*pparameters=parameters;
++}
++/*}}}*/
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp	(revision 12011)
+@@ -0,0 +1,96 @@
++/* \file MatlabVectorToDoubleVector.cpp
++ * \brief: convert a sparse or dense matlab vector to a serial vector:
++ */
++
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++
++#include <string.h>
++
++/*Matlab includes: */
++#include "mex.h"
++
++#include "../../shared/shared.h"
++
++int MatlabVectorToDoubleVector(double** pvector,int* pvector_rows,const mxArray* mxvector){
++
++	int rows,cols;
++	double* mxvector_ptr=NULL;
++	int ierr;
++	int i,j;
++
++	/*output: */
++	double* vector=NULL;
++
++	/*matlab indices: */
++	mwIndex*    ir=NULL;
++	mwIndex*    jc=NULL;
++	double* pr=NULL;
++	int     count;
++	int     nnz;
++	int     nz;
++
++	/*Ok, first check if we are dealing with a sparse or full vector: */
++	if (mxIsSparse(mxvector)){
++
++		/*Dealing with sparse vector: recover size first: */
++		mxvector_ptr=(double*)mxGetPr(mxvector);
++		rows=mxGetM(mxvector);
++		cols=mxGetN(mxvector);
++		nnz=mxGetNzmax(mxvector);
++		
++		/*Check that input is actualy a vector*/
++		if (cols!=1) _error_("input vector of size %ix%i should have only one column",rows,cols);
++
++		nz=(int)((double)nnz/(double)rows);
++
++		if(rows){
++			vector=(double*)xcalloc(rows,sizeof(double));
++
++			/*Now, get ir,jc and pr: */
++			pr=mxGetPr(mxvector);
++			ir=mxGetIr(mxvector);
++			jc=mxGetJc(mxvector);
++
++			/*Now, start inserting data into sparse vector: */
++			count=0;
++			for(i=0;i<cols;i++){
++				for(j=0;j<(jc[i+1]-jc[i]);j++){
++					vector[ir[count]]=pr[count];
++					count++;
++				}
++			}
++		}
++
++	}
++	else{
++
++		/*Dealing with dense vector: recover pointer and size: */
++		mxvector_ptr=(double*)mxGetPr(mxvector);
++		rows=mxGetM(mxvector);
++		cols=mxGetN(mxvector);
++
++		/*Check that input is actualy a vector*/
++		if (cols!=1) _error_("input vector of size %ix%i should have only one column",rows,cols);
++
++		/*allocate and memcpy*/
++		if(rows){
++			vector=(double*)xmalloc(rows*sizeof(double));
++			memcpy(vector,mxvector_ptr,rows*sizeof(double));
++		}
++		else{
++			vector=NULL;
++		}
++	}
++
++	/*Assign output pointer: */
++	*pvector=vector;
++	*pvector_rows=rows;
++
++	return 1;
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12011)
+@@ -0,0 +1,249 @@
++/* \file WriteData.c:
++ * \brief: general interface for writing data
++ */
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include "../../include/include.h"
++#include "../../shared/shared.h"
++
++#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
++#include <mex.h>
++
++/*FUNCTION WriteData(mxArray** pdataref,DataSet* dataset){{{1*/
++void WriteData(mxArray** pdataref,DataSet* dataset){
++
++	mxArray* dataref=NULL;
++	char* marshalled_dataset=NULL;
++	int   marshalled_dataset_size;
++
++	/*Write a dataset: */
++	if(dataset){
++			/* marshall the dataset: */
++			marshalled_dataset=dataset->Marshall();
++			marshalled_dataset_size=dataset->MarshallSize();
++			
++			dataref = mxCreateDoubleMatrix(0,0,mxREAL);
++			mxSetM(dataref,(mwSize)(marshalled_dataset_size/sizeof(double)));
++			mxSetN(dataref,(mwSize)1);
++			mxSetPr(dataref,(double*)marshalled_dataset);	
++	}
++	else{
++		/* return empty matrix: */
++		dataref=mxCreateDoubleMatrix(0,0,mxREAL);
++	}
++	*pdataref=dataref;
++	
++}
++/*}}}*/
++/*FUNCTION WriteData(mxArray** pdataref,Matrix* matrix){{{1*/
++void WriteData(mxArray** pdataref,Matrix* matrix){
++		
++	mxArray* dataref=NULL;
++	double*  matrix_ptr=NULL;
++	int      rows,cols;
++	double*  tmatrix_ptr=NULL;
++	
++	if(matrix){
++		
++		#ifdef _HAVE_PETSC_
++		PetscMatrixToDoubleMatrix(&tmatrix_ptr,&rows,&cols);
++		#else
++		matrix_ptr=matrix->matrix->ToSerial();
++		matrix->matrix->GetSize(&rows,cols);
++		#endif
++
++		/*Now transpose the matrix: */
++		tmatrix_ptr=(double*)mxMalloc(rows*cols*sizeof(double));
++		for(i=0;i<cols;i++){
++			for(j=0;j<rows;j++){
++				tmatrix_ptr[i*rows+j]=matrix_ptr[j*cols+i];
++			}
++		}
++		
++		/*create matlab matrix: */
++		dataref=mxCreateDoubleMatrix(0,0,mxREAL);
++		mxSetM(dataref,rows); 
++		mxSetN(dataref,cols);
++		mxSetPr(dataref,tmatrix_ptr);
++
++		/*Free ressources:*/
++		xfree((void**)&matrix_ptr);
++
++	}
++	else{
++		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
++	}
++
++	*pdataref=dataref;
++}
++/*}}}*/
++/*FUNCTION WriteData(mxArray** pdataref,Vector* vector){{{1*/
++void WriteData(mxArray** pdataref,Vector* vector){
++	
++	mxArray* dataref=NULL;
++	double*  vector_ptr=NULL;
++	int      rows;
++	
++	if(vector){
++		/*call toolkit routine: */
++		#ifdef _HAVE_PETSC_
++		PetscVectorToDoubleVector(&vector_ptr,&rows,vector->vector);
++		#else
++		vector_ptr=vector->vector->ToMPISerial();
++		vector->vector->GetSize(&rows);
++		#endif
++		
++		/*now create the matlab vector: */
++		dataref = mxCreateDoubleMatrix(0,0,mxREAL);                         
++		mxSetM(dataref,rows);
++		mxSetN(dataref,1);                                                                                          
++		mxSetPr(dataref,vector_ptr);           
++	}
++	else{
++		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
++	}
++	*pdataref=dataref;
++
++}
++/*}}}*/
++/*FUNCTION WriteData(mxArray** pdataref,double* matrix, int M,int N){{{1*/
++void WriteData(mxArray** pdataref,double* matrix, int M,int N){
++	
++	mxArray* dataref=NULL;
++	mxArray* tdataref=NULL;
++		
++	if(matrix){
++		
++		/*data is a double* pointer. Copy into a matrix: */
++		tdataref = mxCreateDoubleMatrix(0,0,mxREAL);
++		mxSetM(tdataref,(mwSize)N);
++		mxSetN(tdataref,(mwSize)M);
++		mxSetPr(tdataref,(double*)matrix);
++
++		//transpose
++		mexCallMATLAB(1,&dataref,1,&tdataref, "transpose");
++	}
++	else{
++		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
++	}
++	*pdataref=dataref;
++}
++/*}}}*/
++/*FUNCTION WriteData(mxArray** pdataref,int* matrix, int M,int N){{{1*/
++void WriteData(mxArray** pdataref,int* matrix, int M,int N){
++
++	mxArray* dataref=NULL;
++	mxArray* tdataref=NULL;
++
++	if(matrix){
++
++		/*convert to double matrix*/
++		double* doublematrix=(double*)mxMalloc(M*N*sizeof(double));
++		for(int i=0;i<M*N;i++) doublematrix[i]=(double)matrix[i];
++
++		/*data is a double* pointer. Copy into a matrix: */
++		tdataref = mxCreateDoubleMatrix(0,0,mxREAL);
++		mxSetM(tdataref,(mwSize)N);
++		mxSetN(tdataref,(mwSize)M);
++		mxSetPr(tdataref,(double*)doublematrix);
++
++		//transpose
++		mexCallMATLAB(1,&dataref,1,&tdataref, "transpose");
++	}
++	else{
++		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
++	}
++	*pdataref=dataref;
++}
++/*}}}*/
++/*FUNCTION WriteData(mxArray** pdataref,double* vector, int M){{{1*/
++void WriteData(mxArray** pdataref,double* vector, int M){
++	
++	mxArray* dataref=NULL;
++
++	if(vector){
++
++		/*data is a double* pointer. Copy into a vector: */
++		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
++		mxSetM(dataref,(mwSize)M);
++		mxSetN(dataref,(mwSize)1);
++		mxSetPr(dataref,vector);
++	}
++	else{
++		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
++	}
++
++	*pdataref=dataref;
++}
++/*}}}*/
++/*FUNCTION WriteData(mxArray** pdataref,double scalar){{{1*/
++void WriteData(mxArray** pdataref,double scalar){
++
++	*pdataref=mxCreateDoubleScalar(scalar);
++}
++/*}}}*/
++/*FUNCTION WriteData(mxArray** pdataref,int integer){{{1*/
++void WriteData(mxArray** pdataref,int integer){
++
++		*pdataref=mxCreateDoubleScalar((double)integer);
++
++}
++/*}}}*/
++/*FUNCTION WriteData(mxArray** pdataref,int boolean){{{1*/
++void WriteData(mxArray** pdataref,bool boolean){
++
++	*pdataref=mxCreateDoubleScalar((double)boolean);
++
++}
++/*}}}*/
++/*FUNCTION WriteData(mxArray** pdataref,char* string){{{1*/
++void WriteData(mxArray** pdataref,char* string){
++
++		*pdataref=mxCreateString(string);
++}
++/*}}}*/
++/*FUNCTION WriteData(mxArray** pdataref,Parameters* parameters){{{1*/
++void WriteData(mxArray** pdataref,Parameters* parameters){
++
++	int i;
++
++	/*output: */
++	mxArray  *dataref     = NULL;
++	mwSize    nfields;
++	char    **fnames      = NULL;
++	mwSize    onebyone[2] = {1,1};
++	mwSize    ndim        = 2;
++
++	/*intermediary: */
++	Param*      param=NULL;
++
++	/*Recover data from the parameters dataset: */
++	nfields=(mwSize)parameters->Size();
++	fnames=(char**)mxMalloc(nfields*sizeof(char*));
++	
++	/*Build structure in matlab workspace with all the parameter fields: */
++	for(i=0;i<nfields;i++){
++		param=(Param*)parameters->GetObjectByOffset(i);
++		param->GetParameterName(&fnames[i]);
++	}
++	/*Initialize structure: */
++	dataref=mxCreateStructArray( ndim,onebyone,nfields,(const char**)fnames);
++
++	/*Fill each field: */
++	for(i=0;i<nfields;i++){
++
++		param=(Param*)parameters->GetObjectByOffset(i);
++		param->SetMatlabField(dataref);
++	}
++		
++	/*Assign output pointers:*/
++	*pdataref=dataref;
++
++}
++/*}}}*/
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/mxGetAssignedField.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/mxGetAssignedField.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/mxGetAssignedField.cpp	(revision 12011)
+@@ -0,0 +1,47 @@
++/*!\file: mxGetAssignedField.c: 
++ * \brief: abstract interface on parallel side for i/o, so it ressembles the serial i/o.
++ *
++ * In serial mode, this routine takes care of returning the field coming 
++ * from the model. If largesize is 1, we are running out of core models in 
++ * matlab, and we need to call the subsref private method from the model object
++ * in order to correctly load the data from disk.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#else
++#error "Cannot compile without HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
++#include "mex.h"
++
++mxArray* mxGetAssignedField(const mxArray* pmxa_array,int number,const char* field){
++
++	//output
++	mxArray* mxfield=NULL;
++	
++	//input
++	mxArray    *inputs[2];
++	mxArray    *pindex      = NULL;
++	const char *fnames[2];
++	mwSize      ndim        = 2;
++	mwSize      onebyone[2] = {1,1};
++
++	//We want to call the subsasgn method, and get the returned array.This ensures that if we are running 
++	//large sized problems, the data is truly loaded from disk by the model subsasgn class method.
++	inputs[0]=(mxArray*)pmxa_array; //this is the model
++
++	//create index structure used in the assignment (index.type='.' and index.subs='x' for field x for ex)
++	fnames[0] = "type";
++	fnames[1] = "subs";
++	pindex=mxCreateStructArray( ndim,onebyone,2,fnames);
++	mxSetField( pindex, 0, "type",mxCreateString("."));
++	mxSetField( pindex, 0, "subs",mxCreateString(field));
++	inputs[1]=pindex;
++
++	mexCallMATLAB( 1, &mxfield, 2, (mxArray**)inputs, "subsref");
++
++	return mxfield;
++}
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp	(revision 12011)
+@@ -0,0 +1,101 @@
++/* \file MatlabMatrixToDoubleMatrix.cpp
++ * \brief: convert a sparse or dense matlab matrix to a double* pointer
++ */
++
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++
++/*Matlab includes: */
++#include "mex.h"
++
++#include "../../shared/shared.h"
++
++int MatlabMatrixToDoubleMatrix(double** pmatrix,int* pmatrix_rows,int* pmatrix_cols,const mxArray* mxmatrix){
++
++	int     i,j,count,rows,cols;
++	double *pmxdoublematrix = NULL;
++	float  *pmxsinglematrix = NULL;
++
++	/*output: */
++	double* matrix=NULL;
++
++	/*matlab indices: */
++	mwIndex*    ir=NULL;
++	mwIndex*    jc=NULL;
++
++	/*Ok, first check if we are dealing with a sparse or full matrix: */
++	if (mxIsSparse(mxmatrix)){
++
++		/*Dealing with sparse matrix: recover size first: */
++		pmxdoublematrix=(double*)mxGetPr(mxmatrix);
++		rows=mxGetM(mxmatrix);
++		cols=mxGetN(mxmatrix);
++		
++		if(rows*cols){
++			matrix=(double*)xcalloc(rows*cols,sizeof(double));
++
++			/*Now, get ir,jc and pr: */
++			ir=mxGetIr(mxmatrix);
++			jc=mxGetJc(mxmatrix);
++
++			/*Now, start inserting data into double* matrix: */
++			count=0;
++			for(i=0;i<cols;i++){
++				for(j=0;j<(jc[i+1]-jc[i]);j++){
++					matrix[rows*ir[count]+i]=pmxdoublematrix[count];
++					count++;
++				}
++			}
++		}
++
++	}
++	else if(mxIsClass(mxmatrix,"double")){
++		/*Dealing with dense matrix: recover pointer and size: */
++		pmxdoublematrix=(double*)mxGetPr(mxmatrix);
++		rows=mxGetM(mxmatrix);
++		cols=mxGetN(mxmatrix);
++		
++		/*Create serial matrix: */
++		if(rows*cols){
++			matrix=(double*)xcalloc(rows*cols,sizeof(double));
++
++			for(i=0;i<rows;i++){
++				for(j=0;j<cols;j++){
++					matrix[cols*i+j]=(double)pmxdoublematrix[rows*j+i];
++				}
++			}
++		}
++	}
++	else if(mxIsClass(mxmatrix,"single")){
++		/*Dealing with dense matrix: recover pointer and size: */
++		pmxsinglematrix=(float*)mxGetPr(mxmatrix);
++		rows=mxGetM(mxmatrix);
++		cols=mxGetN(mxmatrix);
++
++		/*Create serial matrix: */
++		if(rows*cols){
++			matrix=(double*)xcalloc(rows*cols,sizeof(double));
++
++			for(i=0;i<rows;i++){
++				for(j=0;j<cols;j++){
++					matrix[cols*i+j]=(double)pmxsinglematrix[rows*j+i];
++				}
++			}
++		}
++	}
++	else{
++		_error_("Matlab matrix type Not implemented yet");
++	}
++
++	/*Assign output pointer: */
++	*pmatrix=matrix;
++	*pmatrix_rows=rows;
++	*pmatrix_cols=cols;
++
++	return 1;
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToPetscVector.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToPetscVector.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToPetscVector.cpp	(revision 12011)
+@@ -0,0 +1,102 @@
++/* \file MatlabVectorToPetscVector.cpp
++ * \brief: convert a sparse or dense matlab vector to a serial Petsc vector:
++ */
++
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++
++#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
++
++/*Petsc includes: */
++#include "petscmat.h"
++#include "petscvec.h"
++#include "petscksp.h"
++
++/*Matlab includes: */
++#include "mex.h"
++
++#include "../../../shared/shared.h"
++
++int MatlabVectorToPetscVector(Vec* pvector,int* pvector_rows,const mxArray* mxvector){
++
++	int rows, cols;
++	double* mxvector_ptr=NULL;
++	int ierr;
++	int i,j;
++
++	/*output: */
++	Vec vector=NULL;
++
++	/*matlab indices: */
++	mwIndex*    ir=NULL;
++	mwIndex*    jc=NULL;
++	double* pr=NULL;
++	int     count;
++	int     nnz;
++	int     nz;
++
++	/*petsc indices: */
++	int* idxm=NULL;
++	
++	/*Ok, first check if we are dealing with a sparse or full vector: */
++	if (mxIsSparse(mxvector)){
++
++		/*Dealing with sparse vector: recover size first: */
++		mxvector_ptr=(double*)mxGetPr(mxvector);
++		rows=mxGetM(mxvector);
++		cols=mxGetN(mxvector);
++		nnz=mxGetNzmax(mxvector);
++		nz=(int)((double)nnz/(double)rows);
++
++		ierr=VecCreateSeq(PETSC_COMM_SELF,rows,&vector);CHKERRQ(ierr);
++
++		/*Now, get ir,jc and pr: */
++		pr=mxGetPr(mxvector);
++		ir=mxGetIr(mxvector);
++		jc=mxGetJc(mxvector);
++
++		/*Now, start inserting data into sparse vector: */
++		count=0;
++		for(i=0;i<cols;i++){
++			for(j=0;j<(jc[i+1]-jc[i]);j++){
++				VecSetValue(vector,ir[count],pr[count],INSERT_VALUES);
++				count++;
++			}
++		}
++
++	}
++	else{
++
++		/*Dealing with dense vector: recover pointer and size: */
++		mxvector_ptr=(double*)mxGetPr(mxvector);
++		rows=mxGetM(mxvector);
++		cols=mxGetN(mxvector);
++
++		/*Create serial vector: */
++		ierr=VecCreateSeq(PETSC_COMM_SELF,rows,&vector);CHKERRQ(ierr);
++
++		/*Insert mxvector_ptr values into petsc vector: */
++		idxm=(int*)xmalloc(rows*sizeof(int));
++
++		for(i=0;i<rows;i++)idxm[i]=i;
++
++		ierr=VecSetValues(vector,rows,idxm,mxvector_ptr,INSERT_VALUES);CHKERRQ(ierr);
++
++	}
++
++	/*Assemble vector: */
++	VecAssemblyBegin(vector);
++	VecAssemblyEnd(vector);
++
++	/*Assign output pointer: */
++	*pvector=vector;
++	*pvector_rows=rows;
++
++	return 1;
++}
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp	(revision 12011)
+@@ -0,0 +1,64 @@
++/*\file PrintfFunction.c
++ *\brief: this function is used by the _printf_ macro, to take into account the 
++ *fact we may be running on a cluster. 
++ */
++
++#include <stdarg.h>
++#include <stdio.h>
++#include "../../shared/shared.h"
++#include "../../include/include.h"
++
++#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
++#include "mex.h"
++#endif
++
++int PrintfFunction(char* format,...){
++	/*http://linux.die.net/man/3/vsnprintf*/
++
++	/*string to be printed: */
++	char *buffer = NULL;
++	int   n,size = 100;
++	int         string_size;
++	extern int  my_rank;
++	extern int  num_procs;
++                                                                                                                                                                                                     
++	//variable list of arguments
++	va_list args;
++
++	while(true){
++
++		/*allocate buffer for given string size*/
++		buffer=(char*)xmalloc(size*sizeof(char));
++
++		/* Try to print in the allocated space. */
++		va_start(args, format);
++#ifndef WIN32
++		n=vsnprintf(buffer,size,format,args);
++#else
++		n=vsnprintf(buffer,size,format,args);
++#endif
++		va_end(args);
++
++		/* If that worked, return the string. */
++		if(n>-1 && n<size) break;
++
++		/* Else try again with more space. */
++		if(n>-1)   /* glibc 2.1 */
++		 size=n+1; /* precisely what is needed */
++		else       /* glibc 2.0 */
++		 size*=2;  /* twice the old size */
++
++		xfree((void**)&buffer);
++	}
++
++	/*Ok, if we are running in parallel, get node 0 to print*/
++#if defined(_PARALLEL_)
++	if(my_rank==0)printf(buffer);
++#else
++	mexPrintf(buffer);
++#endif
++
++	/*Clean up and return*/
++	xfree((void**)&buffer);
++	return 1;
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToVector.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToVector.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToVector.cpp	(revision 12011)
+@@ -0,0 +1,17 @@
++
++Vector* MatlabVectorToVector(const mxArray* mxvector){
++
++	int dummy;
++	Vector* vector=NULL;
++
++	/*allocate vector object: */
++	vector=new Vector();
++
++	#ifdef _HAVE_PETSC_
++	MatlabVectorToPetscVector(&vector->vector,&dummy,mxvector);
++	#else
++	vector->vector=MatlabVectorToSeqVec(mxvector);
++	#endif
++	
++	return vector;
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToPetscMatrix.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToPetscMatrix.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToPetscMatrix.cpp	(revision 12011)
+@@ -0,0 +1,123 @@
++/* \file MatlabMatrixToPetscMatrix.cpp
++ * \brief: convert a sparse or dense matlab matrix to a serial Petsc matrix:
++ */
++
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++
++#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
++
++/*Petsc includes: */
++#include "petscmat.h"
++#include "petscvec.h"
++#include "petscksp.h"
++
++/*Matlab includes: */
++#include "mex.h"
++
++#include "../../../shared/shared.h"
++
++int MatlabMatrixToPetscMatrix(Mat* pmatrix,int* pmatrix_rows,int* pmatrix_cols,const mxArray* mxmatrix){
++
++	int rows, cols;
++	double* mxmatrix_ptr=NULL;
++	double* tmatrix=NULL;
++	int ierr;
++	int i,j;
++
++	/*output: */
++	Mat matrix=NULL;
++
++	/*matlab indices: */
++	mwIndex*    ir=NULL;
++	mwIndex*    jc=NULL;
++	double* pr=NULL;
++	int     count;
++	int     nnz;
++	int     nz;
++
++	/*petsc indices: */
++	int* idxm=NULL;
++	int* idxn=NULL;
++	
++	/*Ok, first check if we are dealing with a sparse or full matrix: */
++	if (mxIsSparse(mxmatrix)){
++
++		/*Dealing with sparse matrix: recover size first: */
++		mxmatrix_ptr=(double*)mxGetPr(mxmatrix);
++		rows=mxGetM(mxmatrix);
++		cols=mxGetN(mxmatrix);
++		nnz=mxGetNzmax(mxmatrix);
++		if(rows){
++			nz=(int)((double)nnz/(double)rows);
++		}
++		else{
++			nz=0;
++		}
++
++		ierr=MatCreateSeqAIJ(PETSC_COMM_SELF,rows,cols,nz,PETSC_NULL,&matrix);CHKERRQ(ierr);
++
++		/*Now, get ir,jc and pr: */
++		pr=mxGetPr(mxmatrix);
++		ir=mxGetIr(mxmatrix);
++		jc=mxGetJc(mxmatrix);
++
++		/*Now, start inserting data into sparse matrix: */
++		count=0;
++		for(i=0;i<cols;i++){
++			for(j=0;j<(jc[i+1]-jc[i]);j++){
++				MatSetValue(matrix,ir[count],i,pr[count],INSERT_VALUES);
++				count++;
++			}
++		}
++
++	}
++	else{
++
++		/*Dealing with dense matrix: recover pointer and size: */
++		mxmatrix_ptr=(double*)mxGetPr(mxmatrix);
++		rows=mxGetM(mxmatrix);
++		cols=mxGetN(mxmatrix);
++
++		/*transpose, as Petsc now does not allows MAT_COLUMN_ORIENTED matrices in MatSetValues: */
++		tmatrix=(double*)xmalloc(rows*cols*sizeof(double));
++		for(i=0;i<cols;i++){
++			for(j=0;j<rows;j++){
++				*(tmatrix+rows*i+j)=*(mxmatrix_ptr+cols*j+i);
++			}
++		}
++
++		/*Create serial matrix: */
++		ierr=MatCreateSeqDense(PETSC_COMM_SELF,rows,cols,NULL,&matrix);CHKERRQ(ierr);
++
++		/*Insert mxmatrix_ptr values into petsc matrix: */
++		idxm=(int*)xmalloc(rows*sizeof(int));
++		idxn=(int*)xmalloc(cols*sizeof(int));
++
++		for(i=0;i<rows;i++)idxm[i]=i;
++		for(i=0;i<cols;i++)idxn[i]=i;
++
++		ierr=MatSetValues(matrix,rows,idxm,cols,idxn,tmatrix,INSERT_VALUES); CHKERRQ(ierr);
++
++		xfree((void**)&tmatrix);
++
++	}
++
++	/*Assemble matrix: */
++	MatAssemblyBegin(matrix,MAT_FINAL_ASSEMBLY); 
++	MatAssemblyEnd(matrix,MAT_FINAL_ASSEMBLY);
++
++
++	/*Assign output pointer: */
++	*pmatrix=matrix;
++	if(pmatrix_rows) *pmatrix_rows=rows;
++	if(pmatrix_cols) *pmatrix_cols=cols;
++
++	return 1;
++}
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToMatrix.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToMatrix.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToMatrix.cpp	(revision 12011)
+@@ -0,0 +1,16 @@
++Matrix* MatlabMatrixToMatrix(const mxArray* mxmatrix){
++
++	int dummy;
++	Matrix* matrix=NULL;
++
++	/*allocate matrix object: */
++	matrix=new Matrix();
++
++	#ifdef _HAVE_PETSC_
++	MatlabMatrixToPetscMatrix(&matrix->matrix,NULL,NULL,mxmatrix);
++	#else
++	matrix->matrix=MatlabMatrixToSeqMat(mxmatrix);
++	#endif
++	
++	return matrix;
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp	(revision 12011)
+@@ -0,0 +1,52 @@
++/* \file PetscVectorToDoubleVector.cpp
++ */
++
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++
++/*Petsc includes: */
++#include "petscmat.h"
++#include "petscvec.h"
++#include "petscksp.h"
++
++/*Petsc includes: */
++#include "mex.h"
++
++#include "../../../shared/shared.h"
++#include <string>
++
++
++void PetscVectorToDoubleVector(double** pvector, int* prows, Vec petsc_vector){
++
++	int     i;
++	int     rows;
++	int    *idxm   = NULL;
++	double *vector = NULL;
++
++	/*output: */
++	mxArray* dataref=NULL;
++
++	/*Get size of vector: */
++	if(vector){
++		VecGetSize(vector,&rows);
++		if(rows){
++			idxm=(int*)xmalloc(rows*sizeof(int));
++			vector=(double*)xmalloc(rows*sizeof(double));
++			for(i=0;i<rows;i++)idxm[i]=i;
++
++			VecGetValues(vector,rows,idxm,vector);
++		}
++	}
++	else{
++		rows=0;
++	}
++
++	/*Assign output pointers: */
++	*pvector=vector;
++	*prows=rows;
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp	(revision 12011)
+@@ -0,0 +1,53 @@
++/* \file PetscMatrixToDoubleMatrix.cpp
++ * \brief: convert a sparse or dense Petsc matrix into a matlab matrix
++ */
++
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++
++/*Petsc includes: */
++#include "petscmat.h"
++#include "petscvec.h"
++#include "petscksp.h"
++
++/*Petsc includes: */
++#include "mex.h"
++
++#include "../../../shared/shared.h"
++#include <string>
++
++
++void PetscMatrixToDoubleMatrix(double** pmatrix, int* prows, int* pcols,Mat petsc_matrix){
++
++	int i,j,k;
++
++	/*output: */
++	double* matrix=NULL;
++	int     rows,cols;
++
++	/*intermediary: */
++	int*    idxm=NULL;
++	int*    idxn=NULL;
++
++	/*Some needed information: */
++	MatGetSize(petsc_matrix,&rows,&cols);
++
++	idxm=(int*)xmalloc(rows*sizeof(int));
++	idxn=(int*)xmalloc(cols*sizeof(int));
++
++	for(i=0;i<rows;i++)idxm[i]=i;
++	for(i=0;i<cols;i++)idxn[i]=i;
++
++	matrix=(double*)xmalloc(rows*cols*sizeof(double));
++	MatGetValues(petsc_matrix,rows,idxm,cols,idxn,matrix);
++
++	/*Assign output pointers: */
++	*pmatrix=matrix;
++	*prows=rows;
++	*pcols=cols;
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToSeqVec.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToSeqVec.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToSeqVec.cpp	(revision 12011)
+@@ -0,0 +1,9 @@
++SeqVec* MatlabVectorToSeqVec(const mxArray* dataref){
++
++	SeqVec* output=NULL;
++
++	output=new SeqVec();
++	MatlabVectorToDoubleVector(&output->vector,&output->M,dataref);
++	return output;
++
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp	(revision 12011)
+@@ -0,0 +1,274 @@
++/* \file MatlabNArrayToNArray.cpp
++ * \brief: convert a sparse or dense matlab n-dimensional array to cpp n-dimensional array
++ */
++
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include "../../shared/shared.h"
++#include "../../include/include.h"
++
++#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
++#include <mex.h>
++
++/*FUNCTION MatlabNArrayToNArray(double** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){{{1*/
++int MatlabNArrayToNArray(double** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){
++
++	int  i,j,rows,cols;
++	int  numel,ndims;
++	int *size,*dims;
++	double* mxmatrix_ptr=NULL;
++	const mwSize* ipt=NULL;
++
++	/*output: */
++	double* matrix=NULL;
++
++	/*matlab indices: */
++	mwIndex*    ir=NULL;
++	mwIndex*    jc=NULL;
++	double* pr=NULL;
++	int     count;
++	int     nnz;
++	int     nz;
++
++	/*get Matlab matrix information: */
++	numel=mxGetNumberOfElements(mxmatrix);
++	ndims=mxGetNumberOfDimensions(mxmatrix);
++	ipt  =mxGetDimensions(mxmatrix);
++	size =(int *) xcalloc(ndims,sizeof(int));
++	for (i=0; i<ndims; i++) size[i]=(int)ipt[i];
++
++	/*Ok, first check if we are dealing with a sparse or full matrix: */
++	if (mxIsSparse(mxmatrix)){
++
++		/*Dealing with sparse matrix: recover size first: */
++		rows=mxGetM(mxmatrix);
++		cols=mxGetN(mxmatrix);
++		nnz=mxGetNzmax(mxmatrix);
++		nz=(int)((double)nnz/(double)rows);
++
++		matrix=(double*)xcalloc(rows*cols,sizeof(double));
++
++		/*Now, get ir,jc and pr: */
++		ir=mxGetIr(mxmatrix);
++		jc=mxGetJc(mxmatrix);
++		pr=mxGetPr(mxmatrix);
++
++		/*Now, start inserting data into double* matrix: */
++		count=0;
++		for(i=0;i<cols;i++){
++			for(j=0;j<(jc[i+1]-jc[i]);j++){
++				*(matrix+rows*ir[count]+i)=pr[count];
++				count++;
++			}
++		}
++
++	}
++	else{
++
++		/*Dealing with dense matrix: recover pointer and size: */
++		mxmatrix_ptr=(double*)mxGetPr(mxmatrix);
++		
++		/*Create serial matrix: */
++		matrix=(double*)xcalloc(numel,sizeof(double));
++
++		dims=(int *) xcalloc(ndims,sizeof(int));
++		for(i=0;i<numel;i++){
++			ColumnWiseDimsFromIndex(dims,i,size,ndims);
++			j=IndexFromRowWiseDims(dims,size,ndims);
++			*(matrix+j)=*(mxmatrix_ptr+i);
++		}
++		xfree((void**)&dims);
++		
++	}
++
++	/*Assign output pointer: */
++	*pmatrix=matrix;
++	*pmatrix_numel=numel;
++	*pmatrix_ndims=ndims;
++	*pmatrix_size=size;
++
++	return 1;
++}
++/*}}}*/
++/*FUNCTION MatlabNArrayToNArray(bool** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){{{1*/
++int MatlabNArrayToNArray(bool** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){
++
++	int  i,j,rows,cols;
++	int  numel,ndims;
++	int *size,*dims;
++	bool* mxmatrix_ptr=NULL;
++	const mwSize* ipt=NULL;
++
++	/*output: */
++	bool* matrix=NULL;
++
++	/*matlab indices: */
++	mwIndex*    ir=NULL;
++	mwIndex*    jc=NULL;
++	bool*   pm=NULL;
++	int     count;
++	int     nnz;
++	int     nz;
++
++	/*get Matlab matrix information: */
++	numel=mxGetNumberOfElements(mxmatrix);
++	ndims=mxGetNumberOfDimensions(mxmatrix);
++	ipt  =mxGetDimensions(mxmatrix);
++	size =(int *) xcalloc(ndims,sizeof(int));
++	for (i=0; i<ndims; i++) size[i]=(int)ipt[i];
++
++	/*Ok, first check if we are dealing with a sparse or full matrix: */
++	if (mxIsSparse(mxmatrix)){
++
++		/*Dealing with sparse matrix: recover size first: */
++		rows=mxGetM(mxmatrix);
++		cols=mxGetN(mxmatrix);
++		nnz=mxGetNzmax(mxmatrix);
++		nz=(int)((double)nnz/(double)rows);
++
++		matrix=(bool*)xcalloc(rows*cols,sizeof(bool));
++
++		/*Now, get ir,jc and pm: */
++		ir=mxGetIr(mxmatrix);
++		jc=mxGetJc(mxmatrix);
++		pm=(bool*)mxGetData(mxmatrix);
++
++		/*Now, start inserting data into bool* matrix: */
++		count=0;
++		for(i=0;i<cols;i++){
++			for(j=0;j<(jc[i+1]-jc[i]);j++){
++				*(matrix+rows*ir[count]+i)=pm[count];
++				count++;
++			}
++		}
++
++	}
++	else{
++
++		/*Dealing with dense matrix: recover pointer and size: */
++		mxmatrix_ptr=(bool*)mxGetData(mxmatrix);
++		
++		/*Create serial matrix: */
++		matrix=(bool*)xcalloc(numel,sizeof(bool));
++
++		dims=(int *) xcalloc(ndims,sizeof(int));
++		for(i=0;i<numel;i++){
++			ColumnWiseDimsFromIndex(dims,i,size,ndims);
++			j=IndexFromRowWiseDims(dims,size,ndims);
++			*(matrix+j)=(bool)*(mxmatrix_ptr+i);
++		}
++		xfree((void**)&dims);
++		
++	}
++
++	/*Assign output pointer: */
++	*pmatrix=matrix;
++	*pmatrix_numel=numel;
++	*pmatrix_ndims=ndims;
++	*pmatrix_size=size;
++
++	return 1;
++}
++/*}}}*/
++/*FUNCTION MatlabNArrayToNArray(char** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){{{1*/
++int MatlabNArrayToNArray(char** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){
++
++	int  i,j,rows,cols;
++	int  numel,ndims;
++	int *size,*dims;
++	mxChar* mxmatrix_ptr=NULL;
++	const mwSize* ipt=NULL;
++
++	/*output: */
++	char* matrix=NULL;
++
++	/*matlab indices: */
++	mwIndex*    ir=NULL;
++	mwIndex*    jc=NULL;
++	char*   pm=NULL;
++	int     count;
++	int     nnz;
++	int     nz;
++
++	/*get Matlab matrix information: */
++	numel=mxGetNumberOfElements(mxmatrix);
++	ndims=mxGetNumberOfDimensions(mxmatrix);
++	ipt  =mxGetDimensions(mxmatrix);
++	size =(int *) xcalloc(ndims,sizeof(int));
++	for (i=0; i<ndims; i++) size[i]=(int)ipt[i];
++
++	/*Ok, first check if we are dealing with a sparse or full matrix: */
++	if (mxIsSparse(mxmatrix)){
++
++		/*Dealing with sparse matrix: recover size first: */
++		rows=mxGetM(mxmatrix);
++		cols=mxGetN(mxmatrix);
++		nnz=mxGetNzmax(mxmatrix);
++		nz=(int)((double)nnz/(double)rows);
++
++		matrix=(char*)xcalloc(rows*cols,sizeof(double));
++
++		/*Now, get ir,jc and pm: */
++		ir=mxGetIr(mxmatrix);
++		jc=mxGetJc(mxmatrix);
++		pm=(char*)mxGetData(mxmatrix);
++
++		/*Now, start inserting data into char* matrix: */
++		count=0;
++		for(i=0;i<cols;i++){
++			for(j=0;j<(jc[i+1]-jc[i]);j++){
++				*(matrix+rows*ir[count]+i)=(char)pm[count];
++				count++;
++			}
++		}
++
++	}
++	else{
++
++		/*Dealing with dense matrix: recover pointer and size: */
++		mxmatrix_ptr=mxGetChars(mxmatrix);
++		
++		/*Create serial matrix: */
++		matrix=(char*)xcalloc(numel+1,sizeof(mxChar));
++
++		/*looping code adapted from Matlab example explore.c: */
++		int elements_per_page = size[0] * size[1];
++		/* total_number_of_pages = size[2] x size[3] x ... x size[N-1] */
++		int total_number_of_pages = 1;
++		for (i=2; i<ndims; i++) {
++			total_number_of_pages *= size[i];
++		}
++
++		i=0;
++		for (int page=0; page < total_number_of_pages; page++) {
++			int row;
++			/* On each page, walk through each row. */
++			for (row=0; row<size[0]; row++)  {
++				int column;
++				j = (page * elements_per_page) + row;
++
++				/* Walk along each column in the current row. */
++				for (column=0; column<size[1]; column++) {
++					*(matrix+i++)=(char)*(mxmatrix_ptr+j);
++					j += size[0];
++				}
++			}
++		}
++
++	}
++
++	/*Assign output pointer: */
++	*pmatrix=matrix;
++	*pmatrix_numel=numel;
++	*pmatrix_ndims=ndims;
++	*pmatrix_size=size;
++
++	return 1;
++}
++/*}}}*/
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h	(revision 12011)
+@@ -0,0 +1,85 @@
++/*\file matlabio.h
++ *\brief: I/O for ISSM in matlab mode
++ */
++
++#ifndef _MATLAB_IO_H_
++#define _MATLAB_IO_H_
++
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif 
++
++#include "../../objects/objects.h"
++#include "../../Container/Container.h"
++#include "../../include/include.h"
++
++class DataSet;
++class Parameters;
++
++#include <mex.h>
++
++void WriteData(mxArray** pdataref,DataSet* dataset);
++void WriteData(mxArray** pdataref,Matrix* matrix);
++void WriteData(mxArray** pdataref,double* matrix, int M,int N);
++void WriteData(mxArray** pdataref,int*    matrix, int M,int N);
++void WriteData(mxArray** pdataref,Vector* vector);
++void WriteData(mxArray** pdataref,double* vector, int M);
++void WriteData(mxArray** pdataref,int integer);
++void WriteData(mxArray** pdataref,bool boolean);
++void WriteData(mxArray** pdataref,double scalar);
++void WriteData(mxArray** pdataref,char* string);
++void WriteData(DataHandle* pdataref,Parameters* parameters);
++
++void FetchData(DataSet** pdataset,const mxArray* dataref);
++void FetchData(double** pmatrix,int* pM,int *pN,const mxArray* dataref);
++void FetchData(double** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref);
++void FetchData(int** pmatrix,int* pM,int *pN,const mxArray* dataref);
++void FetchData(bool** pmatrix,int* pM,int *pN,const mxArray* dataref);
++void FetchData(bool** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref);
++void FetchData(Matrix** pmatrix,const mxArray* dataref);
++void FetchData(int** pvector,int* pM,const mxArray* dataref);
++void FetchData(float** pvector,int* pM,const mxArray* dataref);
++void FetchData(double** pvector,int* pM,const mxArray* dataref);
++void FetchData(bool** pvector,int* pM,const mxArray* dataref);
++void FetchData(Vector** pvector,const mxArray* dataref);
++void FetchData(char** pstring,const mxArray* dataref);
++void FetchData(char** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref);
++void FetchData(double* pscalar,const mxArray* dataref);
++void FetchData(int* pinteger,const mxArray* dataref);
++void FetchData(bool* pbool,const mxArray* dataref);
++void FetchData(Parameters** pparameters, DataHandle dataref);
++
++Option* OptionParse(char* name, const mxArray* prhs[]);
++OptionDouble*   OptionDoubleParse( char* name, const mxArray* prhs[]);
++OptionLogical*  OptionLogicalParse( char* name, const mxArray* prhs[]);
++OptionChar*     OptionCharParse( char* name, const mxArray* prhs[]);
++OptionStruct*   OptionStructParse( char* name, const mxArray* prhs[]);
++OptionCell*     OptionCellParse( char* name, const mxArray* prhs[]);
++
++mxArray* mxGetAssignedField(const mxArray* pmxa_array,int number, const char* field);
++int CheckNumMatlabArguments(int nlhs,int NLHS, int nrhs,int NRHS, const char* THISFUNCTION, void (*function)( void ));
++
++/*Matlab to Matrix routines: */
++Matrix* MatlabMatrixToMatrix(const mxArray* mxmatrix);
++Vector* MatlabVectorToVector(const mxArray* mxvector);
++
++/*Matlab to double* routines: */
++int MatlabVectorToDoubleVector(double** pvector,int* pvector_rows,const mxArray* mxvector);
++int MatlabMatrixToDoubleMatrix(double** pmatrix,int* pmatrix_rows,int* pmatrix_cols,const mxArray* mxmatrix);
++int MatlabNArrayToNArray(double** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix);
++int MatlabNArrayToNArray(bool** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix);
++int MatlabNArrayToNArray(char** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix);
++int MatlabMatrixToPetscMatrix(Mat* matrix,int* prows,int* pcols, const mxArray* mxmatrix);
++
++/*Matlab to Petsc routines: */
++int MatlabVectorToPetscVector(Vec* pvector,int* pvector_rows,const mxArray* mxvector);
++void PetscMatrixToDoubleMatrix(double** pmatrix, int* prows, int* pcols,Mat matrix);
++void PetscVectorToDoubleVector(double** pvector, int* prows, Vec vector);
++
++/*Matlab to SeqMat routines: */
++SeqMat* MatlabMatrixToSeqMat(const mxArray* dataref);
++SeqVec* MatlabVectorToSeqVec(const mxArray* dataref);
++
++#endif	/* _IO_H_ */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgGeom.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgGeom.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgGeom.cpp	(revision 12011)
+@@ -0,0 +1,105 @@
++#include <stdio.h>
++#include "../objects.h"
++#include "../../io/io.h"
++#include "../../shared/shared.h"
++
++/*Constructors/Destructors*/
++/*FUNCTION BamgGeom::BamgGeom(void* module_struct){{{1*/
++BamgGeom::BamgGeom(void* module_struct){
++
++	mxArray* matlab_struct=NULL;
++
++	/*recover our pointer: */
++	matlab_struct=(mxArray*)module_struct;
++
++	FetchData(&this->Vertices,        &this->VerticesSize[0],        &this->VerticesSize[1],        mxGetAssignedField(matlab_struct,0,"Vertices"));
++	FetchData(&this->Edges,           &this->EdgesSize[0],           &this->EdgesSize[1],           mxGetAssignedField(matlab_struct,0,"Edges"));
++	this->TangentAtEdgesSize[0]=0,    this->TangentAtEdgesSize[1]=0;    this->TangentAtEdges=NULL;
++	FetchData(&this->Corners,         &this->CornersSize[0],         &this->CornersSize[1],         mxGetAssignedField(matlab_struct,0,"Corners"));
++	FetchData(&this->RequiredVertices,&this->RequiredVerticesSize[0],&this->RequiredVerticesSize[1],mxGetAssignedField(matlab_struct,0,"RequiredVertices"));
++	FetchData(&this->RequiredEdges,   &this->RequiredEdgesSize[0],   &this->RequiredEdgesSize[1],   mxGetAssignedField(matlab_struct,0,"RequiredEdges"));
++	FetchData(&this->CrackedEdges,    &this->CrackedEdgesSize[0],    &this->CrackedEdgesSize[1],    mxGetAssignedField(matlab_struct,0,"CrackedEdges"));
++	FetchData(&this->SubDomains,      &this->SubDomainsSize[0],      &this->SubDomainsSize[1],      mxGetAssignedField(matlab_struct,0,"SubDomains"));
++
++}
++/*}}}*/
++
++/*Methods*/
++/*FUNCTION BamgGeom::SetStructureFields{{{1*/
++void BamgGeom::SetStructureFields(void* module_struct){
++
++	mxArray** matlab_struct=NULL;
++
++	/*Intermediary*/
++	int         i;
++	mxArray*    output=NULL;
++	const int         numfields=7;
++	const char* fnames[numfields];
++	mwSize      ndim=2;
++	mwSize      dimensions[2]={1,1};
++	
++	/*recover pointer: */
++	matlab_struct=(mxArray**)module_struct;
++
++	/*Initialize field names*/
++	i=0;
++	fnames[i++] = "Vertices";
++	fnames[i++] = "Edges";
++	fnames[i++] = "TangentAtEdges";
++	fnames[i++] = "RequiredVertices";
++	fnames[i++] = "RequiredEdges";
++	fnames[i++] = "CrackedEdges";
++	fnames[i++] = "SubDomains";
++	_assert_(i==numfields);
++
++	/*Initialize Matlab structure*/
++	output=mxCreateStructArray(ndim,dimensions,numfields,fnames);
++
++	/*set each matlab each field*/
++	i=0;
++	i++; SetStructureField(output,"Vertices",        this->VerticesSize[0],        this->VerticesSize[1],        this->Vertices);
++	i++; SetStructureField(output,"Edges",           this->EdgesSize[0],           this->EdgesSize[1],           this->Edges);
++	i++; SetStructureField(output,"TangentAtEdges",  this->TangentAtEdgesSize[0],  this->TangentAtEdgesSize[1],  this->TangentAtEdges);
++	i++; SetStructureField(output,"RequiredVertices",this->RequiredVerticesSize[0],this->RequiredVerticesSize[1],this->RequiredVertices);
++	i++; SetStructureField(output,"RequiredEdges",   this->RequiredEdgesSize[0],   this->RequiredEdgesSize[1],   this->RequiredEdges);
++	i++; SetStructureField(output,"CrackedEdges",    this->CrackedEdgesSize[0],    this->CrackedEdgesSize[1],    this->CrackedEdges);
++	i++; SetStructureField(output,"SubDomains",      this->SubDomainsSize[0],      this->SubDomainsSize[1],      this->SubDomains);
++	_assert_(i==numfields);
++
++	/*Assign output*/
++	*matlab_struct=output;
++
++}
++/*}}}*/
++/*FUNCTION BamgGeom::SetStructureField{{{1*/
++void BamgGeom::SetStructureField(void* module_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer){
++
++	/*Intermediary*/
++	mxArray*    matlab_struct=NULL;
++	int         i1,i2;
++	mxArray*    pfield=NULL;
++	mxArray*    pfield2=NULL;
++
++	/*recover pointer: */
++	matlab_struct=(mxArray*)module_struct;
++
++	/*Copy field*/
++	double*  fieldcopy=NULL;
++	if (fieldrows*fieldcols){
++		fieldcopy=(double*)xmalloc(fieldrows*fieldcols*sizeof(double));
++		for(i1=0;i1<fieldrows;i1++){
++			for(i2=0;i2<fieldcols;i2++){
++				fieldcopy[fieldcols*i1+i2]=fieldpointer[fieldcols*i1+i2];
++			}
++		}
++	}
++
++	/*Set matlab field*/
++	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pfield,fieldcols);
++	mxSetN(pfield,fieldrows);
++	mxSetPr(pfield,fieldcopy);
++	mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose
++	mxSetField(matlab_struct,0,fieldname,pfield2);
++}
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgMesh.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgMesh.cpp	(revision 12011)
+@@ -0,0 +1,137 @@
++#include <stdio.h>
++#include "../objects.h"
++#include "../../io/io.h"
++#include "../../shared/shared.h"
++
++/*Constructors/Destructors*/
++/*FUNCTION BamgMesh::BamgMesh(void* module_struct){{{1*/
++BamgMesh::BamgMesh(void* module_struct){
++
++	mxArray* matlab_struct=NULL;
++	int lines,cols;
++
++	/*recover our pointer: */
++	matlab_struct=(mxArray*)module_struct;
++
++
++	FetchData(&this->Vertices,            &this->VerticesSize[0],            &this->VerticesSize[1],            mxGetAssignedField(matlab_struct,0,"Vertices"));
++	FetchData(&this->Edges,               &this->EdgesSize[0],               &this->EdgesSize[1],               mxGetAssignedField(matlab_struct,0,"Edges"));
++	FetchData(&this->Triangles,           &this->TrianglesSize[0],           &this->TrianglesSize[1],           mxGetAssignedField(matlab_struct,0,"Triangles"));
++	this->QuadrilateralsSize[0]=0,        this->QuadrilateralsSize[1]=0;     this->Quadrilaterals=NULL;
++
++	this->SubDomainsSize[0]=0,            this->SubDomainsSize[1]=0;         this->SubDomains=NULL;
++	this->SubDomainsFromGeomSize[0]=0,    this->SubDomainsFromGeomSize[1]=0; this->SubDomainsFromGeom=NULL;
++	this->CrackedVerticesSize[0]=0,       this->CrackedVerticesSize[1]=0;    this->CrackedVertices=NULL;
++	FetchData(&this->CrackedEdges,        &this->CrackedEdgesSize[0],        &this->CrackedEdgesSize[1],        mxGetAssignedField(matlab_struct,0,"CrackedEdges"));
++
++	FetchData(&this->VerticesOnGeomEdge,  &this->VerticesOnGeomEdgeSize[0],  &this->VerticesOnGeomEdgeSize[1],  mxGetAssignedField(matlab_struct,0,"VerticesOnGeomEdge"));
++	FetchData(&this->VerticesOnGeomVertex,&this->VerticesOnGeomVertexSize[0],&this->VerticesOnGeomVertexSize[1],mxGetAssignedField(matlab_struct,0,"VerticesOnGeomVertex"));
++	FetchData(&this->EdgesOnGeomEdge,     &this->EdgesOnGeomEdgeSize[0],     &this->EdgesOnGeomEdgeSize[1],     mxGetAssignedField(matlab_struct,0,"EdgesOnGeomEdge"));
++
++	this->IssmEdgesSize[0]=0,             this->IssmEdgesSize[1]=0;          this->IssmEdges=NULL;
++	FetchData(&this->IssmSegments,        &this->IssmSegmentsSize[0],        &this->IssmSegmentsSize[1],        mxGetAssignedField(matlab_struct,0,"IssmSegments"));
++
++	this->ElementConnectivitySize[0]=0,      this->ElementConnectivitySize[1]=0;      this->ElementConnectivity=NULL;
++	this->NodalConnectivitySize[0]=0,        this->NodalConnectivitySize[1]=0;        this->NodalConnectivity=NULL;
++	this->NodalElementConnectivitySize[0]=0, this->NodalElementConnectivitySize[1]=0; this->NodalElementConnectivity=NULL;
++
++}
++/*}}}*/
++
++/*Methods*/
++/*FUNCTION BamgMesh::SetStructureFields{{{1*/
++void BamgMesh::SetStructureFields(void* module_struct){
++	
++	mxArray** matlab_struct=NULL;
++
++	/*Intermediary*/
++	int         i;
++	mxArray*    output=NULL;
++	const int         numfields=16;
++	const char* fnames[numfields];
++	mwSize      ndim=2;
++	mwSize      dimensions[2]={1,1};
++
++	/*recover pointer: */
++	matlab_struct=(mxArray**)module_struct;
++
++	/*Initialize field names*/
++	i=0;
++	fnames[i++] = "Triangles";
++	fnames[i++] = "Vertices";
++	fnames[i++] = "Edges";
++	fnames[i++] = "IssmSegments";
++	fnames[i++] = "IssmEdges";
++	fnames[i++] = "Quadrilaterals";
++	fnames[i++] = "VerticesOnGeomVertex";
++	fnames[i++] = "VerticesOnGeomEdge";
++	fnames[i++] = "EdgesOnGeomEdge";
++	fnames[i++] = "SubDomains";
++	fnames[i++] = "SubDomainsFromGeom";
++	fnames[i++] = "ElementConnectivity";
++	fnames[i++] = "NodalConnectivity";
++	fnames[i++] = "NodalElementConnectivity";
++	fnames[i++] = "CrackedVertices";
++	fnames[i++] = "CrackedEdges";
++	_assert_(i==numfields);
++
++	/*Initialize Matlab structure*/
++	output=mxCreateStructArray(ndim,dimensions,numfields,fnames);
++
++	/*set each matlab each field*/
++	i=0;
++	i++; SetStructureField(output,"Triangles",                this->TrianglesSize[0],                this->TrianglesSize[1],                 this->Triangles);
++	i++; SetStructureField(output,"Vertices",                 this->VerticesSize[0],                 this->VerticesSize[1],                  this->Vertices);
++	i++; SetStructureField(output,"Edges",                    this->EdgesSize[0],                    this->EdgesSize[1],                     this->Edges);
++	i++; SetStructureField(output,"IssmSegments",             this->IssmSegmentsSize[0],             this->IssmSegmentsSize[1],              this->IssmSegments);
++	i++; SetStructureField(output,"IssmEdges",                this->IssmEdgesSize[0],                this->IssmEdgesSize[1],                 this->IssmEdges);
++	i++; SetStructureField(output,"Quadrilaterals",           this->QuadrilateralsSize[0],           this->QuadrilateralsSize[1],            this->Quadrilaterals);
++	i++; SetStructureField(output,"VerticesOnGeomVertex",this->VerticesOnGeomVertexSize[0],this->VerticesOnGeomVertexSize[1], this->VerticesOnGeomVertex);
++	i++; SetStructureField(output,"VerticesOnGeomEdge",  this->VerticesOnGeomEdgeSize[0],  this->VerticesOnGeomEdgeSize[1],   this->VerticesOnGeomEdge);
++	i++; SetStructureField(output,"EdgesOnGeomEdge",     this->EdgesOnGeomEdgeSize[0],     this->EdgesOnGeomEdgeSize[1],      this->EdgesOnGeomEdge);
++	i++; SetStructureField(output,"SubDomains",               this->SubDomainsSize[0],               this->SubDomainsSize[1],                this->SubDomains);
++	i++; SetStructureField(output,"SubDomainsFromGeom",       this->SubDomainsFromGeomSize[0],       this->SubDomainsFromGeomSize[1],        this->SubDomainsFromGeom);
++	i++; SetStructureField(output,"ElementConnectivity",      this->ElementConnectivitySize[0],      this->ElementConnectivitySize[1],       this->ElementConnectivity);
++	i++; SetStructureField(output,"NodalConnectivity",        this->NodalConnectivitySize[0],        this->NodalConnectivitySize[1],         this->NodalConnectivity);
++	i++; SetStructureField(output,"NodalElementConnectivity", this->NodalElementConnectivitySize[0], this->NodalElementConnectivitySize[1],  this->NodalElementConnectivity);
++	i++; SetStructureField(output,"CrackedVertices",          this->CrackedVerticesSize[0],          this->CrackedVerticesSize[1],           this->CrackedVertices);
++	i++; SetStructureField(output,"CrackedEdges",             this->CrackedEdgesSize[0],             this->CrackedEdgesSize[1],              this->CrackedEdges);
++	_assert_(i==numfields);
++
++	/*Assign output*/
++	*matlab_struct=output;
++
++}
++/*}}}*/
++/*FUNCTION BamgMesh::SetStructureField{{{1*/
++void BamgMesh::SetStructureField(void* module_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer){
++
++	/*Intermediary*/
++	mxArray*    matlab_struct=NULL;
++	int         i1,i2;
++	mxArray*    pfield=NULL;
++	mxArray*    pfield2=NULL;
++
++	/*recover pointer: */
++	matlab_struct=(mxArray*)module_struct;
++
++	/*Copy field*/
++	double*  fieldcopy=NULL;
++	if (fieldrows*fieldcols){
++		fieldcopy=(double*)xmalloc(fieldrows*fieldcols*sizeof(double));
++		for(i1=0;i1<fieldrows;i1++){
++			for(i2=0;i2<fieldcols;i2++){
++				fieldcopy[fieldcols*i1+i2]=fieldpointer[fieldcols*i1+i2];
++			}
++		}
++	}
++
++	/*Set matlab field*/
++	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pfield,fieldcols);
++	mxSetN(pfield,fieldrows);
++	mxSetPr(pfield,fieldcopy);
++	mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose
++	mxSetField(matlab_struct,0,fieldname,pfield2);
++}
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgOpts.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgOpts.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgOpts.cpp	(revision 12011)
+@@ -0,0 +1,50 @@
++#include <stdio.h>
++#include "../../shared/shared.h"
++#include "../../include/include.h"
++#include "../objects.h"
++#include "../../io/io.h"
++
++/*Constructors/Destructors*/
++/*FUNCTION BamgOpts::BamgOpts(void* module_struct){{{1*/
++BamgOpts::BamgOpts(void* module_struct){
++	
++	mxArray*    matlab_struct=NULL;
++
++	/*recover pointer: */
++	matlab_struct=(mxArray*)module_struct;
++
++	FetchData(&this->anisomax,mxGetField(matlab_struct,0,"anisomax"));
++	FetchData(&this->cutoff,mxGetField(matlab_struct,0,"cutoff"));
++	FetchData(&this->coeff,mxGetField(matlab_struct,0,"coeff"));
++	FetchData(&this->errg,mxGetField(matlab_struct,0,"errg"));
++	FetchData(&this->gradation,mxGetField(matlab_struct,0,"gradation"));
++	FetchData(&this->Hessiantype,mxGetField(matlab_struct,0,"Hessiantype"));
++	FetchData(&this->MaxCornerAngle,mxGetField(matlab_struct,0,"MaxCornerAngle"));
++	FetchData(&this->maxnbv,mxGetField(matlab_struct,0,"maxnbv"));
++	FetchData(&this->maxsubdiv,mxGetField(matlab_struct,0,"maxsubdiv"));
++	FetchData(&this->Metrictype,mxGetField(matlab_struct,0,"Metrictype"));
++	FetchData(&this->nbjacobi,mxGetField(matlab_struct,0,"nbjacobi"));
++	FetchData(&this->nbsmooth,mxGetField(matlab_struct,0,"nbsmooth"));
++	FetchData(&this->omega,mxGetField(matlab_struct,0,"omega"));
++	FetchData(&this->power,mxGetField(matlab_struct,0,"power"));
++	FetchData(&this->verbose,mxGetField(matlab_struct,0,"verbose"));
++
++	FetchData(&this->Crack,mxGetField(matlab_struct,0,"Crack"));
++	FetchData(&this->geometricalmetric,mxGetField(matlab_struct,0,"geometricalmetric"));
++	FetchData(&this->KeepVertices,mxGetField(matlab_struct,0,"KeepVertices"));
++	FetchData(&this->splitcorners,mxGetField(matlab_struct,0,"splitcorners"));
++
++	FetchData(&this->hmin,mxGetField(matlab_struct,0,"hmin"));
++	FetchData(&this->hmax,mxGetField(matlab_struct,0,"hmax"));
++	FetchData(&this->hminVertices,&this->hminVerticesSize[0],&this->hminVerticesSize[1],mxGetField(matlab_struct,0,"hminVertices"));
++	FetchData(&this->hmaxVertices,&this->hmaxVerticesSize[0],&this->hmaxVerticesSize[1],mxGetField(matlab_struct,0,"hmaxVertices"));
++	FetchData(&this->hVertices,&this->hVerticesSize[0],&this->hVerticesSize[1],mxGetField(matlab_struct,0,"hVertices"));
++	FetchData(&this->metric,&this->metricSize[0],&this->metricSize[1],mxGetField(matlab_struct,0,"metric"));
++	FetchData(&this->field,&this->fieldSize[0],&this->fieldSize[1],mxGetField(matlab_struct,0,"field"));
++	FetchData(&this->err,&this->errSize[0],&this->errSize[1],mxGetField(matlab_struct,0,"err"));
++
++	/*Additional checks*/
++	this->Check();
++
++}
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/pythonio.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/pythonio.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/pythonio.h	(revision 12011)
+@@ -0,0 +1,56 @@
++/*\file pythonio.h
++ *\brief: I/O for ISSM in python mode
++ */
++
++#ifndef _PYTHON_IO_H_
++#define _PYTHON_IO_H_
++
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif 
++
++
++#include "../../objects/objects.h"
++#include "../../Container/Container.h"
++#include "../../include/include.h"
++
++class DataSet;
++class Parameters;
++
++//void WriteData(PyObject* py_tuple,DataSet* dataset);
++//void WriteData(PyObject* py_tuple,double* matrix, int M,int N);
++//void WriteData(PyObject* py_tuple,int*    matrix, int M,int N);
++//void WriteData(PyObject* py_tuple,double* vector, int M);
++//void WriteData(PyObject* py_tuple,int integer);
++//void WriteData(PyObject* py_tuple,bool boolean);
++//void WriteData(PyObject* py_tuple,double scalar);
++//void WriteData(DataHandle* py_tuple,Parameters* parameters);
++void WriteData(PyObject* py_tuple, int index, char* string);
++void WriteData(PyObject* py_tuple, int index, Matrix* matrix);
++void WriteData(PyObject* py_tuple, int index, Vector* vector);
++
++
++//void FetchData(DataSet** pdataset,PyObject* py_ref);
++//void FetchData(double** pmatrix,int* pM,int *pN,PyObject* py_ref);
++//void FetchData(double** pmatrix,int* pnumel,int* pndims,int** psize,PyObject* py_ref);
++//void FetchData(int** pmatrix,int* pM,int *pN,PyObject* py_ref);
++//void FetchData(bool** pmatrix,int* pM,int *pN,PyObject* py_ref);
++//void FetchData(bool** pmatrix,int* pnumel,int* pndims,int** psize,PyObject* py_ref);
++//void FetchData(Matrix** pmatrix,PyObject* py_ref);
++//void FetchData(int** pvector,int* pM,PyObject* py_ref);
++//void FetchData(float** pvector,int* pM,PyObject* py_ref);
++//void FetchData(double** pvector,int* pM,PyObject* py_ref);
++//void FetchData(bool** pvector,int* pM,PyObject* py_ref);
++//void FetchData(Vector** pvector,PyObject* py_ref);
++//void FetchData(char** pmatrix,int* pnumel,int* pndims,int** psize,PyObject* py_ref);
++//void FetchData(Parameters** pparameters, DataHandle py_ref);
++void FetchData(char** pstring,PyObject* py_unicode);
++void FetchData(double* pscalar,PyObject* py_float);
++void FetchData(int* pinteger,PyObject* py_long);
++void FetchData(bool* pbool,PyObject* py_boolean);
++
++int CheckNumPythonArguments(PyObject* inputs,int NRHS, void (*function)( void ));
++
++#endif	/* _IO_H_ */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp	(revision 12011)
+@@ -0,0 +1,40 @@
++/*!\file CheckNumPythonArguments.cpp:
++ * \brief: check number of arguments and report an usage error message.
++ */
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++
++#if defined(_HAVE_PYTHON_) && defined(_SERIAL_)
++
++#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
++#define NO_IMPORT
++
++#include "../../toolkits/toolkits.h"
++#include "../../shared/Exceptions/exceptions.h"
++#include "../../include/include.h"
++
++int CheckNumPythonArguments(PyObject* inputs,int NRHS, void (*function)( void )){
++
++	Py_ssize_t size=0;
++
++	/*figure out size of tuple in input: */
++	size=PyTuple_Size(inputs);
++	
++	/*check on requested size: */
++	if (size==0){
++		function();
++		_error_("usage: see above");
++	}
++	else if (size!=NRHS ) {
++		function(); 
++		_error_("usage error.");
++	}
++	return 1;
++}
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp	(revision 12011)
+@@ -0,0 +1,74 @@
++/*\file FetchData.cpp:
++ * \brief: general I/O interface to fetch data in python
++ */
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
++#define NO_IMPORT
++
++#include "../../toolkits/toolkits.h"
++#include "../../include/include.h"
++#include "../../shared/shared.h"
++
++#if defined(_HAVE_PYTHON_) && defined(_SERIAL_)
++/*FUNCTION FetchData(char** pstring,PyObject* py_unicode){{{1*/
++void FetchData(char** pstring,PyObject* py_unicode){
++
++	PyObject* py_bytes;
++	char* string=NULL;
++
++	
++	/*convert to bytes format: */
++	PyUnicode_FSConverter(py_unicode,&py_bytes);
++
++	/*convert from bytes to string: */
++	string=PyBytes_AS_STRING(py_bytes);
++	
++	*pstring=string;
++}
++/*FUNCTION FetchData(double* pscalar,PyObject* py_float){{{1*/
++void FetchData(double* pscalar,PyObject* py_float){
++
++	double scalar;
++
++	/*return internal value: */
++	scalar=PyFloat_AsDouble(py_float);
++
++	/*output: */
++	*pscalar=scalar;
++}
++/*}}}*/
++/*FUNCTION FetchData(int* pinteger,PyObject* py_long){{{1*/
++void FetchData(int* pinteger, PyObject* py_long){
++
++	int integer;
++
++	/*return internal value: */
++	integer=(int)PyLong_AsLong(py_long);
++
++	/*output: */
++	*pinteger=integer;
++}
++/*}}}*/
++/*FUNCTION FetchData(bool* pboolean,PyObject* py_boolean){{{1*/
++void FetchData(bool* pboolean,PyObject* py_boolean){
++
++	bool boolean;
++	
++	/*check this is indeed a subtype of long type: */
++	if(!PyBool_Check(py_boolean))_error_("expecting a boolean in input!");
++
++	/*extract boolean: */
++	boolean=(bool)PyLong_AsLong(py_boolean);
++
++	/*simple copy: */
++	*pboolean=boolean;
++	
++}
++/*}}}*/
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/WritePythonData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/WritePythonData.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/WritePythonData.cpp	(revision 12011)
+@@ -0,0 +1,69 @@
++/* \file WriteData.c:
++ * \brief: general interface for writing data
++ */
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#if defined(_HAVE_PYTHON_) && defined(_SERIAL_)
++
++#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
++#define NO_IMPORT
++
++#include "../../toolkits/toolkits.h"
++#include "../../include/include.h"
++#include "../../modules/modules.h"
++#include "../../Container/Container.h"
++#include "../../shared/shared.h"
++#include "../../io/io.h"
++#include "../../EnumDefinitions/EnumDefinitions.h"
++
++
++/*FUNCTION WriteData(PyObject* py_tuple,int index,char* string){{{1*/
++void WriteData(PyObject* py_tuple, int index, char* string){
++	
++	PyTuple_SetItem(py_tuple, index, PyUnicode_FromString(string));
++
++}
++/*}}}*/
++/*FUNCTION WriteData(PyObject* tuple,int index,Matrix* matrix){{{1*/
++void WriteData(PyObject* tuple,int index,Matrix* matrix){
++	
++	int M,N;
++	double* buffer=NULL;
++	npy_intp dims[2]={0,0};
++	PyObject* array=NULL;
++	
++	buffer=matrix->ToSerial();
++	matrix->GetSize(&M,&N);
++	dims[0]=(npy_intp)M;
++	dims[1]=(npy_intp)N;
++	array=PyArray_SimpleNewFromData(2,dims,NPY_DOUBLE,buffer);
++	
++	PyTuple_SetItem(tuple, index, array);
++
++
++}
++/*FUNCTION WriteData(PyObject* py_tuple,int index,Vector* vector){{{1*/
++void WriteData(PyObject* tuple,int index,Vector* vector){
++	
++	int M;
++	double* buffer=NULL;
++	npy_intp dim=10;
++	PyObject* array=NULL;
++	
++	buffer=vector->ToMPISerial();
++	vector->GetSize(&M);
++	dim=(npy_intp)M;
++	array=PyArray_SimpleNewFromData(1,&dim,NPY_DOUBLE,buffer);
++	
++	PyTuple_SetItem(tuple, index, array);
++
++
++}
++/*}}}*/
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgGeom.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgGeom.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgGeom.cpp	(revision 12011)
+@@ -0,0 +1,27 @@
++#include <stdio.h>
++#include "../objects.h"
++#include "../../io/io.h"
++#include "../../shared/shared.h"
++
++/*Constructors/Destructors*/
++/*FUNCTION BamgGeom::BamgGeom(void* module_struct){{{1*/
++BamgGeom::BamgGeom(void* module_struct){
++
++	_error_("not implemented yet!");
++
++}
++/*}}}*/
++
++/*Methods*/
++/*FUNCTION BamgGeom::SetStructureFields{{{1*/
++void BamgGeom::SetStructureFields(void* module_struct){
++	_error_("not implemented yet!");
++}
++
++/*}}}*/
++/*FUNCTION BamgGeom::SetStructureField{{{1*/
++void BamgGeom::SetStructureField(void* module_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer){
++	_error_("not implemented yet!");
++}
++
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgMesh.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgMesh.cpp	(revision 12011)
+@@ -0,0 +1,23 @@
++#include <stdio.h>
++#include "../objects.h"
++#include "../../io/io.h"
++#include "../../shared/shared.h"
++
++/*Constructors/Destructors*/
++/*FUNCTION BamgMesh::BamgMesh(void* module_struct){{{1*/
++BamgMesh::BamgMesh(void* module_struct){
++	_error_("not implemented yet!");
++}
++/*}}}*/
++
++/*Methods*/
++/*FUNCTION BamgMesh::SetStructureFields{{{1*/
++void BamgMesh::SetStructureFields(void* module_struct){
++	_error_("not implemented yet!");
++}
++/*}}}*/
++/*FUNCTION BamgMesh::SetStructureField{{{1*/
++void BamgMesh::SetStructureField(void* module_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer){
++	_error_("not implemented yet!");
++}
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgOpts.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgOpts.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgOpts.cpp	(revision 12011)
+@@ -0,0 +1,12 @@
++#include <stdio.h>
++#include "../../shared/shared.h"
++#include "../../include/include.h"
++#include "../objects.h"
++#include "../../io/io.h"
++
++/*Constructors/Destructors*/
++/*FUNCTION BamgOpts::BamgOpts(void* module_struct){{{1*/
++BamgOpts::BamgOpts(void* module_struct){
++	_error_("not implemented yet!");
++}
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.h	(revision 12011)
+@@ -14,9 +14,7 @@
+ 
+ 		/*constructors, destructors*/
+ 		Options();
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		Options(int istart, int nrhs, const mxArray* prhs[]);
+-		#endif
++		Options(int istart, int nrhs, void* module_references);
+ 		~Options();
+ 
+ 		/*numerics*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Results.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Results.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Results.cpp	(revision 12011)
+@@ -64,90 +64,6 @@
+ }
+ /*}}}*/
+ /*FUNCTION Results::Write{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void Results::Write(mxArray** pdataref){
+-
+-	int i,j;
+-	int count;
+-
+-	/*output: */
+-	mxArray* dataref=NULL;
+-	mxArray* processeddataref=NULL;
+-	mwSize nfields;
+-	mwSize maxfields;
+-	mwSize nsteps;
+-	mwSize step;
+-	const char **fnames      = NULL;
+-	int         *enums       = NULL;
+-	int          baseenum;
+-	mwSize       onebyone[2] = {1,1};
+-	mwSize       ndim        = 2;
+-
+-	/*How many time steps do we have? : */
+-	nsteps=0;
+-	for(i=0;i<this->Size();i++){
+-		ExternalResult* result=(ExternalResult*)this->GetObjectByOffset(i);
+-		step=result->GetStep();
+-		if(step>nsteps)nsteps=step;
+-	}
+-	onebyone[0]=nsteps;
+-
+-	/*How many field names do we have. First, figure out how many result types we have: */
+-	maxfields=(mwSize)this->Size();
+-	enums=(int*)xmalloc(maxfields*sizeof(int));
+-	for(i=0;i<maxfields;i++){
+-		ExternalResult* result=(ExternalResult*)this->GetObjectByOffset(i);
+-		enums[i]=result->InstanceEnum();
+-	}
+-	/*Now, make result types unique: */
+-	for(i=0;i<maxfields;i++){
+-		if(enums[i]>=0){//if <0, it means this enum was found to replicate another one previously
+-			baseenum=enums[i]; 		
+-			/*is the baseenum repeated later on?:*/
+-			for(j=i+1;j<maxfields;j++){
+-				if (enums[j]==baseenum)enums[j]=-1;
+-			}
+-		}
+-		else continue;
+-	}
+-
+-	/*Now, go through enums, and whatever is not null is a non repeated field name: */
+-	nfields=0;
+-	for(i=0;i<maxfields;i++)if(enums[i]>0)nfields++;
+-
+-	/*Add 2 fields for time and step: */
+-	nfields=nfields+2;
+-	
+-	/*Fill the names of the structure field: */
+-	fnames=(const char**)xmalloc(nfields*sizeof(char*));
+-	count=0;
+-	for(i=0;i<maxfields;i++){
+-		if (enums[i]>0){
+-			fnames[count]=EnumToStringx(enums[i]);
+-			count++;
+-		}
+-	}
+-	/*don't forget the extra fields "time" and "step":*/
+-	fnames[nfields-2]="time";
+-	fnames[nfields-1]="step";
+-
+-	/*Initialize structure: */
+-	dataref=mxCreateStructArray( ndim,onebyone,nfields,fnames);
+-
+-	/*Fill each field: */
+-	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);
+-	}
+-
+-	/*Now, process the patch in the dataref structure, by calling MatlabProcessPatch.m 
+-	 *on the current dataref structure: */
+-	mexCallMATLAB(1,&processeddataref,1,&dataref, "MatlabProcessPatch");
+-
+-	/*Assign output pointers:*/
+-	*pdataref=processeddataref;
+-}
+-#else 
+ void Results::Write(Parameters* parameters){
+ 	
+ 	int         i;
+@@ -166,5 +82,4 @@
+ 	}
+ 
+ }
+-#endif
+ /*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Results.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Results.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Results.h	(revision 12011)
+@@ -25,11 +25,7 @@
+ 		/*}}}*/
+ 		/*numerics: {{{1*/
+ 		Results* SpawnTriaResults(int* indices);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void Write(mxArray** pdataref);
+-		#else 
+ 		void Write(Parameters* parameters);
+-		#endif
+ 		/*}}}*/
+ };
+ #endif //ifndef _RESULTS_H_
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/macros.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/macros.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/macros.h	(revision 12011)
+@@ -47,20 +47,6 @@
+  * will be trapped. Really nifty!*/
+ 
+ #ifdef _SERIAL_
+-#ifdef _HAVE_MATLAB_ //{{{2
+-#define MODULEBOOT(); ModuleBoot(); \
+-	try{
+-
+-#define MODULEEND(); ModuleEnd(); }\
+-	catch(ErrorException &exception){\
+-		exception.Report(); \
+-		mexErrMsgTxt(""); \
+-	}\
+-	catch (exception& e) {\
+-		_printf_(true,"Standard exception: %s\n",e.what());\
+-		mexErrMsgTxt(" ");\
+-	}
+-#endif //}}}
+ #ifdef _HAVE_PYTHON_ //{{{2
+ #define MODULEBOOT(); ModuleBoot();  \
+ 	PyObject* output = PyTuple_New(NLHS); if (!output) return NULL;
+@@ -86,9 +72,6 @@
+ #endif
+ /*}}}*/
+ /* WRAPPER {{{1*/
+-#ifdef _HAVE_MATLAB_
+-#define WRAPPER(modulename,...) void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) 
+-#endif
+ #ifdef _HAVE_PYTHON_
+ #define WRAPPER(modulename,...)  \
+ \
+@@ -119,13 +102,9 @@
+ 
+ /*}}}*/
+ /* CHECKARGUMENTS {{{1*/
+-#ifdef _HAVE_MATLAB_
+-#define CHECKARGUMENTS(NLHS,NRHS,functionpointer) CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,functionpointer)
+-#endif
+ #ifdef _HAVE_PYTHON_
+ #define CHECKARGUMENTS(NLHS,NRHS,functionpointer) CheckNumPythonArguments(args, NRHS,functionpointer)
+ #endif
+ /*}}}*/
+ 
+-
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/types.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/types.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/types.h	(revision 12011)
+@@ -15,14 +15,6 @@
+ #include <stdio.h>
+ 
+ /*Define abstract type for I/O: */
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-typedef const mxArray* ConstDataHandle;  //serially, we are reading data from a matlab array.
+-typedef mxArray* DataHandle;  
+-#else 
+-typedef FILE* ConstDataHandle; //in parallel, we are reading data from a file.
+-typedef FILE* DataHandle; 
+-#endif
+ enum param_type { STRING, INTEGER, STRINGARRAY, DOUBLE, DOUBLEVEC, DOUBLEMAT, PETSCVEC, PETSCMAT };
+ 
+ /*here are our abstracted types: inspired on petsc */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/OptFunc.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/OptFunc.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/OptFunc.cpp	(revision 12011)
+@@ -1,41 +0,0 @@
+-/*!\file:  OptFunc.cpp
+- * \brief: "C" code wrapper to matlab objectivefunctionC call
+- */ 
+-
+-#ifdef HAVE_CONFIG_H
+-	#include <config.h>
+-#else
+-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+-#endif
+-
+-#include "../../objects/objects.h"
+-#include "../../shared/shared.h"
+-#include "../../include/include.h"
+-
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include "mex.h"
+-double OptFunc(double scalar, OptArgs* optargs){
+-	
+-	/*output: */
+-	double J;
+-
+-	mxArray*   inputs[2];
+-	mxArray*   psearch_scalar=NULL;
+-	mxArray*   mxJ=NULL;
+-
+-	psearch_scalar=mxCreateDoubleScalar(scalar);
+-	inputs[0]=psearch_scalar;
+-	inputs[1]=optargs->femmodel;
+-
+-	mexCallMATLAB(1,&mxJ,2,(mxArray**)inputs, optargs->function_name);
+-
+-	/*extract misfit from mxArray*/
+-	J=mxGetScalar(mxJ);
+-
+-	return J;
+-}
+-#else
+-double OptFunc(double scalar, OptArgs* optargs){
+-	_error_(" not implemented yet");
+-}
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/Verbosity.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/Verbosity.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/Verbosity.cpp	(revision 12011)
+@@ -38,37 +38,13 @@
+ 
+ 	if(level<0) _error_("vebosity level should be a positive integer (user provided %i)",level);
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-
+-	mxArray* output=NULL;
+-	mxArray* input=NULL;
+-	input=mxCreateDoubleScalar((double)level);
+-
+-	mexCallMATLAB(0,&output,1,&input,"SetVerbosityLevel");
+-#else
+-
+ 	verbositylevel = level;
+ 
+-#endif
+ }/*}}}*/
+ /*FUNCTION GetVerbosityLevel {{{*/
+ int  GetVerbosityLevel(void){
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+ 
+-	mxArray* output=NULL;
+-	mxArray* input=NULL;
+-	double   level;
+-
+-	mexCallMATLAB(1,&output,0,&input,"GetVerbosityLevel");
+-	level=mxGetScalar(output);
+-
+-	verbositylevel = (int)level;
+-	return verbositylevel;
+-
+-#else
+-
+ 	_assert_(verbositylevel>=0);
+ 	return verbositylevel;
+ 
+-#endif
+ }/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/alloc_module.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/alloc_module.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/alloc_module.cpp	(revision 12011)
+@@ -0,0 +1,41 @@
++/* \file alloc_module.h
++ */
++
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile without HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include <stdio.h>
++#include <stdlib.h>
++
++#include  "./allocmodule.h"
++#include "../Exceptions/exceptions.h"
++#include "../../include/include.h"
++#include "../../objects/objects.h"
++
++void xdelete_module(Matrix** pv){
++	
++	if (pv && *pv){
++		/*Actually, still get rid of internal Petsc matrix. Quick fix until Matlab handles C++ 
++		 * correctly: */
++		#ifdef _HAVE_PETSC_
++			MatFree(&(*pv)->matrix);
++		#endif
++		*pv=NULL;
++	}
++}
++
++void xdelete_module(Vector** pv){
++
++	if (pv && *pv){
++		/*Actually, still get rid of internal Petsc vector. Quick fix until Matlab handles C++ 
++		 * correctly: */
++		#ifdef _HAVE_PETSC_
++			VecFree(&(*pv)->vector);
++		#endif
++		*pv=NULL;
++	}
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/alloc_module.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/alloc_module.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/alloc_module.h	(revision 12011)
+@@ -0,0 +1,11 @@
++/* \file alloc.h
++ */
++
++#ifndef _ALLOC_MODULE_H_
++#define _ALLOC_MODULE_H_
++class Matrix;
++class Vector;
++void xdelete_module(Matrix** pvptr);
++void xdelete_module(Vector** pvptr);
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/alloc.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/alloc.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/alloc.cpp	(revision 12011)
+@@ -18,10 +18,6 @@
+ #error "Cannot compile without HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_SERIAL_) && defined(_HAVE_MATLAB_)
+-#include "mex.h"
+-#endif
+-
+ #include <stdio.h>
+ #include <stdlib.h>
+ 
+@@ -36,13 +32,8 @@
+ 
+ 	if(!size)_error_(" attempting to 0 size allocation!");
+ 
+-	#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-	/* Use the matlab api to do the allocation: */
+-	memptr=mxMalloc(size);
+-	#else
+ 	/* Use the c library to do the allocation: */
+ 	memptr=malloc(size);
+-	#endif
+ 	if(!memptr) _error_("memory allocation failed!");
+ 
+ 	return memptr;
+@@ -54,13 +45,8 @@
+ 	
+ 	if(!size)_error_("attempting to 0 size allocation!");
+ 
+-	#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-	/* Use the matlab api to do the allocation: */
+-	memptr=mxCalloc(n,size);
+-	#else
+ 	/* Use the c library to do the allocation: */
+ 	memptr=calloc(n,size);
+-	#endif
+ 	if(!memptr) _error_("memory allocation failed!");
+ 
+ 	return memptr;
+@@ -69,11 +55,7 @@
+ void xfree(void* *pv){
+ 
+ 	if (pv && *pv){
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-			mxFree(*pv);
+-		#else
+-			free(*pv);
+-		#endif
++		free(*pv);
+ 
+ 		*pv=NULL;
+ 	}
+@@ -82,18 +64,10 @@
+ void xdelete(Matrix** pv){
+ 	
+ 	if (pv && *pv){
+-		#ifdef _PARALLEL_ 
+ 		/*There is no mxDelete in the Matlab API -> using delete trips up Matlab. So we 
+ 		 * don't actually free memory in Matlab, we let the memory manager do that. We only
+ 		 * free in parallel: */
+ 		delete *pv;
+-		#else
+-		/*Actually, still get rid of internal Petsc matrix. Quick fix until Matlab handles C++ 
+-		 * correctly: */
+-		#ifdef _HAVE_PETSC_
+-			MatFree(&(*pv)->matrix);
+-		#endif
+-		#endif
+ 		*pv=NULL;
+ 	}
+ }
+@@ -101,18 +75,10 @@
+ void xdelete(Vector** pv){
+ 
+ 	if (pv && *pv){
+-		#ifdef _PARALLEL_ 
+ 		/*There is no mxDelete in the Matlab API -> using delete trips up Matlab. So we 
+ 		 * don't actually free memory in Matlab, we let the memory manager do that. We only
+ 		 * free in parallel: */
+ 		delete *pv;
+-		#else
+-		/*Actually, still get rid of internal Petsc vector. Quick fix until Matlab handles C++ 
+-		 * correctly: */
+-		#ifdef _HAVE_PETSC_
+-			VecFree(&(*pv)->vector);
+-		#endif
+-		#endif
+ 		*pv=NULL;
+ 	}
+ }
+@@ -123,12 +89,7 @@
+ 	register void* value=NULL;
+ 	
+ 	if(!size)_error_("attempting to realloc to zero");
+-
+-	#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-	value = (void*)mxRealloc(pv,size);
+-	#else
+ 	value = (void*)realloc(pv,size);
+-	#endif
+ 
+ 	if (value == NULL) {
+ 		_error_("virtual memory exhausted");
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/SpawnCoreSerial.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/SpawnCoreSerial.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/SpawnCoreSerial.cpp	(revision 12011)
+@@ -1,71 +0,0 @@
+-/*!\file:  SpawnCoreSerial.cpp
+- * \brief: run core ISSM solution using Dakota inputs. Call the Serial core solution, using mexCallMATLAB
+- * \sa SpawnCore.cpp SpawnCoreParallel.cpp
+- *
+- */ 
+-
+-#ifdef HAVE_CONFIG_H
+-	#include <config.h>
+-#else
+-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+-#endif
+-
+-#include "../../objects/objects.h"
+-#include "../../io/io.h"
+-#include "../../EnumDefinitions/EnumDefinitions.h"
+-#include "../../shared/shared.h"
+-#include "./Dakotax.h"
+-#include "../../include/include.h"
+-
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void SpawnCoreSerial(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, mxArray* femmodel, int counter){
+-
+-	int i;
+-
+-	//inputs to matlab routine
+-	mxArray* mxvariables=NULL;
+-	double*  variables_copy=NULL;
+-	mxArray* mxvariabledescriptors=NULL;
+-	mxArray* mxcounter=NULL;
+-	mwSize   dims[2]={0};
+-
+-	//mexCallMATLAB arrays
+-	mxArray* array[4];
+-
+-	//output from SpawnCore in matlab routine.
+-	mxArray* mxresponses=NULL;
+-
+-	/*Create variables and variable descriptors mxArrays that we will feed to the core solution for update of the inputs: */
+-	mxvariables=mxCreateDoubleMatrix(numvariables,1,mxREAL);
+-	variables_copy=(double*)xmalloc(numvariables*sizeof(double));
+-	memcpy(variables_copy,variables,numvariables*sizeof(double));
+-	mxSetPr(mxvariables,variables_copy);
+-
+-	dims[0]=numvariables;
+-	dims[1]=1;
+-	mxvariabledescriptors=mxCreateCellArray(2,dims);
+-	for(i=0;i<numvariables;i++){
+-		mxSetCell(mxvariabledescriptors,i,mxCreateString(variables_descriptors[i]));
+-	}
+-
+-	mxcounter=mxCreateDoubleScalar((double)counter);
+-
+-	//call SpwanCore matlab routine.
+-	array[0]=femmodel;
+-	array[1]=mxvariables;
+-	array[2]=mxvariabledescriptors;
+-	array[3]=mxcounter;
+-
+-	mexCallMATLAB(1,&mxresponses,4,array,"SpawnCore");
+-
+-	/*copy responses back to dakota: */
+-	memcpy(responses,mxGetPr(mxresponses),numresponses*sizeof(double));
+-
+-	//destroy constructed arrays: 
+-	mxDestroyArray(mxvariables);
+-	mxDestroyArray(mxvariabledescriptors);
+-	mxDestroyArray(mxresponses);
+-	mxDestroyArray(mxcounter);
+-
+-}
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/Dakotax.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/Dakotax.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/Dakotax.h	(revision 12011)
+@@ -9,16 +9,11 @@
+ #include "../../objects/objects.h"
+ 
+ /* local prototypes: */
+-int SpawnCore(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, void* femmodel,int counter);
++int  SpawnCore(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, void* femmodel,int counter);
+ int  DescriptorIndex(char* root, int* pindex,char* descriptor);
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void Dakotax(mxArray* femmodel);
+-void SpawnCoreSerial(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, mxArray* femmodel,int counter);
+-#else
+ void Dakotax(FemModel* femmodel);
+ void SpawnCoreParallel(double* responses, int numresponses, double* variables, char** variables_descriptors,int numvariables, FemModel* femmodel,int counter);
+-#endif
+ void DakotaResponses(double* responses,char** responses_descriptors,int numresponses,FemModel* femmodel);
+ void DakotaMPI_Bcast(double** pvariables, char*** pvariables_descriptors,int* pnumvariables, int* pnumresponses);
+ void DakotaFree(double** pvariables,char*** pvariables_descriptors,char*** presponses_descriptors,int numvariables,int numresponses);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/SpawnCore.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/SpawnCore.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/SpawnCore.cpp	(revision 12011)
+@@ -20,13 +20,10 @@
+ 
+ 	/*Branch into a serial SpawnCore and a parallel SpawnCore: */
+ 
+-	#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		SpawnCoreSerial(responses, numresponses, variables, variables_descriptors,numvariables, (mxArray*)femmodel, counter);
+-	#else
+-		/*Call SpawnCoreParallel unless counter=-1 on cpu0, in which case, bail out and return 0: */
+-		MPI_Bcast(&counter,1,MPI_INT,0,MPI_COMM_WORLD); 
+-		if(counter==-1)return 0;
+-		SpawnCoreParallel(responses, numresponses, variables, variables_descriptors,numvariables, (FemModel*)femmodel,counter);
+-	#endif
++	/*Call SpawnCoreParallel unless counter=-1 on cpu0, in which case, bail out and return 0: */
++	MPI_Bcast(&counter,1,MPI_INT,0,MPI_COMM_WORLD); 
++	if(counter==-1)return 0;
++
++	SpawnCoreParallel(responses, numresponses, variables, variables_descriptors,numvariables, (FemModel*)femmodel,counter);
+ 	return 1;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/Dakotax.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/Dakotax.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/Dakotax.cpp	(revision 12011)
+@@ -50,11 +50,7 @@
+ 
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void Dakotax(mxArray* femmodel){ 
+-#else
+ void Dakotax(FemModel* femmodel){ 
+-#endif
+ 
+ 
+ 	#ifdef _HAVE_DAKOTA_ //only works if dakota library has been compiled in.
+@@ -68,11 +64,7 @@
+ 	Parameters* parameters                = NULL;
+ 
+ 	/*Retrieve parameters: */
+-	#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-	FetchData((Parameters**)&parameters,mxGetField((mxArray*)femmodel,0,"parameters"));
+-	#else
+ 	parameters=femmodel->parameters;
+-	#endif
+ 
+ 	/*Recover dakota_input_file, dakota_output_file and dakota_error_file, in the parameters dataset in parallel */
+ 	parameters->FindParam(&dakota_input_file,QmuInNameEnum);
+@@ -85,11 +77,7 @@
+ 	
+ 		// Instantiate/initialize the parallel library and problem description
+ 		// database objects.
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-			Dakota::ParallelLibrary parallel_lib; //use Dakota's standard library mode constructor
+-		#else
+-			Dakota::ParallelLibrary parallel_lib("serial"); //use our own ISSM Dakota library mode constructor, which only fires up Dakota on CPU 0. 
+-		#endif
++		Dakota::ParallelLibrary parallel_lib("serial"); //use our own ISSM Dakota library mode constructor, which only fires up Dakota on CPU 0. 
+ 		Dakota::ProblemDescDB problem_db(parallel_lib); 
+ 
+ 		// Manage input file parsing, output redirection, and restart processing
+@@ -142,9 +130,5 @@
+ 	xfree((void**)&dakota_error_file);
+ 	xfree((void**)&dakota_output_file);
+ 
+-	#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-	delete parameters;
+-	#endif
+-
+ 	#endif //#ifdef _HAVE_DAKOTA_
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.h	(revision 12011)
+@@ -13,12 +13,7 @@
+ 
+ #include "../../Container/Container.h"
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-void OutputResultsx(mxArray** pdataref, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads,  Materials* materials, Parameters* parameters, Results* results);
+-#else
+ void OutputResultsx(Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads,  Materials* materials, Parameters* parameters, Results* results);
+-#endif
+ 
+ #endif  /* _OUTPUTRESULTS_H */
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/OutputResultsx/OutputResultsx.cpp	(revision 12011)
+@@ -15,11 +15,7 @@
+ #include "../../io/io.h"
+ #include "../../objects/objects.h"
+ 		
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void OutputResultsx(mxArray** pdataref, Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results* results){
+-#else 
+ void OutputResultsx(                    Elements* elements, Nodes* nodes, Vertices* vertices, Loads* loads, Materials* materials, Parameters* parameters,Results* results){
+-#endif
+ 
+ 	extern int  my_rank;
+ 	FILE       *fid                     = NULL;
+@@ -30,21 +26,11 @@
+ 	char*       solutiontypestring      = NULL;
+ 	bool        dakota_analysis         = false;
+ 	
+-	#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-	const char **fnames      = NULL;
+-	mwSize       onebyone[2] = {0,0};
+-	mwSize       ndim        = 2;
+-	int          nfields=0;
+-	#endif
+-
+ 	/*retrieve parameters: */
+ 	parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum);
+ 
+ 	if(dakota_analysis){
+ 		//no need to output anything, Dakota analysis has different outputs
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		*pdataref=mxCreateStructArray( ndim,onebyone,nfields,fnames);
+-		#endif
+ 		return; 
+ 	}
+ 
+@@ -55,7 +41,6 @@
+ 
+ 	/*Results do not include the type of solution being run	. In parallel, we output results to a filename, 
+ 	 *therefore, we need to include the solutiontype into the filename: */
+-	#ifdef _PARALLEL_
+ 	if(my_rank==0){
+ 		parameters->FindParam(&solutiontype,SolutionTypeEnum);
+ 		EnumToStringx(&solutiontypestring,solutiontype);
+@@ -87,27 +72,20 @@
+ 		/*Add file pointer in parameters for further calls to OutputResultsx: */
+ 		parameters->SetParam(fid,OutputFilePointerEnum);
+ 	}
+-	#endif
+ 
+-	/*Write results to disk (in parallel), or to memory (in serial mode): */
+-	#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		results->Write(pdataref);
+-	#else
+-		results->Write(parameters);
+-	#endif
++	/*Write results to disk: */
++	results->Write(parameters);
+ 
+ 	/*Delete and reinitialize results, in parallel: */
+-	#ifdef _PARALLEL_
+-		results->clear();
++	results->clear();
+ 
+-		/*Close output file? :*/
+-		/*WARNING: issm.cpp is taking care of it for now (quick fix)
+-		if((step==1) && (time==0)){
+-			if(io_gather){
+-				if(my_rank==0) pfclose(fid,outputfilename);
+-			}
+-			else pfclose(fid,cpu_outputfilename);
+-		}
+-		*/
+-	#endif
++	/*Close output file? :*/
++	/*WARNING: issm.cpp is taking care of it for now (quick fix)
++	  if((step==1) && (time==0)){
++	  if(io_gather){
++	  if(my_rank==0) pfclose(fid,outputfilename);
++	  }
++	  else pfclose(fid,cpu_outputfilename);
++	  }
++	*/
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqMat.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqMat.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqMat.h	(revision 12011)
+@@ -39,9 +39,6 @@
+ 		/*}}}*/
+ 		/*SeqMat specific routines {{{1*/
+ 		void Echo(void);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		mxArray* ToMatlabMatrix(void);
+-		#endif
+ 		void Assemble(void);
+ 		double Norm(NormMode norm_type);
+ 		void GetSize(int* pM,int* pN);
+@@ -55,9 +52,4 @@
+ 
+ };
+ 		
+-/*API :*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-SeqMat*  MatlabMatrixToSeqMat(const mxArray* dataref);
+-#endif
+-
+ #endif //#ifndef _SEQMAT_H_
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqVec.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqVec.cpp	(revision 12011)
+@@ -65,44 +65,6 @@
+ }
+ /*}}}*/
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-/*FUNCTION SeqVec::ToMatlabVector{{{1*/
+-mxArray* SeqVec::ToMatlabVector(void){
+-
+-	double* buffer=NULL;
+-	
+-	mxArray* dataref=NULL;
+-
+-	/*copy vector into a new buffer: */
+-	if(this->M){
+-		buffer=(double*)xmalloc(this->M*sizeof(double));
+-		memcpy(buffer,vector,M*sizeof(double));
+-
+-		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+-		mxSetM(dataref,this->M);
+-		mxSetN(dataref,1);
+-		mxSetPr(dataref,buffer);	
+-	}
+-	else dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+-
+-
+-	/*do not erase buffer!: */
+-	return dataref;
+-
+-}
+-/*}}}*/
+-/*FUNCTION MatlabVectorToSeqVec{{{1*/
+-SeqVec* MatlabVectorToSeqVec(const mxArray* dataref){
+-
+-	SeqVec* output=NULL;
+-
+-	output=new SeqVec();
+-	MatlabVectorToDoubleVector(&output->vector,&output->M,dataref);
+-	return output;
+-
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION SeqVec::Assemble{{{1*/
+ void SeqVec::Assemble(void){
+ 		
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqMat.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqMat.cpp	(revision 12011)
+@@ -91,54 +91,6 @@
+ 	}
+ }
+ /*}}}*/
+-
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-/*FUNCTION SeqMat::ToMatlabMatrix{{{1*/
+-mxArray* SeqMat::ToMatlabMatrix(void){
+-
+-	/*Intermediary: */
+-	double* buffer=NULL;
+-	mxArray* pfield=NULL;
+-	
+-	/*output: */
+-	mxArray* dataref=NULL;
+-
+-	/*copy vector into a new buffer: */
+-	if(this->M*this->N){
+-		buffer=(double*)xmalloc(this->M*this->N*sizeof(double));
+-		memcpy(buffer,this->matrix,M*N*sizeof(double));
+-
+-		pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+-		mxSetM(pfield,this->N);
+-		mxSetN(pfield,this->M);
+-		mxSetPr(pfield,buffer);
+-		
+-		//transpose the matrix, written directly to matlab! from C to matlab.
+-		mexCallMATLAB(1,&dataref, 1, &pfield, "transpose");
+-	}
+-	else dataref=mxCreateDoubleMatrix(0,0,mxREAL);
+-
+-	/*do not erase buffer!: */
+-	return dataref;
+-
+-}
+-
+-
+-	
+-	
+-/*}}}*/
+-/*FUNCTION MatlabMatrixToSeqMat{{{1*/
+-SeqMat* MatlabMatrixToSeqMat(const mxArray* dataref){
+-
+-	SeqMat* output=NULL;
+-
+-	output=new SeqMat();
+-	MatlabMatrixToDoubleMatrix(&output->matrix,&output->M,&output->N,dataref);
+-	return output;
+-
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION SeqMat::Assemble{{{1*/
+ void SeqMat::Assemble(void){
+ 		
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqVec.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqVec.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqVec.h	(revision 12011)
+@@ -36,9 +36,6 @@
+ 		/*}}}*/
+ 		/*SeqVec specific routines {{{1*/
+ 		void Echo(void);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		mxArray* ToMatlabVector(void);
+-		#endif
+ 		void Assemble(void);
+ 		void SetValues(int ssize, int* list, double* values, InsMode mode);
+ 		void SetValue(int dof, double value, InsMode  mode);
+@@ -58,10 +55,4 @@
+ 		/*}}}*/
+ };
+ 
+-
+-/*API :*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-SeqVec*  MatlabVectorToSeqVec(const mxArray* dataref);
+-#endif
+-
+ #endif //#ifndef _SEQVEC_H_
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12011)
+@@ -3,20 +3,13 @@
+ EXEEXT=$(ISSMEXT)
+ 
+ #Library declaration {{{1
+-#Compile serial library, and then try and compile parallel library
+-if NOSERIAL
+-if NOPARALLEL
+-lib_LIBRARIES = 
+-else
+-lib_LIBRARIES = libpISSM.a libOverload.a
++lib_LIBRARIES = libISSMCore.a libISSMModules.a libISSMOverload.a
++if PYTHON
++lib_LIBRARIES += libISSMPython.a 
+ endif
+-else
+-if NOPARALLEL
+-lib_LIBRARIES = libISSM.a libOverload.a
+-else
+-lib_LIBRARIES = libISSM.a libpISSM.a libOverload.a
++if MATLAB
++lib_LIBRARIES += libISSMMatlab.a 
+ endif
+-endif
+ #}}}
+ 
+ #sources
+@@ -361,8 +354,8 @@
+ 					  ./modules/Dakotax/DescriptorIndex.cpp\
+ 					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\
+ 					  ./modules/ModelProcessorx/Dakota/CreateParametersDakota.cpp\
+-					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h
+-dakota_psources= ./modules/Dakotax/SpawnCoreParallel.cpp
++					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h\
++					  ./modules/Dakotax/SpawnCoreParallel.cpp
+ #}}}
+ #Transient sources  {{{1
+ transient_sources  = ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp
+@@ -442,8 +435,7 @@
+ 					  ./objects/Inputs/ControlInput.h\
+ 					  ./objects/Inputs/ControlInput.cpp\
+ 					  ./shared/Numerics/BrentSearch.cpp\
+-					  ./shared/Numerics/OptimalSearch.cpp\
+-					  ./shared/Numerics/OptFunc.cpp
++					  ./shared/Numerics/OptimalSearch.cpp
+ 
+ control_psources=./solutions/control_core.cpp\
+ 					  ./solutions/controltao_core.cpp\
+@@ -693,34 +685,11 @@
+ 			     ./objects/KML/KMLFileReadUtils.cpp\
+ 			     ./objects/KML/KMLFileReadUtils.h
+ #}}}
+-#Matlab sources  {{{1
+-matlab_sources= ./toolkits/matlab/matlabincludes.h\
+-				    ./toolkits/matlab/MatlabNArrayToNArray.cpp\
+-				    ./toolkits/double/MatlabVectorToDoubleVector.cpp\
+-				    ./toolkits/double/double.h\
+-				    ./toolkits/double/MatlabMatrixToDoubleMatrix.cpp\
+-				    ./io/Matlab/matlabio.h\
+-				    ./io/Matlab/CheckNumMatlabArguments.cpp\
+-				    ./io/Matlab/mxGetAssignedField.cpp\
+-				    ./io/Matlab/WriteMatlabData.cpp\
+-				    ./io/Matlab/FetchMatlabData.cpp\
+-				    ./io/Matlab/OptionParse.cpp
+-#}}}
+-#Python sources  {{{1
+-python_sources=     ./io/Python/pythonio.h\
+-				    ./io/Python/WritePythonData.cpp\
+-				    ./io/Python/CheckNumPythonArguments.cpp\
+-				    ./io/Python/FetchPythonData.cpp
+-#}}}
+ #Petsc sources  {{{1
+ petsc_sources= ./toolkits/petsc\
+ 					./toolkits/petsc/patches\
+ 					./toolkits/petsc/patches/SolverEnum.h\
+ 					./toolkits/petsc/patches/petscpatches.h\
+-					./toolkits/petsc/patches/MatlabMatrixToPetscMatrix.cpp\
+-					./toolkits/petsc/patches/MatlabVectorToPetscVector.cpp\
+-					./toolkits/petsc/patches/PetscMatrixToMatlabMatrix.cpp\
+-					./toolkits/petsc/patches/PetscVectorToMatlabVector.cpp\
+ 					./toolkits/petsc/patches/VecTranspose.cpp\
+ 					./toolkits/petsc/patches/VecToMPISerial.cpp\
+ 					./toolkits/petsc/patches/MatToSerial.cpp\
+@@ -753,8 +722,48 @@
+ gsl_sources= ./modules/Solverx/SolverxGsl.cpp
+ 
+ #}}}
+-#Serialsources  {{{1
+-serial_sources= ./objects/Options/Option.cpp\
++#Python sources  {{{1
++python_sources=     ./python/io/pythonio.h\
++				    ./python/io/WritePythonData.cpp\
++				    ./python/io/CheckNumPythonArguments.cpp\
++				    ./python/io/FetchPythonData.cpp\
++					./python/objects/Bamg/BamgGeom.h\
++					./python/objects/Bamg/BamgGeom.cpp\
++					./python/objects/Bamg/BamgMesh.h\
++					./python/objects/Bamg/BamgMesh.cpp\
++					./python/objects/Bamg/BamgOpts.h\
++					./python/objects/Bamg/BamgOpts.cpp
++
++#}}}
++#Matlab sources  {{{1
++matlab_sources= ./toolkits/matlab/matlabincludes.h\
++				    ./matlab/io/matlabio.h\
++				    ./matlab/io/MatlabNArrayToNArray.cpp\
++				    ./matlab/io/CheckNumMatlabArguments.cpp\
++				    ./matlab/io/mxGetAssignedField.cpp\
++				    ./matlab/io/WriteMatlabData.cpp\
++				    ./matlab/io/FetchMatlabData.cpp\
++				    ./matlab/io/OptionParse.cpp\
++				    ./matlab/io/MatlabMatrixToMatrix.cpp\
++				    ./matlab/io/MatlabVectorToVector.cpp\
++					./matlab/io/MatlabVectorToDoubleVector.cpp\
++				    ./matlab/io/MatlabMatrixToDoubleMatrix.cpp\
++					./matlab/io/Container/Options.cpp\
++					./matlab/objects/Bamg/BamgGeom.h\
++					./matlab/objects/Bamg/BamgGeom.cpp\
++					./matlab/objects/Bamg/BamgMesh.h\
++					./matlab/objects/Bamg/BamgMesh.cpp\
++					./matlab/objects/Bamg/BamgOpts.h\
++					./matlab/objects/Bamg/BamgOpts.cpp\
++					./matlab/io/MatlabMatrixToPetscMatrix.cpp\
++					./matlab/io/MatlabVectorToPetscVector.cpp\
++					./matlab/io/PetscMatrixToDoubleMatrix.cpp\
++					./matlab/io/PetscVectorToDoubleVector.cpp\
++					./matlab/io/MatlabMatrixToSeqMat.cpp\
++					./matlab/io/MatlabVectorToSeqVec.cpp
++#}}}
++#Modules sources{{{1
++module_sources= ./objects/Options/Option.cpp\
+ 			./objects/Options/Option.h\
+ 			./objects/Options/OptionDouble.cpp\
+ 			./objects/Options/OptionDouble.h\
+@@ -768,6 +777,8 @@
+ 			./objects/Options/OptionCell.h\
+ 			./objects/Options/OptionUtilities.cpp\
+ 			./objects/Options/OptionUtilities.h\
++			./shared/Alloc/alloc_module.h\
++			./shared/Alloc/alloc_module.cpp\
+ 			./shared/Threads/issm_threads.h\
+ 			./shared/Threads/LaunchThread.cpp\
+ 			./shared/Threads/PartitionRange.cpp\
+@@ -789,7 +800,6 @@
+ 			./modules/Chacox/input_parse.cpp\
+ 			./modules/Chacox/chaco_seconds.cpp\
+ 			./modules/Chacox/user_params.cpp\
+-			./modules/Dakotax/SpawnCoreSerial.cpp\
+ 			./modules/TriaSearchx/TriaSearchx.h\
+ 			./modules/TriaSearchx/TriaSearchx.cpp\
+ 			./modules/TriMeshx/TriMeshx.h\
+@@ -840,69 +850,57 @@
+ 			./modules/PropagateFlagsFromConnectivityx/PropagateFlagsFromConnectivityx.h
+ #}}}
+ 
++#{{{1 Conditional build-up of sources
+ #ISSM sources are a combination of core sources and sources related to specific capabilities (which can 
+ #be activated by autotools conditionals 
+-#{{{1
+ 
++
+ #First the core
+ issm_sources  =  $(core_sources)
+-issm_psources =  
+ 
+ #Now the optional source
+ if DAKOTA
+ issm_sources  +=  $(dakota_sources)
+-issm_psources +=  $(dakota_psources)
+ endif
+ 
+ if PETSC
+ issm_sources  +=  $(petsc_sources)
+-issm_psources +=  $(petsc_psources)
+ endif
+ 
+ if GSL
+ issm_sources  +=  $(gsl_sources)
+-issm_psources +=  $(gsl_psources)
+ endif
+ 
+-
+ if TRANSIENT
+ issm_sources  +=  $(transient_sources)
+-issm_psources +=  $(transient_psources)
+ endif
+ 
+ if STEADYSTATE
+ issm_sources  +=  $(steadystate_sources)
+-issm_psources +=  $(steadystate_psources)
+ endif
+ 
+ if PROGNOSTIC
+ issm_sources  +=  $(prognostic_sources)
+-issm_psources +=  $(prognostic_psources)
+ endif
+ 
+ if THERMAL
+ issm_sources  +=  $(thermal_sources)
+-issm_psources +=  $(thermal_psources)
+ endif
+ 
+ if CONTROL
+ issm_sources  +=  $(control_sources)
+-issm_psources +=  $(control_psources)
+ endif
+ 
+ if HYDROLOGY
+ issm_sources  +=  $(hydrology_sources)
+-issm_psources +=  $(hydrology_psources)
+ endif
+ 
+ if DIAGNOSTIC
+ issm_sources  +=  $(diagnostic_sources)
+-issm_psources +=  $(diagnostic_psources)
+ endif
+ 
+ if BALANCED
+ issm_sources  +=  $(balanced_sources)
+-issm_psources +=  $(balanced_psources)
+ endif
+ 
+ if RESPONSES
+@@ -911,7 +909,6 @@
+ 
+ if SLOPE
+ issm_sources  +=  $(slope_sources)
+-issm_psources +=  $(slope_psources)
+ endif
+ 
+ if GROUNDINGLINE
+@@ -926,71 +923,61 @@
+ issm_sources +=  $(threed_sources)
+ endif
+ #}}}
++#Library flags and sources {{{1
++ALLCXXFLAGS= -fPIC -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_  $(CXXFLAGS) $(CXXOPTFLAGS) 
+ 
+-#ISSM serial library {{{1
+-if SERIAL
+-libISSM_a_SOURCES  = $(issm_sources)
+-libISSM_a_SOURCES += $(serial_sources)
+-libISSM_a_SOURCES += $(bamg_sources)
+-libISSM_a_SOURCES += $(kml_sources)
+-libISSM_a_CXXFLAGS = -fPIC -D_SERIAL_ -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_  $(CXXFLAGS) $(CXXOPTFLAGS) 
+-#libISSM_a_CXXFLAGS = -D_SERIAL_ -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER   $(CXXFLAGS) $(CXXOPTFLAGS) 
++libISSMCore_a_SOURCES  = $(issm_sources)
++libISSMCore_a_CXXFLAGS = $(ALLCXXFLAGS)
+ 
++libISSMModules_a_SOURCES = $(module_sources)
++libISSMModules_a_SOURCES += $(bamg_sources)
++libISSMModules_a_SOURCES += $(kml_sources)
++libISSMModules_a_CXXFLAGS = $(ALLCXXFLAGS)
++
+ if PYTHON
+-libISSM_a_CXXFLAGS+=  -DNPY_NO_DEPRECATED_API 
+-libISSM_a_SOURCES += $(python_sources)
++libISSMPython_a_SOURCES = $(python_sources)
++libISSMPython_a_CXXFLAGS= $(ALLCXXFLAGS)
++libISSMPython_a_CXXFLAGS+=  -DNPY_NO_DEPRECATED_API 
+ endif
+ 
+ if MATLAB
+-libISSM_a_SOURCES += $(matlab_sources)
++libISSMMatlab_a_SOURCES = $(matlab_sources)
++libISSMMatlab_a_CXXFLAGS= $(ALLCXXFLAGS)
+ endif
+ 
+-endif
+ #}}}
+-#ISSM parallel library {{{1
+-if PARALLEL
+-libpISSM_a_SOURCES  = $(issm_sources)
+-libpISSM_a_SOURCES += $(issm_psources)
+-libpISSM_a_CXXFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(CXXFLAGS) $(CXXOPTFLAGS) 
+-endif
+-#}}}
+ #Overload library, to overload any non-standard symbols. {{{1
+-libOverload_a_SOURCES = ./shared/String/stricmp.c
+-libOverload_a_CFLAGS  = -fPIC -D_PARALLEL_   -D_C_ $(COPTFLAGS) $(CFLAGS)
++libISSMOverload_a_SOURCES = ./shared/String/stricmp.c
++libISSMOverload_a_CFLAGS  = -fPIC -D_C_ $(COPTFLAGS) $(CFLAGS)
+ #}}}
+ 
+ #Executable {{{1
+-if NOPARALLEL
+-bin_PROGRAMS = 
+-else 
+ bin_PROGRAMS = issm 
+-endif
+ 
+ #Standard libraries
+-LDADD = ./libpISSM.a ./libOverload.a
++LDADD = ./libISSMCore.a ./libISSMOverload.a
+ 
+ #External packages
+ LDADD += $(PETSCLIB) $(TAOLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(OSLIBS) $(GSLLIB)
+ 
+ issm_SOURCES = solutions/issm.cpp
+-issm_CXXFLAGS= -fPIC -D_PARALLEL_ $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) 
++issm_CXXFLAGS= -fPIC $(CXXFLAGS) $(CXXOPTFLAGS) $(COPTFLAGS) 
+ #}}}
+ #Automatic differentiation: append this fold to the end of the src/c/Makefile.am to get this Makefile.am {{{
+ if ADIC2 
+-lib_LIBRARIES += libAD.a libpISSMRose.a
++lib_LIBRARIES += libAD.a libISSMRose.a
+ 
+ #ADIC2 library, for automatic differentiation 
+ #libAD_a_SOURCES = ./mini1.ad.c
+ libAD_a_SOURCES = 
+-libAD_a_CFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(COPTFLAGS)
++libAD_a_CFLAGS = -fPIC -D_C_ $(COPTFLAGS)
+ 
+ 
+-
+ #test rose preprocessing 
+ %.r2cpp.cpp : %.cpp
+ 	testTranslator -rose:o $@ -rose:skipfinalCompileStep -DHAVE_CONFIG_H -D_PARALLEL_ -D_C_ -I. -I../.. $(INCLUDES) $<
+-libpISSMRose_a_SOURCES = $(libpISSM_a_SOURCES:.cpp=.r2cpp.cpp)
+-libpISSMRose_a_CXXFLAGS= -fPIC -D_PARALLEL_ -D_C_ $(CXXOPTFLAGS)
++libISSMRose_a_SOURCES = $(libISSMCore_a_SOURCES:.cpp=.r2cpp.cpp)
++libISSMRose_a_CXXFLAGS= -fPIC -D_C_ $(CXXOPTFLAGS)
+ 
+ 
+ 
+@@ -1002,9 +989,9 @@
+ 
+ #Executable
+ bin_PROGRAMS +=  issmRose.exe
+-issmRose_exe_LDADD = ./libpISSMRose.a $(LDADD)
++issmRose_exe_LDADD = ./libISSMRose.a $(LDADD)
+ issmRose_exe_SOURCES = solutions/issm.cpp
+-issmRose_exe_CXXFLAGS= -fPIC -D_PARALLEL_  $(CXXOPTFLAGS) $(COPTFLAGS) 
++issmRose_exe_CXXFLAGS= -fPIC $(CXXOPTFLAGS) $(COPTFLAGS) 
+ LDADD +=  $(ADIC2LIB) 
+ 
+ endif #}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.h	(revision 12011)
+@@ -81,9 +81,6 @@
+ 		void  UnitConversion(int direction_enum);
+ 		
+ 		void GetParameterName(char**pname);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 		/*}}}*/
+ };
+ #endif  /* _DOUBLEVECPARAM_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.h	(revision 12011)
+@@ -81,9 +81,6 @@
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/FileParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/FileParam.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/FileParam.cpp	(revision 12011)
+@@ -100,14 +100,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION FileParam::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  FileParam::SetMatlabField(mxArray* dataref){
+-	
+-	_error_("FileParam is a pointer and cannot be converted into a matlab object");
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION FileParam::UnitConversion{{{1*/
+ void  FileParam::UnitConversion(int direction_enum){
+ 	/*do nothing, no unit conversion*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h	(revision 12011)
+@@ -83,9 +83,6 @@
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.h	(revision 12011)
+@@ -83,9 +83,6 @@
+ 		double* GetPointer(void);
+ 
+ 		void GetParameterName(char**pname);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/Param.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/Param.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/Param.h	(revision 12011)
+@@ -59,8 +59,5 @@
+ 		virtual void  SetValue(double** array, int M, int* mdim_array, int* ndim_array)=0;
+ 		virtual void  UnitConversion(int direction_enum)=0;
+ 		virtual void  GetParameterName(char**pname)=0;
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		virtual void  SetMatlabField(mxArray* dataref)=0;
+-		#endif
+ };
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/FileParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/FileParam.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/FileParam.h	(revision 12011)
+@@ -80,9 +80,6 @@
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntVecParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12011)
+@@ -184,35 +184,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION IntVecParam::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  IntVecParam::SetMatlabField(mxArray* dataref){
+-
+-	char    *name      = NULL;
+-	double  *doublevec = NULL;
+-	int     *intvec    = NULL;
+-	mxArray *pfield    = NULL;
+-
+-	this->GetParameterValue(&intvec,NULL);
+-	this->GetParameterName(&name);
+-
+-	/*cast intvec into doublevec for Matlab*/
+-	if(M){
+-		doublevec=(double*)xmalloc(M*sizeof(double));
+-		for(int i=0;i<M;i++)doublevec[i]=(double)intvec[i];
+-	}
+-	else doublevec=NULL;
+-	xfree((void**)&intvec);
+-				
+-	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pfield,M);
+-	mxSetN(pfield,1);
+-	mxSetPr(pfield,doublevec);
+-	
+-	mxSetField(dataref, 0, name, pfield);
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION IntVecParam::SetValue{{{1*/
+ void  IntVecParam::SetValue(int* intarray,int in_M){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntParam.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntParam.cpp	(revision 12011)
+@@ -133,16 +133,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION IntParam::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  IntParam::SetMatlabField(mxArray* dataref){
+-	
+-	char* name=NULL;
+-	this->GetParameterName(&name);
+-	mxSetField( dataref, 0, name,mxCreateDoubleScalar((double)value));
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION IntParam::UnitConversion{{{1*/
+ void  IntParam::UnitConversion(int direction_enum){
+ 	/*do nothing, no unit conversion*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/BoolParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/BoolParam.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/BoolParam.cpp	(revision 12011)
+@@ -133,15 +133,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION BoolParam::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  BoolParam::SetMatlabField(mxArray* dataref){
+-	char* name=NULL;
+-	this->GetParameterName(&name);
+-	mxSetField( dataref, 0, name,mxCreateDoubleScalar((double)value));
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION BoolParam::UnitConversion{{{1*/
+ void  BoolParam::UnitConversion(int direction_enum){
+ 	/*do nothing, no unit conversion*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntMatParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntMatParam.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntMatParam.cpp	(revision 12011)
+@@ -171,35 +171,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION IntMatParam::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  IntMatParam::SetMatlabField(mxArray* dataref){
+-
+-	char    *name        = NULL;
+-	double  *doublearray = NULL;
+-	int     *intarray    = NULL;
+-	mxArray *pfield      = NULL;
+-	mxArray *pfield2     = NULL;
+-
+-	this->GetParameterValue(&intarray,NULL,NULL);
+-	this->GetParameterName(&name);
+-
+-	/*cast intarray into doublearray for Matlab*/
+-	doublearray=(double*)xmalloc(M*N*sizeof(double));
+-	for(int i=0;i<M*N;i++)doublearray[i]=(double)intarray[i];
+-	xfree((void**)&intarray);
+-
+-	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pfield,M);
+-	mxSetN(pfield,N);
+-	mxSetPr(pfield,doublearray);
+-
+-	//transpose the matrix, written directly to matlab! from C to matlab.
+-	mexCallMATLAB(1,&pfield2, 1, &pfield, "transpose");
+-	mxSetField( dataref, 0, name,pfield2);
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION IntMatParam::SetValue{{{1*/
+ void  IntMatParam::SetValue(int* intarray,int in_M,int in_N){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntVecParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntVecParam.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntVecParam.h	(revision 12011)
+@@ -82,9 +82,6 @@
+ 		void  UnitConversion(int direction_enum);
+ 		
+ 		void GetParameterName(char**pname);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 		/*}}}*/
+ };
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12011)
+@@ -81,9 +81,6 @@
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/BoolParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12011)
+@@ -80,9 +80,6 @@
+ 		void  UnitConversion(int direction_enum);
+ 		
+ 		void GetParameterName(char**pname);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 		/*}}}*/
+ };
+ #endif  /* _BOOLPARAM_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntMatParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntMatParam.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntMatParam.h	(revision 12011)
+@@ -82,9 +82,6 @@
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/VectorParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/VectorParam.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/VectorParam.cpp	(revision 12011)
+@@ -187,28 +187,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION VectorParam::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  VectorParam::SetMatlabField(mxArray* dataref){
+-
+-	mxArray* pfield=NULL;
+-	char* name=NULL;
+-	double* doublevec=NULL;
+-	int M;
+-	
+-	doublevec=value->ToMPISerial();
+-	value->GetSize(&M);
+-	this->GetParameterName(&name);
+-	
+-	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pfield,M);
+-	mxSetN(pfield,1);
+-	mxSetPr(pfield,doublevec);
+-	
+-	mxSetField( dataref, 0, name, pfield);
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION VectorParam::SetValue{{{1*/
+ void  VectorParam::SetValue(Vector* vector){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/MatrixParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/MatrixParam.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/MatrixParam.cpp	(revision 12011)
+@@ -189,27 +189,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION MatrixParam::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  MatrixParam::SetMatlabField(mxArray* dataref){
+-	
+-	char* name=NULL;
+-	int   M,N;
+-	double* doublemat=NULL;
+-	mxArray* pfield=NULL;
+-
+-	doublemat=value->ToSerial();
+-	value->GetSize(&M,&N);
+-	this->GetParameterName(&name);
+-				
+-	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pfield,M);
+-	mxSetN(pfield,N);
+-	mxSetPr(pfield,doublemat);
+-	mxSetField( dataref, 0, name, pfield);
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION MatrixParam::SetValue{{{1*/
+ void  MatrixParam::SetValue(Matrix* matrix){
+ 	
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp	(revision 12011)
+@@ -235,28 +235,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION StringArrayParam::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  StringArrayParam::SetMatlabField(mxArray* dataref){
+-	
+-	int      i;
+-	char*    name=NULL;
+-	mwSize   dims[2]={0};
+-	mxArray* pfield=NULL;
+-	
+-	this->GetParameterName(&name);
+-
+-	dims[0]=this->numstrings;
+-	dims[1]=1;
+-	pfield=mxCreateCellArray(2,dims);
+-	for(i=0;i<this->numstrings;i++){
+-		char* string=value[i];
+-		mxSetCell(pfield,i,mxCreateString(string));
+-	}
+-	mxSetField( dataref, 0, name,pfield);
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION StringArrayParam::SetValue{{{1*/
+ void  StringArrayParam::SetValue(char** stringarray,int M){
+ 	
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringParam.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringParam.cpp	(revision 12011)
+@@ -163,17 +163,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION StringParam::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  StringParam::SetMatlabField(mxArray* dataref){
+-	
+-	char* name=NULL;
+-
+-	this->GetParameterName(&name);
+-	mxSetField( dataref, 0, name, mxCreateString(value));
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION StringParam::SetValue{{{1*/
+ void  StringParam::SetValue(char* string){
+ 	
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/VectorParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/VectorParam.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/VectorParam.h	(revision 12011)
+@@ -81,9 +81,6 @@
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12011)
+@@ -201,26 +201,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecParam::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  DoubleVecParam::SetMatlabField(mxArray* dataref){
+-
+-	char* name=NULL;
+-	double* doublevec=NULL;
+-	mxArray* pfield=NULL;
+-
+-	this->GetParameterValue(&doublevec,NULL);
+-	this->GetParameterName(&name);
+-				
+-	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pfield,M);
+-	mxSetN(pfield,1);
+-	mxSetPr(pfield,doublevec);
+-	
+-	mxSetField( dataref, 0, name, pfield);
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION DoubleVecParam::SetValue{{{1*/
+ void  DoubleVecParam::SetValue(double* doublearray,int in_M){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/MatrixParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/MatrixParam.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/MatrixParam.h	(revision 12011)
+@@ -81,9 +81,6 @@
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12011)
+@@ -218,16 +218,6 @@
+ #endif
+ }
+ /*}}}*/
+-/*FUNCTION DoubleParam::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  DoubleParam::SetMatlabField(mxArray* dataref){
+-
+-	char* name=NULL;
+-	this->GetParameterName(&name);
+-	mxSetField( dataref, 0, name,mxCreateDoubleScalar(value));
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION DoubleParam::UnitConversion{{{1*/
+ void  DoubleParam::UnitConversion(int direction_enum){
+ 	::UnitConversion(&this->value,1,direction_enum,this->enum_type);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringArrayParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringArrayParam.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringArrayParam.h	(revision 12011)
+@@ -83,9 +83,6 @@
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 		/*}}}*/
+ };
+ #endif  /* _STRINGARRAYPARAM_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12011)
+@@ -307,46 +307,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION StringArrayParam::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  DoubleMatArrayParam::SetMatlabField(mxArray* dataref){
+-	
+-	int      i,m,n;
+-	double*  matrix=NULL;
+-	double*  outmatrix=NULL;
+-	char*    name=NULL;
+-	mwSize   dims[2]={0};
+-	mxArray* pfield=NULL;
+-	mxArray* pfield2=NULL;
+-	mxArray* pfield3=NULL;
+-	
+-	this->GetParameterName(&name);
+-	dims[0]=this->M;
+-	dims[1]=1;
+-	pfield=mxCreateCellArray(2,dims);
+-
+-	for(i=0;i<this->M;i++){
+-		matrix=this->array[i];
+-		m=this->mdim_array[i];
+-		n=this->ndim_array[i];
+-		outmatrix=(double*)xmalloc(m*n*sizeof(double));
+-		memcpy(outmatrix,matrix,m*n*sizeof(double));
+-	
+-		pfield2=mxCreateDoubleMatrix(0,0,mxREAL);
+-		mxSetM(pfield2,n);
+-		mxSetN(pfield2,m);
+-		mxSetPr(pfield2,outmatrix);
+-
+-		//transpose the outmatrix, written directly to matlab! from C to matlab.
+-		mexCallMATLAB(1,&pfield3, 1, &pfield2, "transpose");
+-	
+-		mxSetCell(pfield,i,pfield3);
+-	}
+-	
+-	mxSetField( dataref, 0, name,pfield);
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION DoubleMatArrayParam::SetValue(double** array, int M, int* mdim_array, int* ndim_array){{{1*/
+ void  DoubleMatArrayParam::SetValue(double** in_array, int in_M, int* in_mdim_array, int* in_ndim_array){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringParam.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringParam.h	(revision 12011)
+@@ -81,9 +81,6 @@
+ 		void  UnitConversion(int direction_enum);
+ 
+ 		void GetParameterName(char**pname);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12011)
+@@ -189,29 +189,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatParam::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  DoubleMatParam::SetMatlabField(mxArray* dataref){
+-
+-	mxArray* pfield=NULL;
+-	mxArray* pfield2=NULL;
+-	double* doublemat=NULL;
+-	char* name=NULL;
+-	
+-	this->GetParameterName(&name);
+-	this->GetParameterValue(&doublemat,NULL,NULL);
+-				
+-	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pfield,N);
+-	mxSetN(pfield,M);
+-	mxSetPr(pfield,doublemat);
+-	
+-	//transpose the matrix, written directly to matlab! from C to matlab.
+-	mexCallMATLAB(1,&pfield2, 1, &pfield, "transpose");
+-	mxSetField( dataref, 0, name,pfield2);
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION DoubleMatParam::SetValue{{{1*/
+ void  DoubleMatParam::SetValue(double* doublearray,int in_M,int in_N){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Vector.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Vector.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Vector.cpp	(revision 12011)
+@@ -131,40 +131,6 @@
+ 	#endif
+ }
+ /*}}}*/
+-
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-/*FUNCTION Vector::ToMatlabVector{{{1*/
+-mxArray* Vector::ToMatlabVector(void){
+-
+-	mxArray* dataref=NULL;
+-	#ifdef _HAVE_PETSC_
+-	PetscVectorToMatlabVector(&dataref,this->vector);
+-	#else
+-	dataref=this->vector->ToMatlabVector();
+-	#endif
+-	return dataref;
+-
+-}
+-/*}}}*/
+-/*FUNCTION MatlabVectorToVector{{{1*/
+-Vector* MatlabVectorToVector(const mxArray* mxvector){
+-
+-	int dummy;
+-	Vector* vector=NULL;
+-
+-	/*allocate vector object: */
+-	vector=new Vector();
+-
+-	#ifdef _HAVE_PETSC_
+-	MatlabVectorToPetscVector(&vector->vector,&dummy,mxvector);
+-	#else
+-	vector->vector=MatlabVectorToSeqVec(mxvector);
+-	#endif
+-	
+-	return vector;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION Vector::Assemble{{{1*/
+ void Vector::Assemble(void){
+ 		
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12011)
+@@ -139,40 +139,6 @@
+ 	#endif
+ }
+ /*}}}*/
+-
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-/*FUNCTION Matrix::ToMatlabMatrix{{{1*/
+-mxArray* Matrix::ToMatlabMatrix(void){
+-
+-	mxArray* dataref=NULL;
+-	#ifdef _HAVE_PETSC_
+-	PetscMatrixToMatlabMatrix(&dataref,this->matrix);
+-	#else
+-	dataref=this->matrix->ToMatlabMatrix();
+-	#endif
+-	return dataref;
+-
+-}
+-/*}}}*/
+-/*FUNCTION MatlabMatrixToMatrix{{{1*/
+-Matrix* MatlabMatrixToMatrix(const mxArray* mxmatrix){
+-
+-	int dummy;
+-	Matrix* matrix=NULL;
+-
+-	/*allocate matrix object: */
+-	matrix=new Matrix();
+-
+-	#ifdef _HAVE_PETSC_
+-	MatlabMatrixToPetscMatrix(&matrix->matrix,NULL,NULL,mxmatrix);
+-	#else
+-	matrix->matrix=MatlabMatrixToSeqMat(mxmatrix);
+-	#endif
+-	
+-	return matrix;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION Matrix::Assemble{{{1*/
+ void Matrix::Assemble(void){
+ 	#ifdef _HAVE_PETSC_
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Vector.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Vector.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Vector.h	(revision 12011)
+@@ -53,9 +53,6 @@
+ 		/*}}}*/
+ 		/*Vector specific routines {{{1*/
+ 		void Echo(void);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		mxArray* ToMatlabVector(void);
+-		#endif
+ 		void    AXPY(Vector *X, double a);
+ 		void    AYPX(Vector *X, double a);
+ 		void    Assemble(void);
+@@ -76,9 +73,5 @@
+ 		/*}}}*/
+ };
+ 
+-/*API: */
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-Vector* MatlabVectorToVector(const mxArray* mxvector);
+-#endif
+ 
+ #endif //#ifndef _VECTOR_H_
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.h	(revision 12011)
+@@ -50,9 +50,6 @@
+ 		/*}}}*/
+ 		/*Matrix specific routines {{{1*/
+ 		void Echo(void);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		mxArray* ToMatlabMatrix(void);
+-		#endif
+ 		void Assemble(void);
+ 		double Norm(NormMode norm_type);
+ 		void GetSize(int* pM,int* pN);
+@@ -65,9 +62,5 @@
+ 		/*}}}*/
+ 
+ };
+-/*API: */
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-Matrix* MatlabMatrixToMatrix(const mxArray* mxmatrix);
+-#endif
+ 
+ #endif //#ifndef _MATRIX_H_
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12011)
+@@ -221,39 +221,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleMatExternalResult::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void DoubleMatExternalResult::SetMatlabField(mxArray* dataref){
+-
+-	mxArray* pfield=NULL;
+-	mxArray* pfield2=NULL;
+-	char* name=NULL;
+-	double* doublemat=NULL;
+-
+-	/*Make a copy of the value, to be used by matlab: */
+-	doublemat=(double*)xmalloc(M*N*sizeof(double));
+-	memcpy(doublemat,values,M*N*sizeof(double));
+-
+-	/*recover name: */
+-	this->GetResultName(&name);
+-				
+-	/*create matlab matrix: */
+-	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pfield,N);
+-	mxSetN(pfield,M);
+-	mxSetPr(pfield,doublemat);
+-	
+-	/*transpose the matrix, from c to matlab format */
+-	mexCallMATLAB(1,&pfield2, 1, &pfield, "transpose");
+-
+-	/*set tranpose matrix inside the dataref structure: */
+-	mxSetField( dataref, this->step-1, name,pfield2);
+-	mxSetField( dataref, this->step-1, "time",mxCreateDoubleScalar((double)this->time));
+-	mxSetField( dataref, this->step-1, "step",mxCreateDoubleScalar((double)this->step));
+-
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION DoubleMatExternalResult::GetStep{{{1*/
+ int DoubleMatExternalResult::GetStep(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp	(revision 12011)
+@@ -243,31 +243,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION PetscVecExternalResult::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  PetscVecExternalResult::SetMatlabField(mxArray* dataref){
+-
+-	mxArray* pfield=NULL;
+-	char* name=NULL;
+-	double* doublevec=NULL;
+-	int M;
+-	
+-	VecToMPISerial(&doublevec,value);
+-	VecGetSize(value,&M);
+-	this->GetResultName(&name);
+-	
+-	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pfield,M);
+-	mxSetN(pfield,1);
+-	mxSetPr(pfield,doublevec);
+-	
+-	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
+-/*}}}*/
+ /*FUNCTION PetscVecExternalResult::GetStep{{{1*/
+ int PetscVecExternalResult::GetStep(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h	(revision 12011)
+@@ -59,9 +59,6 @@
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  WriteData(FILE* fid,bool io_gather);
+ 		void  GetResultName(char**);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 		int   GetStep(void);
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h	(revision 12011)
+@@ -59,9 +59,6 @@
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  WriteData(FILE* fid,bool io_gather);
+ 		void  GetResultName(char**);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 		int   GetStep(void);
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h	(revision 12011)
+@@ -57,9 +57,6 @@
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  WriteData(FILE* fid,bool io_gather);
+ 		void  GetResultName(char**);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 		int   GetStep(void);
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h	(revision 12011)
+@@ -58,9 +58,6 @@
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  WriteData(FILE* fid,bool io_gather);
+ 		void  GetResultName(char**);
+-	    #if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 		int   GetStep(void);
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h	(revision 12011)
+@@ -60,9 +60,6 @@
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  WriteData(FILE* fid,bool io_gather);
+ 		void  GetResultName(char**);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 		int   GetStep(void);
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h	(revision 12011)
+@@ -59,9 +59,6 @@
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  WriteData(FILE* fid,bool io_gather);
+ 		void  GetResultName(char**);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 		int   GetStep(void);
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/ExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/ExternalResult.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/ExternalResult.h	(revision 12011)
+@@ -32,9 +32,6 @@
+ 		virtual int   InstanceEnum()=0;
+ 		virtual void  WriteData(FILE* fid,bool io_gather)=0;
+ 		virtual void  GetResultName(char**)=0;
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		virtual void  SetMatlabField(mxArray* dataref)=0;
+-		#endif
+ 		virtual int   GetStep(void)=0;
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp	(revision 12011)
+@@ -196,21 +196,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION StringExternalResult::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void  StringExternalResult::SetMatlabField(mxArray* dataref){
+-	
+-	char* name=NULL;
+-
+-	this->GetResultName(&name);
+-
+-	mxSetField( dataref, this->step-1, name, mxCreateString(value));
+-	mxSetField( dataref, this->step-1, "time",mxCreateDoubleScalar((double)this->time)); 
+-	mxSetField( dataref, this->step-1, "step",mxCreateDoubleScalar((double)this->step)); 
+-
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION StringExternalResult::GetStep{{{1*/
+ int StringExternalResult::GetStep(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12011)
+@@ -205,34 +205,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleVecExternalResult::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void DoubleVecExternalResult::SetMatlabField(mxArray* dataref){
+-
+-	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));
+-	memcpy(doublevec,values,M*sizeof(double));
+-
+-	/*recover name: */
+-	this->GetResultName(&name);
+-				
+-	/*create matlab matrix: */
+-	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pfield,M);
+-	mxSetN(pfield,1);
+-	mxSetPr(pfield,doublevec);
+-
+-	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
+-/*}}}*/
+ /*FUNCTION DoubleVecExternalResult::GetStep{{{1*/
+ int DoubleVecExternalResult::GetStep(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp	(revision 12011)
+@@ -180,19 +180,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION DoubleExternalResult::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void DoubleExternalResult::SetMatlabField(mxArray* dataref){
+-
+-	char* name=NULL;
+-	this->GetResultName(&name);
+-	mxSetField( dataref,this->step-1, name,mxCreateDoubleScalar(value));
+-	mxSetField( dataref, this->step-1, "time",mxCreateDoubleScalar((double)this->time)); 
+-	mxSetField( dataref, this->step-1, "step",mxCreateDoubleScalar((double)this->step)); 
+-
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION DoubleExternalResult::GetStep{{{1*/
+ int DoubleExternalResult::GetStep(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp	(revision 12011)
+@@ -184,20 +184,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION IntExternalResult::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void IntExternalResult::SetMatlabField(mxArray* dataref){
+-
+-	char* name=NULL;
+-	this->GetResultName(&name);
+-
+-	mxSetField( dataref, this->step-1, name,mxCreateDoubleScalar(value));
+-	mxSetField( dataref, this->step-1, "time",mxCreateDoubleScalar((double)this->time)); 
+-	mxSetField( dataref, this->step-1, "step",mxCreateDoubleScalar((double)this->step)); 
+-
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION IntExternalResult::GetStep{{{1*/
+ int IntExternalResult::GetStep(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp	(revision 12011)
+@@ -184,19 +184,6 @@
+ 	EnumToStringx(pname,this->enum_type);
+ }
+ /*}}}*/
+-/*FUNCTION BoolExternalResult::SetMatlabField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void BoolExternalResult::SetMatlabField(mxArray* dataref){
+-
+-	char* name=NULL;
+-	this->GetResultName(&name);
+-	
+-	mxSetField( dataref, this->step-1, name,mxCreateDoubleScalar((double)value));
+-	mxSetField( dataref, this->step-1, "time",mxCreateDoubleScalar((double)this->time)); 
+-	mxSetField( dataref, this->step-1, "step",mxCreateDoubleScalar((double)this->step)); 
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION BoolExternalResult::GetStep{{{1*/
+ int BoolExternalResult::GetStep(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h	(revision 12011)
+@@ -59,9 +59,6 @@
+ 		int   InstanceEnum(){return enum_type;}
+ 		void  WriteData(FILE* fid,bool io_gather);
+ 		void  GetResultName(char**);
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void  SetMatlabField(mxArray* dataref);
+-		#endif
+ 		int   GetStep(void);
+ 		/*}}}*/
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/OptArgs.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/OptArgs.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/OptArgs.h	(revision 12011)
+@@ -5,20 +5,9 @@
+ #ifndef _OPTARGS_H_
+ #define _OPTARGS_H_
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-
+-#include "mex.h"
+-struct OptArgs{
+-	char* function_name;
+-	mxArray* femmodel;
+-};
+-
+-#else
+-
+ class Model;
+ struct OptArgs{
+ 	FemModel* femmodel;
+ };
+-#endif
+ 
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp	(revision 12011)
+@@ -40,46 +40,6 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BamgOpts::BamgOpts(mxArray* matlab_struct){{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-BamgOpts::BamgOpts(mxArray* matlab_struct){
+-
+-	FetchData(&this->anisomax,mxGetField(matlab_struct,0,"anisomax"));
+-	FetchData(&this->cutoff,mxGetField(matlab_struct,0,"cutoff"));
+-	FetchData(&this->coeff,mxGetField(matlab_struct,0,"coeff"));
+-	FetchData(&this->errg,mxGetField(matlab_struct,0,"errg"));
+-	FetchData(&this->gradation,mxGetField(matlab_struct,0,"gradation"));
+-	FetchData(&this->Hessiantype,mxGetField(matlab_struct,0,"Hessiantype"));
+-	FetchData(&this->MaxCornerAngle,mxGetField(matlab_struct,0,"MaxCornerAngle"));
+-	FetchData(&this->maxnbv,mxGetField(matlab_struct,0,"maxnbv"));
+-	FetchData(&this->maxsubdiv,mxGetField(matlab_struct,0,"maxsubdiv"));
+-	FetchData(&this->Metrictype,mxGetField(matlab_struct,0,"Metrictype"));
+-	FetchData(&this->nbjacobi,mxGetField(matlab_struct,0,"nbjacobi"));
+-	FetchData(&this->nbsmooth,mxGetField(matlab_struct,0,"nbsmooth"));
+-	FetchData(&this->omega,mxGetField(matlab_struct,0,"omega"));
+-	FetchData(&this->power,mxGetField(matlab_struct,0,"power"));
+-	FetchData(&this->verbose,mxGetField(matlab_struct,0,"verbose"));
+-
+-	FetchData(&this->Crack,mxGetField(matlab_struct,0,"Crack"));
+-	FetchData(&this->geometricalmetric,mxGetField(matlab_struct,0,"geometricalmetric"));
+-	FetchData(&this->KeepVertices,mxGetField(matlab_struct,0,"KeepVertices"));
+-	FetchData(&this->splitcorners,mxGetField(matlab_struct,0,"splitcorners"));
+-
+-	FetchData(&this->hmin,mxGetField(matlab_struct,0,"hmin"));
+-	FetchData(&this->hmax,mxGetField(matlab_struct,0,"hmax"));
+-	FetchData(&this->hminVertices,&this->hminVerticesSize[0],&this->hminVerticesSize[1],mxGetField(matlab_struct,0,"hminVertices"));
+-	FetchData(&this->hmaxVertices,&this->hmaxVerticesSize[0],&this->hmaxVerticesSize[1],mxGetField(matlab_struct,0,"hmaxVertices"));
+-	FetchData(&this->hVertices,&this->hVerticesSize[0],&this->hVerticesSize[1],mxGetField(matlab_struct,0,"hVertices"));
+-	FetchData(&this->metric,&this->metricSize[0],&this->metricSize[1],mxGetField(matlab_struct,0,"metric"));
+-	FetchData(&this->field,&this->fieldSize[0],&this->fieldSize[1],mxGetField(matlab_struct,0,"field"));
+-	FetchData(&this->err,&this->errSize[0],&this->errSize[1],mxGetField(matlab_struct,0,"err"));
+-
+-	/*Additional checks*/
+-	this->Check();
+-
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION BamgOpts::~BamgOpts() {{{1*/
+ BamgOpts::~BamgOpts(){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgGeom.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgGeom.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgGeom.cpp	(revision 12011)
+@@ -18,22 +18,6 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BamgGeom::BamgGeom(mxArray* matlab_struct){{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-BamgGeom::BamgGeom(mxArray* matlab_struct){
+-
+-	FetchData(&this->Vertices,        &this->VerticesSize[0],        &this->VerticesSize[1],        mxGetAssignedField(matlab_struct,0,"Vertices"));
+-	FetchData(&this->Edges,           &this->EdgesSize[0],           &this->EdgesSize[1],           mxGetAssignedField(matlab_struct,0,"Edges"));
+-	this->TangentAtEdgesSize[0]=0,    this->TangentAtEdgesSize[1]=0;    this->TangentAtEdges=NULL;
+-	FetchData(&this->Corners,         &this->CornersSize[0],         &this->CornersSize[1],         mxGetAssignedField(matlab_struct,0,"Corners"));
+-	FetchData(&this->RequiredVertices,&this->RequiredVerticesSize[0],&this->RequiredVerticesSize[1],mxGetAssignedField(matlab_struct,0,"RequiredVertices"));
+-	FetchData(&this->RequiredEdges,   &this->RequiredEdgesSize[0],   &this->RequiredEdgesSize[1],   mxGetAssignedField(matlab_struct,0,"RequiredEdges"));
+-	FetchData(&this->CrackedEdges,    &this->CrackedEdgesSize[0],    &this->CrackedEdgesSize[1],    mxGetAssignedField(matlab_struct,0,"CrackedEdges"));
+-	FetchData(&this->SubDomains,      &this->SubDomainsSize[0],      &this->SubDomainsSize[1],      mxGetAssignedField(matlab_struct,0,"SubDomains"));
+-
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION BamgGeom::~BamgGeom(){{{1*/
+ BamgGeom::~BamgGeom(){
+ 
+@@ -48,78 +32,3 @@
+ 
+ }
+ /*}}}*/
+-
+-/*Methods*/
+-/*FUNCTION BamgGeom::SetMatlabStructureFields{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void BamgGeom::SetMatlabStructureFields(mxArray** matlab_struct){
+-
+-	/*Intermediary*/
+-	int         i;
+-	mxArray*    output=NULL;
+-	const int         numfields=7;
+-	const char* fnames[numfields];
+-	mwSize      ndim=2;
+-	mwSize      dimensions[2]={1,1};
+-
+-	/*Initialize field names*/
+-	i=0;
+-	fnames[i++] = "Vertices";
+-	fnames[i++] = "Edges";
+-	fnames[i++] = "TangentAtEdges";
+-	fnames[i++] = "RequiredVertices";
+-	fnames[i++] = "RequiredEdges";
+-	fnames[i++] = "CrackedEdges";
+-	fnames[i++] = "SubDomains";
+-	_assert_(i==numfields);
+-
+-	/*Initialize Matlab structure*/
+-	output=mxCreateStructArray(ndim,dimensions,numfields,fnames);
+-
+-	/*set each matlab each field*/
+-	i=0;
+-	i++; SetMatlabStructureField(output,"Vertices",        this->VerticesSize[0],        this->VerticesSize[1],        this->Vertices);
+-	i++; SetMatlabStructureField(output,"Edges",           this->EdgesSize[0],           this->EdgesSize[1],           this->Edges);
+-	i++; SetMatlabStructureField(output,"TangentAtEdges",  this->TangentAtEdgesSize[0],  this->TangentAtEdgesSize[1],  this->TangentAtEdges);
+-	i++; SetMatlabStructureField(output,"RequiredVertices",this->RequiredVerticesSize[0],this->RequiredVerticesSize[1],this->RequiredVertices);
+-	i++; SetMatlabStructureField(output,"RequiredEdges",   this->RequiredEdgesSize[0],   this->RequiredEdgesSize[1],   this->RequiredEdges);
+-	i++; SetMatlabStructureField(output,"CrackedEdges",    this->CrackedEdgesSize[0],    this->CrackedEdgesSize[1],    this->CrackedEdges);
+-	i++; SetMatlabStructureField(output,"SubDomains",      this->SubDomainsSize[0],      this->SubDomainsSize[1],      this->SubDomains);
+-	_assert_(i==numfields);
+-
+-	/*Assign output*/
+-	*matlab_struct=output;
+-
+-}
+-#endif
+-/*}}}*/
+-/*FUNCTION BamgGeom::SetMatlabStructureField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void BamgGeom::SetMatlabStructureField(mxArray* matlab_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer){
+-
+-	/*Intermediary*/
+-	int         i1,i2;
+-	mxArray*    pfield=NULL;
+-	mxArray*    pfield2=NULL;
+-
+-	/*Copy field*/
+-	double*  fieldcopy=NULL;
+-	if (fieldrows*fieldcols){
+-		fieldcopy=(double*)xmalloc(fieldrows*fieldcols*sizeof(double));
+-		for(i1=0;i1<fieldrows;i1++){
+-			for(i2=0;i2<fieldcols;i2++){
+-				fieldcopy[fieldcols*i1+i2]=fieldpointer[fieldcols*i1+i2];
+-			}
+-		}
+-	}
+-
+-	/*Set matlab field*/
+-	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pfield,fieldcols);
+-	mxSetN(pfield,fieldrows);
+-	mxSetPr(pfield,fieldcopy);
+-	mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose
+-	mxSetField(matlab_struct,0,fieldname,pfield2);
+-}
+-#endif
+-/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp	(revision 12011)
+@@ -31,36 +31,6 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION BamgMesh::BamgMesh(mxArray* matlab_struct){{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-BamgMesh::BamgMesh(mxArray* matlab_struct){
+-
+-	int lines,cols;
+-
+-	FetchData(&this->Vertices,            &this->VerticesSize[0],            &this->VerticesSize[1],            mxGetAssignedField(matlab_struct,0,"Vertices"));
+-	FetchData(&this->Edges,               &this->EdgesSize[0],               &this->EdgesSize[1],               mxGetAssignedField(matlab_struct,0,"Edges"));
+-	FetchData(&this->Triangles,           &this->TrianglesSize[0],           &this->TrianglesSize[1],           mxGetAssignedField(matlab_struct,0,"Triangles"));
+-	this->QuadrilateralsSize[0]=0,        this->QuadrilateralsSize[1]=0;     this->Quadrilaterals=NULL;
+-
+-	this->SubDomainsSize[0]=0,            this->SubDomainsSize[1]=0;         this->SubDomains=NULL;
+-	this->SubDomainsFromGeomSize[0]=0,    this->SubDomainsFromGeomSize[1]=0; this->SubDomainsFromGeom=NULL;
+-	this->CrackedVerticesSize[0]=0,       this->CrackedVerticesSize[1]=0;    this->CrackedVertices=NULL;
+-	FetchData(&this->CrackedEdges,        &this->CrackedEdgesSize[0],        &this->CrackedEdgesSize[1],        mxGetAssignedField(matlab_struct,0,"CrackedEdges"));
+-
+-	FetchData(&this->VerticesOnGeomEdge,  &this->VerticesOnGeomEdgeSize[0],  &this->VerticesOnGeomEdgeSize[1],  mxGetAssignedField(matlab_struct,0,"VerticesOnGeomEdge"));
+-	FetchData(&this->VerticesOnGeomVertex,&this->VerticesOnGeomVertexSize[0],&this->VerticesOnGeomVertexSize[1],mxGetAssignedField(matlab_struct,0,"VerticesOnGeomVertex"));
+-	FetchData(&this->EdgesOnGeomEdge,     &this->EdgesOnGeomEdgeSize[0],     &this->EdgesOnGeomEdgeSize[1],     mxGetAssignedField(matlab_struct,0,"EdgesOnGeomEdge"));
+-
+-	this->IssmEdgesSize[0]=0,             this->IssmEdgesSize[1]=0;          this->IssmEdges=NULL;
+-	FetchData(&this->IssmSegments,        &this->IssmSegmentsSize[0],        &this->IssmSegmentsSize[1],        mxGetAssignedField(matlab_struct,0,"IssmSegments"));
+-
+-	this->ElementConnectivitySize[0]=0,      this->ElementConnectivitySize[1]=0;      this->ElementConnectivity=NULL;
+-	this->NodalConnectivitySize[0]=0,        this->NodalConnectivitySize[1]=0;        this->NodalConnectivity=NULL;
+-	this->NodalElementConnectivitySize[0]=0, this->NodalElementConnectivitySize[1]=0; this->NodalElementConnectivity=NULL;
+-
+-}
+-#endif
+-/*}}}*/
+ /*FUNCTION BamgMesh::~BamgMesh(){{{1*/
+ BamgMesh::~BamgMesh(){
+ 
+@@ -88,96 +58,3 @@
+ 
+ }
+ /*}}}*/
+-
+-/*Methods*/
+-/*FUNCTION BamgMesh::SetMatlabStructureFields{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void BamgMesh::SetMatlabStructureFields(mxArray** matlab_struct){
+-
+-	/*Intermediary*/
+-	int         i;
+-	mxArray*    output=NULL;
+-	const int         numfields=16;
+-	const char* fnames[numfields];
+-	mwSize      ndim=2;
+-	mwSize      dimensions[2]={1,1};
+-
+-	/*Initialize field names*/
+-	i=0;
+-	fnames[i++] = "Triangles";
+-	fnames[i++] = "Vertices";
+-	fnames[i++] = "Edges";
+-	fnames[i++] = "IssmSegments";
+-	fnames[i++] = "IssmEdges";
+-	fnames[i++] = "Quadrilaterals";
+-	fnames[i++] = "VerticesOnGeomVertex";
+-	fnames[i++] = "VerticesOnGeomEdge";
+-	fnames[i++] = "EdgesOnGeomEdge";
+-	fnames[i++] = "SubDomains";
+-	fnames[i++] = "SubDomainsFromGeom";
+-	fnames[i++] = "ElementConnectivity";
+-	fnames[i++] = "NodalConnectivity";
+-	fnames[i++] = "NodalElementConnectivity";
+-	fnames[i++] = "CrackedVertices";
+-	fnames[i++] = "CrackedEdges";
+-	_assert_(i==numfields);
+-
+-	/*Initialize Matlab structure*/
+-	output=mxCreateStructArray(ndim,dimensions,numfields,fnames);
+-
+-	/*set each matlab each field*/
+-	i=0;
+-	i++; SetMatlabStructureField(output,"Triangles",                this->TrianglesSize[0],                this->TrianglesSize[1],                 this->Triangles);
+-	i++; SetMatlabStructureField(output,"Vertices",                 this->VerticesSize[0],                 this->VerticesSize[1],                  this->Vertices);
+-	i++; SetMatlabStructureField(output,"Edges",                    this->EdgesSize[0],                    this->EdgesSize[1],                     this->Edges);
+-	i++; SetMatlabStructureField(output,"IssmSegments",             this->IssmSegmentsSize[0],             this->IssmSegmentsSize[1],              this->IssmSegments);
+-	i++; SetMatlabStructureField(output,"IssmEdges",                this->IssmEdgesSize[0],                this->IssmEdgesSize[1],                 this->IssmEdges);
+-	i++; SetMatlabStructureField(output,"Quadrilaterals",           this->QuadrilateralsSize[0],           this->QuadrilateralsSize[1],            this->Quadrilaterals);
+-	i++; SetMatlabStructureField(output,"VerticesOnGeomVertex",this->VerticesOnGeomVertexSize[0],this->VerticesOnGeomVertexSize[1], this->VerticesOnGeomVertex);
+-	i++; SetMatlabStructureField(output,"VerticesOnGeomEdge",  this->VerticesOnGeomEdgeSize[0],  this->VerticesOnGeomEdgeSize[1],   this->VerticesOnGeomEdge);
+-	i++; SetMatlabStructureField(output,"EdgesOnGeomEdge",     this->EdgesOnGeomEdgeSize[0],     this->EdgesOnGeomEdgeSize[1],      this->EdgesOnGeomEdge);
+-	i++; SetMatlabStructureField(output,"SubDomains",               this->SubDomainsSize[0],               this->SubDomainsSize[1],                this->SubDomains);
+-	i++; SetMatlabStructureField(output,"SubDomainsFromGeom",       this->SubDomainsFromGeomSize[0],       this->SubDomainsFromGeomSize[1],        this->SubDomainsFromGeom);
+-	i++; SetMatlabStructureField(output,"ElementConnectivity",      this->ElementConnectivitySize[0],      this->ElementConnectivitySize[1],       this->ElementConnectivity);
+-	i++; SetMatlabStructureField(output,"NodalConnectivity",        this->NodalConnectivitySize[0],        this->NodalConnectivitySize[1],         this->NodalConnectivity);
+-	i++; SetMatlabStructureField(output,"NodalElementConnectivity", this->NodalElementConnectivitySize[0], this->NodalElementConnectivitySize[1],  this->NodalElementConnectivity);
+-	i++; SetMatlabStructureField(output,"CrackedVertices",          this->CrackedVerticesSize[0],          this->CrackedVerticesSize[1],           this->CrackedVertices);
+-	i++; SetMatlabStructureField(output,"CrackedEdges",             this->CrackedEdgesSize[0],             this->CrackedEdgesSize[1],              this->CrackedEdges);
+-	_assert_(i==numfields);
+-
+-	/*Assign output*/
+-	*matlab_struct=output;
+-
+-}
+-#endif
+-/*}}}*/
+-/*FUNCTION BamgMesh::SetMatlabStructureField{{{1*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-void BamgMesh::SetMatlabStructureField(mxArray* matlab_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer){
+-
+-	/*Intermediary*/
+-	int         i1,i2;
+-	mxArray*    pfield=NULL;
+-	mxArray*    pfield2=NULL;
+-
+-	/*Copy field*/
+-	double*  fieldcopy=NULL;
+-	if (fieldrows*fieldcols){
+-		fieldcopy=(double*)xmalloc(fieldrows*fieldcols*sizeof(double));
+-		for(i1=0;i1<fieldrows;i1++){
+-			for(i2=0;i2<fieldcols;i2++){
+-				fieldcopy[fieldcols*i1+i2]=fieldpointer[fieldcols*i1+i2];
+-			}
+-		}
+-	}
+-
+-	/*Set matlab field*/
+-	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pfield,fieldcols);
+-	mxSetN(pfield,fieldrows);
+-	mxSetPr(pfield,fieldcopy);
+-	mexCallMATLAB(1,&pfield2,1,&pfield,"transpose");//transpose
+-	mxSetField(matlab_struct,0,fieldname,pfield2);
+-}
+-#endif
+-/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgOpts.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgOpts.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgOpts.h	(revision 12011)
+@@ -5,10 +5,6 @@
+ #ifndef _BAMGOPTS_H_
+ #define _BAMGOPTS_H_
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ class BamgOpts{
+ 
+ 	public:
+@@ -53,9 +49,7 @@
+ 		double* err;
+ 
+ 		BamgOpts();
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		BamgOpts(mxArray* matlab_struct);
+-		#endif
++		BamgOpts(void* module_struct);
+ 		~BamgOpts();
+ 
+ 		void Check(void);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgGeom.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgGeom.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgGeom.h	(revision 12011)
+@@ -4,10 +4,6 @@
+ #ifndef _BAMGGEOM_H_
+ #define _BAMGGEOM_H_
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ class BamgGeom{
+ 
+ 	public:
+@@ -29,15 +25,11 @@
+ 		double* SubDomains;
+ 
+ 		BamgGeom();
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		BamgGeom(mxArray* matlab_struct);
+-		#endif
++		BamgGeom(void* module_struct);
+ 		~BamgGeom();
+ 
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void SetMatlabStructureFields(mxArray** matlab_struct);
+-		void SetMatlabStructureField(mxArray* matlab_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer);
+-		#endif
++		void SetStructureFields(void* matlab_struct);
++		void SetStructureField(void* matlab_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer);
+ };
+ 
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgMesh.h	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgMesh.h	(revision 12011)
+@@ -4,10 +4,6 @@
+ #ifndef _BAMGMESH_H_
+ #define _BAMGMESH_H_
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ class BamgMesh{
+ 
+ 	public:
+@@ -50,15 +46,11 @@
+ 		double* NodalElementConnectivity;
+ 
+ 		BamgMesh();
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		BamgMesh(mxArray* matlab_struct);
+-		#endif
++		BamgMesh(void* module_struct);
+ 		~BamgMesh();
+ 
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		void SetMatlabStructureFields(mxArray** matlab_struct);
+-		void SetMatlabStructureField(mxArray* matlab_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer);
+-		#endif
++		void SetStructureFields(void* module_struct);
++		void SetStructureField(void* module_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer);
+ 
+ };
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py	(revision 12010)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py	(revision 12011)
+@@ -78,7 +78,6 @@
+ from hydrology import *
+ from miscellaneous import *
+ from private import *
+-from TriMesh import *
+ 
+ #}}}
+ 
Index: /issm/oecreview/Archive/12010-12040/ISSM-12011-12012.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12011-12012.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12011-12012.diff	(revision 12325)
@@ -0,0 +1,22 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp	(revision 12011)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp	(revision 12012)
+@@ -1,4 +1,3 @@
+-#include "../../io/Matlab/matlabio.h"
+ #include "../Alloc/alloc.h"
+ #include "../../include/include.h"
+ #include "../Exceptions/exceptions.h"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/alloc_module.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/alloc_module.cpp	(revision 12011)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/alloc_module.cpp	(revision 12012)
+@@ -11,7 +11,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ 
+-#include  "./allocmodule.h"
++#include  "./alloc_module.h"
+ #include "../Exceptions/exceptions.h"
+ #include "../../include/include.h"
+ #include "../../objects/objects.h"
Index: /issm/oecreview/Archive/12010-12040/ISSM-12012-12013.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12012-12013.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12012-12013.diff	(revision 12325)
@@ -0,0 +1,1370 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12013)
+@@ -22,6 +22,7 @@
+ 	AC_MSG_RESULT($MODULES_VALUE) 
+ 	dnl }}}
+ 	dnl Extensions{{{
++	ISSMEXT=".exe"
+ 	AC_SUBST([ISSMEXT])
+ 	dnl }}}
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/Container/Options.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/Container/Options.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/Container/Options.cpp	(revision 12013)
+@@ -12,16 +12,15 @@
+ 
+ #include <vector>
+ #include <algorithm>
++#include <mex.h>
+ 
+-#include "./DataSet.h"
+-#include "../shared/shared.h"
+-#include "../io/io.h"
+-#include "../include/include.h"
+-#include "../shared/shared.h"
+-#include "../EnumDefinitions/EnumDefinitions.h"
+-#if _SERIAL_
+-#include "../io/io.h"
+-#endif
++#include "../../Container/DataSet.h"
++#include "../../shared/shared.h"
++#include "../../io/io.h"
++#include "../io/matlabio.h"
++#include "../../include/include.h"
++#include "../../shared/shared.h"
++#include "../../EnumDefinitions/EnumDefinitions.h"
+ /*}}}*/
+ 
+ /*Object constructors and destructor*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12013)
+@@ -6,8 +6,6 @@
+ #ifndef _MATLAB_MACROS_H_
+ #define _MATLAB_MACROS_H_
+ 
+-#include "./typedefs.h"
+-
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToSeqMat.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToSeqMat.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToSeqMat.cpp	(revision 12013)
+@@ -1,3 +1,23 @@
++/*!\file MatlabMatrixToSeqMat.cpp
++ */
++
++/*Headers:*/
++/*{{{1*/
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include <mex.h>
++#include <stdio.h>
++#include <string.h>
++#include "../../toolkits/toolkits.h"
++#include "../../shared/shared.h"
++#include "./matlabio.h"
++
++/*}}}*/
++
+ SeqMat* MatlabMatrixToSeqMat(const mxArray* dataref){
+ 
+ 	SeqMat* output=NULL;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/OptionParse.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12013)
+@@ -12,7 +12,6 @@
+ #include "../../include/include.h"
+ #include "./matlabio.h"
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+ #include <mex.h>
+ 
+ /*FUNCTION OptionDoubleParse {{{1*/
+@@ -190,5 +189,3 @@
+ 
+ 	return(option);
+ }/*}}}*/
+-
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp	(revision 12013)
+@@ -9,8 +9,6 @@
+ #endif
+ 
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-
+ #include "../../shared/Exceptions/exceptions.h"
+ #include "../../include/include.h"
+ #include "mex.h"
+@@ -31,5 +29,3 @@
+ 	}
+ 	return 1;
+ }
+-
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12013)
+@@ -8,45 +8,11 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
++#include <mex.h>
+ #include "../../shared/shared.h"
+ #include "../../include/include.h"
++#include "./matlabio.h"
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-/*FUNCTION FetchData(DataSet** pdataset,const mxArray* dataref){{{1*/
+-void FetchData(DataSet** pdataset,const mxArray* dataref){
+-
+-	/*output*/
+-	DataSet* outdataset=NULL;
+-	char*    outdataset_buffer=NULL;
+-	int      outdataset_size;
+-
+-	/*First, check that our reference is a double, otherwise, error out: */
+-	if (mxIsClass(dataref,"double")){
+-			
+-		/*We need to copy the data pointed by dataref, so that our dataset is not actually a pointer!:*/
+-		if (!mxIsEmpty(dataref)){
+-			outdataset_buffer=(char*)mxGetPr(dataref);
+-			outdataset_size=mxGetM(dataref)*mxGetN(dataref);
+-			if(outdataset_size)outdataset=DataSetDemarshall(outdataset_buffer);
+-		}
+-	}
+-	else{
+-		if (mxIsEmpty(dataref)){
+-			/*Nothing to pick up. Just initialize pointer to NULL, and warn the server we are not uploading anything: */
+-			outdataset_size=0;
+-			outdataset=NULL;
+-		}
+-		else{
+-			/*This is an error: we don't have the correct input!: */
+-			_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
+-		}
+-	}
+-
+-	/*Assign output pointers:*/
+-	*pdataset=outdataset;
+-}
+-/*}}}*/
+ /*FUNCTION FetchData(double** pmatrix,int* pM,int *pN,const mxArray* dataref){{{1*/
+ void FetchData(double** pmatrix,int* pM,int *pN,const mxArray* dataref){
+ 
+@@ -559,186 +525,3 @@
+ 	*pboolean=*mxbool_ptr;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(Parameters** pparameters, DataHandle dataref){{{1*/
+-void FetchData(Parameters** pparameters, DataHandle dataref){
+-
+-	int i,j;
+-	int count;
+-
+-	/*output: */
+-	Param* param=NULL;
+-	Parameters* parameters=NULL;
+-
+-	/*intermediary: */
+-	int M,N;
+-	double* tmatrix=NULL;
+-	double* matrix=NULL;
+-	char**  stringarray=NULL;
+-	double** array=NULL;
+-	int*     mdims_array=NULL;
+-	int*     ndims_array=NULL;
+-	int nfields;
+-	char* name=NULL;
+-	mxArray* pfield=NULL;
+-	mxArray* pfield2=NULL;
+-	int enum_type;
+-
+-
+-	/*First, create parameters : */
+-	parameters=new Parameters();
+-
+-	/*go through matlab params structure, and create Param object for each field: */
+-
+-	nfields=mxGetNumberOfFields(dataref);
+-
+-	for(count=0;count<nfields;count++){
+-
+-		/*Get i'th field: */
+-		name=(char*)mxGetFieldNameByNumber(dataref,count);
+-		enum_type=StringToEnumx(name);
+-		pfield=mxGetFieldByNumber(dataref,0,count);
+-		_assert_(pfield);
+-		
+-		/*Check type of field: */
+-		if (mxIsClass(pfield,"double")){
+-			
+-			M=mxGetM(pfield);
+-			N=mxGetN(pfield);
+-
+-			if (M==0 | N==0){
+-				_error_("array in parameters structure field %s is of size 0",name);
+-			}
+-			if (M==1 && N==1){
+-				/*we have a simple scalar: */
+-				param= new DoubleParam(enum_type,*mxGetPr(pfield));
+-				parameters->AddObject(param);
+-
+-			}
+-			else{
+-				if (N==1){
+-					
+-					/*vector: */
+-					param= new DoubleVecParam(enum_type,mxGetPr(pfield),M);
+-					parameters->AddObject(param);
+-
+-				}
+-				else{
+-					/*matrix: first, transpose, then plug into Param */
+-					matrix=mxGetPr(pfield);
+-					tmatrix=(double*)xmalloc(M*N*sizeof(double));
+-					for (i=0;i<M;i++){
+-						for(j=0;j<N;j++){
+-							*(tmatrix+N*i+j)=*(matrix+M*j+i);
+-						}
+-					}
+-
+-					param= new DoubleMatParam(enum_type,tmatrix,M,N);
+-					parameters->AddObject(param);
+-	
+-					/*Free ressources:*/
+-					xfree((void**)&tmatrix);
+-				}
+-			}
+-
+-		}
+-		else if (mxIsClass(pfield,"logical")){
+-
+-			M=mxGetM(pfield);
+-			N=mxGetN(pfield);
+-
+-			if (M==0 | N==0){
+-				_error_("array in parameters structure field %s is of size 0",name);
+-			}
+-			if (M==1 && N==1){
+-				/*we have a simple bool: */
+-				param= new BoolParam(enum_type,*mxGetLogicals(pfield));
+-				parameters->AddObject(param);
+-
+-			}
+-			else{
+-				_error_("Matrices of Booleans not supported yet in parameters");
+-			}
+-		}
+-		else if (mxIsClass(pfield,"char")){
+-			/* we have a string parameter:*/
+-			
+-			int stringlen;
+-			char* string=NULL;
+-			
+-			stringlen = mxGetM(pfield)*mxGetN(pfield)+1;
+-			string = (char*)xmalloc(sizeof(mxChar)*stringlen);
+-			mxGetString(pfield,string,stringlen);
+-
+-			param= new StringParam(enum_type,string);
+-			parameters->AddObject(param);
+-
+-			xfree((void**)&string);
+-		}
+-		else if (mxIsClass(pfield,"cell")){
+-
+-			/*This can be a string array, or a matrix array. Check the first 
+-			 *element type to decide: */
+-			pfield2=mxGetCell(pfield,0);
+-			if (mxIsClass(pfield2,"char")){
+-				
+-				/*string array: */
+-				M=mxGetM(pfield);
+-				stringarray=(char**)xmalloc(M*sizeof(char*));
+-
+-				for(i=0;i<M;i++){
+-					char* descriptor=NULL;
+-					pfield2=mxGetCell(pfield,i);
+-					FetchData(&descriptor,pfield2);
+-					stringarray[i]=descriptor;
+-				}
+-
+-				param= new StringArrayParam(enum_type,stringarray,M);
+-				parameters->AddObject(param);
+-
+-				/*Free ressources:*/
+-				for(i=0;i<M;i++){
+-					char* descriptor=stringarray[i];
+-					xfree((void**)&descriptor);
+-				}
+-				xfree((void**)&stringarray);
+-
+-			}
+-			else{
+-				
+-				/*matrix array: */
+-				M=mxGetM(pfield);
+-				array=(double**)xmalloc(M*sizeof(double*));
+-				mdims_array=(int*)xmalloc(M*sizeof(int));
+-				ndims_array=(int*)xmalloc(M*sizeof(int));
+-
+-				for(i=0;i<M;i++){
+-					double* matrix=NULL;
+-					int     m,n;
+-					pfield2=mxGetCell(pfield,i);
+-					FetchData(&matrix,&m,&n,pfield2);
+-					array[i]=matrix;
+-					mdims_array[i]=m;
+-					ndims_array[i]=n;
+-				}
+-
+-				param= new DoubleMatArrayParam(enum_type,array,M,mdims_array,ndims_array);
+-				parameters->AddObject(param);
+-
+-				/*Free ressources:*/
+-				for(i=0;i<M;i++){
+-					double* matrix=array[i];
+-					xfree((void**)&matrix);
+-				}
+-				xfree((void**)&array);
+-				xfree((void**)&mdims_array);
+-				xfree((void**)&ndims_array);
+-			}
+-		}
+-		else _error_("Parameters structure field %s has a format that is not supported: %s",name,mxGetClassName(pfield));
+-	}
+-
+-	/*Assign output pointers:*/
+-	*pparameters=parameters;
+-}
+-/*}}}*/
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12013)
+@@ -10,39 +10,14 @@
+ 
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
++#include "./matlabio.h"
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+ #include <mex.h>
+ 
+-/*FUNCTION WriteData(mxArray** pdataref,DataSet* dataset){{{1*/
+-void WriteData(mxArray** pdataref,DataSet* dataset){
+-
+-	mxArray* dataref=NULL;
+-	char* marshalled_dataset=NULL;
+-	int   marshalled_dataset_size;
+-
+-	/*Write a dataset: */
+-	if(dataset){
+-			/* marshall the dataset: */
+-			marshalled_dataset=dataset->Marshall();
+-			marshalled_dataset_size=dataset->MarshallSize();
+-			
+-			dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+-			mxSetM(dataref,(mwSize)(marshalled_dataset_size/sizeof(double)));
+-			mxSetN(dataref,(mwSize)1);
+-			mxSetPr(dataref,(double*)marshalled_dataset);	
+-	}
+-	else{
+-		/* return empty matrix: */
+-		dataref=mxCreateDoubleMatrix(0,0,mxREAL);
+-	}
+-	*pdataref=dataref;
+-	
+-}
+-/*}}}*/
+ /*FUNCTION WriteData(mxArray** pdataref,Matrix* matrix){{{1*/
+ void WriteData(mxArray** pdataref,Matrix* matrix){
+ 		
++	int i,j;
+ 	mxArray* dataref=NULL;
+ 	double*  matrix_ptr=NULL;
+ 	int      rows,cols;
+@@ -51,7 +26,7 @@
+ 	if(matrix){
+ 		
+ 		#ifdef _HAVE_PETSC_
+-		PetscMatrixToDoubleMatrix(&tmatrix_ptr,&rows,&cols);
++		PetscMatrixToDoubleMatrix(&tmatrix_ptr,&rows,&cols,matrix->matrix);
+ 		#else
+ 		matrix_ptr=matrix->matrix->ToSerial();
+ 		matrix->matrix->GetSize(&rows,cols);
+@@ -207,43 +182,3 @@
+ 		*pdataref=mxCreateString(string);
+ }
+ /*}}}*/
+-/*FUNCTION WriteData(mxArray** pdataref,Parameters* parameters){{{1*/
+-void WriteData(mxArray** pdataref,Parameters* parameters){
+-
+-	int i;
+-
+-	/*output: */
+-	mxArray  *dataref     = NULL;
+-	mwSize    nfields;
+-	char    **fnames      = NULL;
+-	mwSize    onebyone[2] = {1,1};
+-	mwSize    ndim        = 2;
+-
+-	/*intermediary: */
+-	Param*      param=NULL;
+-
+-	/*Recover data from the parameters dataset: */
+-	nfields=(mwSize)parameters->Size();
+-	fnames=(char**)mxMalloc(nfields*sizeof(char*));
+-	
+-	/*Build structure in matlab workspace with all the parameter fields: */
+-	for(i=0;i<nfields;i++){
+-		param=(Param*)parameters->GetObjectByOffset(i);
+-		param->GetParameterName(&fnames[i]);
+-	}
+-	/*Initialize structure: */
+-	dataref=mxCreateStructArray( ndim,onebyone,nfields,(const char**)fnames);
+-
+-	/*Fill each field: */
+-	for(i=0;i<nfields;i++){
+-
+-		param=(Param*)parameters->GetObjectByOffset(i);
+-		param->SetMatlabField(dataref);
+-	}
+-		
+-	/*Assign output pointers:*/
+-	*pdataref=dataref;
+-
+-}
+-/*}}}*/
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/mxGetAssignedField.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/mxGetAssignedField.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/mxGetAssignedField.cpp	(revision 12013)
+@@ -13,7 +13,6 @@
+ #error "Cannot compile without HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+ #include "mex.h"
+ 
+ mxArray* mxGetAssignedField(const mxArray* pmxa_array,int number,const char* field){
+@@ -44,4 +43,3 @@
+ 
+ 	return mxfield;
+ }
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToPetscVector.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToPetscVector.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToPetscVector.cpp	(revision 12013)
+@@ -9,9 +9,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-
+ /*Petsc includes: */
+ #include "petscmat.h"
+ #include "petscvec.h"
+@@ -20,7 +17,7 @@
+ /*Matlab includes: */
+ #include "mex.h"
+ 
+-#include "../../../shared/shared.h"
++#include "../../shared/shared.h"
+ 
+ int MatlabVectorToPetscVector(Vec* pvector,int* pvector_rows,const mxArray* mxvector){
+ 
+@@ -99,4 +96,3 @@
+ 
+ 	return 1;
+ }
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp	(revision 12013)
+@@ -8,9 +8,7 @@
+ #include "../../shared/shared.h"
+ #include "../../include/include.h"
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+ #include "mex.h"
+-#endif
+ 
+ int PrintfFunction(char* format,...){
+ 	/*http://linux.die.net/man/3/vsnprintf*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToVector.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToVector.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToVector.cpp	(revision 12013)
+@@ -1,4 +1,26 @@
++/*!\file MatlabVectorToVector.cpp
++ */
+ 
++/*Headers:*/
++/*{{{1*/
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include <mex.h>
++#include <stdio.h>
++#include <string.h>
++#include "./matlabio.h"
++#include "../../objects/objects.h"
++#include "../../shared/shared.h"
++#include "../../Container/Container.h"
++#include "../../include/include.h"
++#include "../../toolkits/toolkits.h"
++	
++/*}}}*/
++
+ Vector* MatlabVectorToVector(const mxArray* mxvector){
+ 
+ 	int dummy;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToPetscMatrix.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToPetscMatrix.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToPetscMatrix.cpp	(revision 12013)
+@@ -10,8 +10,6 @@
+ #endif
+ 
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-
+ /*Petsc includes: */
+ #include "petscmat.h"
+ #include "petscvec.h"
+@@ -20,7 +18,7 @@
+ /*Matlab includes: */
+ #include "mex.h"
+ 
+-#include "../../../shared/shared.h"
++#include "../../shared/shared.h"
+ 
+ int MatlabMatrixToPetscMatrix(Mat* pmatrix,int* pmatrix_rows,int* pmatrix_cols,const mxArray* mxmatrix){
+ 
+@@ -120,4 +118,3 @@
+ 
+ 	return 1;
+ }
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToMatrix.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToMatrix.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabMatrixToMatrix.cpp	(revision 12013)
+@@ -1,3 +1,26 @@
++/*!\file MatlabMatrixToMatrix.cpp
++ */
++
++/*Headers:*/
++/*{{{1*/
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include <mex.h>
++#include <stdio.h>
++#include <string.h>
++#include "./matlabio.h"
++#include "../../objects/objects.h"
++#include "../../shared/shared.h"
++#include "../../Container/Container.h"
++#include "../../include/include.h"
++#include "../../toolkits/toolkits.h"
++	
++/*}}}*/
++
+ Matrix* MatlabMatrixToMatrix(const mxArray* mxmatrix){
+ 
+ 	int dummy;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp	(revision 12013)
+@@ -17,7 +17,7 @@
+ /*Petsc includes: */
+ #include "mex.h"
+ 
+-#include "../../../shared/shared.h"
++#include "../../shared/shared.h"
+ #include <string>
+ 
+ 
+@@ -33,13 +33,13 @@
+ 
+ 	/*Get size of vector: */
+ 	if(vector){
+-		VecGetSize(vector,&rows);
++		VecGetSize(petsc_vector,&rows);
+ 		if(rows){
+ 			idxm=(int*)xmalloc(rows*sizeof(int));
+ 			vector=(double*)xmalloc(rows*sizeof(double));
+ 			for(i=0;i<rows;i++)idxm[i]=i;
+ 
+-			VecGetValues(vector,rows,idxm,vector);
++			VecGetValues(petsc_vector,rows,idxm,vector);
+ 		}
+ 	}
+ 	else{
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp	(revision 12013)
+@@ -18,7 +18,7 @@
+ /*Petsc includes: */
+ #include "mex.h"
+ 
+-#include "../../../shared/shared.h"
++#include "../../shared/shared.h"
+ #include <string>
+ 
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToSeqVec.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToSeqVec.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabVectorToSeqVec.cpp	(revision 12013)
+@@ -1,3 +1,23 @@
++/*!\file MatlabVectorToSeqVec.cpp
++ */
++
++/*Headers:*/
++/*{{{1*/
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include <mex.h>
++#include <stdio.h>
++#include <string.h>
++#include "../../toolkits/toolkits.h"
++#include "../../shared/shared.h"
++#include "./matlabio.h"
++
++/*}}}*/
++
+ SeqVec* MatlabVectorToSeqVec(const mxArray* dataref){
+ 
+ 	SeqVec* output=NULL;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp	(revision 12013)
+@@ -12,7 +12,6 @@
+ #include "../../shared/shared.h"
+ #include "../../include/include.h"
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+ #include <mex.h>
+ 
+ /*FUNCTION MatlabNArrayToNArray(double** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix){{{1*/
+@@ -271,4 +270,3 @@
+ 	return 1;
+ }
+ /*}}}*/
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h	(revision 12013)
+@@ -15,12 +15,8 @@
+ #include "../../Container/Container.h"
+ #include "../../include/include.h"
+ 
+-class DataSet;
+-class Parameters;
+-
+ #include <mex.h>
+ 
+-void WriteData(mxArray** pdataref,DataSet* dataset);
+ void WriteData(mxArray** pdataref,Matrix* matrix);
+ void WriteData(mxArray** pdataref,double* matrix, int M,int N);
+ void WriteData(mxArray** pdataref,int*    matrix, int M,int N);
+@@ -30,9 +26,7 @@
+ void WriteData(mxArray** pdataref,bool boolean);
+ void WriteData(mxArray** pdataref,double scalar);
+ void WriteData(mxArray** pdataref,char* string);
+-void WriteData(DataHandle* pdataref,Parameters* parameters);
+ 
+-void FetchData(DataSet** pdataset,const mxArray* dataref);
+ void FetchData(double** pmatrix,int* pM,int *pN,const mxArray* dataref);
+ void FetchData(double** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref);
+ void FetchData(int** pmatrix,int* pM,int *pN,const mxArray* dataref);
+@@ -49,7 +43,6 @@
+ void FetchData(double* pscalar,const mxArray* dataref);
+ void FetchData(int* pinteger,const mxArray* dataref);
+ void FetchData(bool* pbool,const mxArray* dataref);
+-void FetchData(Parameters** pparameters, DataHandle dataref);
+ 
+ Option* OptionParse(char* name, const mxArray* prhs[]);
+ OptionDouble*   OptionDoubleParse( char* name, const mxArray* prhs[]);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgGeom.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgGeom.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgGeom.cpp	(revision 12013)
+@@ -1,7 +1,12 @@
++/*!\file BamgGeom.cpp
++ */
++
+ #include <stdio.h>
+-#include "../objects.h"
+-#include "../../io/io.h"
+-#include "../../shared/shared.h"
++#include "../../../objects/objects.h"
++#include "../../../io/io.h"
++#include "../../../shared/shared.h"
++#include "../../io/matlabio.h"
++#include <mex.h>
+ 
+ /*Constructors/Destructors*/
+ /*FUNCTION BamgGeom::BamgGeom(void* module_struct){{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgMesh.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgMesh.cpp	(revision 12013)
+@@ -1,7 +1,11 @@
++/*!\file BamgMesh.cpp
++ */
++
+ #include <stdio.h>
+-#include "../objects.h"
+-#include "../../io/io.h"
+-#include "../../shared/shared.h"
++#include "../../../objects/objects.h"
++#include "../../../io/io.h"
++#include "../../../shared/shared.h"
++#include "../../io/matlabio.h"
+ 
+ /*Constructors/Destructors*/
+ /*FUNCTION BamgMesh::BamgMesh(void* module_struct){{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgOpts.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgOpts.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/objects/Bamg/BamgOpts.cpp	(revision 12013)
+@@ -1,8 +1,12 @@
++/*!\file BamgOpts.cpp
++ */
++
+ #include <stdio.h>
+-#include "../../shared/shared.h"
+-#include "../../include/include.h"
+-#include "../objects.h"
+-#include "../../io/io.h"
++#include "../../../objects/objects.h"
++#include "../../../io/io.h"
++#include "../../../shared/shared.h"
++#include "../../io/matlabio.h"
++#include "../../../include/include.h"
+ 
+ /*Constructors/Destructors*/
+ /*FUNCTION BamgOpts::BamgOpts(void* module_struct){{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/matlab-binding.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/matlab-binding.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/matlab-binding.h	(revision 12013)
+@@ -0,0 +1,6 @@
++#ifndef _MATLAB_BINDING_H_
++#define _MATLAB_BINDING_H_
++
++#include "./io/matlabio.h"
++#include "./include/matlab_macros.h"
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Wrapper/wrappershared.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Wrapper/wrappershared.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Wrapper/wrappershared.h	(revision 12013)
+@@ -7,9 +7,7 @@
+ 
+ #include "../../objects/objects.h"
+ 
+-#ifdef _SERIAL_
+ int ModuleBoot(void);
+ int ModuleEnd(void);
+-#endif
+ 
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h	(revision 12013)
+@@ -110,9 +110,7 @@
+ #include "./CreateJacobianMatrixx/CreateJacobianMatrixx.h"
+ #include "./TimeAdaptx/TimeAdaptx.h"
+ #include "./TriaSearchx/TriaSearchx.h"
+-#ifdef _SERIAL_
+ #include "./TriMeshx/TriMeshx.h"
+-#endif
+ #include "./ThicknessAbsMisfitx/ThicknessAbsMisfitx.h"
+ #include "./ThicknessAbsGradientx/ThicknessAbsGradientx.h"
+ #include "./UpdateVertexPositionsx/UpdateVertexPositionsx.h"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12013)
+@@ -14,7 +14,9 @@
+ 
+ #sources
+ #Core sources{{{1
+-core_sources = ./include/macros.h\
++core_sources = ./issm.h\
++			        ./issm-binding.h\
++			        ./include/macros.h\
+ 					./include/typedefs.h\
+ 					./include/types.h\
+ 					./include/include.h\
+@@ -748,7 +750,7 @@
+ 				    ./matlab/io/MatlabVectorToVector.cpp\
+ 					./matlab/io/MatlabVectorToDoubleVector.cpp\
+ 				    ./matlab/io/MatlabMatrixToDoubleMatrix.cpp\
+-					./matlab/io/Container/Options.cpp\
++					./matlab/Container/Options.cpp\
+ 					./matlab/objects/Bamg/BamgGeom.h\
+ 					./matlab/objects/Bamg/BamgGeom.cpp\
+ 					./matlab/objects/Bamg/BamgMesh.h\
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/issm-binding.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/issm-binding.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/issm-binding.h	(revision 12013)
+@@ -0,0 +1,18 @@
++#ifndef _ISSM_BINDING_H_
++#define _ISSM_BINDING_H_
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#ifdef  _HAVE_MATLAB_
++#include "./matlab/matlab-binding.h"
++#endif
++
++#ifdef  _HAVE_PYTHON_
++#include "./python/python-binding.h"
++#endif
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.h	(revision 12013)
+@@ -20,9 +20,6 @@
+ #include "adolc.h"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include "mex.h"
+-#endif
+ class Vector;
+ 
+ /*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Scotch/Scotch.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Scotch/Scotch.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Scotch/Scotch.h	(revision 12013)
+@@ -16,6 +16,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+     
+ #undef __FUNCT__ 
+ #define __FUNCT__  "Scotch"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgConvertMesh/BamgConvertMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12013)
+@@ -63,8 +63,8 @@
+ 	BamgConvertMeshx(bamgmesh,bamggeom,index,x,y,nods,nels);
+ 
+ 	/*Generate output Matlab Structures*/
+-	bamggeom->SetMatlabStructureFields(BAMGGEOMOUT);
+-	bamgmesh->SetMatlabStructureFields(BAMGMESHOUT);
++	bamggeom->SetStructureFields((void*)BAMGGEOMOUT);
++	bamgmesh->SetStructureFields((void*)BAMGMESHOUT);
+ 
+ 	/*Clean up*/
+ 	delete bamggeom;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgConvertMesh/BamgConvertMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgConvertMesh/BamgConvertMesh.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgConvertMesh/BamgConvertMesh.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "BamgConvertMesh"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/KMLOverlay/KMLOverlay.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/KMLOverlay/KMLOverlay.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/KMLOverlay/KMLOverlay.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "KMLOverlay"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/ContourToNodes/ContourToNodes.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/ContourToNodes/ContourToNodes.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/ContourToNodes/ContourToNodes.h	(revision 12013)
+@@ -14,6 +14,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__
+ #define __FUNCT__ "ContourToNodes"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/HoleFiller/HoleFiller.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/HoleFiller/HoleFiller.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/HoleFiller/HoleFiller.h	(revision 12013)
+@@ -14,6 +14,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "HoleFiller"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/MeshProfileIntersection/MeshProfileIntersection.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/MeshProfileIntersection/MeshProfileIntersection.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/MeshProfileIntersection/MeshProfileIntersection.h	(revision 12013)
+@@ -14,6 +14,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__
+ #define __FUNCT__ "MeshProfileIntersection"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMeshRefine/TriMeshRefine.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMeshRefine/TriMeshRefine.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMeshRefine/TriMeshRefine.h	(revision 12013)
+@@ -13,6 +13,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ void TriMeshRefineUsage(void);
+ #undef __FUNCT__ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "InterpFromMeshToMesh3d"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Ll2xy/Ll2xy.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Ll2xy/Ll2xy.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Ll2xy/Ll2xy.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "Ll2xy"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgMesher/BamgMesher.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgMesher/BamgMesher.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgMesher/BamgMesher.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "BamgMesher"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgMesher/BamgMesher.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgMesher/BamgMesher.cpp	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgMesher/BamgMesher.cpp	(revision 12013)
+@@ -35,8 +35,8 @@
+ 	Bamgx(bamgmesh_out,bamggeom_out,bamgmesh_in,bamggeom_in,bamgopts);
+ 
+ 	/*Generate output Matlab Structures*/
+-	bamggeom_out->SetMatlabStructureFields(BAMGGEOMOUT);
+-	bamgmesh_out->SetMatlabStructureFields(BAMGMESHOUT);
++	bamggeom_out->SetStructureFields((void*)BAMGGEOMOUT);
++	bamgmesh_out->SetStructureFields((void*)BAMGMESHOUT);
+ 
+ 	/*Free ressources: */
+ 	delete bamgopts;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromGridToMesh/InterpFromGridToMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromGridToMesh/InterpFromGridToMesh.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromGridToMesh/InterpFromGridToMesh.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "InterpFromGridToMesh"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromMeshToGrid/InterpFromMeshToGrid.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromMeshToGrid/InterpFromMeshToGrid.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromMeshToGrid/InterpFromMeshToGrid.h	(revision 12013)
+@@ -14,6 +14,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "InterpFromMeshToGrid"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/KMLFileRead/KMLFileRead.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/KMLFileRead/KMLFileRead.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/KMLFileRead/KMLFileRead.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "KMLFileRead"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Shp2Kml/Shp2Kml.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Shp2Kml/Shp2Kml.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Shp2Kml/Shp2Kml.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "Shp2Kml"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/AverageFilter/AverageFilter.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/AverageFilter/AverageFilter.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/AverageFilter/AverageFilter.h	(revision 12013)
+@@ -14,6 +14,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "AverageFilter"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMeshProcessRifts/TriMeshProcessRifts.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMeshProcessRifts/TriMeshProcessRifts.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMeshProcessRifts/TriMeshProcessRifts.h	(revision 12013)
+@@ -13,6 +13,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ #include "../../c/EnumDefinitions/EnumDefinitions.h"
+ 
+ void TriMeshProcessRiftsUsage(void);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Exp2Kml/Exp2Kml.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Exp2Kml/Exp2Kml.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Exp2Kml/Exp2Kml.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "Exp2Kml"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Kml2Exp/Kml2Exp.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Kml2Exp/Kml2Exp.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Kml2Exp/Kml2Exp.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "Kml2Exp"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/PointCloudFindNeighbors/PointCloudFindNeighbors.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/PointCloudFindNeighbors/PointCloudFindNeighbors.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/PointCloudFindNeighbors/PointCloudFindNeighbors.h	(revision 12013)
+@@ -14,6 +14,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__
+ #define __FUNCT__ "PointCloudFindNeighbors"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h	(revision 12013)
+@@ -14,6 +14,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "PropagateFlagsFromConnectivity"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMeshRifts/TriMeshRifts.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMeshRifts/TriMeshRifts.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMeshRifts/TriMeshRifts.h	(revision 12013)
+@@ -13,6 +13,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ void TriMeshRiftsUsage(void);
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriaSearch/TriaSearch.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriaSearch/TriaSearch.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriaSearch/TriaSearch.h	(revision 12013)
+@@ -11,6 +11,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "TriaSearch"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InternalFront/InternalFront.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InternalFront/InternalFront.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InternalFront/InternalFront.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ 
+ #include "../../c/include/globals.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ #include "../../c/io/io.h"
+ 
+ #undef __FUNCT__ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/MeshPartition/MeshPartition.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/MeshPartition/MeshPartition.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/MeshPartition/MeshPartition.h	(revision 12013)
+@@ -14,6 +14,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef CLEANUP
+ #define CLEANUP MeshPartitionLocalCleanup();
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromMesh2d/InterpFromMesh2d.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromMesh2d/InterpFromMesh2d.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromMesh2d/InterpFromMesh2d.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "InterpFromMesh2d"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/ElementConnectivity/ElementConnectivity.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/ElementConnectivity/ElementConnectivity.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/ElementConnectivity/ElementConnectivity.h	(revision 12013)
+@@ -14,6 +14,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "ElementConnectivity"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/EnumToString/EnumToString.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/EnumToString/EnumToString.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/EnumToString/EnumToString.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+     
+ /* serial input macros: */
+ #define ENUMIN (mxArray*)prhs[0]
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/StringToEnum/StringToEnum.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/StringToEnum/StringToEnum.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/StringToEnum/StringToEnum.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+     
+ /* serial input macros: */
+ #define NAME (mxArray*)prhs[0]
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgTriangulate/BamgTriangulate.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgTriangulate/BamgTriangulate.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/BamgTriangulate/BamgTriangulate.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "BamgTriangulate"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "InterpFromMeshToMesh2d"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMeshNoDensity/TriMeshNoDensity.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMeshNoDensity/TriMeshNoDensity.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMeshNoDensity/TriMeshNoDensity.h	(revision 12013)
+@@ -13,6 +13,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ void TriMeshNoDensityUsage(void);
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am	(revision 12013)
+@@ -54,14 +54,14 @@
+ 
+ if MATLAB
+ AM_LDFLAGS  = $(MEXLINK)
+-AM_CXXFLAGS +=  -DMATLAB  -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread 
++AM_CXXFLAGS +=  -D_HAVE_MATLAB_ -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread 
+ LDADD       += $(MEXLIB) ../c/libISSMMatlab.a
+ 
+ endif
+ 
+ if PYTHON
+ AM_LDFLAGS  = $(PYTHONLINK)
+-AM_CXXFLAGS +=  -DNPY_NO_DEPRECATED_API 
++AM_CXXFLAGS +=  -D_HAVE_PYTHON_ -DNPY_NO_DEPRECATED_API 
+ LDADD       += $(BOOSTLIB) $(PYTHONLIB) ../c/libISSMPython.a
+ endif
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/ContourToMesh/ContourToMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/ContourToMesh/ContourToMesh.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/ContourToMesh/ContourToMesh.h	(revision 12013)
+@@ -14,6 +14,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__
+ #define __FUNCT__ "ContourToMesh"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Xy2ll/Xy2ll.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Xy2ll/Xy2ll.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Xy2ll/Xy2ll.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "Xy2ll"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.h	(revision 12013)
+@@ -24,6 +24,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ #include "../../c/io/io.h"
+ #include "../../c/EnumDefinitions/EnumDefinitions.h"
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/KMLMeshWrite/KMLMeshWrite.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/KMLMeshWrite/KMLMeshWrite.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/KMLMeshWrite/KMLMeshWrite.h	(revision 12013)
+@@ -12,6 +12,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+ 
+ #undef __FUNCT__ 
+ #define __FUNCT__  "KMLMeshWrite"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Chaco/Chaco.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Chaco/Chaco.h	(revision 12012)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Chaco/Chaco.h	(revision 12013)
+@@ -16,6 +16,7 @@
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
+     
+ /* serial input macros: */
+ #define A_IN (mxArray*)prhs[0]
Index: /issm/oecreview/Archive/12010-12040/ISSM-12013-12014.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12013-12014.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12013-12014.diff	(revision 12325)
@@ -0,0 +1,5511 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Contour.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Contour.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Contour.h	(revision 12014)
+@@ -33,11 +33,6 @@
+ 		void  DeepEcho(void);
+ 		int   Id(void);
+ 		int   MyRank(void);
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize(void);
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum(void);
+ 		Object* copy(void);
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/DofIndexing.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/DofIndexing.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/DofIndexing.cpp	(revision 12014)
+@@ -207,129 +207,4 @@
+ 	printf("\n");
+ }		
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION DofIndexing::Marshall{{{1*/
+-void  DofIndexing::Marshall(char** pmarshalled_dataset){
+ 
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-	bool  flagdoftype; //to indicate if there are some doftype or if NULL
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*preliminary: */
+-	if(this->doftype)flagdoftype=true;
+-	else             flagdoftype=false;
+-
+-	/*get enum type of DofIndexing: */
+-	enum_type=DofIndexingEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*marshall DofIndexing data: */
+-	memcpy(marshalled_dataset,&gsize,sizeof(gsize));marshalled_dataset+=sizeof(gsize);
+-	memcpy(marshalled_dataset,&fsize,sizeof(fsize));marshalled_dataset+=sizeof(fsize);
+-	memcpy(marshalled_dataset,&ssize,sizeof(ssize));marshalled_dataset+=sizeof(ssize);
+-	memcpy(marshalled_dataset,&flagdoftype,sizeof(flagdoftype));marshalled_dataset+=sizeof(flagdoftype);
+-	memcpy(marshalled_dataset,&clone,sizeof(clone));marshalled_dataset+=sizeof(clone);
+-	
+-	if(this->gsize>0){
+-		memcpy(marshalled_dataset,f_set,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool);
+-		memcpy(marshalled_dataset,s_set,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool);
+-		memcpy(marshalled_dataset,svalues,gsize*sizeof(double)); marshalled_dataset+=gsize*sizeof(double);
+-		if(flagdoftype){ memcpy(marshalled_dataset,doftype,gsize*sizeof(int)); marshalled_dataset+=gsize*sizeof(int); }
+-		memcpy(marshalled_dataset,gdoflist,gsize*sizeof(int)); marshalled_dataset+=gsize*sizeof(int);
+-	}
+-	if(this->fsize>0 && this->fsize!=UNDEF){ memcpy(marshalled_dataset,fdoflist,fsize*sizeof(int)); marshalled_dataset+=fsize*sizeof(int);}
+-	if(this->ssize>0 && this->ssize!=UNDEF){ memcpy(marshalled_dataset,sdoflist,ssize*sizeof(int)); marshalled_dataset+=ssize*sizeof(int);}
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-/*FUNCTION DofIndexing::MarshallSize{{{1*/
+-int   DofIndexing::MarshallSize(){
+-
+-	int size=0;
+-
+-	size+=4*sizeof(int)+sizeof(bool);
+-	if(this->gsize>0){
+-		size+= 2*this->gsize*sizeof(bool)+
+-			   this->gsize*sizeof(double)+
+-			   this->gsize*sizeof(int);
+-		if(this->doftype)size+=this->gsize*sizeof(int);
+-	}
+-	if(this->fsize>0 && this->fsize!=UNDEF)size+=this->fsize*sizeof(int);
+-	if(this->ssize>0 && this->ssize!=UNDEF)size+=this->ssize*sizeof(int);
+-
+-	size+=sizeof(int); //sizeof(int) for enum type
+-
+-	return size;
+-}
+-/*}}}*/
+-/*FUNCTION DofIndexing::Demarshall{{{1*/
+-void  DofIndexing::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_type;
+-	bool  flagdoftype;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of object since DofIndexing is not directly called by DataSet: */
+-	memcpy(&enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);
+-
+-	/*easy part: */
+-	memcpy(&gsize,marshalled_dataset,sizeof(gsize));marshalled_dataset+=sizeof(gsize);
+-	memcpy(&fsize,marshalled_dataset,sizeof(fsize));marshalled_dataset+=sizeof(fsize);
+-	memcpy(&ssize,marshalled_dataset,sizeof(ssize));marshalled_dataset+=sizeof(ssize);
+-	memcpy(&flagdoftype,marshalled_dataset,sizeof(flagdoftype));marshalled_dataset+=sizeof(flagdoftype);
+-	memcpy(&clone,marshalled_dataset,sizeof(clone));marshalled_dataset+=sizeof(clone);
+-	
+-	/*Allocate: */
+-	if(this->gsize>0){
+-		this->f_set=(bool*)xmalloc(this->gsize*sizeof(bool));
+-		this->s_set=(bool*)xmalloc(this->gsize*sizeof(bool));
+-		this->svalues=(double*)xmalloc(this->gsize*sizeof(double));
+-		if(flagdoftype)this->doftype=(int*)xmalloc(this->gsize*sizeof(int));
+-		else           this->doftype=NULL;
+-		this->gdoflist=(int*)xmalloc(this->gsize*sizeof(int));
+-	}
+-	else{
+-		this->f_set=NULL;
+-		this->s_set=NULL;
+-		this->svalues=NULL;
+-		this->doftype=NULL;
+-		this->gdoflist=NULL;
+-	}
+-	if(this->fsize>0)
+-	 this->fdoflist=(int*)xmalloc(this->fsize*sizeof(int));
+-	else
+-	 this->fdoflist=NULL;
+-	if(this->ssize>0)
+-	 this->sdoflist=(int*)xmalloc(this->ssize*sizeof(int));
+-	else
+-	 this->sdoflist=NULL;
+-
+-	/*Copy arrays: */
+-	if(this->gsize>0){
+-		memcpy(f_set,marshalled_dataset,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool);
+-		memcpy(s_set,marshalled_dataset,gsize*sizeof(bool));marshalled_dataset+=gsize*sizeof(bool);
+-		memcpy(svalues,marshalled_dataset,gsize*sizeof(double));marshalled_dataset+=gsize*sizeof(double);
+-		if(flagdoftype){memcpy(doftype,marshalled_dataset,gsize*sizeof(int));marshalled_dataset+=gsize*sizeof(int); }
+-		memcpy(gdoflist,marshalled_dataset,gsize*sizeof(int));marshalled_dataset+=gsize*sizeof(int);
+-	}
+-	
+-	if(this->fsize>0 && this->fsize!=UNDEF){ memcpy(this->fdoflist,marshalled_dataset,this->fsize*sizeof(int));marshalled_dataset+=this->fsize*sizeof(int); }
+-	if(this->ssize>0 && this->ssize!=UNDEF){ memcpy(this->sdoflist,marshalled_dataset,this->ssize*sizeof(int));marshalled_dataset+=this->ssize*sizeof(int); }
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+-
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Materials/Matice.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Materials/Matice.cpp	(revision 12014)
+@@ -87,76 +87,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION Matice::Marshall {{{1*/
+-void  Matice::Marshall(char** pmarshalled_dataset){
+-
+-	/*Intermediaries*/
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-	char* marshalled_inputs=NULL;
+-	int   marshalled_inputs_size;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of Matice: */
+-	enum_type=MaticeEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*marshall Matice data: */
+-	memcpy(marshalled_dataset,&mid,sizeof(mid));marshalled_dataset+=sizeof(mid);
+-
+-	/*Marshall hooks: */
+-	helement->Marshall(&marshalled_dataset);
+-
+-	/*Marshall inputs: */
+-	marshalled_inputs_size=inputs->MarshallSize();
+-	marshalled_inputs=inputs->Marshall();
+-	memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));
+-	marshalled_dataset+=marshalled_inputs_size;
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-
+-	/*clean up and return*/
+-	xfree((void**)&marshalled_inputs);
+-}
+-/*}}}*/
+-/*FUNCTION Matice::MarshallSize{{{1*/
+-int   Matice::MarshallSize(){
+-
+-	return sizeof(mid)
+-	  +helement->MarshallSize()
+-	  +inputs->MarshallSize()
+-	  +sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}*/
+-/*FUNCTION Matice::Demarshall {{{1*/
+-void  Matice::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&mid,marshalled_dataset,sizeof(mid));marshalled_dataset+=sizeof(mid);
+-
+-	/*demarshall hooks: */
+-	helement=new Hook(); helement->Demarshall(&marshalled_dataset);
+-
+-	/*demarshall inputs: */
+-	inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset); 
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION Matice::ObjectEnum{{{1*/
+ int Matice::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Materials/Matpar.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Materials/Matpar.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Materials/Matpar.cpp	(revision 12014)
+@@ -101,91 +101,6 @@
+ 	return my_rank; 
+ }
+ /*}}}1*/
+-#ifdef _SERIAL_
+-/*FUNCTION Matpar::Marshall {{{1*/
+-void  Matpar::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of Matpar: */
+-	enum_type=MatparEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*marshall Matpar data: */
+-	memcpy(marshalled_dataset,&mid,sizeof(mid));marshalled_dataset+=sizeof(mid);
+-	memcpy(marshalled_dataset,&rho_ice,sizeof(rho_ice));marshalled_dataset+=sizeof(rho_ice);
+-	memcpy(marshalled_dataset,&rho_water,sizeof(rho_water));marshalled_dataset+=sizeof(rho_water);
+-	memcpy(marshalled_dataset,&mu_water,sizeof(mu_water));marshalled_dataset+=sizeof(mu_water);
+-	memcpy(marshalled_dataset,&heatcapacity,sizeof(heatcapacity));marshalled_dataset+=sizeof(heatcapacity);
+-	memcpy(marshalled_dataset,&thermalconductivity,sizeof(thermalconductivity));marshalled_dataset+=sizeof(thermalconductivity);
+-	memcpy(marshalled_dataset,&latentheat,sizeof(latentheat));marshalled_dataset+=sizeof(latentheat);
+-	memcpy(marshalled_dataset,&beta,sizeof(beta));marshalled_dataset+=sizeof(beta);
+-	memcpy(marshalled_dataset,&meltingpoint,sizeof(meltingpoint));marshalled_dataset+=sizeof(meltingpoint);
+-	memcpy(marshalled_dataset,&referencetemperature,sizeof(referencetemperature));marshalled_dataset+=sizeof(referencetemperature);
+-	memcpy(marshalled_dataset,&mixed_layer_capacity,sizeof(mixed_layer_capacity));marshalled_dataset+=sizeof(mixed_layer_capacity);
+-	memcpy(marshalled_dataset,&thermal_exchange_velocity,sizeof(thermal_exchange_velocity));marshalled_dataset+=sizeof(thermal_exchange_velocity);
+-	memcpy(marshalled_dataset,&g,sizeof(g));marshalled_dataset+=sizeof(g);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}1*/
+-/*FUNCTION Matpar::MarshallSize {{{1*/
+-int   Matpar::MarshallSize(){
+-
+-	return sizeof(mid)+
+-		sizeof(rho_ice)+
+-		sizeof(rho_water)+
+-		sizeof(mu_water)+
+-		sizeof(heatcapacity)+
+-		sizeof(thermalconductivity)+
+-		sizeof(latentheat)+
+-		sizeof(beta)+
+-		sizeof(meltingpoint)+
+-		sizeof(referencetemperature)+
+-		sizeof(mixed_layer_capacity)+
+-		sizeof(thermal_exchange_velocity)+
+-		sizeof(g)+
+-		sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}1*/
+-/*FUNCTION Matpar::Demarshall {{{1*/
+-void  Matpar::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-
+-	memcpy(&mid,marshalled_dataset,sizeof(mid));marshalled_dataset+=sizeof(mid);
+-	memcpy(&rho_ice,marshalled_dataset,sizeof(rho_ice));marshalled_dataset+=sizeof(rho_ice);
+-	memcpy(&rho_water,marshalled_dataset,sizeof(rho_water));marshalled_dataset+=sizeof(rho_water);
+-	memcpy(&mu_water,marshalled_dataset,sizeof(mu_water));marshalled_dataset+=sizeof(mu_water);
+-	memcpy(&heatcapacity,marshalled_dataset,sizeof(heatcapacity));marshalled_dataset+=sizeof(heatcapacity);
+-	memcpy(&thermalconductivity,marshalled_dataset,sizeof(thermalconductivity));marshalled_dataset+=sizeof(thermalconductivity);
+-	memcpy(&latentheat,marshalled_dataset,sizeof(latentheat));marshalled_dataset+=sizeof(latentheat);
+-	memcpy(&beta,marshalled_dataset,sizeof(beta));marshalled_dataset+=sizeof(beta);
+-	memcpy(&meltingpoint,marshalled_dataset,sizeof(meltingpoint));marshalled_dataset+=sizeof(meltingpoint);
+-	memcpy(&referencetemperature,marshalled_dataset,sizeof(referencetemperature));marshalled_dataset+=sizeof(referencetemperature);
+-	memcpy(&mixed_layer_capacity,marshalled_dataset,sizeof(mixed_layer_capacity));marshalled_dataset+=sizeof(mixed_layer_capacity);
+-	memcpy(&thermal_exchange_velocity,marshalled_dataset,sizeof(thermal_exchange_velocity));marshalled_dataset+=sizeof(thermal_exchange_velocity);
+-	memcpy(&g,marshalled_dataset,sizeof(g));marshalled_dataset+=sizeof(g);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}1*/
+-#endif
+ /*FUNCTION Matpar::ObjectEnum{{{1*/
+ int Matpar::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Materials/Matice.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Materials/Matice.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Materials/Matice.h	(revision 12014)
+@@ -34,11 +34,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Materials/Matpar.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Materials/Matpar.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Materials/Matpar.h	(revision 12014)
+@@ -45,11 +45,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.h	(revision 12014)
+@@ -14,10 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./Param.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -41,11 +37,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.h	(revision 12014)
+@@ -14,10 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./Param.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -41,11 +37,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/FileParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/FileParam.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/FileParam.cpp	(revision 12014)
+@@ -61,24 +61,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION FileParam::Marshall{{{1*/
+-void  FileParam::Marshall(char** pmarshalled_dataset){
+-
+-	_error_("FileParam is a pointer and cannot be marshalled");
+-}
+-/*}}}*/
+-/*FUNCTION FileParam::MarshallSize{{{1*/
+-int   FileParam::MarshallSize(){
+-	_error_("FileParam is a pointer and cannot be marshalled");
+-}
+-/*}}}*/
+-/*FUNCTION FileParam::Demarshall{{{1*/
+-void  FileParam::Demarshall(char** pmarshalled_dataset){
+-	_error_("FileParam is a pointer and cannot be marshalled");
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION FileParam::ObjectEnum{{{1*/
+ int FileParam::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h	(revision 12014)
+@@ -14,10 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./Param.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -43,11 +39,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.h	(revision 12014)
+@@ -14,10 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./Param.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -42,11 +38,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/Param.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/Param.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/Param.h	(revision 12014)
+@@ -15,10 +15,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "../Object.h"
+ #include "../Node.h"
+ /*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/FileParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/FileParam.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/FileParam.h	(revision 12014)
+@@ -14,10 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./Param.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -40,11 +36,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntVecParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntVecParam.cpp	(revision 12014)
+@@ -90,65 +90,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION IntVecParam::Marshall{{{1*/
+-void  IntVecParam::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of IntVecParam: */
+-	enum_value=IntVecParamEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall IntVecParam data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+-	if(M)memcpy(marshalled_dataset,values,M*sizeof(int));marshalled_dataset+=M*sizeof(int);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION IntVecParam::MarshallSize{{{1*/
+-int   IntVecParam::MarshallSize(){
+-	
+-	return sizeof(M)+
+-		+M*sizeof(int)
+-		+sizeof(enum_type)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION IntVecParam::Demarshall{{{1*/
+-void  IntVecParam::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*data: */
+-	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
+-	if(M) {
+-		values=(int*)xmalloc(M*sizeof(int));
+-		memcpy(values,marshalled_dataset,M*sizeof(int));marshalled_dataset+=M*sizeof(int);
+-	}
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION IntVecParam::ObjectEnum{{{1*/
+ int IntVecParam::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntParam.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntParam.cpp	(revision 12014)
+@@ -61,57 +61,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION IntParam::Marshall{{{1*/
+-void  IntParam::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of IntParam: */
+-	enum_value=IntParamEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall IntParam data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION IntParam::MarshallSize{{{1*/
+-int   IntParam::MarshallSize(){
+-	
+-	return sizeof(value)+
+-		+sizeof(enum_type)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION IntParam::Demarshall{{{1*/
+-void  IntParam::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION IntParam::ObjectEnum{{{1*/
+ int IntParam::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/BoolParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/BoolParam.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/BoolParam.cpp	(revision 12014)
+@@ -61,57 +61,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION BoolParam::Marshall{{{1*/
+-void  BoolParam::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of BoolParam: */
+-	enum_value=BoolParamEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall BoolParam data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION BoolParam::MarshallSize{{{1*/
+-int   BoolParam::MarshallSize(){
+-	
+-	return sizeof(value)+
+-		+sizeof(enum_type)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION BoolParam::Demarshall{{{1*/
+-void  BoolParam::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION BoolParam::ObjectEnum{{{1*/
+ int BoolParam::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntMatParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntMatParam.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntMatParam.cpp	(revision 12014)
+@@ -77,66 +77,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION IntMatParam::Marshall{{{1*/
+-void  IntMatParam::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of IntMatParam: */
+-	enum_value=IntMatParamEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall IntMatParam data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+-	memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);
+-	memcpy(marshalled_dataset,value,M*N*sizeof(int));marshalled_dataset+=M*N*sizeof(int);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION IntMatParam::MarshallSize{{{1*/
+-int   IntMatParam::MarshallSize(){
+-	
+-	return sizeof(M)
+-		+sizeof(N)
+-		+M*N*sizeof(int)
+-		+sizeof(enum_type)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION IntMatParam::Demarshall{{{1*/
+-void  IntMatParam::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*data: */
+-	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
+-	memcpy(&N,marshalled_dataset,sizeof(N));marshalled_dataset+=sizeof(N);
+-	value=(int*)xmalloc(M*N*sizeof(int));
+-	memcpy(value,marshalled_dataset,M*N*sizeof(int));marshalled_dataset+=M*N*sizeof(int);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION IntMatParam::ObjectEnum{{{1*/
+ int IntMatParam::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntVecParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntVecParam.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntVecParam.h	(revision 12014)
+@@ -14,10 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./Param.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -42,11 +38,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntParam.h	(revision 12014)
+@@ -14,10 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./Param.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -41,11 +37,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/BoolParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/BoolParam.h	(revision 12014)
+@@ -14,10 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./Param.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -40,11 +36,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntMatParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntMatParam.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/IntMatParam.h	(revision 12014)
+@@ -14,10 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./Param.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -42,11 +38,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/VectorParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/VectorParam.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/VectorParam.cpp	(revision 12014)
+@@ -71,90 +71,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION VectorParam::Marshall{{{1*/
+-void  VectorParam::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-	int   M;
+-	double* serial_value=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of VectorParam: */
+-	enum_value=VectorParamEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall VectorParam data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	if(value){
+-		value->GetSize(&M);
+-		serial_value=value->ToMPISerial();
+-		memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+-		memcpy(marshalled_dataset,serial_value,M*sizeof(double));marshalled_dataset+=(M*sizeof(double));
+-	}
+-	else{
+-		M=0;
+-		memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+-	}
+-	/*Free ressources:*/
+-	xfree((void**)&serial_value);
+-
+-	/*return:*/
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION VectorParam::MarshallSize{{{1*/
+-int   VectorParam::MarshallSize(){
+-
+-	int M=0;
+-	if(value)value->GetSize(&M);
+-
+-	return sizeof(M)+M*sizeof(double)
+-		+sizeof(enum_type)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION VectorParam::Demarshall{{{1*/
+-void  VectorParam::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-	double* serial_vec=NULL;
+-	int   M;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*data: */
+-	
+-	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
+-	if(M){
+-		serial_vec=(double*)xmalloc(M*sizeof(double));
+-		memcpy(serial_vec,marshalled_dataset,M*sizeof(double));marshalled_dataset+=(M*sizeof(double));
+-
+-		value=new Vector(serial_vec,M);
+-	}
+-	else{
+-		value=NULL;
+-	}
+-
+-	/*Free ressources:*/
+-	xfree((void**)&serial_vec);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION VectorParam::ObjectEnum{{{1*/
+ int VectorParam::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/MatrixParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/MatrixParam.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/MatrixParam.cpp	(revision 12014)
+@@ -69,95 +69,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION MatrixParam::Marshall{{{1*/
+-void  MatrixParam::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-	int   M,N;
+-	double* serial_mat=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of MatrixParam: */
+-	enum_value=MatrixParamEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall MatrixParam data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	if(value){
+-		value->GetSize(&M,&N);
+-		serial_mat=value->ToSerial();
+-		memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+-		memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);
+-		memcpy(marshalled_dataset,serial_mat,M*N*sizeof(double));marshalled_dataset+=(M*N*sizeof(double));
+-	}
+-	else{
+-		M=0;
+-		N=0;
+-		memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+-		memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);
+-	}
+-	
+-	/*Free ressources:*/
+-	xfree((void**)&serial_mat);
+-
+-	/*return:*/
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION MatrixParam::MarshallSize{{{1*/
+-int   MatrixParam::MarshallSize(){
+-
+-	int M=0;
+-	int N=0;
+-	if(value)value->GetSize(&M,&N);
+-			
+-	return sizeof(M)+
+-		sizeof(N)+
+-		M*N*sizeof(double)+
+-		+sizeof(enum_type)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION MatrixParam::Demarshall{{{1*/
+-void  MatrixParam::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   M,N;
+-	double* serial_mat=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*data: */
+-	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
+-	memcpy(&N,marshalled_dataset,sizeof(N));marshalled_dataset+=sizeof(N);
+-	if(M!=0 && N!=0){
+-		serial_mat=(double*)xmalloc(M*N*sizeof(double));
+-		memcpy(serial_mat,marshalled_dataset,M*N*sizeof(double));marshalled_dataset+=(M*N*sizeof(double));
+-		value=new Matrix(serial_mat,M,N,.001);
+-	}
+-	else{
+-		value=NULL;
+-	}
+-
+-	/*Free ressources:*/
+-	xfree((void**)&serial_mat);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION MatrixParam::ObjectEnum{{{1*/
+ int MatrixParam::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp	(revision 12014)
+@@ -91,98 +91,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION StringArrayParam::Marshall{{{1*/
+-void  StringArrayParam::Marshall(char** pmarshalled_dataset){
+-
+-	int   i;
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-	int   stringsize;
+-	char* string=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of StringArrayParam: */
+-	enum_value=StringArrayParamEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&numstrings,sizeof(numstrings));marshalled_dataset+=sizeof(numstrings);
+-	for(i=0;i<numstrings;i++){
+-		string=this->value[i];
+-		stringsize=strlen(string)+1;
+-		
+-		memcpy(marshalled_dataset,&stringsize,sizeof(stringsize));marshalled_dataset+=sizeof(stringsize);
+-		memcpy(marshalled_dataset,string,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);
+-	}
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION StringArrayParam::MarshallSize{{{1*/
+-int   StringArrayParam::MarshallSize(){
+-
+-	int i;
+-	int marshallsize=0;
+-	int stringsize;
+-	char* string=NULL;
+-
+-	marshallsize+=sizeof(numstrings);
+-
+-	for(i=0;i<numstrings;i++){
+-		string=this->value[i];
+-		stringsize=strlen(string)+1;
+-		marshallsize+=sizeof(stringsize);
+-		marshallsize+=stringsize*sizeof(char);
+-	}
+-	
+-	marshallsize+=sizeof(enum_type);
+-	marshallsize+=sizeof(int); //sizeof(int) for enum value
+-
+-	return marshallsize;
+-}
+-/*}}}*/
+-/*FUNCTION StringArrayParam::Demarshall{{{1*/
+-void  StringArrayParam::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-	int   stringsize;
+-	char* string=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-
+-	memcpy(&numstrings,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
+-	if(numstrings){
+-		this->value=(char**)xmalloc(numstrings*sizeof(char*));
+-
+-		for(i=0;i<numstrings;i++){
+-			memcpy(&stringsize,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
+-
+-			string=(char*)xmalloc(stringsize*sizeof(char));
+-			memcpy(string,marshalled_dataset,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);
+-
+-			this->value[i]=string;
+-		}
+-	}
+-	else this->value=NULL;
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION StringArrayParam::ObjectEnum{{{1*/
+ int StringArrayParam::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringParam.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringParam.cpp	(revision 12014)
+@@ -63,70 +63,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION StringParam::Marshall{{{1*/
+-void  StringParam::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-	int   stringsize;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of StringParam: */
+-	enum_value=StringParamEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-
+-	/*marshall data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	stringsize=strlen(this->value)+1;
+-	
+-	memcpy(marshalled_dataset,&stringsize,sizeof(stringsize));marshalled_dataset+=sizeof(stringsize);
+-	memcpy(marshalled_dataset,this->value,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION StringParam::MarshallSize{{{1*/
+-int   StringParam::MarshallSize(){
+-
+-	int stringsize;
+-	stringsize=strlen(this->value)+1;
+-	
+-	return sizeof(int)+
+-		stringsize*sizeof(char)+
+-		sizeof(enum_type)+
+-		sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION StringParam::Demarshall{{{1*/
+-void  StringParam::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-	int   stringsize;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-
+-	memcpy(&stringsize,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
+-	
+-	this->value=(char*)xmalloc(stringsize*sizeof(char));
+-	memcpy(this->value,marshalled_dataset,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION StringParam::ObjectEnum{{{1*/
+ int StringParam::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/VectorParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/VectorParam.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/VectorParam.h	(revision 12014)
+@@ -14,10 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./Param.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -41,11 +37,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12014)
+@@ -74,63 +74,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION DoubleVecParam::Marshall{{{1*/
+-void  DoubleVecParam::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of DoubleVecParam: */
+-	enum_value=DoubleVecParamEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall DoubleVecParam data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+-	memcpy(marshalled_dataset,values,M*sizeof(double));marshalled_dataset+=M*sizeof(double);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION DoubleVecParam::MarshallSize{{{1*/
+-int   DoubleVecParam::MarshallSize(){
+-	
+-	return sizeof(M)
+-		+M*sizeof(double)
+-		+sizeof(enum_type)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION DoubleVecParam::Demarshall{{{1*/
+-void  DoubleVecParam::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*data: */
+-	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
+-	values=(double*)xmalloc(M*sizeof(double));
+-	memcpy(values,marshalled_dataset,M*sizeof(double));marshalled_dataset+=M*sizeof(double);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION DoubleVecParam::ObjectEnum{{{1*/
+ int DoubleVecParam::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.h	(revision 12014)
+@@ -14,10 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./Param.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/MatrixParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/MatrixParam.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/MatrixParam.h	(revision 12014)
+@@ -14,10 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./Param.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -41,11 +37,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12014)
+@@ -58,57 +58,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION DoubleParam::Marshall{{{1*/
+-void  DoubleParam::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of DoubleParam: */
+-	enum_value=DoubleParamEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall DoubleParam data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION DoubleParam::MarshallSize{{{1*/
+-int   DoubleParam::MarshallSize(){
+-	
+-	return sizeof(value)+
+-		+sizeof(enum_type)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION DoubleParam::Demarshall{{{1*/
+-void  DoubleParam::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION DoubleParam::ObjectEnum{{{1*/
+ int DoubleParam::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringArrayParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringArrayParam.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringArrayParam.h	(revision 12014)
+@@ -14,10 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./Param.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -43,11 +39,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp	(revision 12014)
+@@ -126,113 +126,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION DoubleMatArrayParam::Marshall{{{1*/
+-void  DoubleMatArrayParam::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of DoubleMatArrayParam: */
+-	enum_value=DoubleMatArrayParamEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall DoubleMatArrayParam data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+-	if(M){
+-		memcpy(marshalled_dataset,mdim_array,M*sizeof(int));marshalled_dataset+=M*sizeof(int);
+-		memcpy(marshalled_dataset,ndim_array,M*sizeof(int));marshalled_dataset+=M*sizeof(int);
+-		for(i=0;i<M;i++){
+-			double* matrix=this->array[i];
+-			int     m=this->mdim_array[i];
+-			int     n=this->ndim_array[i];
+-			memcpy(marshalled_dataset,&m,sizeof(m));marshalled_dataset+=sizeof(m);
+-			memcpy(marshalled_dataset,&n,sizeof(n));marshalled_dataset+=sizeof(n);
+-			if(m*n)memcpy(marshalled_dataset,matrix,m*n*sizeof(double));marshalled_dataset+=m*n*sizeof(double);
+-		}
+-	}
+-	
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION DoubleMatArrayParam::MarshallSize{{{1*/
+-int   DoubleMatArrayParam::MarshallSize(){
+-
+-	int size=0;
+-	int i;
+-
+-	size+=sizeof(enum_type)+
+-		sizeof(M)+
+-		M*sizeof(int)+
+-		M*sizeof(int);
+-
+-	for(i=0;i<M;i++){
+-		int     m=this->mdim_array[i];
+-		int     n=this->ndim_array[i];
+-		size+=sizeof(m)+sizeof(n)+m*n*sizeof(double);
+-	}
+-	size+=sizeof(int); //sizeof(int) for enum value
+-
+-	return  size;
+-}
+-/*}}}*/
+-/*FUNCTION DoubleMatArrayParam::Demarshall{{{1*/
+-void  DoubleMatArrayParam::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-	double* matrix=NULL;
+-	int     m,n;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum value, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	
+-	/*data: */
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
+-	if(M){
+-		this->mdim_array=(int*)xmalloc(M*sizeof(int));
+-		this->ndim_array=(int*)xmalloc(M*sizeof(int));
+-		memcpy(this->mdim_array,marshalled_dataset,M*sizeof(int));marshalled_dataset+=M*sizeof(int);
+-		memcpy(this->ndim_array,marshalled_dataset,M*sizeof(int));marshalled_dataset+=M*sizeof(int);
+-
+-		this->array=(double**)xmalloc(M*sizeof(double*));
+-		for(i=0;i<M;i++){
+-			memcpy(&m,marshalled_dataset,sizeof(m));marshalled_dataset+=sizeof(m);
+-			memcpy(&n,marshalled_dataset,sizeof(n));marshalled_dataset+=sizeof(n);
+-			if(m*n){
+-				matrix=(double*)xmalloc(m*n*sizeof(double));
+-				memcpy(matrix,marshalled_dataset,m*n*sizeof(double));marshalled_dataset+=m*n*sizeof(double);
+-			}
+-			else{
+-				matrix=NULL;
+-			}
+-			this->array[i]=matrix;
+-		}
+-	}
+-	else{
+-		this->array=NULL;
+-		this->mdim_array=NULL;
+-		this->ndim_array=NULL;
+-	}
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION DoubleMatArrayParam::ObjectEnum{{{1*/
+ int DoubleMatArrayParam::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringParam.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringParam.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/StringParam.h	(revision 12014)
+@@ -14,10 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./Param.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -41,11 +37,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12014)
+@@ -77,66 +77,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION DoubleMatParam::Marshall{{{1*/
+-void  DoubleMatParam::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of DoubleMatParam: */
+-	enum_value=DoubleMatParamEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall DoubleMatParam data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+-	memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);
+-	memcpy(marshalled_dataset,value,M*N*sizeof(double));marshalled_dataset+=M*N*sizeof(double);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION DoubleMatParam::MarshallSize{{{1*/
+-int   DoubleMatParam::MarshallSize(){
+-	
+-	return sizeof(M)
+-		+sizeof(N)
+-		+M*N*sizeof(double)
+-		+sizeof(enum_type)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION DoubleMatParam::Demarshall{{{1*/
+-void  DoubleMatParam::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*data: */
+-	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
+-	memcpy(&N,marshalled_dataset,sizeof(N));marshalled_dataset+=sizeof(N);
+-	value=(double*)xmalloc(M*N*sizeof(double));
+-	memcpy(value,marshalled_dataset,M*N*sizeof(double));marshalled_dataset+=M*N*sizeof(double);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION DoubleMatParam::ObjectEnum{{{1*/
+ int DoubleMatParam::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Segment.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Segment.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Segment.cpp	(revision 12014)
+@@ -70,24 +70,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION Segment::Marshall{{{1*/
+-void  Segment::Marshall(char** pmarshalled_dataset){
+-
+-	_error_(" not supported yet!");
+-}
+-/*}}}*/
+-/*FUNCTION Segment::MarshallSize{{{1*/
+-int   Segment::MarshallSize(){
+-	_error_(" not supported yet!");
+-}
+-/*}}}*/
+-/*FUNCTION Segment::Demarshall{{{1*/
+-void  Segment::Demarshall(char** pmarshalled_dataset){
+-	_error_(" not supported yet!");
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION Segment::ObjectEnum{{{1*/
+ int Segment::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Vector.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Vector.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Vector.h	(revision 12014)
+@@ -20,10 +20,6 @@
+ #include "adolc.h"
+ #endif
+ 		
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include "mex.h"
+-#endif
+-
+ /*}}}*/
+ 
+ class Vector{
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Hook.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Hook.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Hook.h	(revision 12014)
+@@ -33,11 +33,6 @@
+ 		/*Object like functionality:{{{1*/
+ 		void       Echo(void);
+ 		void       DeepEcho(void);
+-		#ifdef _SERIAL_
+-		void       Marshall(char** pmarshalled_dataset);
+-		int        MarshallSize();
+-		void       Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		Object*    copy(void);
+ 		/*}}}*/
+ 		/*Hook management: {{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionStruct.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionStruct.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionStruct.h	(revision 12014)
+@@ -29,11 +29,6 @@
+ 		void  DeepEcho(char* indent);
+ 		int   Id(){_error_("Not implemented yet");};
+ 		int   MyRank(){_error_("Not implemented yet");};
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet");};
+-		int   MarshallSize(){_error_("Not implemented yet");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet");};
+-		#endif
+ 		int   ObjectEnum(){return OptionStructEnum;};
+ 		Object* copy(){_error_("Not implemented yet");};
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionDouble.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionDouble.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionDouble.h	(revision 12014)
+@@ -29,11 +29,6 @@
+ 		void  DeepEcho(char* indent);
+ 		int   Id(){_error_("Not implemented yet");};
+ 		int   MyRank(){_error_("Not implemented yet");};
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet");};
+-		int   MarshallSize(){_error_("Not implemented yet");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet");};
+-		#endif
+ 		int   ObjectEnum(){return OptionDoubleEnum;};
+ 		Object* copy(){_error_("Not implemented yet");};
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionLogical.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionLogical.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionLogical.h	(revision 12014)
+@@ -29,11 +29,6 @@
+ 		void  DeepEcho(char* indent);
+ 		int   Id(){_error_("Not implemented yet");};
+ 		int   MyRank(){_error_("Not implemented yet");};
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet");};
+-		int   MarshallSize(){_error_("Not implemented yet");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet");};
+-		#endif
+ 		int   ObjectEnum(){return OptionLogicalEnum;};
+ 		Object* copy(){_error_("Not implemented yet");};
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionChar.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionChar.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionChar.h	(revision 12014)
+@@ -29,11 +29,6 @@
+ 		void  DeepEcho(char* indent);
+ 		int   Id(){_error_("Not implemented yet");};
+ 		int   MyRank(){_error_("Not implemented yet");};
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet");};
+-		int   MarshallSize(){_error_("Not implemented yet");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet");};
+-		#endif
+ 		int   ObjectEnum(){return OptionCharEnum;};
+ 		Object* copy(){_error_("Not implemented yet");};
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/Option.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/Option.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/Option.h	(revision 12014)
+@@ -32,11 +32,6 @@
+ 		virtual void  DeepEcho(char* indent);
+ 		int   Id(){_error_("Not implemented yet");};
+ 		int   MyRank(){_error_("Not implemented yet");};
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet");};
+-		int   MarshallSize(){_error_("Not implemented yet");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet");};
+-		#endif
+ 		int   ObjectEnum(){return OptionEnum;};
+ 		Object* copy(){_error_("Not implemented yet");};
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionCell.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionCell.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionCell.h	(revision 12014)
+@@ -29,11 +29,6 @@
+ 		void  DeepEcho(char* indent);
+ 		int   Id(){_error_("Not implemented yet");};
+ 		int   MyRank(){_error_("Not implemented yet");};
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset){_error_("Not implemented yet");};
+-		int   MarshallSize(){_error_("Not implemented yet");};
+-		void  Demarshall(char** pmarshalled_dataset){_error_("Not implemented yet");};
+-		#endif
+ 		int   ObjectEnum(){return OptionCellEnum;};
+ 		Object* copy(){_error_("Not implemented yet");};
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Vertex.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Vertex.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Vertex.cpp	(revision 12014)
+@@ -91,80 +91,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION Vertex::Marshall {{{1*/
+-void  Vertex::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of Vertex: */
+-	enum_type=VertexEnum;
+-
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-
+-	/*marshall Vertex data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);
+-	memcpy(marshalled_dataset,&x,sizeof(x));marshalled_dataset+=sizeof(x);
+-	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);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-/*FUNCTION Vertex::MarshallSize {{{1*/
+-int   Vertex::MarshallSize(){
+-	
+-	return sizeof(id)+
+-		sizeof(sid)+
+-		sizeof(x)+
+-		sizeof(y)+
+-		sizeof(z)+
+-		sizeof(sigma)+
+-		sizeof(connectivity)+
+-		sizeof(dof)+
+-		sizeof(clone)+
+-		+sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}*/
+-/*FUNCTION Vertex::Demarshall {{{1*/
+-void  Vertex::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);
+-	memcpy(&x,marshalled_dataset,sizeof(x));marshalled_dataset+=sizeof(x);
+-	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);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION Vertex::ObjectEnum{{{1*/
+ int Vertex::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Icefront.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Icefront.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Icefront.h	(revision 12014)
+@@ -48,11 +48,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Numericalflux.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Numericalflux.cpp	(revision 12014)
+@@ -188,89 +188,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION Numericalflux::Marshall {{{1*/
+-void  Numericalflux::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-	char* marshalled_inputs=NULL;
+-	int   marshalled_inputs_size;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of Numericalflux: */
+-	enum_type=NumericalfluxEnum;
+-
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-
+-	/*marshall Numericalflux data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-
+-	/*Marshall hooks: */
+-	hnodes->Marshall(&marshalled_dataset);
+-	helement->Marshall(&marshalled_dataset);
+-
+-	/*Marshall inputs: */
+-	marshalled_inputs_size=inputs->MarshallSize();
+-	marshalled_inputs=inputs->Marshall();
+-	memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));
+-	marshalled_dataset+=marshalled_inputs_size;
+-
+-	/*parameters: don't do anything about it. parameters are marshalled somewhere else!*/
+-
+-	xfree((void**)&marshalled_inputs);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-/*FUNCTION Numericalflux::MarshallSize{{{1*/
+-int   Numericalflux::MarshallSize(){
+-
+-	return sizeof(id)
+-		+sizeof(analysis_type)
+-		+hnodes->MarshallSize()
+-		+helement->MarshallSize()
+-		+inputs->MarshallSize()
+-		+sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}*/
+-/*FUNCTION Numericalflux::Demarshall {{{1*/
+-void  Numericalflux::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-
+-	/*demarshall hooks: */
+-	hnodes=new Hook(); hnodes->Demarshall(&marshalled_dataset);
+-	helement=new Hook(); helement->Demarshall(&marshalled_dataset);
+-	
+-	/*demarshall inputs: */
+-	inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset); 
+-
+-	/*parameters: may not exist even yet, so let Configure handle it: */
+-	this->parameters=NULL;
+-	this->element=NULL;
+-	this->nodes=NULL;
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION Numericalflux::ObjectEnum{{{1*/
+ int Numericalflux::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Penpair.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Penpair.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Penpair.cpp	(revision 12014)
+@@ -84,69 +84,6 @@
+ 	return my_rank; 
+ }
+ /*}}}1*/
+-#ifdef _SERIAL_
+-/*FUNCTION Penpair::Marshall {{{1*/
+-void  Penpair::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of Penpair: */
+-	enum_type=PenpairEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*marshall Penpair data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-
+-	/*Marshall hooks*/
+-	hnodes->Marshall(&marshalled_dataset);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}1*/
+-/*FUNCTION Penpair::MarshallSize {{{1*/
+-int   Penpair::MarshallSize(){
+-
+-	return sizeof(id)+
+-		+sizeof(analysis_type)
+-		+hnodes->MarshallSize()
+-		+sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}1*/
+-/*FUNCTION Penpair::Demarshall {{{1*/
+-void  Penpair::Demarshall(char** pmarshalled_dataset){
+-
+-	int i;
+-	char* marshalled_dataset=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-
+-	/*demarshall hooks: */
+-	hnodes=new Hook(); hnodes->Demarshall(&marshalled_dataset);
+-
+-	/*pointers are garbabe, until configuration is carried out: */
+-	nodes=NULL;
+-	parameters=NULL;
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}1*/
+-#endif
+ /*FUNCTION Penpair::ObjectEnum{{{1*/
+ int Penpair::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Riftfront.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Riftfront.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Riftfront.h	(revision 12014)
+@@ -56,11 +56,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Numericalflux.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Numericalflux.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Numericalflux.h	(revision 12014)
+@@ -44,11 +44,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Penpair.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Penpair.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Penpair.h	(revision 12014)
+@@ -36,11 +36,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Pengrid.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Pengrid.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Pengrid.cpp	(revision 12014)
+@@ -131,100 +131,6 @@
+ 	return my_rank; 
+ }
+ /*}}}1*/
+-#ifdef _SERIAL_
+-/*FUNCTION Pengrid::Marshall {{{1*/
+-void  Pengrid::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-	char* marshalled_inputs=NULL;
+-	int   marshalled_inputs_size;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of Tria: */
+-	enum_type=PengridEnum;
+-
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-
+-	/*marshall Tria data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-	memcpy(marshalled_dataset,&active,sizeof(active));marshalled_dataset+=sizeof(active);
+-	memcpy(marshalled_dataset,&zigzag_counter,sizeof(zigzag_counter));marshalled_dataset+=sizeof(zigzag_counter);
+-
+-	/*Marshall hooks: */
+-	hnode->Marshall(&marshalled_dataset);
+-	helement->Marshall(&marshalled_dataset);
+-	hmatpar->Marshall(&marshalled_dataset);
+-
+-	/*Marshall inputs: */
+-	marshalled_inputs_size=inputs->MarshallSize();
+-	marshalled_inputs=inputs->Marshall();
+-	memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));
+-	marshalled_dataset+=marshalled_inputs_size;
+-
+-	/*parameters: don't do anything about it. parameters are marshalled somewhere else!*/
+-
+-	xfree((void**)&marshalled_inputs);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-/*FUNCTION Pengrid::MarshallSize {{{1*/
+-int   Pengrid::MarshallSize(){
+-	
+-	return sizeof(id)
+-		+sizeof(analysis_type)
+-		+sizeof(active)
+-		+sizeof(zigzag_counter)
+-		+hnode->MarshallSize()
+-		+helement->MarshallSize()
+-		+hmatpar->MarshallSize()
+-		+inputs->MarshallSize()
+-		+sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}*/
+-/*FUNCTION Pengrid::Demarshall {{{1*/
+-void  Pengrid::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-	memcpy(&active,marshalled_dataset,sizeof(active));marshalled_dataset+=sizeof(active);
+-	memcpy(&zigzag_counter,marshalled_dataset,sizeof(zigzag_counter));marshalled_dataset+=sizeof(zigzag_counter);
+-
+-	/*demarshall hooks: */
+-	hnode=new Hook(); hnode->Demarshall(&marshalled_dataset);
+-	helement=new Hook(); helement->Demarshall(&marshalled_dataset);
+-	hmatpar=new Hook(); hmatpar->Demarshall(&marshalled_dataset);
+-	
+-	/*demarshall inputs: */
+-	inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset); 
+-
+-	/*parameters: may not exist even yet, so let Configure handle it: */
+-	this->parameters=NULL;
+-	this->node=NULL;
+-	this->element=NULL;
+-	this->matpar=NULL;
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION Pengrid::ObjectEnum{{{1*/
+ int Pengrid::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Icefront.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Icefront.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Icefront.cpp	(revision 12014)
+@@ -162,94 +162,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION Icefront::Marshall {{{1*/
+-void  Icefront::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-	char* marshalled_inputs=NULL;
+-	int   marshalled_inputs_size;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of Icefront: */
+-	enum_type=IcefrontEnum;
+-
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-
+-	/*marshall Icefront data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-
+-	/*Marshall hooks: */
+-	hnodes->Marshall(&marshalled_dataset);
+-	helement->Marshall(&marshalled_dataset);
+-	hmatpar->Marshall(&marshalled_dataset);
+-
+-	/*Marshall inputs: */
+-	marshalled_inputs_size=inputs->MarshallSize();
+-	marshalled_inputs=inputs->Marshall();
+-	memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));
+-	marshalled_dataset+=marshalled_inputs_size;
+-
+-	/*parameters: don't do anything about it. parameters are marshalled somewhere else!*/
+-
+-	xfree((void**)&marshalled_inputs);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION Icefront::MarshallSize {{{1*/
+-int   Icefront::MarshallSize(){
+-	
+-	return sizeof(id)
+-		+sizeof(analysis_type)
+-		+hnodes->MarshallSize()
+-		+helement->MarshallSize()
+-		+hmatpar->MarshallSize()
+-		+inputs->MarshallSize()
+-		+sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}*/
+-/*FUNCTION Icefront::Demarshall {{{1*/
+-void  Icefront::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-
+-	/*demarshall hooks: */
+-	hnodes=new Hook(); hnodes->Demarshall(&marshalled_dataset);
+-	helement=new Hook(); helement->Demarshall(&marshalled_dataset);
+-	hmatpar=new Hook(); hmatpar->Demarshall(&marshalled_dataset);
+-	
+-	/*pointers are garbabe, until configuration is carried out: */
+-	nodes=NULL;
+-	element=NULL;
+-	matpar=NULL;
+-
+-	/*demarshall inputs: */
+-	inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset); 
+-
+-	/*parameters: may not exist even yet, so let Configure handle it: */
+-	this->parameters=NULL;
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION Icefront::ObjectEnum{{{1*/
+ int Icefront::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Pengrid.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Pengrid.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Pengrid.h	(revision 12014)
+@@ -49,11 +49,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Riftfront.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Riftfront.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Loads/Riftfront.cpp	(revision 12014)
+@@ -191,125 +191,6 @@
+ 	return my_rank; 
+ }
+ /*}}}1*/
+-#ifdef _SERIAL_
+-/*FUNCTION Riftfront::Marshall {{{1*/
+-void  Riftfront::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-	char* marshalled_inputs=NULL;
+-	int   marshalled_inputs_size;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of Riftfront: */
+-	enum_type=RiftfrontEnum;
+-
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-
+-	/*marshall Riftfront data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-	memcpy(marshalled_dataset,&active,sizeof(active));marshalled_dataset+=sizeof(active);
+-	memcpy(marshalled_dataset,&normal,sizeof(normal));marshalled_dataset+=sizeof(normal);
+-	memcpy(marshalled_dataset,&length,sizeof(length));marshalled_dataset+=sizeof(length);
+-	memcpy(marshalled_dataset,&fraction,sizeof(fraction));marshalled_dataset+=sizeof(fraction);
+-	memcpy(marshalled_dataset,&frozen,sizeof(frozen));marshalled_dataset+=sizeof(frozen);
+-	memcpy(marshalled_dataset,&state,sizeof(state));marshalled_dataset+=sizeof(state);
+-	memcpy(marshalled_dataset,&counter,sizeof(counter));marshalled_dataset+=sizeof(counter);
+-	memcpy(marshalled_dataset,&prestable,sizeof(prestable));marshalled_dataset+=sizeof(prestable);
+-	memcpy(marshalled_dataset,&penalty_lock,sizeof(penalty_lock));marshalled_dataset+=sizeof(penalty_lock);
+-	memcpy(marshalled_dataset,&material_converged,sizeof(material_converged));marshalled_dataset+=sizeof(material_converged);
+-
+-	/*Marshall hooks: */
+-	hnodes->Marshall(&marshalled_dataset);
+-	helements->Marshall(&marshalled_dataset);
+-	hmatpar->Marshall(&marshalled_dataset);
+-
+-	/*Marshall inputs: */
+-	marshalled_inputs_size=inputs->MarshallSize();
+-	marshalled_inputs=inputs->Marshall();
+-	memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));
+-	marshalled_dataset+=marshalled_inputs_size;
+-
+-	/*parameters: don't do anything about it. parameters are marshalled somewhere else!*/
+-
+-	xfree((void**)&marshalled_inputs);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-/*FUNCTION Riftfront::MarshallSize {{{1*/
+-int   Riftfront::MarshallSize(){
+-	
+-	return sizeof(id)
+-		+sizeof(analysis_type)
+-		+sizeof(active)
+-		+sizeof(normal)
+-		+sizeof(length)
+-		+sizeof(fraction)
+-		+sizeof(frozen)
+-		+sizeof(state)
+-		+sizeof(counter)
+-		+sizeof(prestable)
+-		+sizeof(penalty_lock)
+-		+sizeof(material_converged)
+-		+hnodes->MarshallSize()
+-		+helements->MarshallSize()
+-		+hmatpar->MarshallSize()
+-		+inputs->MarshallSize()
+-		+sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}*/
+-/*FUNCTION Riftfront::Demarshall {{{1*/
+-void  Riftfront::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-	memcpy(&active,marshalled_dataset,sizeof(active));marshalled_dataset+=sizeof(active);
+-	memcpy(&normal,marshalled_dataset,sizeof(normal));marshalled_dataset+=sizeof(normal);
+-	memcpy(&length,marshalled_dataset,sizeof(length));marshalled_dataset+=sizeof(length);
+-	memcpy(&fraction,marshalled_dataset,sizeof(fraction));marshalled_dataset+=sizeof(fraction);
+-	memcpy(&frozen,marshalled_dataset,sizeof(frozen));marshalled_dataset+=sizeof(frozen);
+-	memcpy(&state,marshalled_dataset,sizeof(state));marshalled_dataset+=sizeof(state);
+-	memcpy(&counter,marshalled_dataset,sizeof(counter));marshalled_dataset+=sizeof(counter);
+-	memcpy(&prestable,marshalled_dataset,sizeof(prestable));marshalled_dataset+=sizeof(prestable);
+-	memcpy(&penalty_lock,marshalled_dataset,sizeof(penalty_lock));marshalled_dataset+=sizeof(penalty_lock);
+-	memcpy(&material_converged,marshalled_dataset,sizeof(material_converged));marshalled_dataset+=sizeof(material_converged);
+-
+-	/*demarshall hooks: */
+-	hnodes=new Hook();    hnodes->Demarshall(&marshalled_dataset);
+-	helements=new Hook(); helements->Demarshall(&marshalled_dataset);
+-	hmatpar=new Hook();   hmatpar->Demarshall(&marshalled_dataset);
+-
+-	/*pointers are garbabe, until configuration is carried out: */
+-	nodes=NULL;
+-	elements=NULL;
+-	matpar=NULL;
+-	
+-	/*demarshall inputs: */
+-	inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset); 
+-
+-	/*parameters: may not exist even yet, so let Configure handle it: */
+-	this->parameters=NULL;
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION Riftfront::ObjectEnum{{{1*/
+ int Riftfront::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp	(revision 12014)
+@@ -95,75 +95,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION DoubleMatExternalResult::Marshall{{{1*/
+-void  DoubleMatExternalResult::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of DoubleMatExternalResult: */
+-	enum_value=DoubleMatExternalResultEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall DoubleMatExternalResult data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+-	memcpy(marshalled_dataset,&N,sizeof(N));marshalled_dataset+=sizeof(N);
+-	memcpy(marshalled_dataset,values,M*sizeof(double));marshalled_dataset+=M*sizeof(double);
+-	memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION DoubleMatExternalResult::MarshallSize{{{1*/
+-int   DoubleMatExternalResult::MarshallSize(){
+-	
+-	return sizeof(M)
+-		+sizeof(N)
+-		+M*N*sizeof(double)
+-		+sizeof(id)
+-		+sizeof(enum_type)
+-		+sizeof(step)
+-		+sizeof(time)
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION DoubleMatExternalResult::Demarshall{{{1*/
+-void  DoubleMatExternalResult::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*data: */
+-	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
+-	memcpy(&N,marshalled_dataset,sizeof(N));marshalled_dataset+=sizeof(N);
+-	values=(double*)xmalloc(M*N*sizeof(double));
+-	memcpy(values,marshalled_dataset,M*N*sizeof(double));marshalled_dataset+=M*N*sizeof(double);
+-	memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION DoubleMatExternalResult::ObjectEnum{{{1*/
+ int DoubleMatExternalResult::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp	(revision 12014)
+@@ -79,110 +79,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION PetscVecExternalResult::Marshall{{{1*/
+-void  PetscVecExternalResult::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-	int   M;
+-	double* serial_value=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of PetscVecExternalResult: */
+-	enum_value=PetscVecExternalResultEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall PetscVecExternalResult data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);
+-	
+-	if(value){
+-		VecGetSize(value,&M);
+-		VecToMPISerial(&serial_value,value);
+-		memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+-		memcpy(marshalled_dataset,serial_value,M*sizeof(double));marshalled_dataset+=(M*sizeof(double));
+-	}
+-	else{
+-		M=0;
+-		memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+-	}
+-	/*Free ressources:*/
+-	xfree((void**)&serial_value);
+-
+-	/*return:*/
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION PetscVecExternalResult::MarshallSize{{{1*/
+-int   PetscVecExternalResult::MarshallSize(){
+-
+-	int M=0;
+-	if(value)VecGetSize(value,&M);
+-
+-	return sizeof(M)+M*sizeof(double)
+-		+sizeof(id)
+-		+sizeof(enum_type)
+-		+sizeof(step)
+-		+sizeof(time)
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION PetscVecExternalResult::Demarshall{{{1*/
+-void  PetscVecExternalResult::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-	int   M;
+-	double* serial_vec=NULL;
+-	int*    idxm=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*data: */
+-	memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);
+-	
+-	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
+-	if(M){
+-		serial_vec=(double*)xmalloc(M*sizeof(double));
+-		memcpy(serial_vec,marshalled_dataset,M*sizeof(double));marshalled_dataset+=(M*sizeof(double));
+-
+-		value=NewVec(M);
+-		idxm=(int*)xmalloc(M*sizeof(int));
+-		for(i=0;i<M;i++)idxm[i]=i;
+-		VecSetValues(value,M,idxm,serial_vec,INSERT_VALUES);
+-
+-		VecAssemblyBegin(value);
+-		VecAssemblyEnd(value);
+-
+-		
+-	}
+-	else{
+-		value=NULL;
+-	}
+-
+-	/*Free ressources:*/
+-	xfree((void**)&serial_vec);
+-	xfree((void**)&idxm);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION PetscVecExternalResult::ObjectEnum{{{1*/
+ int PetscVecExternalResult::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h	(revision 12014)
+@@ -14,11 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+-
+ #include "./ExternalResult.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -47,11 +42,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h	(revision 12014)
+@@ -15,11 +15,7 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+ 
+-
+ #include "./ExternalResult.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -47,11 +43,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h	(revision 12014)
+@@ -15,10 +15,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "./ExternalResult.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -45,11 +41,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h	(revision 12014)
+@@ -15,11 +15,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+-
+ #include "./ExternalResult.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -46,11 +41,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+@@ -61,4 +51,4 @@
+ 		int   GetStep(void);
+ 		/*}}}*/
+ };
+-#endif  /* _BOOLEXTERNALRESULT_H */
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h	(revision 12014)
+@@ -14,11 +14,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+-
+ #include "./ExternalResult.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -48,11 +43,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h	(revision 12014)
+@@ -15,11 +15,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+-
+ #include "./ExternalResult.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -47,11 +42,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/ExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/ExternalResult.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/ExternalResult.h	(revision 12014)
+@@ -15,10 +15,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+ #include "../Object.h"
+ #include "../Node.h"
+ /*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp	(revision 12014)
+@@ -70,79 +70,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION StringExternalResult::Marshall{{{1*/
+-void  StringExternalResult::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-	int   stringsize;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of StringExternalResult: */
+-	enum_value=StringExternalResultEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-
+-	/*marshall data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	stringsize=strlen(this->value)+1;
+-	
+-	memcpy(marshalled_dataset,&stringsize,sizeof(stringsize));marshalled_dataset+=sizeof(stringsize);
+-	memcpy(marshalled_dataset,this->value,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);
+-	memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION StringExternalResult::MarshallSize{{{1*/
+-int   StringExternalResult::MarshallSize(){
+-
+-	int stringsize;
+-	stringsize=strlen(this->value)+1;
+-	
+-	return sizeof(int)+
+-		+stringsize*sizeof(char)
+-		+sizeof(id)
+-		+sizeof(enum_type)
+-		+sizeof(step)
+-		+sizeof(time)
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION StringExternalResult::Demarshall{{{1*/
+-void  StringExternalResult::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-	int   stringsize;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-
+-	memcpy(&stringsize,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
+-	
+-	this->value=(char*)xmalloc(stringsize*sizeof(char));
+-	memcpy(value,marshalled_dataset,stringsize*sizeof(char));marshalled_dataset+=stringsize*sizeof(char);
+-	memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION StringExternalResult::ObjectEnum{{{1*/
+ int StringExternalResult::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp	(revision 12014)
+@@ -86,72 +86,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION DoubleVecExternalResult::Marshall{{{1*/
+-void  DoubleVecExternalResult::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of DoubleVecExternalResult: */
+-	enum_value=DoubleVecExternalResultEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall DoubleVecExternalResult data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&M,sizeof(M));marshalled_dataset+=sizeof(M);
+-	memcpy(marshalled_dataset,values,M*sizeof(double));marshalled_dataset+=M*sizeof(double);
+-	memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION DoubleVecExternalResult::MarshallSize{{{1*/
+-int   DoubleVecExternalResult::MarshallSize(){
+-	
+-	return sizeof(M)
+-		+M*sizeof(double)
+-		+sizeof(id)
+-		+sizeof(enum_type)
+-		+sizeof(step)
+-		+sizeof(time)
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION DoubleVecExternalResult::Demarshall{{{1*/
+-void  DoubleVecExternalResult::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*data: */
+-	memcpy(&M,marshalled_dataset,sizeof(M));marshalled_dataset+=sizeof(M);
+-	values=(double*)xmalloc(M*sizeof(double));
+-	memcpy(values,marshalled_dataset,M*sizeof(double));marshalled_dataset+=M*sizeof(double);
+-	memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION DoubleVecExternalResult::ObjectEnum{{{1*/
+ int DoubleVecExternalResult::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp	(revision 12014)
+@@ -67,66 +67,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION DoubleExternalResult::Marshall{{{1*/
+-void  DoubleExternalResult::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of DoubleExternalResult: */
+-	enum_value=DoubleExternalResultEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall DoubleExternalResult data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+-	memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION DoubleExternalResult::MarshallSize{{{1*/
+-int   DoubleExternalResult::MarshallSize(){
+-	
+-	return sizeof(value)+
+-		+sizeof(id)
+-		+sizeof(enum_type)
+-		+sizeof(step)
+-		+sizeof(time)
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION DoubleExternalResult::Demarshall{{{1*/
+-void  DoubleExternalResult::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+-	memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION DoubleExternalResult::ObjectEnum{{{1*/
+ int DoubleExternalResult::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp	(revision 12014)
+@@ -67,66 +67,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION IntExternalResult::Marshall{{{1*/
+-void  IntExternalResult::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of IntExternalResult: */
+-	enum_value=IntExternalResultEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall IntExternalResult data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+-	memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION IntExternalResult::MarshallSize{{{1*/
+-int   IntExternalResult::MarshallSize(){
+-	
+-	return sizeof(value)+
+-		+sizeof(id)
+-		+sizeof(enum_type)
+-		+sizeof(step)
+-		+sizeof(time)
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION IntExternalResult::Demarshall{{{1*/
+-void  IntExternalResult::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+-	memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION IntExternalResult::ObjectEnum{{{1*/
+ int IntExternalResult::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp	(revision 12014)
+@@ -67,66 +67,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION BoolExternalResult::Marshall{{{1*/
+-void  BoolExternalResult::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of BoolExternalResult: */
+-	enum_value=BoolExternalResultEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall BoolExternalResult data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+-	memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION BoolExternalResult::MarshallSize{{{1*/
+-int   BoolExternalResult::MarshallSize(){
+-	
+-	return sizeof(value)+
+-		+sizeof(id)
+-		+sizeof(enum_type)
+-		+sizeof(step)
+-		+sizeof(time)
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION BoolExternalResult::Demarshall{{{1*/
+-void  BoolExternalResult::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+-	memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION BoolExternalResult::ObjectEnum{{{1*/
+ int BoolExternalResult::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h	(revision 12014)
+@@ -15,11 +15,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+-
+-
+ #include "./ExternalResult.h"
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+@@ -47,11 +42,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.h	(revision 12014)
+@@ -32,11 +32,6 @@
+ 					void  DeepEcho(){_error_("not implemented yet");};
+ 					int   Id(){_error_("not implemented yet");};
+ 					int   MyRank(){_error_("not implemented yet");};
+-					#ifdef _SERIAL_
+-					void  Marshall(char** pmarshalled_dataset){_error_("not implemented yet");};
+-					int   MarshallSize(){_error_("not implemented yet");};
+-					void  Demarshall(char** pmarshalled_dataset){_error_("not implemented yet");};
+-					#endif
+ 					int   ObjectEnum(){_error_("not implemented yet");};
+ 					Object* copy(){_error_("not implemented yet");};
+ 			};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Contour.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Contour.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Contour.cpp	(revision 12014)
+@@ -78,73 +78,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION Contour::Marshall{{{1*/
+-void  Contour::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-	char* marshalled_inputs=NULL;
+-	int   marshalled_inputssize;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of Contour: */
+-	enum_type=ContourEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*marshall Contour data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&nods,sizeof(nods));marshalled_dataset+=sizeof(nods);
+-	memcpy(marshalled_dataset,&closed,sizeof(closed));marshalled_dataset+=sizeof(closed);
+-	memcpy(marshalled_dataset,x,nods*sizeof(double));marshalled_dataset+=nods*sizeof(double);
+-	memcpy(marshalled_dataset,y,nods*sizeof(double));marshalled_dataset+=nods*sizeof(double);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-/*FUNCTION Contour::MarshallSize{{{1*/
+-int   Contour::MarshallSize(){
+-
+-	return sizeof(id)+
+-		sizeof(nods)+
+-		sizeof(closed)+
+-		2*nods*sizeof(double)+
+-		sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}*/
+-/*FUNCTION Contour::Demarshall{{{1*/
+-void  Contour::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&nods,marshalled_dataset,sizeof(nods));marshalled_dataset+=sizeof(nods);
+-	memcpy(&closed,marshalled_dataset,sizeof(closed));marshalled_dataset+=sizeof(closed);
+-
+-	if(nods){
+-		this->x=(double*)xmalloc(nods*sizeof(double));
+-		this->y=(double*)xmalloc(nods*sizeof(double));
+-		memcpy(x,marshalled_dataset,nods*sizeof(double));marshalled_dataset+=nods*sizeof(double);
+-		memcpy(y,marshalled_dataset,nods*sizeof(double));marshalled_dataset+=nods*sizeof(double);
+-	}
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION Contour::ObjectEnum{{{1*/
+ int Contour::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.h	(revision 12014)
+@@ -32,11 +32,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp	(revision 12014)
+@@ -66,63 +66,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION PentaP1ElementResult::Marshall{{{1*/
+-void  PentaP1ElementResult::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of PentaP1ElementResult: */
+-	enum_value=PentaP1ElementResultEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall PentaP1ElementResult data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);
+-	memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);
+-	memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION PentaP1ElementResult::MarshallSize{{{1*/
+-int   PentaP1ElementResult::MarshallSize(){
+-	
+-	return sizeof(values)+
+-		+sizeof(enum_type)
+-		+sizeof(time)
+-		+sizeof(step)
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION PentaP1ElementResult::Demarshall{{{1*/
+-void  PentaP1ElementResult::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);
+-	memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);
+-	memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION PentaP1ElementResult::ObjectEnum{{{1*/
+ int PentaP1ElementResult::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.cpp	(revision 12014)
+@@ -63,63 +63,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION DoubleElementResult::Marshall{{{1*/
+-void  DoubleElementResult::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of DoubleElementResult: */
+-	enum_value=DoubleElementResultEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall DoubleElementResult data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+-	memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);
+-	memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION DoubleElementResult::Demarshall{{{1*/
+-void  DoubleElementResult::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+-	memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);
+-	memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-/*FUNCTION DoubleElementResult::MarshallSize{{{1*/
+-int   DoubleElementResult::MarshallSize(){
+-	
+-	return sizeof(value)+
+-		+sizeof(enum_type)
+-		+sizeof(time)
+-		+sizeof(step)
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION DoubleElementResult::ObjectEnum{{{1*/
+ int DoubleElementResult::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.cpp	(revision 12014)
+@@ -63,63 +63,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION BoolElementResult::Marshall{{{1*/
+-void  BoolElementResult::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of BoolElementResult: */
+-	enum_value=BoolElementResultEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall BoolElementResult data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+-	memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);
+-	memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION BoolElementResult::Demarshall{{{1*/
+-void  BoolElementResult::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+-	memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);
+-	memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-/*FUNCTION BoolElementResult::MarshallSize{{{1*/
+-int   BoolElementResult::MarshallSize(){
+-	
+-	return sizeof(value)+
+-		+sizeof(enum_type)
+-		+sizeof(time)
+-		+sizeof(step)
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION BoolElementResult::ObjectEnum{{{1*/
+ int BoolElementResult::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h	(revision 12014)
+@@ -33,11 +33,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h	(revision 12014)
+@@ -34,11 +34,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/BoolElementResult.h	(revision 12014)
+@@ -34,11 +34,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp	(revision 12014)
+@@ -65,64 +65,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION TriaP1ElementResult::Marshall{{{1*/
+-void  TriaP1ElementResult::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of TriaP1ElementResult: */
+-	enum_value=TriaP1ElementResultEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall TriaP1ElementResult data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);
+-	memcpy(marshalled_dataset,&time,sizeof(time));marshalled_dataset+=sizeof(time);
+-	memcpy(marshalled_dataset,&step,sizeof(step));marshalled_dataset+=sizeof(step);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION TriaP1ElementResult::MarshallSize{{{1*/
+-int   TriaP1ElementResult::MarshallSize(){
+-	
+-	return sizeof(values)
+-		+sizeof(enum_type)
+-		+sizeof(time)
+-		+sizeof(step)
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION TriaP1ElementResult::Demarshall{{{1*/
+-void  TriaP1ElementResult::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);
+-	memcpy(&time,marshalled_dataset,sizeof(time));marshalled_dataset+=sizeof(time);
+-	memcpy(&step,marshalled_dataset,sizeof(step));marshalled_dataset+=sizeof(step);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION TriaP1ElementResult::ObjectEnum{{{1*/
+ int TriaP1ElementResult::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Node.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Node.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Node.h	(revision 12014)
+@@ -43,11 +43,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy(){_error_("Not implemented yet (similar to Elements)");};
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12014)
+@@ -122,160 +122,6 @@
+ }
+ /*}}}*/
+ 
+-/*Marshall*/
+-#ifdef _SERIAL_
+-/*FUNCTION Tria::Marshall {{{1*/
+-void  Tria::Marshall(char** pmarshalled_dataset){
+-
+-	int   i;
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-	char* marshalled_inputs=NULL;
+-	int   marshalled_inputs_size;
+-	char* marshalled_results=NULL;
+-	int   marshalled_results_size;
+-	int   flaghook; //to indicate if hook is NULL or exists
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of Tria: */
+-	enum_type=TriaEnum;
+-
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-
+-	/*marshall Tria data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);
+-	memcpy(marshalled_dataset,&numanalyses,sizeof(numanalyses));marshalled_dataset+=sizeof(numanalyses);
+-
+-	/*Mershall Ref: */
+-	for(i=0;i<numanalyses;i++){
+-		memcpy(marshalled_dataset,&element_type_list[i],sizeof(element_type_list[i]));marshalled_dataset+=sizeof(element_type_list[i]);
+-	}
+-
+-	/*Marshall hooks: */
+-	for(i=0;i<numanalyses;i++){
+-		if(hnodes[i]){
+-			/*Set flag to 1 as there is a hook */
+-			flaghook=1;
+-			memcpy(marshalled_dataset,&flaghook,sizeof(flaghook));marshalled_dataset+=sizeof(flaghook);
+-			hnodes[i]->Marshall(&marshalled_dataset);
+-		}
+-		else{
+-			/*Set flag to 0 and do not marshall flag as there is no Hook */
+-			flaghook=0;
+-			memcpy(marshalled_dataset,&flaghook,sizeof(flaghook));marshalled_dataset+=sizeof(flaghook);
+-		}
+-	}
+-	hmatice->Marshall(&marshalled_dataset);
+-	hmatpar->Marshall(&marshalled_dataset);
+-
+-	/*Marshall inputs: */
+-	marshalled_inputs_size=inputs->MarshallSize();
+-	marshalled_inputs=inputs->Marshall();
+-	memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));
+-	marshalled_dataset+=marshalled_inputs_size;
+-
+-	/*Marshall results: */
+-	marshalled_results_size=results->MarshallSize();
+-	marshalled_results=results->Marshall();
+-	memcpy(marshalled_dataset,marshalled_results,marshalled_results_size*sizeof(char));
+-	marshalled_dataset+=marshalled_results_size;
+-
+-	/*parameters: don't do anything about it. parameters are marshalled somewhere else!*/
+-
+-	xfree((void**)&marshalled_inputs);
+-	xfree((void**)&marshalled_results);
+-
+-	/*marshall horizontal neighbors: */
+-	memcpy(marshalled_dataset,horizontalneighborsids,3*sizeof(int));marshalled_dataset+=3*sizeof(int);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-/*FUNCTION Tria::MarshallSize {{{1*/
+-int   Tria::MarshallSize(){
+-
+-	int i;
+-	int hnodes_size=0;;
+-
+-	for(i=0;i<numanalyses;i++){
+-		hnodes_size+=sizeof(int); //Flag 0 or 1
+-		if (hnodes[i]) hnodes_size+=hnodes[i]->MarshallSize();
+-	}
+-
+-	return sizeof(id)
+-	  +sizeof(sid)
+-	  +hnodes_size
+-	  +sizeof(numanalyses)
+-	  +numanalyses*sizeof(int) //element_type_lists
+-	  +hmatice->MarshallSize()
+-	  +hmatpar->MarshallSize()
+-	  +inputs->MarshallSize()
+-	  +results->MarshallSize()
+-	  +3*sizeof(int)
+-	  +sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}*/
+-/*FUNCTION Tria::Demarshall {{{1*/
+-void  Tria::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int i;
+-	int flaghook;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);
+-	memcpy(&numanalyses,marshalled_dataset,sizeof(numanalyses));marshalled_dataset+=sizeof(numanalyses);
+-
+-	/*demarshall Ref: */
+-	this->element_type_list=(int*)xmalloc(this->numanalyses*sizeof(int));
+-	for(i=0;i<numanalyses;i++){ memcpy(&element_type_list[i],marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);}
+-
+-	/*allocate dynamic memory: */
+-	this->hnodes=new Hook*[this->numanalyses];
+-	/*demarshall hooks: */
+-	for(i=0;i<numanalyses;i++){
+-		memcpy(&flaghook,marshalled_dataset,sizeof(flaghook));marshalled_dataset+=sizeof(flaghook);
+-		if(flaghook){ // there is a hook so demarshall it
+-			hnodes[i]=new Hook();
+-			hnodes[i]->Demarshall(&marshalled_dataset);
+-		}
+-		else hnodes[i]=NULL; //There is no hook so it is NULL
+-	}
+-	hmatice=new Hook(); hmatice->Demarshall(&marshalled_dataset);
+-	hmatpar=new Hook(); hmatpar->Demarshall(&marshalled_dataset);
+-
+-	/*pointers are garbabe, until configuration is carried out: */
+-	nodes=NULL;
+-	matice=NULL;
+-	matpar=NULL;
+-	
+-	/*demarshall inputs: */
+-	inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset); 
+-	results=(Results*)DataSetDemarshallRaw(&marshalled_dataset); 
+-
+-	/*parameters: may not exist even yet, so let Configure handle it: */
+-	this->parameters=NULL;
+-
+-	/*neighbors: */
+-	memcpy(&this->horizontalneighborsids,marshalled_dataset,3*sizeof(int));marshalled_dataset+=3*sizeof(int);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+-
+ /*Other*/
+ /*FUNCTION Tria::AverageOntoPartition {{{1*/
+ void  Tria::AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,double* vertex_response,double* qmu_part){
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.h	(revision 12014)
+@@ -50,11 +50,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.cpp	(revision 12014)
+@@ -142,163 +142,6 @@
+ }
+ /*}}}*/
+ 
+-/*Marshall*/
+-#ifdef _SERIAL_
+-/*FUNCTION Penta::Marshall {{{1*/
+-void  Penta::Marshall(char** pmarshalled_dataset){
+-
+-	int   i;
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-	char* marshalled_inputs=NULL;
+-	int   marshalled_inputs_size;
+-	char* marshalled_results=NULL;
+-	int   marshalled_results_size;
+-	int   flaghook; //to indicate if hook is NULL or exists
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of Penta: */
+-	enum_type=PentaEnum;
+-
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-
+-	/*marshall Penta data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);
+-	memcpy(marshalled_dataset,&numanalyses,sizeof(numanalyses));marshalled_dataset+=sizeof(numanalyses);
+-
+-	/*Mershall Ref: */
+-	for(i=0;i<numanalyses;i++){
+-		memcpy(marshalled_dataset,&element_type_list[i],sizeof(element_type_list[i]));marshalled_dataset+=sizeof(element_type_list[i]);
+-	}
+-
+-	/*Marshall hooks: */
+-	for(i=0;i<numanalyses;i++){
+-		if(hnodes[i]){
+-			/*Set flag to 1 as there is a hook */
+-			flaghook=1;
+-			memcpy(marshalled_dataset,&flaghook,sizeof(flaghook));marshalled_dataset+=sizeof(flaghook);
+-			hnodes[i]->Marshall(&marshalled_dataset);
+-		}
+-		else{
+-			/*Set flag to 0 and do not marshall flag as there is no Hook */
+-			flaghook=0;
+-			memcpy(marshalled_dataset,&flaghook,sizeof(flaghook));marshalled_dataset+=sizeof(flaghook);
+-		}
+-	}
+-	hmatice->Marshall(&marshalled_dataset);
+-	hmatpar->Marshall(&marshalled_dataset);
+-	hneighbors->Marshall(&marshalled_dataset);
+-
+-	/*Marshall inputs and results: */
+-	marshalled_inputs_size=inputs->MarshallSize();
+-	marshalled_inputs=inputs->Marshall();
+-	memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));
+-	marshalled_dataset+=marshalled_inputs_size;
+-
+-	marshalled_results_size=results->MarshallSize();
+-	marshalled_results=results->Marshall();
+-	memcpy(marshalled_dataset,marshalled_results,marshalled_results_size*sizeof(char));
+-	marshalled_dataset+=marshalled_results_size;
+-
+-	/*parameters: don't do anything about it. parameters are marshalled somewhere else!*/
+-
+-	xfree((void**)&marshalled_inputs);
+-	xfree((void**)&marshalled_results);
+-
+-	/*marshall horizontal neighbors: */
+-	memcpy(marshalled_dataset,horizontalneighborsids,3*sizeof(int));marshalled_dataset+=3*sizeof(int);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-/*FUNCTION Penta::MarshallSize {{{1*/
+-int   Penta::MarshallSize(){
+-
+-	int i;
+-	int hnodes_size=0;;
+-
+-	for(i=0;i<numanalyses;i++){
+-		hnodes_size+=sizeof(int); //Flag 0 or 1
+-		if (hnodes[i]) hnodes_size+=hnodes[i]->MarshallSize();
+-	}
+-
+-	return sizeof(id)
+-		+sizeof(sid)
+-		+hnodes_size
+-		+sizeof(numanalyses)
+-		+numanalyses*sizeof(int) //element_type_lists
+-		+hmatice->MarshallSize()
+-		+hmatpar->MarshallSize()
+-		+hneighbors->MarshallSize()
+-		+inputs->MarshallSize()
+-		+results->MarshallSize()
+-		+3*sizeof(int)
+-		+sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}*/
+-/*FUNCTION Penta::Demarshall {{{1*/
+-void  Penta::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-	int flaghook;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);
+-	memcpy(&numanalyses,marshalled_dataset,sizeof(numanalyses));marshalled_dataset+=sizeof(numanalyses);
+-
+-	/*demarshall Ref: */
+-	this->element_type_list=(int*)xmalloc(this->numanalyses*sizeof(int));
+-	for(i=0;i<numanalyses;i++){ memcpy(&element_type_list[i],marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);}
+-
+-	/*allocate dynamic memory: */
+-	this->hnodes=new Hook*[this->numanalyses];
+-	/*demarshall hooks: */
+-	for(i=0;i<numanalyses;i++){
+-		memcpy(&flaghook,marshalled_dataset,sizeof(flaghook));marshalled_dataset+=sizeof(flaghook);
+-		if(flaghook){ // there is a hook so demarshall it
+-			hnodes[i]=new Hook();
+-			hnodes[i]->Demarshall(&marshalled_dataset);
+-		}
+-		else hnodes[i]=NULL; //There is no hook so it is NULL
+-	}
+-	hmatice=new Hook(); hmatice->Demarshall(&marshalled_dataset);
+-	hmatpar=new Hook(); hmatpar->Demarshall(&marshalled_dataset);
+-	hneighbors=new Hook(); hneighbors->Demarshall(&marshalled_dataset);
+-
+-	/*pointers are garbage, until configuration is carried out: */
+-	nodes=NULL;
+-	matice=NULL;
+-	matpar=NULL;
+-	verticalneighbors=NULL;
+-
+-	/*demarshall inputs and results: */
+-	inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset); 
+-	results=(Results*)DataSetDemarshallRaw(&marshalled_dataset); 
+-
+-	/*parameters: may not exist even yet, so let Configure handle it: */
+-	this->parameters=NULL;
+-
+-	/*neighbors: */
+-	memcpy(&this->horizontalneighborsids,marshalled_dataset,3*sizeof(int));marshalled_dataset+=3*sizeof(int);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+-
+ /*Other*/
+ /*FUNCTION Penta::AverageOntoPartition {{{1*/
+ void  Penta::AverageOntoPartition(Vector* partition_contributions,Vector* partition_areas,double* vertex_response,double* qmu_part){
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Penta.h	(revision 12014)
+@@ -54,11 +54,6 @@
+ 		void	  Echo();
+ 		int		  ObjectEnum();
+ 		int		  Id(); 
+-		#ifdef _SERIAL_
+-		void	  Marshall(char** pmarshalled_dataset);
+-		int		  MarshallSize();
+-		void	  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int		  MyRank();
+ 		/*}}}*/
+ 		/*Update virtual functions definitions: {{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Patch.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Patch.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Patch.cpp	(revision 12014)
+@@ -121,10 +121,6 @@
+ 	double     *total_values  = NULL;
+ 	MPI_Status  status;
+ 
+-	#ifdef _SERIAL_
+-	return; //nothing to be done
+-	#endif
+-	
+ 	/*First, figure out total number of rows combining all the cpus: */
+ 	MPI_Reduce(&this->numrows,&total_numrows,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&total_numrows,1,MPI_INT,0,MPI_COMM_WORLD);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Hook.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Hook.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Hook.cpp	(revision 12014)
+@@ -117,93 +117,6 @@
+ 	}
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION Hook::Marshall{{{1*/
+-void Hook::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of Hook: */
+-	enum_type=HookEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*marshall Hook data: */
+-	memcpy(marshalled_dataset,&num,sizeof(num));marshalled_dataset+=sizeof(num);
+-	for(i=0;i<num;i++){
+-		memcpy(marshalled_dataset,&this->ids[i],sizeof(int));marshalled_dataset+=sizeof(int);
+-		memcpy(marshalled_dataset,&this->offsets[i],sizeof(int));marshalled_dataset+=sizeof(int);
+-	}
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-/*FUNCTION Hook::MarshallSize{{{1*/
+-int Hook::MarshallSize(){
+-
+-	return 
+-		sizeof(num)+
+-		num*sizeof(int)+
+-		num*sizeof(int)+
+-		sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}*/
+-/*FUNCTION Hook::Demarshall{{{1*/
+-void Hook::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-	int   enum_type;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of object since Hook is not directly called by DataSet: */
+-	memcpy(&enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);
+-
+-	memcpy(&num,marshalled_dataset,sizeof(num));marshalled_dataset+=sizeof(num);
+-	
+-	/*allocate: */
+-	if (num<0){
+-		_error_("cannot demarshall Hook as num<=0");
+-	}
+-	else if (num==0){
+-		this->ids=NULL;
+-		this->offsets=NULL;
+-		this->objects=NULL;
+-	}
+-	else{
+-
+-		this->ids=(int*)xmalloc(num*sizeof(int));
+-		this->offsets=(int*)xmalloc(num*sizeof(int));
+-
+-		/*demarshall allocated ids and offsets: */
+-		_assert_(num<1000);
+-		for (i=0;i<num;i++){
+-			memcpy(&this->ids[i],marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
+-			memcpy(&this->offsets[i],marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
+-		}
+-
+-		/*nullify object pointers */
+-		this->objects=(Object**)xmalloc(num*sizeof(Object*));
+-		for (i=0;i<num;i++){
+-			this->objects[i]=NULL;
+-		}
+-	}
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION Hook::copy {{{1*/
+ Object* Hook::copy(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DoubleInput.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DoubleInput.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DoubleInput.h	(revision 12014)
+@@ -29,11 +29,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/ControlInput.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/ControlInput.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/ControlInput.cpp	(revision 12014)
+@@ -89,214 +89,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION ControlInput::Marshall{{{1*/
+-void  ControlInput::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-	int   flag;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of ControlInput: */
+-	enum_value=ControlInputEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall enum_type: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&control_id,sizeof(control_id));marshalled_dataset+=sizeof(control_id);
+-
+-	/*marshal values*/
+-	if(!values){
+-		flag=0;
+-		memcpy(marshalled_dataset,&flag,sizeof(flag));marshalled_dataset+=sizeof(flag);
+-	}
+-	else{
+-		flag=1;
+-		memcpy(marshalled_dataset,&flag,sizeof(flag));marshalled_dataset+=sizeof(flag);
+-		this->values->Marshall(&marshalled_dataset);
+-	}
+-
+-	/*marshal savedvalues*/
+-	if(!savedvalues){
+-		flag=0;
+-		memcpy(marshalled_dataset,&flag,sizeof(flag));marshalled_dataset+=sizeof(flag);
+-	}
+-	else{
+-		flag=1;
+-		memcpy(marshalled_dataset,&flag,sizeof(flag));marshalled_dataset+=sizeof(flag);
+-		this->savedvalues->Marshall(&marshalled_dataset);
+-	}
+-
+-	/*marshal minvalues*/
+-	if(!minvalues){
+-		flag=0;
+-		memcpy(marshalled_dataset,&flag,sizeof(flag));marshalled_dataset+=sizeof(flag);
+-	}
+-	else{
+-		flag=1;
+-		memcpy(marshalled_dataset,&flag,sizeof(flag));marshalled_dataset+=sizeof(flag);
+-		this->minvalues->Marshall(&marshalled_dataset);
+-	}
+-
+-	/*marshal maxvalues*/
+-	if(!maxvalues){
+-		flag=0;
+-		memcpy(marshalled_dataset,&flag,sizeof(flag));marshalled_dataset+=sizeof(flag);
+-	}
+-	else{
+-		flag=1;
+-		memcpy(marshalled_dataset,&flag,sizeof(flag));marshalled_dataset+=sizeof(flag);
+-		this->maxvalues->Marshall(&marshalled_dataset);
+-	}
+-
+-	/*marshal gradient*/
+-	if(!gradient){
+-		flag=0;
+-		memcpy(marshalled_dataset,&flag,sizeof(flag));marshalled_dataset+=sizeof(flag);
+-	}
+-	else{
+-		flag=1;
+-		memcpy(marshalled_dataset,&flag,sizeof(flag));marshalled_dataset+=sizeof(flag);
+-		this->gradient->Marshall(&marshalled_dataset);
+-	}
+-
+-	/*clean up and assign output pointer*/
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION ControlInput::MarshallSize{{{1*/
+-int   ControlInput::MarshallSize(){
+-	
+-	int size=0;
+-
+-	size=sizeof(enum_type)+
+-	  +sizeof(control_id)
+-	  +5*sizeof(int) //5 flags
+-	  +sizeof(int); //sizeof(int) for enum value
+-
+-	if(values)     size+=values->MarshallSize();
+-	if(savedvalues)size+=savedvalues->MarshallSize();
+-	if(minvalues)size+=minvalues->MarshallSize();
+-	if(maxvalues)size+=maxvalues->MarshallSize();
+-	if(gradient)   size+=gradient->MarshallSize();
+-	return size;
+-}
+-/*}}}*/
+-/*FUNCTION ControlInput::Demarshall{{{1*/
+-void  ControlInput::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   flag,input_enum_type;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&control_id,marshalled_dataset,sizeof(control_id));marshalled_dataset+=sizeof(control_id);
+-
+-	/*Demarshal values*/
+-	memcpy(&flag,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
+-	if(flag){
+-		memcpy(&input_enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);
+-		if(input_enum_type==PentaP1InputEnum){
+-			values=new PentaP1Input();
+-			values->Demarshall(&marshalled_dataset);
+-		}
+-		else if(input_enum_type==TriaP1InputEnum){
+-			values=new TriaP1Input();
+-			values->Demarshall(&marshalled_dataset);
+-		}
+-		else _error_("Not supported yet");
+-	}
+-	else{
+-		values=NULL;
+-	}
+-
+-	/*Demarshal savedvalues*/
+-	memcpy(&flag,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
+-	if(flag){
+-		memcpy(&input_enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);
+-		if(input_enum_type==PentaP1InputEnum){
+-			savedvalues=new PentaP1Input();
+-			savedvalues->Demarshall(&marshalled_dataset);
+-		}
+-		else if(input_enum_type==TriaP1InputEnum){
+-			savedvalues=new TriaP1Input();
+-			savedvalues->Demarshall(&marshalled_dataset);
+-		}
+-		else _error_("Not supported yet");
+-	}
+-	else{
+-		savedvalues=NULL;
+-	}
+-
+-	/*Demarshal minvalues*/
+-	memcpy(&flag,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
+-	if(flag){
+-		memcpy(&input_enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);
+-		if(input_enum_type==PentaP1InputEnum){
+-			minvalues=new PentaP1Input();
+-			minvalues->Demarshall(&marshalled_dataset);
+-		}
+-		else if(input_enum_type==TriaP1InputEnum){
+-			minvalues=new TriaP1Input();
+-			minvalues->Demarshall(&marshalled_dataset);
+-		}
+-		else _error_("Not supported yet");
+-	}
+-	else{
+-		minvalues=NULL;
+-	}
+-
+-	/*Demarshal maxvalues*/
+-	memcpy(&flag,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
+-	if(flag){
+-		memcpy(&input_enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);
+-		if(input_enum_type==PentaP1InputEnum){
+-			maxvalues=new PentaP1Input();
+-			maxvalues->Demarshall(&marshalled_dataset);
+-		}
+-		else if(input_enum_type==TriaP1InputEnum){
+-			maxvalues=new TriaP1Input();
+-			maxvalues->Demarshall(&marshalled_dataset);
+-		}
+-		else _error_("Not supported yet");
+-	}
+-	else{
+-		maxvalues=NULL;
+-	}
+-
+-	/*Demarshal gradient*/
+-	memcpy(&flag,marshalled_dataset,sizeof(int));marshalled_dataset+=sizeof(int);
+-	if(flag){
+-		memcpy(&input_enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);
+-		if(input_enum_type==PentaP1InputEnum){
+-			gradient=new PentaP1Input();
+-			gradient->Demarshall(&marshalled_dataset);
+-		}
+-		else if(input_enum_type==TriaP1InputEnum){
+-			gradient=new TriaP1Input();
+-			gradient->Demarshall(&marshalled_dataset);
+-		}
+-		else _error_("Not supported yet");
+-	}
+-	else{
+-		gradient=NULL;
+-	}
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION ControlInput::ObjectEnum{{{1*/
+ int ControlInput::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/ControlInput.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/ControlInput.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/ControlInput.h	(revision 12014)
+@@ -34,11 +34,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp	(revision 12014)
+@@ -60,70 +60,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION DatasetInput::Marshall{{{1*/
+-void  DatasetInput::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	char* marshalled_inputs=NULL;
+-	int   marshalled_inputs_size;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of DatasetInput: */
+-	enum_value=DatasetInputEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall enum_type: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-
+-	/*marshal inputs*/
+-	marshalled_inputs_size=inputs->MarshallSize();
+-	marshalled_inputs=inputs->Marshall();
+-	memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));
+-	marshalled_dataset+=marshalled_inputs_size;
+-
+-	/*clean up and assign output pointer*/
+-	xfree((void**)&marshalled_inputs);
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION DatasetInput::MarshallSize{{{1*/
+-int   DatasetInput::MarshallSize(){
+-	
+-	int size=0;
+-
+-	size=sizeof(enum_type)+
+-	  +inputs->MarshallSize()
+-	  +sizeof(int); //sizeof(int) for enum value
+-
+-	return size;
+-}
+-/*}}}*/
+-/*FUNCTION DatasetInput::Demarshall{{{1*/
+-void  DatasetInput::Demarshall(char** pmarshalled_dataset){
+-	char* marshalled_dataset=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-
+-	/*Demarshal values*/
+-	inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset); 
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION DatasetInput::ObjectEnum{{{1*/
+ int DatasetInput::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DatasetInput.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DatasetInput.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DatasetInput.h	(revision 12014)
+@@ -30,11 +30,6 @@
+ 		void  DeepEcho();
+ 		int   Id();
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/IntInput.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/IntInput.cpp	(revision 12014)
+@@ -53,57 +53,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION IntInput::Marshall{{{1*/
+-void  IntInput::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of IntInput: */
+-	enum_value=IntInputEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall IntInput data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION IntInput::MarshallSize{{{1*/
+-int   IntInput::MarshallSize(){
+-	
+-	return sizeof(value)+
+-		+sizeof(enum_type)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION IntInput::Demarshall{{{1*/
+-void  IntInput::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION IntInput::ObjectEnum{{{1*/
+ int IntInput::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/BoolInput.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/BoolInput.cpp	(revision 12014)
+@@ -58,57 +58,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION BoolInput::Marshall{{{1*/
+-void  BoolInput::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of BoolInput: */
+-	enum_value=BoolInputEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall BoolInput data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION BoolInput::MarshallSize{{{1*/
+-int   BoolInput::MarshallSize(){
+-	
+-	return sizeof(value)+
+-		+sizeof(enum_type)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION BoolInput::Demarshall{{{1*/
+-void  BoolInput::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION BoolInput::ObjectEnum{{{1*/
+ int BoolInput::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/IntInput.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/IntInput.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/IntInput.h	(revision 12014)
+@@ -30,11 +30,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/BoolInput.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/BoolInput.h	(revision 12014)
+@@ -30,11 +30,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp	(revision 12014)
+@@ -69,57 +69,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION TriaP1Input::Marshall{{{1*/
+-void  TriaP1Input::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of TriaP1Input: */
+-	enum_value=TriaP1InputEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall TriaP1Input data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION TriaP1Input::MarshallSize{{{1*/
+-int   TriaP1Input::MarshallSize(){
+-	
+-	return sizeof(values)+
+-		+sizeof(enum_type)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION TriaP1Input::Demarshall{{{1*/
+-void  TriaP1Input::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION TriaP1Input::ObjectEnum{{{1*/
+ int TriaP1Input::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/TriaP1Input.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/TriaP1Input.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/TriaP1Input.h	(revision 12014)
+@@ -30,11 +30,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/TransientInput.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/TransientInput.cpp	(revision 12014)
+@@ -113,79 +113,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION TransientInput::Marshall{{{1*/
+-void  TransientInput::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	char* marshalled_inputs=NULL;
+-	int   marshalled_inputs_size;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of TransientInput: */
+-	enum_value=TransientInputEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-
+-	/*marshall TransientInput data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&numtimesteps,sizeof(numtimesteps));marshalled_dataset+=sizeof(numtimesteps);
+-	memcpy(marshalled_dataset,timesteps,numtimesteps*sizeof(double));marshalled_dataset+=numtimesteps*sizeof(double);
+-
+-	/*marshal inputs*/
+-	marshalled_inputs_size=inputs->MarshallSize();
+-	marshalled_inputs=inputs->Marshall();
+-	memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputs_size*sizeof(char));
+-	marshalled_dataset+=marshalled_inputs_size;
+-
+-	/*clean up and assign output pointer*/
+-	xfree((void**)&marshalled_inputs);
+-	*pmarshalled_dataset=marshalled_dataset;
+-
+-}
+-/*}}}*
+-/*FUNCTION TransientInput::MarshallSize{{{1*/
+-int   TransientInput::MarshallSize(){
+-
+-	return 
+-		+sizeof(enum_type)+
+-		+sizeof(numtimesteps)+
+-		+inputs->MarshallSize()
+-		+numtimesteps*sizeof(double)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION TransientInput::Demarshall{{{1*/
+-void  TransientInput::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&numtimesteps,marshalled_dataset,sizeof(numtimesteps));marshalled_dataset+=sizeof(numtimesteps);
+-
+-	/*allocate: */
+-	timesteps=(double*)xmalloc(numtimesteps*sizeof(double));
+-	memcpy(timesteps,marshalled_dataset,numtimesteps*sizeof(double));marshalled_dataset+=numtimesteps*sizeof(double);
+-
+-	/*Demarshal values*/
+-	inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION TransientInput::ObjectEnum{{{1*/
+ int TransientInput::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp	(revision 12014)
+@@ -69,57 +69,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION PentaP1Input::Marshall{{{1*/
+-void  PentaP1Input::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of PentaP1Input: */
+-	enum_value=PentaP1InputEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall PentaP1Input data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&values,sizeof(values));marshalled_dataset+=sizeof(values);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION PentaP1Input::MarshallSize{{{1*/
+-int   PentaP1Input::MarshallSize(){
+-	
+-	return sizeof(values)+
+-		+sizeof(enum_type)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION PentaP1Input::Demarshall{{{1*/
+-void  PentaP1Input::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&values,marshalled_dataset,sizeof(values));marshalled_dataset+=sizeof(values);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION PentaP1Input::ObjectEnum{{{1*/
+ int PentaP1Input::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12014)
+@@ -58,57 +58,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION DoubleInput::Marshall{{{1*/
+-void  DoubleInput::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_value=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum value of DoubleInput: */
+-	enum_value=DoubleInputEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_value,sizeof(enum_value));marshalled_dataset+=sizeof(enum_value);
+-	
+-	/*marshall DoubleInput data: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION DoubleInput::MarshallSize{{{1*/
+-int   DoubleInput::MarshallSize(){
+-	
+-	return sizeof(value)+
+-		+sizeof(enum_type)+
+-		+sizeof(int); //sizeof(int) for enum value
+-}
+-/*}}}*/
+-/*FUNCTION DoubleInput::Demarshall{{{1*/
+-void  DoubleInput::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   i;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-	memcpy(&enum_type,marshalled_dataset,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION DoubleInput::ObjectEnum{{{1*/
+ int DoubleInput::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/TransientInput.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/TransientInput.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/TransientInput.h	(revision 12014)
+@@ -33,11 +33,6 @@
+ 		void  DeepEcho();
+ 		int   Id();
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/PentaP1Input.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/PentaP1Input.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/PentaP1Input.h	(revision 12014)
+@@ -30,11 +30,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/DofIndexing.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/DofIndexing.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/DofIndexing.h	(revision 12014)
+@@ -42,11 +42,6 @@
+ 		/*Object like functionality: {{{1*/
+ 		void  Echo(void); 
+ 		void  DeepEcho(void); 
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		void  copy(DofIndexing* properties);
+ 		/*}}}*/
+ 		/*DofIndexing management: {{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Segment.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Segment.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Segment.h	(revision 12014)
+@@ -29,11 +29,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Object.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Object.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Object.h	(revision 12014)
+@@ -20,11 +20,6 @@
+ 		virtual void  DeepEcho()=0;
+ 		virtual int   Id()=0;
+ 		virtual int   MyRank()=0;
+-		#ifdef _SERIAL_
+-		virtual void  Marshall(char** pmarshalled_dataset)=0;
+-		virtual int   MarshallSize()=0;
+-		virtual void  Demarshall(char** pmarshalled_dataset)=0;
+-		#endif
+ 		virtual int   ObjectEnum()=0;
+ 		virtual Object* copy()=0;
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Vertex.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Vertex.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Vertex.h	(revision 12014)
+@@ -46,11 +46,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Node.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Node.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Node.cpp	(revision 12014)
+@@ -192,89 +192,6 @@
+ 	return my_rank; 
+ }
+ /*}}}*/
+-#ifdef _SERIAL_
+-/*FUNCTION Node::Marshall{{{1*/
+-void  Node::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-	char* marshalled_inputs=NULL;
+-	int   marshalled_inputssize;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of Node: */
+-	enum_type=NodeEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*marshall Node data: */
+-	memcpy(marshalled_dataset,&id,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);
+-	memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-	memcpy(marshalled_dataset,&coord_system,9*sizeof(double));marshalled_dataset+=9*sizeof(double);  
+-
+-	/*marshall objects: */
+-	indexing.Marshall(&marshalled_dataset);
+-	hvertex->Marshall(&marshalled_dataset);
+-
+-	/*Marshall inputs: */
+-	marshalled_inputssize=inputs->MarshallSize();
+-	marshalled_inputs=inputs->Marshall();
+-	memcpy(marshalled_dataset,marshalled_inputs,marshalled_inputssize*sizeof(char));
+-	marshalled_dataset+=marshalled_inputssize;
+-
+-	/*Free ressources:*/
+-	xfree((void**)&marshalled_inputs);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-/*FUNCTION Node::MarshallSize{{{1*/
+-int   Node::MarshallSize(){
+-
+-	return sizeof(id)+
+-		sizeof(sid)+
+-		indexing.MarshallSize()+
+-		hvertex->MarshallSize()+
+-		inputs->MarshallSize()+
+-		sizeof(analysis_type)+
+-		9*sizeof(double)+
+-		sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}*/
+-/*FUNCTION Node::Demarshall{{{1*/
+-void  Node::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-
+-	memcpy(&id,marshalled_dataset,sizeof(id));marshalled_dataset+=sizeof(id);
+-	memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);
+-	memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-	memcpy(&coord_system,marshalled_dataset,9*sizeof(double));marshalled_dataset+=9*sizeof(double);
+-	
+-	/*demarshall objects: */
+-	indexing.Demarshall(&marshalled_dataset);
+-	hvertex=new Hook(); hvertex->Demarshall(&marshalled_dataset);
+-
+-	/*demarshall inputs: */
+-	inputs=(Inputs*)DataSetDemarshallRaw(&marshalled_dataset); 
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION Node::ObjectEnum{{{1*/
+ int Node::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcDynamic.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcDynamic.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcDynamic.h	(revision 12014)
+@@ -33,11 +33,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcStatic.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcStatic.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcStatic.h	(revision 12014)
+@@ -32,11 +32,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcTransient.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcTransient.h	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcTransient.h	(revision 12014)
+@@ -34,11 +34,6 @@
+ 		void  DeepEcho();
+ 		int   Id(); 
+ 		int   MyRank();
+-		#ifdef _SERIAL_
+-		void  Marshall(char** pmarshalled_dataset);
+-		int   MarshallSize();
+-		void  Demarshall(char** pmarshalled_dataset);
+-		#endif
+ 		int   ObjectEnum();
+ 		Object* copy();
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp	(revision 12014)
+@@ -71,70 +71,6 @@
+ 	return my_rank; 
+ }
+ /*}}}1*/
+-#ifdef _SERIAL_
+-/*FUNCTION SpcDynamic::Marshall {{{1*/
+-void  SpcDynamic::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of SpcDynamic: */
+-	enum_type=SpcDynamicEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*marshall SpcDynamic data: */
+-	memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);
+-	memcpy(marshalled_dataset,&nodeid,sizeof(nodeid));marshalled_dataset+=sizeof(nodeid);
+-	memcpy(marshalled_dataset,&dof,sizeof(dof));marshalled_dataset+=sizeof(dof);
+-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+-	memcpy(marshalled_dataset,&isset,sizeof(isset));marshalled_dataset+=sizeof(isset);
+-	memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}1*/
+-/*FUNCTION SpcDynamic::MarshallSize {{{1*/
+-int   SpcDynamic::MarshallSize(){
+-
+-	return sizeof(sid)
+-		+sizeof(nodeid)
+-		+sizeof(dof)
+-		+sizeof(value)
+-		+sizeof(isset)
+-		+sizeof(analysis_type)
+-		+sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}1*/
+-/*FUNCTION SpcDynamic::Demarshall {{{1*/
+-void  SpcDynamic::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-
+-	memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);
+-	memcpy(&nodeid,marshalled_dataset,sizeof(nodeid));marshalled_dataset+=sizeof(nodeid);
+-	memcpy(&dof,marshalled_dataset,sizeof(dof));marshalled_dataset+=sizeof(dof);
+-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+-	memcpy(&isset,marshalled_dataset,sizeof(isset));marshalled_dataset+=sizeof(isset);
+-	memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}1*/
+-#endif
+ /*FUNCTION SpcDynamic::ObjectEnum{{{1*/
+ int SpcDynamic::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp	(revision 12014)
+@@ -74,67 +74,6 @@
+ 	return my_rank; 
+ }
+ /*}}}1*/
+-#ifdef _SERIAL_
+-/*FUNCTION SpcStatic::Marshall {{{1*/
+-void  SpcStatic::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of SpcStatic: */
+-	enum_type=SpcStaticEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*marshall SpcStatic data: */
+-	memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);
+-	memcpy(marshalled_dataset,&nodeid,sizeof(nodeid));marshalled_dataset+=sizeof(nodeid);
+-	memcpy(marshalled_dataset,&dof,sizeof(dof));marshalled_dataset+=sizeof(dof);
+-	memcpy(marshalled_dataset,&value,sizeof(value));marshalled_dataset+=sizeof(value);
+-	memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}1*/
+-/*FUNCTION SpcStatic::MarshallSize {{{1*/
+-int   SpcStatic::MarshallSize(){
+-
+-	return sizeof(sid)
+-		+sizeof(nodeid)
+-		+sizeof(dof)
+-		+sizeof(value)
+-		+sizeof(analysis_type)
+-		+sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}1*/
+-/*FUNCTION SpcStatic::Demarshall {{{1*/
+-void  SpcStatic::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-
+-	memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);
+-	memcpy(&nodeid,marshalled_dataset,sizeof(nodeid));marshalled_dataset+=sizeof(nodeid);
+-	memcpy(&dof,marshalled_dataset,sizeof(dof));marshalled_dataset+=sizeof(dof);
+-	memcpy(&value,marshalled_dataset,sizeof(value));marshalled_dataset+=sizeof(value);
+-	memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}1*/
+-#endif
+ /*FUNCTION SpcStatic::ObjectEnum{{{1*/
+ int SpcStatic::ObjectEnum(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12013)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp	(revision 12014)
+@@ -86,78 +86,6 @@
+ 	return my_rank; 
+ }
+ /*}}}1*/
+-#ifdef _SERIAL_
+-/*FUNCTION SpcTransient::Marshall {{{1*/
+-void  SpcTransient::Marshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-	int   enum_type=0;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*get enum type of SpcTransient: */
+-	enum_type=SpcTransientEnum;
+-	
+-	/*marshall enum: */
+-	memcpy(marshalled_dataset,&enum_type,sizeof(enum_type));marshalled_dataset+=sizeof(enum_type);
+-	
+-	/*marshall SpcTransient data: */
+-	memcpy(marshalled_dataset,&sid,sizeof(sid));marshalled_dataset+=sizeof(sid);
+-	memcpy(marshalled_dataset,&nodeid,sizeof(nodeid));marshalled_dataset+=sizeof(nodeid);
+-	memcpy(marshalled_dataset,&dof,sizeof(dof));marshalled_dataset+=sizeof(dof);
+-	memcpy(marshalled_dataset,&nsteps,sizeof(nsteps));marshalled_dataset+=sizeof(nsteps);
+-	memcpy(marshalled_dataset,&analysis_type,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-	if(nsteps){
+-		memcpy(marshalled_dataset,values,nsteps*sizeof(double));marshalled_dataset+=nsteps*sizeof(double);
+-		memcpy(marshalled_dataset,times,nsteps*sizeof(double));marshalled_dataset+=nsteps*sizeof(double);
+-	}
+-
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}1*/
+-/*FUNCTION SpcTransient::MarshallSize {{{1*/
+-int   SpcTransient::MarshallSize(){
+-
+-	return sizeof(sid)
+-		+sizeof(nodeid)
+-		+sizeof(dof)
+-		+sizeof(nsteps)
+-		+nsteps*2*sizeof(double)
+-		+sizeof(analysis_type)
+-		+sizeof(int); //sizeof(int) for enum type
+-}
+-/*}}}1*/
+-/*FUNCTION SpcTransient::Demarshall {{{1*/
+-void  SpcTransient::Demarshall(char** pmarshalled_dataset){
+-
+-	char* marshalled_dataset=NULL;
+-
+-	/*recover marshalled_dataset: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*this time, no need to get enum type, the pointer directly points to the beginning of the 
+-	 *object data (thanks to DataSet::Demarshall):*/
+-
+-	memcpy(&sid,marshalled_dataset,sizeof(sid));marshalled_dataset+=sizeof(sid);
+-	memcpy(&nodeid,marshalled_dataset,sizeof(nodeid));marshalled_dataset+=sizeof(nodeid);
+-	memcpy(&dof,marshalled_dataset,sizeof(dof));marshalled_dataset+=sizeof(dof);
+-	memcpy(&nsteps,marshalled_dataset,sizeof(nsteps));marshalled_dataset+=sizeof(nsteps);
+-	memcpy(&analysis_type,marshalled_dataset,sizeof(analysis_type));marshalled_dataset+=sizeof(analysis_type);
+-	if(nsteps){
+-		values=(double*)xmalloc(nsteps*sizeof(double));
+-		times=(double*)xmalloc(nsteps*sizeof(double));
+-		memcpy(values,marshalled_dataset,nsteps*sizeof(double));marshalled_dataset+=nsteps*sizeof(double);
+-		memcpy(times,marshalled_dataset,nsteps*sizeof(double));marshalled_dataset+=nsteps*sizeof(double);
+-	}
+-
+-	/*return: */
+-	*pmarshalled_dataset=marshalled_dataset;
+-	return;
+-}
+-/*}}}1*/
+-#endif
+ /*FUNCTION SpcTransient::ObjectEnum{{{1*/
+ int SpcTransient::ObjectEnum(void){
+ 
Index: /issm/oecreview/Archive/12010-12040/ISSM-12014-12015.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12014-12015.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12014-12015.diff	(revision 12325)
@@ -0,0 +1,623 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12014)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12015)
+@@ -1,5 +1,5 @@
+-/* \file macros.h
+- * \brief: global macros used in the whole code
++/* \file matlab macros.h
++ * \brief: macros used for the matlab bindings
+  */
+ 
+ /*Header {{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/python-binding.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/python-binding.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/python-binding.h	(revision 12015)
+@@ -0,0 +1,6 @@
++#ifndef _PYTHON_BINDING_H_
++#define _PYTHON_BINDING_H_
++
++#include "./io/pythonio.h"
++#include "./include/python_macros.h"
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/include/python_macros.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/include/python_macros.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/include/python_macros.h	(revision 12015)
+@@ -0,0 +1,59 @@
++/* \file python_macros.h
++ * \brief: macros used for the python bindings
++ */
++
++#ifndef _PYTHON_MACROS_H_
++#define _PYTHON_MACROS_H_
++
++/*Header {{{1*/
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++/*}}}*/
++
++/* MODULEBOOT/MODULEEND {{{1*/
++
++/*The following macros hide the error exception handling in a matlab module. Just put 
++ * MODULEBOOT(); and MODULEEND(); at the beginning and end of a module, and c++ exceptions 
++ * will be trapped. Really nifty!*/
++
++#define MODULEBOOT(); ModuleBoot();  \
++	PyObject* output = PyTuple_New(NLHS); if (!output) return NULL;
++
++#define MODULEEND();  ModuleEnd(); \
++						 return output;
++//}}}
++/* WRAPPER {{{1*/
++#define WRAPPER(modulename,...)  \
++\
++static PyObject* modulename(PyObject* self,PyObject* args);\
++static PyMethodDef modulename##_funcs[] = {\
++	{#modulename, (PyCFunction)modulename, METH_VARARGS, ""},\
++	{NULL,NULL,0,NULL}\
++};\
++\
++static struct PyModuleDef modulename##module= {\
++	PyModuleDef_HEAD_INIT,\
++	#modulename,   /* name of module */\
++	NULL, /* module documentation, may be NULL */\
++	-1,       /* size of per-interpreter state of the module,\
++				 or -1 if the module keeps state in global variables. */\
++	modulename##_funcs\
++};\
++\
++PyMODINIT_FUNC PyInit_##modulename(void){\
++\
++	import_array();\
++	return PyModule_Create(&modulename##module);\
++}\
++\
++static PyObject* modulename(PyObject* self,PyObject* args)
++/*}}}*/
++/* CHECKARGUMENTS {{{1*/
++#define CHECKARGUMENTS(NLHS,NRHS,functionpointer) CheckNumPythonArguments(args, NRHS,functionpointer)
++/*}}}*/
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/DataSet.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/DataSet.cpp	(revision 12014)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/DataSet.cpp	(revision 12015)
+@@ -83,331 +83,6 @@
+ }
+ /*}}}*/
+ 
+-/*I/O*/
+-#ifdef _SERIAL_
+-/*FUNCTION DataSet::Marshall{{{1*/
+-char* DataSet::Marshall(){
+-
+-	vector<Object*>::iterator object;
+-	int                       object_size;
+-	int                       marshalled_dataset_size=0;
+-	char*                     marshalled_dataset=NULL;
+-	char*                     old_marshalled_dataset=NULL;
+-
+-	/*First get size of marshalled dataset: */
+-	object_size=(int)objects.size();
+-
+-	marshalled_dataset_size=MarshallSize();
+-	
+-	/*Allocate marshalled dataset: */
+-	marshalled_dataset=(char*)xmalloc(marshalled_dataset_size*sizeof(char)); 
+-
+-	/*Keep track of old_marshalled_dataset: */
+-	old_marshalled_dataset=marshalled_dataset;
+-
+-	/*Store internals of dataset first: */
+-	memcpy(marshalled_dataset,&object_size,sizeof(int)); marshalled_dataset+=sizeof(int);
+-	memcpy(marshalled_dataset,&sorted,sizeof(int)); marshalled_dataset+=sizeof(int);
+-	if(sorted){
+-		if(object_size)memcpy(marshalled_dataset,sorted_ids,object_size*sizeof(int)); marshalled_dataset+=object_size*sizeof(int);
+-		if(object_size)memcpy(marshalled_dataset,id_offsets,object_size*sizeof(int)); marshalled_dataset+=object_size*sizeof(int);
+-	}
+-
+-	for ( object=objects.begin() ; object < objects.end(); object++ ){
+-		(*object)->Marshall(&marshalled_dataset);
+-	}
+-
+-	/* Ok, marshalled_dataset now points to the end of the original marshalled_dataset pointer 
+-	 * before  we started the loop on objects. Get object to point right again: */
+-	marshalled_dataset-=marshalled_dataset_size;
+-
+-	/*We should be back to old_marshalled_dataset: check and abort if that's not the case, 
+-	 * because this is a nasty error: */
+-	if (marshalled_dataset!=old_marshalled_dataset){
+-		_error_("final marshalled dataset \"%s\" is different from initial one!",EnumToStringx(enum_type)); 
+-		abort();
+-	}
+-
+-	/*Return: */
+-	return marshalled_dataset;
+-}
+-/*}}}*/
+-/*FUNCTION DataSet::MarshallSize{{{1*/
+-int DataSet::MarshallSize(){
+-
+-	vector<Object*>::iterator object;
+-	int                      marshalled_dataset_size=0;
+-
+-
+-	for ( object=objects.begin() ; object < objects.end(); object++ ){
+-		marshalled_dataset_size+= (*object)->MarshallSize();
+-	}
+-
+-	marshalled_dataset_size+=sizeof(int); //objects size
+-	marshalled_dataset_size+=sizeof(int); //sorted size
+-	if(sorted){
+-		marshalled_dataset_size+=(int)objects.size()*sizeof(int); //sorted ids
+-		marshalled_dataset_size+=(int)objects.size()*sizeof(int); //id offsets
+-	}
+-
+-	return marshalled_dataset_size;
+-}
+-/*}}}*/
+-/*FUNCTION DataSet::Demarshall{{{1*/
+-DataSet* DataSetDemarshall(char* marshalled_dataset){
+-
+-	return DataSetDemarshallRaw(&marshalled_dataset);
+-
+-}
+-/*}}}*/
+-/*FUNCTION DataSet::DemarshallRaw{{{1*/
+-DataSet* DataSetDemarshallRaw(char** pmarshalled_dataset){
+-
+-	int i;
+-
+-	DataSet* dataset=NULL;
+-	int      numobjects=0;
+-	int      enum_type;
+-	Object*  object=NULL;
+-	int      sorted;
+-	int*     sorted_ids=NULL;
+-	int*     id_offsets=NULL;
+-	char*    marshalled_dataset=NULL;
+-
+-	/*recover marshalled_dataset pointer: */
+-	marshalled_dataset=*pmarshalled_dataset;
+-
+-	/*initialize dataset: */
+-	dataset=new DataSet();
+-
+-	/*Get internals first: */
+-	memcpy(&numobjects,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);
+-	memcpy(&sorted,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);
+-	if(sorted){
+-		if(numobjects){
+-			sorted_ids=(int*)xmalloc(numobjects*sizeof(int));
+-			id_offsets=(int*)xmalloc(numobjects*sizeof(int));
+-			memcpy(sorted_ids,marshalled_dataset,numobjects*sizeof(int)); marshalled_dataset+=numobjects*sizeof(int);
+-			memcpy(id_offsets,marshalled_dataset,numobjects*sizeof(int)); marshalled_dataset+=numobjects*sizeof(int);
+-		}
+-		dataset->SetSorting(sorted_ids,id_offsets);
+-	}
+-
+-	for(i=0;i<numobjects;i++){
+-
+-		/*get enum type of object: */
+-		memcpy(&enum_type,marshalled_dataset,sizeof(int)); marshalled_dataset+=sizeof(int);
+-
+-		switch(enum_type){
+-			case NodeEnum:{
+-				Node* node=NULL;
+-				node=new Node();
+-				node->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(node);}
+-				break;
+-			case VertexEnum:{
+-				Vertex* vertex=NULL;
+-				vertex=new Vertex();
+-				vertex->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(vertex);}
+-				break;
+-			case DoubleParamEnum:{
+-				DoubleParam* doubleparam=NULL;
+-				doubleparam=new DoubleParam();
+-				doubleparam->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(doubleparam);}
+-				break;
+-			case TriaEnum:{
+-				Tria* tria=NULL;
+-				tria=new Tria();
+-				tria->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(tria);}
+-				break;
+-			case TriaP1InputEnum:{
+-				TriaP1Input* triavertexinput=NULL;
+-				triavertexinput=new TriaP1Input();
+-				triavertexinput->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(triavertexinput);}
+-				break;
+-			#ifdef _HAVE_3D_
+-			case PentaP1InputEnum:{
+-				PentaP1Input* pentavertexinput=NULL;
+-				pentavertexinput=new PentaP1Input();
+-				pentavertexinput->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(pentavertexinput);}
+-				break;
+-			#endif
+-			case TransientInputEnum:{
+-				TransientInput* transientinput=NULL;
+-				transientinput=new TransientInput();
+-				transientinput->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(transientinput);}
+-				break;
+-			#ifdef _HAVE_CONTROL_
+-			case ControlInputEnum:{
+-			   ControlInput* controlinputinput=NULL;
+-				controlinputinput=new ControlInput();
+-				controlinputinput->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(controlinputinput);}
+-				break;
+-			#endif
+-			case DatasetInputEnum:{
+-				DatasetInput* datasetinputinput=NULL;
+-				datasetinputinput=new DatasetInput();
+-				datasetinputinput->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(datasetinputinput);}
+-				break;
+-			case TriaP1ElementResultEnum:{
+-				TriaP1ElementResult* triavertexelementresult=NULL;
+-				triavertexelementresult=new TriaP1ElementResult();
+-				triavertexelementresult->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(triavertexelementresult);}
+-				break;
+-			 #ifdef _HAVE_3D_
+-			case PentaP1ElementResultEnum:{
+-				PentaP1ElementResult* pentavertexelementresult=NULL;
+-				pentavertexelementresult=new PentaP1ElementResult();
+-				pentavertexelementresult->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(pentavertexelementresult);}
+-				break;
+-			case PentaEnum:{
+-				Penta* penta=NULL;
+-				penta=new Penta();
+-				penta->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(penta);}
+-				break;
+-			#endif
+-			case MaticeEnum:{
+-				Matice* matice=NULL;
+-				matice=new Matice();
+-				matice->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(matice);}
+-				break;
+-			case MatparEnum:{
+-				Matpar* matpar=NULL;
+-				matpar=new Matpar();
+-				matpar->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(matpar);}
+-				break;
+-			case SpcStaticEnum:{
+-				SpcStatic* spcstatic=NULL;
+-				spcstatic=new SpcStatic();
+-				spcstatic->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(spcstatic);}
+-				break;
+-			case SpcDynamicEnum:{
+-				SpcDynamic* spcdynamic=NULL;
+-				spcdynamic=new SpcDynamic();
+-				spcdynamic->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(spcdynamic);}
+-				break;
+-			case SpcTransientEnum:{
+-				SpcTransient* spctransient=NULL;
+-				spctransient=new SpcTransient();
+-				spctransient->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(spctransient);}
+-				break;
+-			case PengridEnum:{
+-				Pengrid* pengrid=NULL;
+-				pengrid=new Pengrid();
+-				pengrid->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(pengrid);}
+-				break;
+-			case PenpairEnum:{
+-				Penpair* penpair=NULL;
+-				penpair=new Penpair();
+-				penpair->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(penpair);}
+-				break;
+-			case IcefrontEnum:{
+-				Icefront* icefront=NULL;
+-				icefront=new Icefront();
+-				icefront->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(icefront);}
+-				break;
+-			case NumericalfluxEnum:{
+-				Numericalflux* numericalflux=NULL;
+-				numericalflux=new Numericalflux();
+-				numericalflux->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(numericalflux);}
+-				break;
+-			#ifdef _HAVE_RIFTS_
+-			case RiftfrontEnum:{
+-				Riftfront* riftfront=NULL;
+-				riftfront=new Riftfront();
+-				riftfront->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(riftfront);}
+-				break;
+-			#endif
+-			case DoubleInputEnum:{
+-				DoubleInput* doubleinput=NULL;
+-				doubleinput=new DoubleInput();
+-				doubleinput->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(doubleinput);}
+-				break;
+-			case IntInputEnum:{
+-				IntInput* intinput=NULL;
+-				intinput=new IntInput();
+-				intinput->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(intinput);}
+-				break;
+-			case BoolInputEnum:{
+-				BoolInput* boolinput=NULL;
+-				boolinput=new BoolInput();
+-				boolinput->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(boolinput);}
+-				break;
+-			case IntParamEnum:{
+-				IntParam* intparam=NULL;
+-				intparam=new IntParam();
+-				intparam->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(intparam);}
+-				break;
+-			case BoolParamEnum:{
+-				BoolParam* boolparam=NULL;
+-				boolparam=new BoolParam();
+-				boolparam->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(boolparam);}
+-				break;
+-			case StringParamEnum:{
+-				StringParam* stringparam=NULL;
+-				stringparam=new StringParam();
+-				stringparam->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(stringparam);}
+-				break;
+-			case DoubleVecExternalResultEnum:{
+-				DoubleVecExternalResult* doublevecexternalresult=NULL;
+-				doublevecexternalresult=new DoubleVecExternalResult();
+-				doublevecexternalresult->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(doublevecexternalresult);}
+-				break;
+-			case DoubleExternalResultEnum:{
+-				DoubleExternalResult* doubleexternalresult=NULL;
+-				doubleexternalresult=new DoubleExternalResult();
+-				doubleexternalresult->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(doubleexternalresult);}
+-				break;
+-			#ifdef _HAVE_GROUNDINGLINE_
+-			case BoolElementResultEnum:{
+-				BoolElementResult* boolelementresult=NULL;
+-				boolelementresult=new BoolElementResult();
+-				boolelementresult->Demarshall(&marshalled_dataset);
+-				dataset->AddObject(boolelementresult);}
+-				break;
+-			#endif
+-			default:
+-				_error_("could not recognize enum type: %s",EnumToStringx(enum_type));
+-		}
+-	}
+-
+-	/*Assign output pointers:*/
+-	*pmarshalled_dataset=marshalled_dataset;
+-	
+-	return dataset;
+-}
+-/*}}}*/
+-#endif
+-
+ /*Specific methods*/
+ /*FUNCTION DataSet::AddObject{{{1*/
+ int  DataSet::AddObject(Object* object){
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/DataSet.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/DataSet.h	(revision 12014)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/DataSet.h	(revision 12015)
+@@ -48,10 +48,6 @@
+ 		int   GetEnum(int offset);
+ 		void  Echo();
+ 		void  DeepEcho();
+-		#ifdef _SERIAL_
+-		char* Marshall();
+-		int   MarshallSize();
+-		#endif
+ 		int   AddObject(Object* object);
+ 		int   DeleteObject(int id);
+ 		int   Size();
+@@ -68,12 +64,4 @@
+ 
+ };
+ 
+-/*This routine cannot be object oriented, but need for demarshalling: */
+-#ifdef _SERIAL_
+-DataSet* DataSetDemarshall(char* marshalled_dataset);
+-DataSet* DataSetDemarshallRaw(char** pmarshalled_dataset);
+ #endif
+-	
+-
+-
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.cpp	(revision 12014)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.cpp	(revision 12015)
+@@ -19,9 +19,7 @@
+ #include "../include/include.h"
+ #include "../shared/shared.h"
+ #include "../EnumDefinitions/EnumDefinitions.h"
+-#if _SERIAL_
+ #include "../io/io.h"
+-#endif
+ /*}}}*/
+ 
+ /*Object constructors and destructor*/
+@@ -30,32 +28,6 @@
+ 	return;
+ }
+ /*}}}*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-/*FUNCTION Options::Options(int istart, int nrhs, const mxArray* prhs[]){{{1*/
+-Options::Options(int istart, int nrhs, const mxArray* prhs[]){
+-
+-	int            i;
+-	char          *name    = NULL;
+-	Option *option = NULL;
+-
+-	/*loop over each name and value*/
+-	for (i=istart; i<nrhs; i=i+2){
+-		if (!mxIsClass(prhs[i],"char")) _error_("Argument %d must be name of option.",i+1);
+-
+-		FetchData(&name,prhs[i]);
+-		if (i+1 == nrhs) _error_("Argument %d must exist and be value of option \"%s\".",i+2,name);
+-
+-		//_printf_(true,"  Processing option \"%s\" of class \"%s\".\n",name,mxGetClassName(prhs[i+1]));
+-		option=(Option*)OptionParse(name,&prhs[i+1]);
+-		this->AddOption(option);
+-		option=NULL;
+-	}
+-
+-	/*echo the dataset  */
+-	//if (this->Size()) for(i=0;i<this->Size();i++) ((Option*)this->GetObjectByOffset(i))->Echo();
+-}
+-/*}}}*/
+-#endif
+ /*FUNCTION Options::~Options(){{{1*/
+ Options::~Options(){
+ 	return;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/macros.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/macros.h	(revision 12014)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/macros.h	(revision 12015)
+@@ -39,23 +39,12 @@
+   ((void) 0)
+ #endif
+ /*}}}*/
+-
+ /* MODULEBOOT/MODULEEND {{{1*/
+ 
+ /*The following macros hide the error exception handling in a matlab module. Just put 
+  * MODULEBOOT(); and MODULEEND(); at the beginning and end of a module, and c++ exceptions 
+  * will be trapped. Really nifty!*/
+ 
+-#ifdef _SERIAL_
+-#ifdef _HAVE_PYTHON_ //{{{2
+-#define MODULEBOOT(); ModuleBoot();  \
+-	PyObject* output = PyTuple_New(NLHS); if (!output) return NULL;
+-
+-#define MODULEEND();  ModuleEnd(); \
+-						 return output;
+-#endif //}}}
+-#else 
+-//{{{2
+ #define MODULEBOOT(); \
+ 	try{
+ 
+@@ -68,43 +57,6 @@
+ 		_printf_(true,"Standard exception: %s\n",e.what());\
+ 		return 1;\
+ 	}
+-//}}}
+-#endif
+ /*}}}*/
+-/* WRAPPER {{{1*/
+-#ifdef _HAVE_PYTHON_
+-#define WRAPPER(modulename,...)  \
+-\
+-static PyObject* modulename(PyObject* self,PyObject* args);\
+-static PyMethodDef modulename##_funcs[] = {\
+-	{#modulename, (PyCFunction)modulename, METH_VARARGS, ""},\
+-	{NULL,NULL,0,NULL}\
+-};\
+-\
+-static struct PyModuleDef modulename##module= {\
+-	PyModuleDef_HEAD_INIT,\
+-	#modulename,   /* name of module */\
+-	NULL, /* module documentation, may be NULL */\
+-	-1,       /* size of per-interpreter state of the module,\
+-				 or -1 if the module keeps state in global variables. */\
+-	modulename##_funcs\
+-};\
+-\
+-PyMODINIT_FUNC PyInit_##modulename(void){\
+-\
+-	import_array();\
+-	return PyModule_Create(&modulename##module);\
+-}\
+-\
+-static PyObject* modulename(PyObject* self,PyObject* args)
+ 
+ #endif
+-
+-/*}}}*/
+-/* CHECKARGUMENTS {{{1*/
+-#ifdef _HAVE_PYTHON_
+-#define CHECKARGUMENTS(NLHS,NRHS,functionpointer) CheckNumPythonArguments(args, NRHS,functionpointer)
+-#endif
+-/*}}}*/
+-
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/shared.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/shared.h	(revision 12014)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/shared.h	(revision 12015)
+@@ -7,6 +7,7 @@
+ 
+ 
+ #include "Alloc/alloc.h"
++#include "Alloc/alloc_module.h"
+ #include "Exceptions/exceptions.h"
+ #include "Exp/exp.h"
+ #include "TriMesh/trimesh.h"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12014)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12015)
+@@ -726,6 +726,7 @@
+ #}}}
+ #Python sources  {{{1
+ python_sources=     ./python/io/pythonio.h\
++					./python/python-binding.h\
+ 				    ./python/io/WritePythonData.cpp\
+ 				    ./python/io/CheckNumPythonArguments.cpp\
+ 				    ./python/io/FetchPythonData.cpp\
+@@ -739,6 +740,7 @@
+ #}}}
+ #Matlab sources  {{{1
+ matlab_sources= ./toolkits/matlab/matlabincludes.h\
++				    ./matlab/matlab-binding.h\
+ 				    ./matlab/io/matlabio.h\
+ 				    ./matlab/io/MatlabNArrayToNArray.cpp\
+ 				    ./matlab/io/CheckNumMatlabArguments.cpp\
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.cpp	(revision 12014)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.cpp	(revision 12015)
+@@ -49,11 +49,11 @@
+ 
+ 	/*free ressources: */
+ 	delete domain;
+-	xdelete(&index);
+-	xdelete(&x);
+-	xdelete(&y);
+-	xdelete(&segments);
+-	xdelete(&segmentmarkerlist);
++	xdelete_module(&index);
++	xdelete_module(&x);
++	xdelete_module(&y);
++	xdelete_module(&segments);
++	xdelete_module(&segmentmarkerlist);
+ 
+ 	/*end module: */
+ 	MODULEEND();
Index: /issm/oecreview/Archive/12010-12040/ISSM-12015-12016.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12015-12016.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12015-12016.diff	(revision 12325)
@@ -0,0 +1,757 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solutions/issm.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solutions/issm.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solutions/issm.cpp	(revision 12016)
+@@ -36,10 +36,6 @@
+ 
+ 	MODULEBOOT();
+ 
+-	#ifndef _PARALLEL_
+-	_error_(" parallel executable was compiled without support of parallel libraries!");
+-	#endif
+-
+ 	/*Initialize environments: Petsc, MPI, etc...: */
+ 	#ifdef _HAVE_PETSC_
+ 	ierr=PetscInitialize(&argc,&argv,(char*)0,"");  
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp	(revision 12016)
+@@ -50,11 +50,7 @@
+ 	}
+ 
+ 	/*Ok, if we are running in parallel, get node 0 to print*/
+-#if defined(_PARALLEL_)
+ 	if(my_rank==0)printf(buffer);
+-#else
+-	mexPrintf(buffer);
+-#endif
+ 
+ 	/*Clean up and return*/
+ 	xfree((void**)&buffer);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Loads.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Loads.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Loads.cpp	(revision 12016)
+@@ -62,12 +62,8 @@
+ 	localloads=this->Size();
+ 
+ 	/*figure out total number of loads combining all the cpus (no clones here)*/
+-	#ifdef _PARALLEL_
+ 	MPI_Reduce(&localloads,&numberofloads,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&numberofloads,1,MPI_INT,0,MPI_COMM_WORLD);
+-	#else
+-	numberofloads=localloads;
+-	#endif
+ 
+ 	return numberofloads;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Constraints.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Constraints.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Constraints.cpp	(revision 12016)
+@@ -47,12 +47,8 @@
+ 	localconstraints=this->Size();
+ 
+ 	/*figure out total number of constraints combining all the cpus (no clones here)*/
+-	#ifdef _PARALLEL_
+ 	MPI_Reduce(&localconstraints,&numberofconstraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&numberofconstraints,1,MPI_INT,0,MPI_COMM_WORLD);
+-	#else
+-	numberofconstraints=localconstraints;
+-	#endif
+ 
+ 	return numberofconstraints;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Nodes.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Nodes.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Nodes.cpp	(revision 12016)
+@@ -203,11 +203,9 @@
+ 		}
+ 	}
+ 
+-#ifdef _PARALLEL_
+ 	/*Grab max of all cpus: */
+ 	MPI_Allreduce ( (void*)&max,(void*)&allmax,1,MPI_INT,MPI_MAX,MPI_COMM_WORLD);
+ 	max=allmax;
+-#endif
+ 
+ 	return max;
+ }
+@@ -287,11 +285,9 @@
+ 		}
+ 	}
+ 
+-	#ifdef _PARALLEL_
+-		MPI_Reduce (&max_sid,&node_max_sid,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD );
+-		MPI_Bcast(&node_max_sid,1,MPI_INT,0,MPI_COMM_WORLD);
+-		max_sid=node_max_sid;
+-	#endif 
++	MPI_Reduce (&max_sid,&node_max_sid,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD );
++	MPI_Bcast(&node_max_sid,1,MPI_INT,0,MPI_COMM_WORLD);
++	max_sid=node_max_sid;
+ 
+ 	if(max_sid==1){
+ 		return 0;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Elements.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Elements.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Elements.cpp	(revision 12016)
+@@ -123,7 +123,6 @@
+ 		if(element_numnodes>numnodes)numnodes=element_numnodes;
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	/*Synchronize across cluster, so as to not end up with different sizes for each patch on each cpu: */
+ 	MPI_Reduce (&numvertices,&max_numvertices,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&max_numvertices,1,MPI_INT,0,MPI_COMM_WORLD);
+@@ -132,7 +131,6 @@
+ 	MPI_Reduce (&numnodes,&max_numnodes,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&max_numnodes,1,MPI_INT,0,MPI_COMM_WORLD);
+ 	numnodes=max_numnodes;
+-	#endif
+ 
+ 	/*Ok, initialize Patch object: */
+ 	patch=new Patch(numrows,numvertices,numnodes);
+@@ -249,9 +247,7 @@
+ 		patch=this->ResultsToPatch();
+ 
+ 		/*Gather onto master cpu 0, if needed: */
+-#ifdef _PARALLEL_
+ 		if(io_gather)patch->Gather();
+-#endif
+ 
+ 		/*create result object and add to results dataset:*/
+ 		if (patch->maxvertices && patch->maxnodes){
+@@ -275,12 +271,8 @@
+ 	int local_nelem=0;
+ 	int numberofelements;
+ 
+-	#ifdef _PARALLEL_
+ 	local_nelem=this->Size();
+ 	MPI_Allreduce ( (void*)&local_nelem,(void*)&numberofelements,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
+-	#else
+-	numberofelements=this->Size();
+-	#endif
+ 
+ 	return numberofelements;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Vertices.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Vertices.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Vertices.cpp	(revision 12016)
+@@ -148,11 +148,9 @@
+ 		if (sid>max_sid)max_sid=sid;
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	MPI_Reduce (&max_sid,&vertex_max_sid,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&vertex_max_sid,1,MPI_INT,0,MPI_COMM_WORLD);
+ 	max_sid=vertex_max_sid;
+-	#endif
+ 
+ 	/*sid starts at 0*/
+ 	max_sid++;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVzx/MinVzx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVzx/MinVzx.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVzx/MinVzx.cpp	(revision 12016)
+@@ -30,12 +30,10 @@
+ 		minvz=INFINITY;
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	/*Figure out minimum across the cluster: */
+ 	MPI_Reduce (&minvz,&node_minvz,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_minvz,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	minvz=node_minvz;
+-	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pminvz=minvz;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVxx/MaxVxx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVxx/MaxVxx.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVxx/MaxVxx.cpp	(revision 12016)
+@@ -30,12 +30,10 @@
+ 		maxvx=-INFINITY;
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	/*Figure out minimum across the cluster: */
+ 	MPI_Reduce (&maxvx,&node_maxvx,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_maxvx,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	maxvx=node_maxvx;
+-	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pmaxvx=maxvx;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp	(revision 12016)
+@@ -30,12 +30,10 @@
+ 		if(dt<min_dt)min_dt=dt;
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	/*Figure out minimum across the cluster: */
+ 	MPI_Reduce (&min_dt,&node_min_dt,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_min_dt,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
+ 	min_dt=node_min_dt;
+-	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pdt=min_dt;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVxx/MaxAbsVxx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVxx/MaxAbsVxx.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVxx/MaxAbsVxx.cpp	(revision 12016)
+@@ -30,12 +30,10 @@
+ 		maxabsvx=-INFINITY;
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	/*Figure out maximum across the cluster: */
+ 	MPI_Reduce (&maxabsvx,&node_maxabsvx,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_maxabsvx,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	maxabsvx=node_maxabsvx;
+-	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pmaxabsvx=maxabsvx;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVelx/MinVelx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVelx/MinVelx.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVelx/MinVelx.cpp	(revision 12016)
+@@ -31,12 +31,10 @@
+ 		minvel=INFINITY;
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	/*Figure out minimum across the cluster: */
+ 	MPI_Reduce (&minvel,&node_minvel,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_minvel,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	minvel=node_minvel;
+-	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pminvel=minvel;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVelx/MaxVelx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVelx/MaxVelx.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVelx/MaxVelx.cpp	(revision 12016)
+@@ -31,12 +31,10 @@
+ 		maxvel=-INFINITY;
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	/*Figure out maximum across the cluster: */
+ 	MPI_Reduce (&maxvel,&node_maxvel,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_maxvel,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	maxvel=node_maxvel;
+-	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pmaxvel=maxvel;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/Dakotax.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/Dakotax.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Dakotax/Dakotax.cpp	(revision 12016)
+@@ -71,9 +71,7 @@
+ 	parameters->FindParam(&dakota_output_file,QmuOutNameEnum);
+ 	parameters->FindParam(&dakota_error_file,QmuErrNameEnum);
+ 
+-	#ifdef _PARALLEL_
+ 	if(my_rank==0){
+-	#endif
+ 	
+ 		// Instantiate/initialize the parallel library and problem description
+ 		// database objects.
+@@ -110,12 +108,9 @@
+ 		problem_db.lock(); // prevent run-time DB queries
+ 		selected_strategy.run_strategy();
+ 		
+-		#ifdef _PARALLEL_
+ 		//Warn other cpus that we are done running the dakota iterator, by setting the counter to -1:
+ 		SpawnCore(NULL,0, NULL,NULL,0,femmodel,-1);
+-		#endif
+ 
+-	#ifdef _PARALLEL_
+ 	}
+ 	else{
+ 
+@@ -123,7 +118,6 @@
+ 			if(!SpawnCore(NULL,0, NULL,NULL,0,femmodel,0))break; //counter came in at -1 on cpu0, bail out.
+ 		}
+ 	}
+-	#endif //#ifdef _PARALLEL_
+ 
+ 	/*Free ressources:*/
+ 	xfree((void**)&dakota_input_file);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVyx/MaxVyx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVyx/MaxVyx.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVyx/MaxVyx.cpp	(revision 12016)
+@@ -30,12 +30,10 @@
+ 		maxvy=-INFINITY;
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	/*Figure out minimum across the cluster: */
+ 	MPI_Reduce (&maxvy,&node_maxvy,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_maxvy,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	maxvy=node_maxvy;
+-	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pmaxvy=maxvy;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVyx/MaxAbsVyx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVyx/MaxAbsVyx.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVyx/MaxAbsVyx.cpp	(revision 12016)
+@@ -31,12 +31,10 @@
+ 		maxabsvy=-INFINITY;
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	/*Figure out maximum across the cluster: */
+ 	MPI_Reduce (&maxabsvy,&node_maxabsvy,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_maxabsvy,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	maxabsvy=node_maxabsvy;
+-	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pmaxabsvy=maxabsvy;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp	(revision 12016)
+@@ -62,7 +62,6 @@
+ 	if(dim==2) elements_width=3; //tria elements
+ 	else elements_width=6; //penta elements
+ 
+-	#ifdef _PARALLEL_
+ 	/*Determine parallel partitioning of elements: we use Metis for now. First load the data, then partition*/
+ 	if(dim==2){
+ 		/*load elements: */
+@@ -79,11 +78,6 @@
+ 	xfree((void**)&elements);
+ 	xfree((void**)&elements2d);
+ 
+-	#else
+-	/*In serial mode, epart is full of 0: all elements belong to cpu 0: */
+-	epart=(int*)xcalloc(numberofelements,sizeof(int));
+-	#endif
+-
+ 	/*Deal with rifts, they have to be included into one partition only, not several: */
+ 	if(numrifts){
+ 		iomodel->FetchData(&riftinfo,&numrifts,NULL,RiftsRiftstructEnum);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVxx/MinVxx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVxx/MinVxx.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVxx/MinVxx.cpp	(revision 12016)
+@@ -30,12 +30,10 @@
+ 		minvx=INFINITY;
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	/*Figure out minimum across the cluster: */
+ 	MPI_Reduce (&minvx,&node_minvx,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_minvx,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	minvx=node_minvx;
+-	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pminvx=minvx;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVzx/MaxVzx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVzx/MaxVzx.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVzx/MaxVzx.cpp	(revision 12016)
+@@ -31,12 +31,10 @@
+ 		maxvz=-INFINITY;
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	/*Figure out minimum across the cluster: */
+ 	MPI_Reduce (&maxvz,&node_maxvz,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_maxvz,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	maxvz=node_maxvz;
+-	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pmaxvz=maxvz;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalConstraintsState.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalConstraintsState.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalConstraintsState.cpp	(revision 12016)
+@@ -35,11 +35,9 @@
+ 		}
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	num_unstable_constraints=sum_num_unstable_constraints;
+-	#endif
+ 
+ 	/*Have we converged? : */
+ 	if (num_unstable_constraints==0) converged=1;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalIsPresent.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalIsPresent.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalIsPresent.cpp	(revision 12016)
+@@ -27,11 +27,9 @@
+ 		}
+ 	}
+ 	
+-	#ifdef _PARALLEL_
+ 	MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	found=mpi_found;
+-	#endif
+ 
+ 	return found;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp	(revision 12016)
+@@ -31,11 +31,9 @@
+ 		}
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	found=mpi_found;
+-	#endif
+ 
+ 	return found;
+ }
+@@ -94,11 +92,9 @@
+ 		}
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	num_unstable_constraints=sum_num_unstable_constraints;
+-	#endif
+ 	
+ 	/*Assign output pointers: */
+ 	*pnum_unstable_constraints=num_unstable_constraints;
+@@ -134,11 +130,9 @@
+ 	}
+ 	
+ 	/*Is there just one found? that would mean we have frozen! : */
+-	#ifdef _PARALLEL_
+ 	MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	found=mpi_found;
+-	#endif
+ 
+ 	return found;
+ }
+@@ -194,11 +188,9 @@
+ 		}
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	found=mpi_found;
+-	#endif
+ 
+ 	return found;
+ }
+@@ -227,11 +219,9 @@
+ 		}
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	found=mpi_found;
+-	#endif
+ 
+ 	if (found){
+ 		/*We found an unstable constraint. : */
+@@ -288,11 +278,9 @@
+ 		}
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	num_unstable_constraints=sum_num_unstable_constraints;
+-	#endif
+ 	
+ 	/*Assign output pointers: */
+ 	*pnum_unstable_constraints=num_unstable_constraints;
+@@ -328,11 +316,9 @@
+ 		}
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	MPI_Reduce (&max_penetration,&mpi_max_penetration,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&mpi_max_penetration,1,MPI_DOUBLE,0,MPI_COMM_WORLD);                
+ 	max_penetration=mpi_max_penetration;
+-	#endif
+ 
+ 	/*feed max_penetration to inputs: */
+ 	for(i=0;i<loads->Size();i++){
+@@ -367,11 +353,9 @@
+ 		}
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	num_unstable_constraints=sum_num_unstable_constraints;
+-	#endif
+ 
+ 	return num_unstable_constraints;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12016)
+@@ -122,7 +122,7 @@
+ 	KSPSetOperators(ksp,Kff,Kff,DIFFERENT_NONZERO_PATTERN);
+ 	KSPSetFromOptions(ksp);
+ 
+-	#if defined(_SERIAL_) && _PETSC_MAJOR_==3
++	#if _PETSC_MAJOR_==3
+ 	/*Specific solver?: */
+ 	KSPGetPC(ksp,&pc);
+ 	if (solver_type==MUMPSPACKAGE_LU){
+@@ -132,9 +132,7 @@
+ 		PCFactorSetMatSolverPackage(pc,MATSOLVERMUMPS);
+ 		#endif
+ 	}
+-	#endif
+ 
+-	#if defined(_PARALLEL_) && _PETSC_MAJOR_==3
+ 	/*Stokes: */
+ 	if (solver_type==StokesSolverEnum){
+ 		/*Make indices out of doftypes: */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 12016)
+@@ -29,10 +29,8 @@
+ 	}
+ 
+ 	/*In parallel, we need to gather the converged status: */
+-	#ifdef _PARALLEL_
+ 	MPI_Allreduce ( (void*)&num_notconverged,(void*)&total_notconverged,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
+ 	num_notconverged=total_notconverged;
+-	#endif
+ 	_printf_(VerboseConvergence(),"      #elements above convergence criterion = %i\n",num_notconverged);
+ 
+ 	/*Free ressources:*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12016)
+@@ -91,7 +91,6 @@
+ 		}
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	/*Ok, broadcast to other cpus: */
+ 	MPI_Bcast(&numanalyses,1,MPI_INT,0,MPI_COMM_WORLD);
+ 	if(my_rank!=0){
+@@ -110,7 +109,6 @@
+ 		MPI_Bcast(string,stringlength,MPI_CHAR,0,MPI_COMM_WORLD);
+ 		if(my_rank!=0)strings[i]=string;
+ 	}
+-	#endif
+ 
+ 	/*Ok, out of strings and analyses and numanalyses, create parameters, and plug them into parameters container: */
+ 	parameters->AddObject(new StringArrayParam(PetscOptionsStringsEnum,strings,numanalyses));
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVzx/MaxAbsVzx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVzx/MaxAbsVzx.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVzx/MaxAbsVzx.cpp	(revision 12016)
+@@ -30,12 +30,10 @@
+ 		maxabsvz=-INFINITY;
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	/*Figure out minimum across the cluster: */
+ 	MPI_Reduce (&maxabsvz,&node_maxabsvz,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_maxabsvz,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	maxabsvz=node_maxabsvz;
+-	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pmaxabsvz=maxabsvz;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MassFluxx/MassFluxx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MassFluxx/MassFluxx.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MassFluxx/MassFluxx.cpp	(revision 12016)
+@@ -58,10 +58,8 @@
+ 		}
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	MPI_Allreduce ( (void*)&mass_flux,(void*)&all_mass_flux,1,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
+ 	mass_flux=all_mass_flux;
+-	#endif
+ 
+ 	/*Free ressources:*/
+ 	for(j=0;j<M;j++){
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVyx/MinVyx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVyx/MinVyx.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVyx/MinVyx.cpp	(revision 12016)
+@@ -30,12 +30,10 @@
+ 		minvy=INFINITY;
+ 	}
+ 
+-	#ifdef _PARALLEL_
+ 	/*Figure out minimum across the cluster: */
+ 	MPI_Reduce (&minvy,&node_minvy,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_minvy,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	minvy=node_minvy;
+-	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pminvy=minvy;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12016)
+@@ -360,19 +360,19 @@
+ 					  ./modules/Dakotax/SpawnCoreParallel.cpp
+ #}}}
+ #Transient sources  {{{1
+-transient_sources  = ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp
+-transient_psources = ./solutions/transient_core.cpp
++transient_sources  = ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp \
++					 ./solutions/transient_core.cpp
+ #}}}
+ #Steadystate sources  {{{1
+-steadystate_psources = ./solutions/steadystate_core.cpp\
+-					        ./solutions/steadystateconvergence.cpp
++steadystate_sources = ./solutions/steadystate_core.cpp\
++					  ./solutions/steadystateconvergence.cpp
+ #}}}
+ #Prognostic sources  {{{1
+ prognostic_sources = ./modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp\
+ 					      ./modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp\
+ 					      ./modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp\
+-					      ./modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
+-prognostic_psources = ./solutions/prognostic_core.cpp
++					      ./modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp\
++						  ./solutions/prognostic_core.cpp
+ #}}}
+ #Thermal sources  {{{1
+ thermal_sources = ./modules/ModelProcessorx/Thermal/UpdateElementsThermal.cpp\
+@@ -389,11 +389,10 @@
+ 					   ./modules/ModelProcessorx/Melting/CreateLoadsMelting.cpp\
+ 					   ./modules/ConstraintsStatex/ThermalConstraintsState.cpp\
+ 					   ./modules/ConstraintsStatex/ThermalIsPresent.cpp\
+-					   ./modules/ResetConstraintsx/ThermalConstraintsReset.cpp
+-
+-thermal_psources = ./solutions/thermal_core.cpp\
+-					    ./solutions/enthalpy_core.cpp\
+-					    ./solvers/solver_thermal_nonlinear.cpp
++					   ./modules/ResetConstraintsx/ThermalConstraintsReset.cpp \
++					   ./solutions/thermal_core.cpp\
++					   ./solutions/enthalpy_core.cpp\
++					   ./solvers/solver_thermal_nonlinear.cpp
+ #}}}
+ #Control sources  {{{1
+ control_sources= ./modules/ControlInputGetGradientx/ControlInputGetGradientx.cpp\
+@@ -437,9 +436,8 @@
+ 					  ./objects/Inputs/ControlInput.h\
+ 					  ./objects/Inputs/ControlInput.cpp\
+ 					  ./shared/Numerics/BrentSearch.cpp\
+-					  ./shared/Numerics/OptimalSearch.cpp
+-
+-control_psources=./solutions/control_core.cpp\
++					  ./shared/Numerics/OptimalSearch.cpp \
++					  ./solutions/control_core.cpp\
+ 					  ./solutions/controltao_core.cpp\
+ 					  ./solutions/controlrestart.cpp\
+ 					  ./solutions/controlconvergence.cpp\
+@@ -455,10 +453,9 @@
+ hydrology_sources  = ./modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp\
+ 					      ./modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp\
+ 					      ./modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp\
+-					      ./modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp
+-					  
+-hydrology_psources  = ./solutions/hydrology_core.cpp\
+-					       ./solutions/hydrology_core_step.cpp 
++					      ./modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp \
++						  ./solutions/hydrology_core.cpp\
++						  ./solutions/hydrology_core_step.cpp 
+ #}}}
+ #Diagnostic sources  {{{1
+ diagnostic_sources = ./modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp\
+@@ -473,20 +470,20 @@
+ 					      ./modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp \
+ 					      ./modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp \
+ 					      ./modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp \
+-							./shared/Elements/CoordinateSystemTransform.cpp\
+-							./shared/Elements/TransformLoadVectorCoord.cpp \
+-							./shared/Elements/TransformStiffnessMatrixCoord.cpp \
+-							./shared/Elements/TransformInvStiffnessMatrixCoord.cpp \
+-							./shared/Elements/TransformSolutionCoord.cpp
+-diagnostic_psources =./solutions/diagnostic_core.cpp\
+-					      ./solvers/solver_stokescoupling_nonlinear.cpp
++						  ./shared/Elements/CoordinateSystemTransform.cpp\
++						  ./shared/Elements/TransformLoadVectorCoord.cpp \
++						  ./shared/Elements/TransformStiffnessMatrixCoord.cpp \
++						  ./shared/Elements/TransformInvStiffnessMatrixCoord.cpp \
++						  ./shared/Elements/TransformSolutionCoord.cpp\
++						  ./solutions/diagnostic_core.cpp\
++						  ./solvers/solver_stokescoupling_nonlinear.cpp
+ #}}}
+ #Balanced sources  {{{1
+ balanced_sources = ./modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp\
+ 					    ./modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp\
+ 					    ./modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp\
+-					    ./modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp
+-balanced_psources = ./solutions/balancethickness_core.cpp
++						./modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp\
++						./solutions/balancethickness_core.cpp
+ #}}}
+ #Responses sources  {{{1
+ responses_sources = ./modules/MinVelx/MinVelx.h\
+@@ -526,8 +523,8 @@
+ 					  ./modules/ModelProcessorx/SurfaceSlope/UpdateElementsSurfaceSlope.cpp\
+ 					  ./modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp \
+ 					  ./modules/ModelProcessorx/SurfaceSlope/CreateConstraintsSurfaceSlope.cpp\
+-					  ./modules/ModelProcessorx/SurfaceSlope/CreateLoadsSurfaceSlope.cpp
+-slope_psources = ./solutions/surfaceslope_core.cpp\
++					  ./modules/ModelProcessorx/SurfaceSlope/CreateLoadsSurfaceSlope.cpp\
++					  ./solutions/surfaceslope_core.cpp\
+ 					  ./solutions/bedslope_core.cpp
+ #}}}
+ #Groundingline sources  {{{1
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/FemModel.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/FemModel.cpp	(revision 12015)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/FemModel.cpp	(revision 12016)
+@@ -21,7 +21,6 @@
+ /*Object constructors and destructor*/
+ /*FUNCTION FemModel::constructor {{{1*/
+ FemModel::FemModel(char* inputfilename, char* outputfilename, const int in_solution_type,const int* analyses,const int nummodels){
+-#ifdef _PARALLEL_
+ 
+ 	/*intermediary*/
+ 	int i;
+@@ -75,8 +74,6 @@
+ 	/*Add output file name to parameters: */
+ 	this->parameters->AddObject(new StringParam(OutputfilenameEnum,outputfilename));
+ 
+-#endif
+-
+ }
+ 
+ /*}}}1*/
Index: /issm/oecreview/Archive/12010-12040/ISSM-12016-12017.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12016-12017.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12016-12017.diff	(revision 12325)
@@ -0,0 +1,165 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py	(revision 12016)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py	(revision 12017)
+@@ -1,5 +1,5 @@
+ from model import *
+-from TriMesh.Python import *
++from TriMesh import *
+ 
+ #md=model()
+ #md=triangle(md,'../Exp/Square.exp',150000);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/python-binding.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/python-binding.h	(revision 12016)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/python-binding.h	(revision 12017)
+@@ -3,4 +3,5 @@
+ 
+ #include "./io/pythonio.h"
+ #include "./include/python_macros.h"
++
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp	(revision 12016)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp	(revision 12017)
+@@ -9,8 +9,6 @@
+ #endif
+ 
+ 
+-#if defined(_HAVE_PYTHON_) && defined(_SERIAL_)
+-
+ #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
+ #define NO_IMPORT
+ 
+@@ -36,5 +34,3 @@
+ 	}
+ 	return 1;
+ }
+-
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp	(revision 12016)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp	(revision 12017)
+@@ -15,7 +15,6 @@
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+ 
+-#if defined(_HAVE_PYTHON_) && defined(_SERIAL_)
+ /*FUNCTION FetchData(char** pstring,PyObject* py_unicode){{{1*/
+ void FetchData(char** pstring,PyObject* py_unicode){
+ 
+@@ -71,4 +70,3 @@
+ 	
+ }
+ /*}}}*/
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/WritePythonData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/WritePythonData.cpp	(revision 12016)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/WritePythonData.cpp	(revision 12017)
+@@ -8,8 +8,6 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_PYTHON_) && defined(_SERIAL_)
+-
+ #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
+ #define NO_IMPORT
+ 
+@@ -65,5 +63,3 @@
+ 
+ }
+ /*}}}*/
+-
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgGeom.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgGeom.cpp	(revision 12016)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgGeom.cpp	(revision 12017)
+@@ -1,8 +1,13 @@
++/*!\file BamgGeom.cpp
++ */
++
+ #include <stdio.h>
+-#include "../objects.h"
+-#include "../../io/io.h"
+-#include "../../shared/shared.h"
++#include "../../../objects/objects.h"
++#include "../../../io/io.h"
++#include "../../../shared/shared.h"
++#include "../../io/pythonio.h"
+ 
++
+ /*Constructors/Destructors*/
+ /*FUNCTION BamgGeom::BamgGeom(void* module_struct){{{1*/
+ BamgGeom::BamgGeom(void* module_struct){
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgMesh.cpp	(revision 12016)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgMesh.cpp	(revision 12017)
+@@ -1,8 +1,13 @@
++/*!\file BamgMesh.cpp
++ */
++
+ #include <stdio.h>
+-#include "../objects.h"
+-#include "../../io/io.h"
+-#include "../../shared/shared.h"
++#include "../../../objects/objects.h"
++#include "../../../io/io.h"
++#include "../../../shared/shared.h"
++#include "../../io/pythonio.h"
+ 
++
+ /*Constructors/Destructors*/
+ /*FUNCTION BamgMesh::BamgMesh(void* module_struct){{{1*/
+ BamgMesh::BamgMesh(void* module_struct){
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgOpts.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgOpts.cpp	(revision 12016)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/objects/Bamg/BamgOpts.cpp	(revision 12017)
+@@ -1,8 +1,12 @@
++/*!\file BamgOpts.cpp
++ */
++
+ #include <stdio.h>
+-#include "../../shared/shared.h"
+-#include "../../include/include.h"
+-#include "../objects.h"
+-#include "../../io/io.h"
++#include "../../../objects/objects.h"
++#include "../../../io/io.h"
++#include "../../../shared/shared.h"
++#include "../../io/pythonio.h"
++#include "../../../include/include.h"
+ 
+ /*Constructors/Destructors*/
+ /*FUNCTION BamgOpts::BamgOpts(void* module_struct){{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/python/pythonincludes.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/python/pythonincludes.h	(revision 12016)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/python/pythonincludes.h	(revision 12017)
+@@ -9,8 +9,6 @@
+ #include "Python.h"
+ #include "arrayobject.h"
+ 
+-
+-
+ #ifdef _HAVE_BOOST_
+ using namespace std;
+ #include <boost/python/def.hpp>
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/toolkits.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/toolkits.h	(revision 12016)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/toolkits.h	(revision 12017)
+@@ -11,7 +11,7 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#if defined(_HAVE_PYTHON_) && defined(_SERIAL_)
++#ifdef _HAVE_PYTHON_
+ #include "./python/pythonincludes.h"
+ #endif
+ 
Index: /issm/oecreview/Archive/12010-12040/ISSM-12017-12018.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12017-12018.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12017-12018.diff	(revision 12325)
@@ -0,0 +1,437 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp	(revision 12018)
+@@ -10,9 +10,6 @@
+ 
+ #include "../shared.h"
+ #include "../../include/include.h"
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include "mex.h"
+-#endif
+ 
+ ErrorException::ErrorException(const string &what_arg){
+ 
+@@ -44,13 +41,8 @@
+ 		printf("%s%s","Error message: ",what());
+ 	}
+ 	else{
+-		#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-			mexErrMsgTxt(exprintf("\n??? Error using ==> %s at %i\n%s error message: %s\n",
+-							file_name.c_str(),file_line,function_name.c_str(),what()));
+-		#else
+-			printf("\n[%i] ??? Error using ==> %s:%i\n",my_rank,file_name.c_str(),file_line);
+-			printf("[%i] %s error message: %s\n\n",my_rank,function_name.c_str(),what());
+-		#endif
++		printf("\n[%i] ??? Error using ==> %s:%i\n",my_rank,file_name.c_str(),file_line);
++		printf("[%i] %s error message: %s\n\n",my_rank,function_name.c_str(),what());
+ 	}
+ 	return;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/Synchronize.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/Synchronize.sh	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/Synchronize.sh	(revision 12018)
+@@ -28,9 +28,6 @@
+ #include "./Verbosity.h"
+ #include "../../include/macros.h"
+ #include "../Exceptions/exceptions.h"
+-#ifdef _SERIAL_
+-#include <mex.h>
+-#endif
+ /*}}}*/
+ 
+ /*Verbosityt levels*/
+@@ -139,39 +136,13 @@
+ 
+ 	if(level<0) _error_("vebosity level should be a positive integer (user provided %i)",level);
+ 
+-#ifdef _SERIAL_
+-
+-	mxArray* output=NULL;
+-	mxArray* input=NULL;
+-	input=mxCreateDoubleScalar((double)level);
+-
+-	mexCallMATLAB(0,&output,1,&input,"SetVerbosityLevel");
+-#else
+-
+ 	verbositylevel = level;
+ 
+-#endif
+ }/*}}}*/
+ /*FUNCTION GetVerbosityLevel {{{*/
+ int  GetVerbosityLevel(void){
+-#ifdef _SERIAL_
+-
+-	mxArray* output=NULL;
+-	mxArray* input=NULL;
+-	double   level;
+-
+-	mexCallMATLAB(1,&output,0,&input,"GetVerbosityLevel");
+-	level=mxGetScalar(output);
+-
+-	verbositylevel = (int)level;
+-	return verbositylevel;
+-
+-#else
+-
+ 	_assert_(verbositylevel>=0);
+ 	return verbositylevel;
+-
+-#endif
+ }/*}}}*/
+ END
+ #}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12018)
+@@ -29,13 +29,7 @@
+ 	numanalyses=0;
+ 	parameters->FindParam(&strings,&numanalyses,PetscOptionsStringsEnum);
+ 
+-	#if defined(_HAVE_MATLAB_) && defined(_SERIAL_) //do not take this away, because ISSM loads analyses as a Double Param instead of a DoubleVec Param  when running with only 1 analysis
+-	if(numanalyses==1){ analyses=(double*)xmalloc(1*sizeof(double)); parameters->FindParam(analyses,PetscOptionsAnalysesEnum);
+-	}
+-	else parameters->FindParam(&analyses,&dummy,PetscOptionsAnalysesEnum);
+-	#else
+ 	parameters->FindParam(&analyses,&dummy,PetscOptionsAnalysesEnum);
+-	#endif
+ 
+ 	if(numanalyses==0)return NULL; //we did not find petsc options, don't bother.
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/Verbosity.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/Verbosity.cpp	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/Verbosity.cpp	(revision 12018)
+@@ -17,9 +17,6 @@
+ #include "./Verbosity.h"
+ #include "../../include/macros.h"
+ #include "../Exceptions/exceptions.h"
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include <mex.h>
+-#endif
+ /*}}}*/
+ 
+ /*Verbosityt levels*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/io/PrintfFunction.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/io/PrintfFunction.cpp	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/io/PrintfFunction.cpp	(revision 12018)
+@@ -8,10 +8,6 @@
+ #include "../shared/shared.h"
+ #include "../include/include.h"
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include "mex.h"
+-#endif
+-
+ int PrintfFunction(const char* format,...){
+ 	/*http://linux.die.net/man/3/vsnprintf*/
+ 
+@@ -52,11 +48,7 @@
+ 	}
+ 
+ 	/*Ok, if we are running in parallel, get node 0 to print*/
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-	mexPrintf(buffer);
+-#else
+ 	if(my_rank==0)printf(buffer);
+-#endif
+ 
+ 	/*Clean up and return*/
+ 	xfree((void**)&buffer);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12018)
+@@ -77,35 +77,6 @@
+ 	/*Process petsc options to see if we are using special types of external solvers: {{{1*/
+ 	PetscOptionsDetermineSolverType(&solver_type);
+ 
+-	/*In serial mode, the matrices have been loaded as MPIAIJ or AIJ matrices. 
+-	 We need to convert them if we are going to run the solvers successfully: */
+-	#ifdef _SERIAL_
+-	#if _PETSC_MAJOR_ == 2 
+-	if (solver_type==MUMPSPACKAGE_LU){
+-		/*Convert Kff to MATTAIJMUMPS: */
+-		MatConvert(Kff,MATAIJMUMPS,MAT_REUSE_MATRIX,&Kff);
+-	}
+-	if (solver_type==MUMPSPACKAGE_CHOL){
+-		/*Convert Kff to MATTSBAIJMUMPS: */
+-		MatConvert(Kff,MATSBAIJMUMPS,MAT_REUSE_MATRIX,&Kff);
+-	}
+-	if (solver_type==SPOOLESPACKAGE_LU){
+-		/*Convert Kff to MATTSBAIJMUMPS: */
+-		MatConvert(Kff,MATAIJSPOOLES,MAT_REUSE_MATRIX,&Kff);
+-	}
+-	if (solver_type==SPOOLESPACKAGE_CHOL){
+-		/*Convert Kff to MATTSBAIJMUMPS: */
+-		MatConvert(Kff,MATSBAIJSPOOLES,MAT_REUSE_MATRIX,&Kff);
+-	}
+-	if (solver_type==SUPERLUDISTPACKAGE){
+-		/*Convert Kff to MATTSBAIJMUMPS: */
+-		MatConvert(Kff,MATSUPERLU_DIST,MAT_REUSE_MATRIX,&Kff);
+-	}
+-	if (solver_type==StokesSolverEnum){
+-		_error_("Petsc 2 does not support multi-physics solvers");
+-	}
+-	#endif
+-	#endif
+ 	/*}}}*/
+ 	/*Check the solver is available: {{{1*/
+ 	if(solver_type==MUMPSPACKAGE_LU || solver_type==MUMPSPACKAGE_CHOL){
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Solverx/Solverx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Solverx/Solverx.cpp	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Solverx/Solverx.cpp	(revision 12018)
+@@ -33,10 +33,6 @@
+ 		if(df)  df_vector  = df->vector;
+ 
+ 		/*In serial mode, the Petsc Options database has not been initialized properly: */
+-		#ifdef _SERIAL_
+-		parameters->FindParam(&analysis_type,AnalysisTypeEnum);
+-		PetscOptionsFromAnalysis(parameters,analysis_type);
+-		#endif
+ 
+ 		SolverxPetsc(&uf_vector,Kff->matrix,pf->vector,uf0_vector,df_vector,parameters);
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/triangle/triangleincludes.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/triangle/triangleincludes.h	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/triangle/triangleincludes.h	(revision 12018)
+@@ -5,14 +5,10 @@
+ #ifndef _TRIANGLE_INCLUDES_H_
+ #define _TRIANGLE_INCLUDES_H_
+ 
+-#ifdef _SERIAL_
+-
+ #ifdef _C_ //only valid for iso C, not C++
+ /*Triangle includes: */
+ #include "triangle.h"
+ #endif //#ifdef _C_
+ 
+-#endif //ifdef _SERIAL_
+ 
+-
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqMat.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqMat.h	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqMat.h	(revision 12018)
+@@ -15,10 +15,6 @@
+ 
+ #include "../toolkitsenums.h"
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include "mex.h"
+-#endif
+-
+ /*}}}*/
+ class SeqVec;
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqVec.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqVec.h	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/issm/SeqVec.h	(revision 12018)
+@@ -15,10 +15,6 @@
+ 
+ #include "../toolkitsenums.h"
+ 
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-#include "mex.h"
+-#endif
+-
+ /*}}}*/
+ 
+ class SeqVec{
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/petsc/patches/MatInvert.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/petsc/patches/MatInvert.cpp	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/petsc/patches/MatInvert.cpp	(revision 12018)
+@@ -54,12 +54,8 @@
+ 	/*Assemble inverse: */
+ 	MatAssemblyBegin(inv,MAT_FINAL_ASSEMBLY);
+ 	MatAssemblyEnd(inv,MAT_FINAL_ASSEMBLY);
+-
+-	#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-		MatConvert(inv, MATSEQAIJ,MAT_REUSE_MATRIX,&inv);
+-	#else
+-		MatConvert(inv, MATMPIAIJ,MAT_REUSE_MATRIX,&inv);
+-	#endif
++		
++	MatConvert(inv, MATMPIAIJ,MAT_REUSE_MATRIX,&inv);
+ 	
+ 	/*Free ressources:*/
+ 	MatFree(&identity);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp	(revision 12018)
+@@ -123,20 +123,7 @@
+ /*}}}*/
+ /*FUNCTION DoubleVecParam::GetParameterValue(int** pintarray,int* pM){{{1*/
+ void  DoubleVecParam::GetParameterValue(int** pintarray,int* pM){
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-	int* output=NULL;
+-	int i;
+-
+-	/*Cast values into integers*/
+-	output=(int*)xmalloc(M*sizeof(int));
+-	for(i=0;i<M;i++) output[i]=(int)values[i];
+-
+-	/*Assign output pointers:*/
+-	if(pM) *pM=M;
+-	*pintarray=output;
+-#else
+ 	_error_("DoubleVec param of enum %i (%s) cannot return an array of int",enum_type,EnumToStringx(enum_type));
+-#endif
+ }
+ /*}}}*/
+ /*FUNCTION DoubleVecParam::GetParameterName{{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleParam.cpp	(revision 12018)
+@@ -81,90 +81,32 @@
+ /*}}}*/
+ /*FUNCTION DoubleParam::GetParameterValue(int* pinteger){{{1*/
+ void DoubleParam::GetParameterValue(int* pinteger){
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-	*pinteger=(int)value;
+-#else
+ 	_error_("Double param of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));
+-#endif
+ }
+ /*}}}*/
+ /*FUNCTION DoubleParam::GetParameterValue(bool* pbool){{{1*/
+ void DoubleParam::GetParameterValue(bool* pbool){
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-
+-	/*If debugging mode, cheeck that the double is 0 or 1*/
+-	_assert_(value==0 || value==1);
+-	*pbool=(bool)value;
+-
+-#else
+ 	_error_("Double param of enum %i (%s) cannot return an bool",enum_type,EnumToStringx(enum_type));
+-#endif
+ }
+ /*}}}*/
+ /*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM){{{1*/
+ void DoubleParam::GetParameterValue(int** pintarray,int* pM){
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-	int* output=NULL;
+-
+-	output=(int*)xmalloc(1*sizeof(int));
+-	*output=(int)value;
+-
+-	/*Assign output pointers:*/
+-	if(pM) *pM=1;
+-	*pintarray=output;
+-#else
+ 	_error_("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));
+-#endif
+ }
+ /*}}}*/
+ /*FUNCTION DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{1*/
+ void DoubleParam::GetParameterValue(int** pintarray,int* pM,int* pN){
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-	int* output=NULL;
+-
+-	output=(int*)xmalloc(1*sizeof(int));
+-	*output=(int)value;
+-
+-	/*Assign output pointers:*/
+-	if(pM) *pM=1;
+-	if(pN) *pN=1;
+-	*pintarray=output;
+-#else
+ 	_error_("Double param of enum %i (%s) cannot return an array of integers",enum_type,EnumToStringx(enum_type));
+-#endif
+ }
+ /*}}}*/
+ /*FUNCTION DoubleParam::GetParameterValue(double** pdoublearray,int* pM){{{1*/
+ void DoubleParam::GetParameterValue(double** pdoublearray,int* pM){
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-	double* output=NULL;
+-
+-	output=(double*)xmalloc(1*sizeof(double));
+-	*output=(double)value;
+-
+-	/*Assign output podoubleers:*/
+-	if(pM) *pM=1;
+-	*pdoublearray=output;
+-#else
+ 	_error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToStringx(enum_type));
+-#endif
+ }
+ /*}}}*/
+ /*FUNCTION DoubleParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){{{1*/
+ void DoubleParam::GetParameterValue(double** pdoublearray,int* pM,int* pN){
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-	double* output=NULL;
+-
+-	output=(double*)xmalloc(1*sizeof(double));
+-	*output=(double)value;
+-
+-	/*Assign output podoubleers:*/
+-	if(pM) *pM=1;
+-	if(pN) *pN=1;
+-	*pdoublearray=output;
+-#else
+ 	_error_("Double param of enum %i (%s) cannot return an array of double",enum_type,EnumToStringx(enum_type));
+-#endif
+ }
+ /*}}}*/
+ /*FUNCTION DoubleParam::UnitConversion{{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp	(revision 12018)
+@@ -108,20 +108,7 @@
+ /*}}}*/
+ /*FUNCTION DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){{{1*/
+ void  DoubleMatParam::GetParameterValue(int** pintarray,int* pM,int* pN){
+-#if defined(_HAVE_MATLAB_) && defined(_SERIAL_)
+-	int* output=NULL;
+-	int  i;
+-
+-	output=(int*)xmalloc((int)(M*N*sizeof(int)));
+-	for(i=0;i<M*N;i++) output[i]=(int)value[i];
+-
+-	/*Assign output pointers:*/
+-	if(pM) *pM=M;
+-	if(pN) *pN=N;
+-	*pintarray=output;
+-#else
+ 	_error_("DoubleMat of enum %i (%s) cannot return an array of int",enum_type,EnumToStringx(enum_type));
+-#endif
+ }
+ /*}}}*/
+ /*FUNCTION DoubleMatParam::GetParameterName{{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12017)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp	(revision 12018)
+@@ -107,21 +107,13 @@
+ /*Object functions*/
+ /*FUNCTION DoubleInput::GetInputValue(bool* pvalue) {{{1*/
+ void DoubleInput::GetInputValue(bool* pvalue){
+-#ifdef _SERIAL_
+-	*pvalue=(bool)value;
+-#else
+ 	_error_("Double input of enum %s cannot return a boolean",EnumToStringx(enum_type));
+-#endif
+ 
+ }
+ /*}}}*/
+ /*FUNCTION DoubleInput::GetInputValue(int* pvalue){{{1*/
+ void DoubleInput::GetInputValue(int* pvalue){
+-#ifdef _SERIAL_
+-	*pvalue=(int)value;
+-#else
+ 	_error_("Double input of enum %i (%s) cannot return an integer",enum_type,EnumToStringx(enum_type));
+-#endif
+ 
+ }
+ /*}}}*/
Index: /issm/oecreview/Archive/12010-12040/ISSM-12018-12019.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12018-12019.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12018-12019.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12018)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12019)
+@@ -976,7 +976,7 @@
+ 
+ #test rose preprocessing 
+ %.r2cpp.cpp : %.cpp
+-	testTranslator -rose:o $@ -rose:skipfinalCompileStep -DHAVE_CONFIG_H -D_PARALLEL_ -D_C_ -I. -I../.. $(INCLUDES) $<
++	testTranslator -rose:o $@ -rose:skipfinalCompileStep -DHAVE_CONFIG_H -D_C_ -I. -I../.. $(INCLUDES) $<
+ libISSMRose_a_SOURCES = $(libISSMCore_a_SOURCES:.cpp=.r2cpp.cpp)
+ libISSMRose_a_CXXFLAGS= -fPIC -D_C_ $(CXXOPTFLAGS)
+ 
Index: /issm/oecreview/Archive/12010-12040/ISSM-12019-12020.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12019-12020.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12019-12020.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh	(revision 12019)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh	(revision 12020)
+@@ -25,8 +25,6 @@
+ 	--with-python=python3.2 \
+ 	--with-python-root="$ISSM_TIER/externalpackages/python/install" 
+ 
+-exit
+-
+ #Compile boost
+ ./bjam install
+ 
Index: /issm/oecreview/Archive/12010-12040/ISSM-12020-12021.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12020-12021.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12020-12021.diff	(revision 12325)
@@ -0,0 +1,86 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12020)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp	(revision 12021)
+@@ -42,7 +42,6 @@
+ 	char ksp_type[50];
+ 	#endif
+ 
+-
+ 	/*Display message*/
+ 	_printf_(VerboseModule(),"   Solving\n");
+ 	#if _PETSC_MAJOR_ < 3 || (_PETSC_MAJOR_ == 3 && _PETSC_MINOR_ < 2)
+@@ -51,14 +50,14 @@
+ 	if(VerboseSolver())PetscOptionsView(PETSC_VIEWER_STDOUT_WORLD);
+ 	#endif
+ 
+-	/*First, check that f-set is not NULL, i.e. model is fully constrained: {{{*/
++	/*First, check that f-set is not NULL, i.e. model is fully constrained:*/ 
+ 	_assert_(Kff);
+ 	MatGetSize(Kff,&global_m,&global_n); _assert_(global_m==global_m);
+ 	if(!global_n){
+ 		*puf=NULL; return;
+ 	}
+-	/*}}}*/
+-	/*Initial guess logic here: {{{1*/
++
++	/*Initial guess */
+ 	/*Now, check that we are not giving an initial guess to the solver, if we are running a direct solver: */
+ 	#if _PETSC_MAJOR_ >= 3 
+ 	PetscOptionsGetString(PETSC_NULL,"-ksp_type",ksp_type,49,&flg);
+@@ -73,22 +72,20 @@
+ 	else{
+ 		MatGetLocalSize(Kff,&local_m,&local_n);uf=NewVec(local_n,fromlocalsize);
+ 	}
+-	/*}}}*/
+-	/*Process petsc options to see if we are using special types of external solvers: {{{1*/
++
++	/*Process petsc options to see if we are using special types of external solvers*/
+ 	PetscOptionsDetermineSolverType(&solver_type);
+ 
+-	/*}}}*/
+-	/*Check the solver is available: {{{1*/
++	/*Check the solver is available*/
+ 	if(solver_type==MUMPSPACKAGE_LU || solver_type==MUMPSPACKAGE_CHOL){
+-	#if _PETSC_MAJOR_ >=3
+-		#ifndef _HAVE_MUMPS_
+-		_error_("requested MUMPS solver, which was not compiled into ISSM!\n");
++		#if _PETSC_MAJOR_ >=3
++			#ifndef _HAVE_MUMPS_
++			_error_("requested MUMPS solver, which was not compiled into ISSM!\n");
++			#endif
+ 		#endif
+-
+-	#endif
+ 	}
+-	/*}}}*/
+-	/*Prepare solver:{{{1*/
++
++	/*Prepare solver*/
+ 	KSPCreate(MPI_COMM_WORLD,&ksp);
+ 	KSPSetOperators(ksp,Kff,Kff,DIFFERENT_NONZERO_PATTERN);
+ 	KSPSetFromOptions(ksp);
+@@ -123,18 +120,17 @@
+ 	}
+ 	#endif
+ 
+-	/*}}}*/
+-	/*If there is an initial guess for the solution, use it, except if we are using the MUMPS direct solver, where any initial guess will crash Petsc: {{{1*/
++	/*If there is an initial guess for the solution, use it
++	 * except if we are using the MUMPS direct solver
++	 * where any initial guess will crash Petsc*/
+ 	if (uf0){
+-		if( (solver_type!=MUMPSPACKAGE_LU) && (solver_type!=MUMPSPACKAGE_CHOL) && (solver_type!=SPOOLESPACKAGE_LU) && (solver_type!=SPOOLESPACKAGE_CHOL) && (solver_type!=SUPERLUDISTPACKAGE)){
++		if((solver_type!=MUMPSPACKAGE_LU) && (solver_type!=MUMPSPACKAGE_CHOL) && (solver_type!=SPOOLESPACKAGE_LU) && (solver_type!=SPOOLESPACKAGE_CHOL) && (solver_type!=SUPERLUDISTPACKAGE)){
+ 			KSPSetInitialGuessNonzero(ksp,PETSC_TRUE);
+ 		}
+ 	}
+-	/*}}}*/
+-	
+-	if(VerboseSolver())KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);
+ 
+ 	/*Solve: */
++	if(VerboseSolver())KSPView(ksp,PETSC_VIEWER_STDOUT_WORLD);
+ 	KSPSolve(ksp,pf,uf);
+ 	
+ 	/*Check convergence*/
Index: /issm/oecreview/Archive/12010-12040/ISSM-12021-12022.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12021-12022.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12021-12022.diff	(revision 12325)
@@ -0,0 +1,88 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solutions/issm.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solutions/issm.cpp	(revision 12021)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solutions/issm.cpp	(revision 12022)
+@@ -34,7 +34,7 @@
+ 	double   start_init, finish_init;
+ 	int      ierr;
+ 
+-	MODULEBOOT();
++	ISSMBOOT();
+ 
+ 	/*Initialize environments: Petsc, MPI, etc...: */
+ 	#ifdef _HAVE_PETSC_
+@@ -140,8 +140,7 @@
+ 	#endif
+ 	
+ 	/*end module: */
+-	MODULEEND();
++	ISSMEND();
+ 
+ 	return 0; //unix success return;
+ }
+-
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12021)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12022)
+@@ -19,7 +19,6 @@
+  * MODULEBOOT(); and MODULEEND(); at the beginning and end of a module, and c++ exceptions 
+  * will be trapped. Really nifty!*/
+ 
+-//Module Boot //{{{
+ #define MODULEBOOT(); ModuleBoot(); \
+ 	try{
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12021)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12022)
+@@ -26,7 +26,7 @@
+ 	if(matrix){
+ 		
+ 		#ifdef _HAVE_PETSC_
+-		PetscMatrixToDoubleMatrix(&tmatrix_ptr,&rows,&cols,matrix->matrix);
++		PetscMatrixToDoubleMatrix(&matrix_ptr,&rows,&cols,matrix->matrix);
+ 		#else
+ 		matrix_ptr=matrix->matrix->ToSerial();
+ 		matrix->matrix->GetSize(&rows,cols);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/macros.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/macros.h	(revision 12021)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/macros.h	(revision 12022)
+@@ -39,16 +39,16 @@
+   ((void) 0)
+ #endif
+ /*}}}*/
+-/* MODULEBOOT/MODULEEND {{{1*/
++/* ISSMBOOT/ISSMEND {{{1*/
+ 
+ /*The following macros hide the error exception handling in a matlab module. Just put 
+- * MODULEBOOT(); and MODULEEND(); at the beginning and end of a module, and c++ exceptions 
++ * ISSMBOOT(); and ISSMEND(); at the beginning and end of a module, and c++ exceptions 
+  * will be trapped. Really nifty!*/
+ 
+-#define MODULEBOOT(); \
++#define ISSMBOOT(); \
+ 	try{
+ 
+-#define MODULEEND(); }\
++#define ISSMEND(); }\
+ 	catch(ErrorException &exception){\
+ 		exception.Report(); \
+ 		return 1;\
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12021)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12022)
+@@ -15,8 +15,8 @@
+ #sources
+ #Core sources{{{1
+ core_sources = ./issm.h\
+-			        ./issm-binding.h\
+-			        ./include/macros.h\
++					./issm-binding.h\
++					./include/macros.h\
+ 					./include/typedefs.h\
+ 					./include/types.h\
+ 					./include/include.h\
Index: /issm/oecreview/Archive/12010-12040/ISSM-12022-12023.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12022-12023.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12022-12023.diff	(revision 12325)
@@ -0,0 +1,41 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am	(revision 12022)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am	(revision 12023)
+@@ -1,7 +1,6 @@
+ INCLUDES = @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
+ EXEEXT=$(WRAPPEREXT)
+ #Bin programs {{{1
+-
+ if MODULES
+ if MATLAB
+ bin_PROGRAMS =  AverageFilter\
+@@ -53,18 +52,18 @@
+ AM_CXXFLAGS =  -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
+ 
+ if MATLAB
+-AM_LDFLAGS  = $(MEXLINK)
++AM_LDFLAGS   = $(MEXLINK)
+ AM_CXXFLAGS +=  -D_HAVE_MATLAB_ -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread 
+-LDADD       += $(MEXLIB) ../c/libISSMMatlab.a
+-
++LDADD       += $(MEXLIB) ../c/libISSMMatlab.a 
+ endif
+ 
+ if PYTHON
+-AM_LDFLAGS  = $(PYTHONLINK)
++AM_LDFLAGS   = $(PYTHONLINK)
+ AM_CXXFLAGS +=  -D_HAVE_PYTHON_ -DNPY_NO_DEPRECATED_API 
+ LDADD       += $(BOOSTLIB) $(PYTHONLIB) ../c/libISSMPython.a
+ endif
+ 
++LDADD       += ../c/libISSMCore.a ../c/libISSMModules.a 
+ 
+ #Optimization flags:
+ AM_CXXFLAGS += $(CXXOPTFLAGS) 
+@@ -177,5 +176,4 @@
+ 
+ TriMeshRefine_SOURCES = TriMeshRefine/TriMeshRefine.cpp\
+ 			  TriMeshRefine/TriMeshRefine.h
+-
+ #}}}
Index: /issm/oecreview/Archive/12010-12040/ISSM-12023-12024.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12023-12024.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12023-12024.diff	(revision 12325)
@@ -0,0 +1,40 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp	(revision 12023)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp	(revision 12024)
+@@ -1,26 +1,21 @@
+ /* \file PetscVectorToDoubleVector.cpp
+  */
+ 
+-
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-
+ /*Petsc includes: */
+ #include "petscmat.h"
+ #include "petscvec.h"
+ #include "petscksp.h"
+ 
+-/*Petsc includes: */
+ #include "mex.h"
+-
+ #include "../../shared/shared.h"
+ #include <string>
+ 
+-
+ void PetscVectorToDoubleVector(double** pvector, int* prows, Vec petsc_vector){
+ 
+ 	int     i;
+@@ -32,7 +27,7 @@
+ 	mxArray* dataref=NULL;
+ 
+ 	/*Get size of vector: */
+-	if(vector){
++	if(petsc_vector){
+ 		VecGetSize(petsc_vector,&rows);
+ 		if(rows){
+ 			idxm=(int*)xmalloc(rows*sizeof(int));
Index: /issm/oecreview/Archive/12010-12040/ISSM-12024-12025.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12024-12025.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12024-12025.diff	(revision 12325)
@@ -0,0 +1,81 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.h	(revision 12024)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.h	(revision 12025)
+@@ -5,7 +5,6 @@
+ #ifndef _TRIMESH_H
+ #define _TRIMESH_H
+ 
+-
+ #ifdef HAVE_CONFIG_H
+ 	#include <config.h>
+ #else
+@@ -30,27 +29,27 @@
+ 
+ #ifdef _HAVE_MATLAB_
+ /* serial input macros: */
+-#define DOMAINOUTLINE     (mxArray *)prhs[0]
+-#define AREA        (mxArray *)prhs[1]
+-#define ORDER     (mxArray *)prhs[2]
++#define DOMAINOUTLINE  (mxArray *)prhs[0]
++#define AREA           (mxArray *)prhs[1]
++#define ORDER          (mxArray *)prhs[2]
+ /* serial output macros: */
+-#define INDEX  (mxArray**)&plhs[0]
+-#define X  (mxArray**)&plhs[1]
+-#define Y   (mxArray**)&plhs[2]
+-#define SEGMENTS   (mxArray**)&plhs[3]
++#define INDEX             (mxArray**)&plhs[0]
++#define X                 (mxArray**)&plhs[1]
++#define Y                 (mxArray**)&plhs[2]
++#define SEGMENTS          (mxArray**)&plhs[3]
+ #define SEGMENTMARKERLIST (mxArray**)&plhs[4]
+ #endif
+ 
+ #ifdef _HAVE_PYTHON_
+ /* serial input macros: */
+-#define DOMAINOUTLINE     PyTuple_GetItem(args,0)
+-#define AREA        PyTuple_GetItem(args,1)
+-#define ORDER     PyTuple_GetItem(args,2)
++#define DOMAINOUTLINE PyTuple_GetItem(args,0)
++#define AREA          PyTuple_GetItem(args,1)
++#define ORDER         PyTuple_GetItem(args,2)
+ /* serial output macros: */
+-#define INDEX  output,0
+-#define X  output,1
+-#define Y   output,2
+-#define SEGMENTS   output,3
++#define INDEX             output,0
++#define X                 output,1
++#define Y                 output,2
++#define SEGMENTS          output,3
+ #define SEGMENTMARKERLIST output,4
+ #endif
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.cpp	(revision 12024)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.cpp	(revision 12025)
+@@ -32,14 +32,12 @@
+ 	FetchData(&area,AREA);
+ 	FetchData(&order,ORDER);
+ 
+-
+ 	/*Read domain outline: */
+ 	domain=DomainOutlineRead(domainname,false);
+ 
+ 	/*call x core: */
+ 	TriMeshx(&index,&x,&y,&segments,&segmentmarkerlist,domain,area,order);
+ 	
+-	
+ 	/*write outputs: */
+ 	WriteData(INDEX,index);
+ 	WriteData(X,x);
+@@ -57,7 +55,6 @@
+ 
+ 	/*end module: */
+ 	MODULEEND();
+-
+ }
+ 
+ void TriMeshUsage(void) //{{{1
Index: /issm/oecreview/Archive/12010-12040/ISSM-12025-12026.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12025-12026.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12025-12026.diff	(revision 12325)
@@ -0,0 +1,133 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/AnalysisConfiguration.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/AnalysisConfiguration.m	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/AnalysisConfiguration.m	(revision 12026)
+@@ -0,0 +1,58 @@
++function [analyses,numanalyses]=AnalysisConfiguration(solutiontype),
++%ANALYSISCONFIGURATION - return type of analyses, number of analyses 
++%
++%   Usage:
++%      [analyses, numanalyses]=AnalysisConfiguration(solutiontype);
++
++
++
++switch solutiontype,
++
++	case DiagnosticSolutionEnum,
++		numanalyses=5;
++		analyses=[DiagnosticHorizAnalysisEnum;DiagnosticVertAnalysisEnum;DiagnosticHutterAnalysisEnum;SurfaceSlopeAnalysisEnum;BedSlopeAnalysisEnum];
++
++	case SteadystateSolutionEnum,
++		numanalyses=7; 
++		analyses=[DiagnosticHorizAnalysisEnum;DiagnosticVertAnalysisEnum;DiagnosticHutterAnalysisEnum;SurfaceSlopeAnalysisEnum;BedSlopeAnalysisEnum;ThermalAnalysisEnum;MeltingAnalysisEnum];
++
++	case ThermalSolutionEnum,
++		numanalyses=2; 
++		analyses=[ThermalAnalysisEnum;MeltingAnalysisEnum];
++
++	case EnthalpySolutionEnum,
++		numanalyses=1; 
++		analyses=[EnthalpyAnalysisEnum];
++
++	case PrognosticSolutionEnum,
++		numanalyses=1; 
++		analyses=[PrognosticAnalysisEnum];
++
++	case BalancethicknessSolutionEnum,
++		numanalyses=1; 
++		analyses=[BalancethicknessAnalysisEnum];
++
++	case SurfaceSlopeSolutionEnum,
++		numanalyses=1; 
++		analyses=[SurfaceSlopeAnalysisEnum];
++
++	case BedSlopeSolutionEnum,
++		numanalyses=1; 
++		analyses=[BedSlopeAnalysisEnum];
++
++	case TransientSolutionEnum,
++		numanalyses=9; 
++		analyses=[DiagnosticHorizAnalysisEnum;DiagnosticVertAnalysisEnum;DiagnosticHutterAnalysisEnum;SurfaceSlopeAnalysisEnum;BedSlopeAnalysisEnum;ThermalAnalysisEnum;MeltingAnalysisEnum;EnthalpyAnalysisEnum;PrognosticAnalysisEnum];
++
++	case FlaimSolutionEnum,
++		numanalyses=1; 
++		analyses=[FlaimAnalysisEnum];
++
++	case HydrologySolutionEnum,
++		numanalyses=3; 
++		analyses=[BedSlopeAnalysisEnum;SurfaceSlopeAnalysisEnum;HydrologyAnalysisEnum];
++
++	otherwise
++		error('%s%s%s',' solution type: ',EnumToString(solutiontype),' not supported yet!');
++
++end
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/MatlabProcessPatch.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/MatlabProcessPatch.m	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/MatlabProcessPatch.m	(revision 12026)
+@@ -0,0 +1,65 @@
++function structure=MatlabProcessPatch(structure);
++%PROCESSPATCH - create a structure from a patch
++%
++%   Usage:
++%      Result=ProcessPatch(Result);
++
++%return if there is no fiel Patch
++if (~isfield(structure,'Patch')),
++	return;
++end
++
++%loop over steps
++for i=1:length(structure),
++
++	%Get Patch for current step
++	Patch=structure(i).Patch;
++	numvertices=structure(i).PatchVertices;
++
++	%check that Patch is not empty
++	if length(Patch)==0 continue; end
++
++	%Get number of fields;
++	fields=unique(Patch(:,1));
++	steps=unique(Patch(:,2));
++
++	%parse steps
++	for j=1:length(steps),
++
++		posstep=find(Patch(:,2)==steps(j));
++
++		%Take all the lines of the Patch for this timestep
++		temporarypatch=Patch(posstep,:);
++		time=temporarypatch(1,3);
++		step=temporarypatch(1,2);
++
++		%parse fields
++		for i=1:length(fields),
++
++			%get name
++			fieldname=EnumToString(fields(i));
++
++			%get line positions
++			pos=find(temporarypatch(:,1)==fields(i));
++
++			%Fill Result structure
++			structure(step).steps=step;
++			structure(step).time=time;
++			structure(step).(fieldname).element=temporarypatch(pos,4);
++			structure(step).(fieldname).interpolation=temporarypatch(pos,5);
++			structure(step).(fieldname).index=temporarypatch(pos,6:5+numvertices);
++			if structure(step).(fieldname).interpolation==P1Enum,
++				structure(step).(fieldname).value=temporarypatch(pos,6+numvertices:end);
++			end
++			if structure(step).(fieldname).interpolation==P0Enum,
++				structure(step).(fieldname).value=temporarypatch(pos,6+numvertices);
++			end
++
++		end
++	end
++end
++
++%remove fields
++structure=rmfield(structure,'Patch');
++structure=rmfield(structure,'PatchVertices');
++structure=rmfield(structure,'PatchNodes');
Index: /issm/oecreview/Archive/12010-12040/ISSM-12026-12027.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12026-12027.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12026-12027.diff	(revision 12325)
@@ -0,0 +1,4829 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test401.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test401.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test401.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test141.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test141.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test141.m	(revision 12027)
+@@ -1,30 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.initialization.waterfraction=zeros(md.mesh.numberofvertices,1);
+-md.cluster=none;
+-md.transient.isdiagnostic=0;
+-md.transient.isprognostic=0;
+-md.transient.isthermal=1;
+-md.transient.isgroundingline=0;
+-md.thermal.isenthalpy=1;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Enthalpy1','Waterfraction1','Temperature1',...
+-	'Enthalpy2','Waterfraction2','Temperature2',...
+-	'Enthalpy3','Waterfraction3','Temperature3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Enthalpy),...
+-	(md.results.TransientSolution(1).Waterfraction),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(2).Enthalpy),...
+-	(md.results.TransientSolution(2).Waterfraction),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(3).Enthalpy),...
+-	(md.results.TransientSolution(3).Waterfraction),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test303.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test303.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test303.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=setflowequation(md,'hutter','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test205.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test205.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test205.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,2);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test107.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test107.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test107.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=extrude(md,3,2);
+-md.cluster=none;
+-md=setflowequation(md,'stokes','all');
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-08,1e-08,1e-08,1e-08,1e-08};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test605.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test605.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test605.m	(revision 12027)
+@@ -1,14 +0,0 @@
+-md=triangle(model,'../Exp/79North.exp',10000);
+-md=setmask(md,'../Exp/79NorthShelf.exp','');
+-md=parameterize(md,'../Par/79North.par');
+-md=extrude(md,6,1);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,PrognosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.PrognosticSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test443.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test443.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test443.m	(revision 12027)
+@@ -1,19 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,5,1);
+-md=setflowequation(md,'stokes','../Exp/SquareHalfRight.exp','fill','macayeal','coupling','tiling');
+-md.cluster=none;
+-md.diagnostic.reltol=0.4;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-09,1e-09,1e-06,1e-09,1e-09};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test345.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test345.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test345.m	(revision 12027)
+@@ -1,35 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md.timestepping.time_adapt=1;
+-md.timestepping.final_time=600;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test507.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test507.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test507.m	(revision 12027)
+@@ -1,26 +0,0 @@
+-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');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test409.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test409.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test409.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,5,1);
+-md=setflowequation(md,'macayeal','../Exp/SquareHalfRight.exp','fill','pattyn','coupling','penalties');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-05,1e-05,1e-05,1e-05,1e-05};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test247.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test247.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test247.m	(revision 12027)
+@@ -1,46 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md.prognostic.hydrostatic_adjustment='Incremental';
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2', ...
+-					   'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-06};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test133.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test133.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test133.m	(revision 12027)
+@@ -1,17 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=extrude(md,5,1);
+-%Add boundary conditions on thickness on the border
+-pos=find(md.mesh.vertexonboundary);
+-md.balancethickness.spcthickness(pos)=md.geometry.thickness(pos);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,BalancethicknessSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.BalancethicknessSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test435.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test435.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test435.m	(revision 12027)
+@@ -1,21 +0,0 @@
+-%test partitioning, and partition averaging
+-md=triangle(model,'../Exp/Square.exp',30000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-
+-%partitioning
+-md.qmu.numberofpartitions=100;
+-md=partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions);
+-md.qmu.partition=md.qmu.partition-1;
+-
+-vector=(1:1:md.mesh.numberofvertices)';
+-vector_on_partition=AreaAverageOntoPartition(md,vector);
+-vector_on_nodes=vector_on_partition(md.qmu.partition+1);
+-
+-field_names     ={'vector_on_nodes'};
+-field_tolerances={1e-11};
+-field_values={...
+-         vector_on_nodes,...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test337.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test337.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test337.m	(revision 12027)
+@@ -1,33 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=setflowequation(md,'macayeal','all');
+-
+-%control parameters
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'FrictionCoefficient'};
+-md.inversion.min_parameters=1*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=200*ones(md.mesh.numberofvertices,1);
+-md.inversion.nsteps=2;
+-md.inversion.cost_functions=[103*ones(md.inversion.nsteps,1)  501*ones(md.inversion.nsteps,1)];
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,2); md.inversion.cost_functions_coefficients(:,2)=0*2*10^-7;
+-md.inversion.gradient_scaling=3*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=2*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.3*ones(md.inversion.nsteps,1);
+-md.inversion.vx_obs=md.initialization.vx; md.inversion.vy_obs=md.initialization.vy;
+-
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'FrictionCoefficient' 'Pressure' 'Vel' 'Vx' 'Vy'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Gradient1),...
+-	md.results.DiagnosticSolution.J,...
+-	(md.results.DiagnosticSolution.FrictionCoefficient),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test239.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test239.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test239.m	(revision 12027)
+@@ -1,17 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',120000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,2,1);
+-md=setflowequation(md,'stokes','../Exp/SquareHalfRight.exp','fill','pattyn');
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test321.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test321.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test321.m	(revision 12027)
+@@ -1,14 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=setflowequation(md,'macayeal','all');
+-md=extrude(md,5,0.5);
+-md.cluster=none;
+-md=solve(md,PrognosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.PrognosticSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test223.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test223.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test223.m	(revision 12027)
+@@ -1,33 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-
+-%control parameters
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'MaterialsRheologyBbar'};
+-md.inversion.min_parameters=10^6*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=2*10^9*ones(md.mesh.numberofvertices,1);
+-md.inversion.nsteps=2;
+-md.inversion.cost_functions=101*ones(md.inversion.nsteps,1);
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,1);
+-md.inversion.gradient_scaling=10^7*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=2*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.3*ones(md.inversion.nsteps,1);
+-md.inversion.vx_obs=md.initialization.vx; md.inversion.vy_obs=md.initialization.vy;
+-
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'MaterialsRheologyBbar' 'Pressure' 'Vel' 'Vx' 'Vy'};
+-field_tolerances={1e-12,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Gradient1),...
+-	md.results.DiagnosticSolution.J,...
+-	(md.results.DiagnosticSolution.MaterialsRheologyBbar),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test125.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test125.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test125.m	(revision 12027)
+@@ -1,15 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=extrude(md,5,1);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,SurfaceSlopeSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'SurfaceSlopeX','SurfaceSlopeY'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.SurfaceSlopeSolution.SurfaceSlopeX),...
+-	(md.results.SurfaceSlopeSolution.SurfaceSlopeY),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test623.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test623.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test623.m	(revision 12027)
+@@ -1,32 +0,0 @@
+-md=triangle(model,'../Exp/79North.exp',10000);
+-md=meshconvert(md);
+-md=setmask(md,'../Exp/79NorthShelf.exp','');
+-md=parameterize(md,'../Par/79North.par');
+-md=setflowequation(md,'macayeal','all');
+-
+-%control parameters
+-md.inversion.nsteps=2;
+-md.balancethickness.stabilization=3;
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'BalancethicknessThickeningRate'};
+-md.inversion.thickness_obs=md.geometry.thickness;
+-md.inversion.min_parameters=-50*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=50*ones(md.mesh.numberofvertices,1);
+-md.inversion.cost_functions=201*ones(md.inversion.nsteps,1);
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,1);
+-md.inversion.gradient_scaling=10/md.constants.yts*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=4*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.99*ones(md.inversion.nsteps,1);
+-
+-md.cluster=none;
+-md=solve(md,BalancethicknessSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'BalancethicknessThickeningRate' 'Thickness'};
+-field_tolerances={1e-12,1e-12,1e-12,1e-12,1e-12,1e-12};
+-field_values={...
+-	(md.results.BalancethicknessSolution.Gradient1),...
+-	md.results.BalancethicknessSolution.J,...
+-	(md.results.BalancethicknessSolution.BalancethicknessThickeningRate),...
+-	(md.results.BalancethicknessSolution.Thickness)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test461.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test461.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test461.m	(revision 12027)
+@@ -1,24 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,3,2);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md.timestepping.time_step=0;
+-md.thermal.isenthalpy=1;
+-md.initialization.waterfraction=zeros(md.mesh.numberofvertices,1);
+-md=solve(md,SteadystateSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure','Temperature','Water fraction','Enthalpy'};
+-field_tolerances={1e-10,1e-10,1e-09,1e-10,1e-13,1e-10,1e-10,1e-10};
+-field_values={...
+-	(md.results.SteadystateSolution.Vx),...
+-	(md.results.SteadystateSolution.Vy),...
+-	(md.results.SteadystateSolution.Vz),...
+-	(md.results.SteadystateSolution.Vel),...
+-	(md.results.SteadystateSolution.Pressure),...
+-	(md.results.SteadystateSolution.Temperature),...
+-	(md.results.SteadystateSolution.Waterfraction),...
+-	(md.results.SteadystateSolution.Enthalpy),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test525.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test525.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test525.m	(revision 12027)
+@@ -1,39 +0,0 @@
+-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);
+-md=setflowequation(md,'macayeal','all');
+-
+-%control parameters
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'FrictionCoefficient'};
+-md.inversion.min_parameters=1*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=200*ones(md.mesh.numberofvertices,1);
+-md.inversion.nsteps=2;
+-md.inversion.cost_functions=[103*ones(md.inversion.nsteps,1)  501*ones(md.inversion.nsteps,1)];
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,2); md.inversion.cost_functions_coefficients(:,2)=2*10^-7;
+-md.inversion.gradient_scaling=3*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=2*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.99*ones(md.inversion.nsteps,1);
+-md.inversion.vx_obs=md.initialization.vx; md.inversion.vy_obs=md.initialization.vy;
+-md.timestepping.time_step=0;
+-
+-md.thermal.penalty_lock=5;
+-md.cluster=none;
+-md=solve(md,SteadystateSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'FrictionCoefficient' 'Pressure' 'Vel' 'Vx' 'Vy' 'Vz' 'Temperature' 'BasalforcingsMeltingRate'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.SteadystateSolution.Gradient1),...
+-	md.results.SteadystateSolution.J,...
+-	(md.results.SteadystateSolution.FrictionCoefficient),...
+-	(md.results.SteadystateSolution.Pressure),...
+-	(md.results.SteadystateSolution.Vel),...
+-	(md.results.SteadystateSolution.Vx),...
+-	(md.results.SteadystateSolution.Vy),...
+-	(md.results.SteadystateSolution.Vz),...
+-	(md.results.SteadystateSolution.Temperature),...
+-	(md.results.SteadystateSolution.BasalforcingsMeltingRate)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test265.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test265.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test265.m	(revision 12027)
+@@ -1,62 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md.thermal.spctemperature=[md.thermal.spctemperature, md.thermal.spctemperature+5; 1 2];
+-md.timestepping.time_step=0.5;
+-md.timestepping.final_time=2;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2', ...
+-					   'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3',...
+-					   'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','Temperature4','BasalforcingsMeltingRate4'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09, ...
+-						1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09, ...
+-						1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09, ...
+-						1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-06};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(4).Vx),...
+-	(md.results.TransientSolution(4).Vy),...
+-	(md.results.TransientSolution(4).Vz),...
+-	(md.results.TransientSolution(4).Vel),...
+-	(md.results.TransientSolution(4).Pressure),...
+-	(md.results.TransientSolution(4).Bed),...
+-	(md.results.TransientSolution(4).Surface),...
+-	(md.results.TransientSolution(4).Thickness),...
+-	(md.results.TransientSolution(4).Temperature),...
+-	(md.results.TransientSolution(4).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test427.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test427.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test427.m	(revision 12027)
+@@ -1,71 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md.materials.rho_ice=10^7; %involved in the mass flux, make it easy
+-md.geometry.thickness(:)=1; %make it easy
+-
+-%constrain all velocities to 1 m/yr, in the y-direction
+-md.diagnostic.spcvx(:)=0;
+-md.diagnostic.spcvy(:)=1;
+-md.diagnostic.spcvz(:)=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.drag_coefficient=normal_uncertain('scaled_FrictionCoefficient',1,0.01);
+-
+-%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.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]);
+-md.qmu.responses.MassFlux7=response_function('indexed_MassFlux_7',[],[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','../Exp/Square.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='diagnostic';
+-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
+-
+-%solve
+-md=solve(md,DiagnosticSolutionEnum,'overwrite','y');
+-md=tres(md,'dakota');
+-
+-%Fields and tolerances to track changes
+-
+-%ok, mass flux of 3 profiles should be -3 Gt/yr -3 Gt/yr and the sum, which is -6 Gt/yr
+-%we recover those mass fluxes through the mean of the response.
+-%also, we recover the max velo, which should be 1m/yr. 
+-%we put all that data in the importancefactors, which we will use to test for success.
+-%also, check that the stddev are 0.
+-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-clean/trunk-jpl/test/NightlyRun/test329.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test329.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test329.m	(revision 12027)
+@@ -1,47 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,5,1.2);
+-md=setflowequation(md,'hutter','all');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2', ...
+-					   'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+-						1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+-						1e-10,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test411.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test411.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test411.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,4,1);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md.timestepping.time_step=0;
+-md=solve(md,ThermalSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Temperature','BasalforcingsMeltingRate'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.ThermalSolution.Temperature),...
+-	(md.results.ThermalSolution.BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test313.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test313.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test313.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test215.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test215.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test215.m	(revision 12027)
+@@ -1,33 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test117.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test117.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test117.m	(revision 12027)
+@@ -1,19 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md.transient.isdiagnostic=0;
+-md.transient.isprognostic=0;
+-md.transient.isthermal=1;
+-md.transient.isgroundingline=0;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Temperature','BasalforcingsMeltingRate'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test453.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test453.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test453.m	(revision 12027)
+@@ -1,41 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md.initialization.vx(:)=0;
+-md.initialization.vy(:)=0;
+-md.initialization.vel(:)=0;
+-md.geometry.bed=-700-abs(md.mesh.y-500000)/1000;
+-md.geometry.bathymetry=-700-abs(md.mesh.y-500000)/1000;
+-md.geometry.thickness(:)=1300;
+-md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-
+-md.surfaceforcings.mass_balance(:)=-150;
+-md.transient.isdiagnostic=0;
+-md.transient.isgroundingline=1;
+-md.groundingline.migration='SoftMigration';
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Bed1','Surface1','Thickness1','Floatingice1',...
+-	'Bed2','Surface2','Thickness2','Floatingice2',...
+-	'Bed3','Surface3','Thickness3','Floatingice3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,...
+-	1e-13,1e-13,1e-13,1e-13,...
+-	1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).MaskElementonfloatingice),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).MaskElementonfloatingice),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).MaskElementonfloatingice),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test615.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test615.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test615.m	(revision 12027)
+@@ -1,13 +0,0 @@
+-md=triangle(model,'../Exp/79North.exp',10000);
+-md=setmask(md,'../Exp/79NorthShelf.exp','');
+-md=parameterize(md,'../Par/79North.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,BalancethicknessSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.BalancethicknessSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test517.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test517.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test517.m	(revision 12027)
+@@ -1,22 +0,0 @@
+-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);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md.timestepping.time_step=0;
+-md=solve(md,SteadystateSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure','Temperature','BasalforcingsMeltingRate'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13
+-};
+-field_values={...
+-	(md.results.SteadystateSolution.Vx),...
+-	(md.results.SteadystateSolution.Vy),...
+-	(md.results.SteadystateSolution.Vz),...
+-	(md.results.SteadystateSolution.Vel),...
+-	(md.results.SteadystateSolution.Pressure),...
+-	(md.results.SteadystateSolution.Temperature),...
+-	(md.results.SteadystateSolution.BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test419.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test419.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test419.m	(revision 12027)
+@@ -1,22 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,3,2);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md.timestepping.time_step=0;
+-md=solve(md,SteadystateSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure','Temperature','BasalforcingsMeltingRate'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13
+-};
+-field_values={...
+-	(md.results.SteadystateSolution.Vx),...
+-	(md.results.SteadystateSolution.Vy),...
+-	(md.results.SteadystateSolution.Vz),...
+-	(md.results.SteadystateSolution.Vel),...
+-	(md.results.SteadystateSolution.Pressure),...
+-	(md.results.SteadystateSolution.Temperature),...
+-	(md.results.SteadystateSolution.BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test257.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test257.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test257.m	(revision 12027)
+@@ -1,64 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-
+-md.timestepping.time_step=1;
+-md.settings.output_frequency=1;
+-md.timestepping.final_time=4;
+-
+-%Set up transient
+-smb = ones(md.mesh.numberofvertices,1)*3.6;
+-smb=[ smb smb*2 ];
+-
+-md.surfaceforcings.mass_balance= smb;
+-md.surfaceforcings.mass_balance(end+1,:)=[1.5 3];
+-md.transient.isthermal=0;
+-
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SurfaceforcingsMassBalance1', ...
+-	'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SurfaceforcingsMassBalance2', ...
+-	'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SurfaceforcingsMassBalance3', ...
+-	'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SurfaceforcingsMassBalance4'};
+-field_tolerances={1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
+-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
+-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
+-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10};
+-
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).SurfaceforcingsMassBalance),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).SurfaceforcingsMassBalance),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).SurfaceforcingsMassBalance),...
+-	(md.results.TransientSolution(4).Vx),...
+-	(md.results.TransientSolution(4).Vy),...
+-	(md.results.TransientSolution(4).Vel),...
+-	(md.results.TransientSolution(4).Pressure),...
+-	(md.results.TransientSolution(4).Bed),...
+-	(md.results.TransientSolution(4).Surface),...
+-	(md.results.TransientSolution(4).Thickness),...
+-	(md.results.TransientSolution(4).SurfaceforcingsMassBalance),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test501.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test501.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test501.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-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');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test403.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test403.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test403.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,4,1);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test241.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test241.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test241.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',120000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,2,1);
+-md.diagnostic.viscosity_overshoot=0.0;
+-md=setflowequation(md,'stokes','../Exp/SquareHalfRight.exp','fill','macayeal');
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test305.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test305.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test305.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-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');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test143.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test143.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test143.m	(revision 12027)
+@@ -1,53 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'pattyn','all');
+-md.initialization.waterfraction=zeros(md.mesh.numberofvertices,1);
+-md.thermal.isenthalpy=1;
+-md.thermal.stabilization=2;
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','Enthalpy1','Waterfraction1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','Enthalpy2','Waterfraction2', ...
+-					   'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','Enthalpy3','Waterfraction3'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
+-						1e-09,1e-09,1e-10,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
+-						1e-09,5e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).Enthalpy),...
+-	(md.results.TransientSolution(1).Waterfraction),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).Enthalpy),...
+-	(md.results.TransientSolution(2).Waterfraction),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).Enthalpy),...
+-	(md.results.TransientSolution(3).Waterfraction),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test207.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test207.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test207.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,2);
+-md.cluster=none;
+-md=setflowequation(md,'stokes','all');
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-08,1e-08,1e-08,1e-08,1e-08};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test109.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test109.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test109.m	(revision 12027)
+@@ -1,13 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,PrognosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.PrognosticSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test445.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test445.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test445.m	(revision 12027)
+@@ -1,37 +0,0 @@
+-radius=1e6;
+-shelfextent=2e5;
+-
+-md=roundmesh(model,radius,200000);
+-%fix center node to 0,0
+-rad=sqrt(md.mesh.x.^2+md.mesh.y.^2);
+-pos=find(rad==min(rad));
+-md.mesh.x(pos)=0; md.mesh.y(pos)=0; %the closest node to the center is changed to be exactly at the center
+-xelem=md.mesh.x(md.mesh.elements)*[1;1;1]/3;
+-yelem=md.mesh.y(md.mesh.elements)*[1;1;1]/3;
+-rad=sqrt(xelem.^2+yelem.^2);
+-flags=zeros(md.mesh.numberofelements,1);
+-pos=find(rad>=(radius-shelfextent));
+-flags(pos)=1;
+-md=setmask(md,flags,''); 
+-md=parameterize(md,'../Par/RoundSheetShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-
+-md.transient.isthermal=0;
+-md.transient.isprognostic=0;
+-md.transient.isdiagnostic=0;
+-md.transient.isgroundingline=1;
+-
+-%test different grounding line dynamics
+-md.groundingline.migration='AgressiveMigration';
+-md=solve(md,TransientSolutionEnum);
+-element_on_iceshelf_agressive=(md.results.TransientSolution.MaskElementonfloatingice);
+-
+-md.groundingline.migration='SoftMigration';
+-md=solve(md,TransientSolutionEnum);
+-element_on_iceshelf_soft=(md.results.TransientSolution.MaskElementonfloatingice);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'ElementOnIceShelfAgressive','ElementOnIceShelfSoft'};
+-field_tolerances={1e-13,1e-13};
+-field_values={element_on_iceshelf_agressive,element_on_iceshelf_soft};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test607.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test607.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test607.m	(revision 12027)
+@@ -1,14 +0,0 @@
+-md=triangle(model,'../Exp/79North.exp',10000);
+-md=setmask(md,'../Exp/79NorthShelf.exp','');
+-md=parameterize(md,'../Par/79North.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,SurfaceSlopeSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'SurfaceSlopeX','SurfaceSlopeY'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.SurfaceSlopeSolution.SurfaceSlopeX),...
+-	(md.results.SurfaceSlopeSolution.SurfaceSlopeY),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test347.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test347.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test347.m	(revision 12027)
+@@ -1,49 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,4,1.2);
+-md=setflowequation(md,'hutter','all');
+-md.cluster=none;
+-md.timestepping.time_adapt=1;
+-md.timestepping.final_time=500;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2'};
+-					   %'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+-						1e-12,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+-						1e-12,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-%	(md.results.TransientSolution(3).Vx),...
+-%	(md.results.TransientSolution(3).Vy),...
+-%	(md.results.TransientSolution(3).Vz),...
+-%	(md.results.TransientSolution(3).Vel),...
+-%	(md.results.TransientSolution(3).Pressure),...
+-%	(md.results.TransientSolution(3).Bed),...
+-%	(md.results.TransientSolution(3).Surface),...
+-%	(md.results.TransientSolution(3).Thickness),...
+-%	(md.results.TransientSolution(3).Temperature),...
+-%	(md.results.TransientSolution(3).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test509.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test509.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test509.m	(revision 12027)
+@@ -1,34 +0,0 @@
+-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);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2'};
+-field_tolerances={1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12,1e-12};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test249.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test249.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test249.m	(revision 12027)
+@@ -1,47 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'pattyn','all');
+-md.geometry.bed=md.geometry.bed+50; md.geometry.surface=md.geometry.surface+50;
+-md.cluster=none;
+-md.prognostic.hydrostatic_adjustment='Incremental';
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2', ...
+-					   'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-06};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test331.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test331.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test331.m	(revision 12027)
+@@ -1,33 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test233.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test233.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test233.m	(revision 12027)
+@@ -1,69 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-
+-%redo the parameter file for this special shelf. 
+-%constant thickness, constrained (vy=0) flow into an icefront, 
+-%from 0 m/yr at the grounding line.
+-
+-%tighten
+-md.diagnostic.restol=10^-4;
+-
+-%needed later
+-ymin=min(md.mesh.y);
+-ymax=max(md.mesh.y);
+-xmin=min(md.mesh.x);
+-xmax=max(md.mesh.x);
+-
+-di=md.materials.rho_ice/md.materials.rho_water;
+-
+-h=1000;
+-md.geometry.thickness=h*ones(md.mesh.numberofvertices,1);
+-md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+-md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+-
+-%Initial velocity and pressure
+-md.initialization.vx=zeros(md.mesh.numberofvertices,1);
+-md.initialization.vy=zeros(md.mesh.numberofvertices,1);
+-md.initialization.vz=zeros(md.mesh.numberofvertices,1);
+-md.initialization.pressure=zeros(md.mesh.numberofvertices,1);
+-
+-%Materials
+-md.initialization.temperature=(273-20)*ones(md.mesh.numberofvertices,1);
+-md.materials.rheology_B=paterson(md.initialization.temperature);
+-md.materials.rheology_n=3*ones(md.mesh.numberofelements,1);
+-
+-%Boundary conditions:
+-md.diagnostic.spcvx=NaN*ones(md.mesh.numberofvertices,1);
+-md.diagnostic.spcvy=NaN*ones(md.mesh.numberofvertices,1);
+-md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1);
+-
+-%constrain flanks to 0 normal velocity
+-pos=find(md.mesh.x==xmin | md.mesh.x==xmax);
+-md.diagnostic.spcvx(pos)=0;
+-md.diagnostic.spcvz(pos)=NaN;
+-
+-%constrain grounding line to 0 velocity
+-pos=find(md.mesh.y==ymin);
+-md.diagnostic.spcvx(pos)=0;
+-md.diagnostic.spcvy(pos)=0;
+-
+-%icefront
+-nodeonicefront=zeros(md.mesh.numberofvertices,1);
+-pos=find(md.mesh.y==ymax); nodeonicefront(pos)=1;
+-pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2))); diagnostic.icefront=md.mesh.segments(pos,:);
+-diagnostic.icefront=[diagnostic.icefront 1*md.mask.elementonfloatingice(diagnostic.icefront(:,end))];
+-md.diagnostic.icefront=diagnostic.icefront;
+-
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%create analytical solution: strain rate is constant = ((rho_ice*g*h)/4B)^3 (Paterson, 4th Edition, page 292.
+-%ey_c=(md.materials.rho_ice*md.constants.g*(1-di)*md.geometry.thickness./(4*md.materials.rheology_B)).^3;
+-%vy_c=ey_c.*md.mesh.y*md.constants.yts;
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vy'};
+-field_tolerances={1e-13};
+-field_values={(md.results.DiagnosticSolution.Vy)};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test135.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test135.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test135.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=meshconvert(md);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md.balancethickness.stabilization=3;
+-md.initialization.vy=md.initialization.vy+400;
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,BalancethicknessSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.BalancethicknessSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test437.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test437.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test437.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,5,1);
+-md=setflowequation(md,'macayeal','../Exp/SquareHalfRight.exp','fill','pattyn','coupling','tiling');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test339.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test339.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test339.m	(revision 12027)
+@@ -1,34 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-
+-%control parameters
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'FrictionCoefficient'};
+-md.inversion.min_parameters=1*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=200*ones(md.mesh.numberofvertices,1);
+-md.inversion.nsteps=2;
+-md.inversion.cost_functions=[103*ones(md.inversion.nsteps,1)  501*ones(md.inversion.nsteps,1)];
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,2); md.inversion.cost_functions_coefficients(:,2)=2*10^-7;
+-md.inversion.gradient_scaling=3*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=2*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.3*ones(md.inversion.nsteps,1);
+-md.inversion.vx_obs=md.initialization.vx; md.inversion.vy_obs=md.initialization.vy;
+-
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'FrictionCoefficient' 'Pressure' 'Vel' 'Vx' 'Vy'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Gradient1),...
+-	md.results.DiagnosticSolution.J,...
+-	(md.results.DiagnosticSolution.FrictionCoefficient),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test421.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test421.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test421.m	(revision 12027)
+@@ -1,21 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,3,2);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md.timestepping.time_step=0;
+-md=solve(md,SteadystateSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure','Temperature','BasalforcingsMeltingRate'};
+-field_tolerances={1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-06};
+-field_values={...
+-	(md.results.SteadystateSolution.Vx),...
+-	(md.results.SteadystateSolution.Vy),...
+-	(md.results.SteadystateSolution.Vz),...
+-	(md.results.SteadystateSolution.Vel),...
+-	(md.results.SteadystateSolution.Pressure),...
+-	(md.results.SteadystateSolution.Temperature),...
+-	(md.results.SteadystateSolution.BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test323.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test323.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test323.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.timestepping.time_step=0;
+-md.cluster=none;
+-md=solve(md,ThermalSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Temperature','BasalforcingsMeltingRate'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.ThermalSolution.Temperature),...
+-	(md.results.ThermalSolution.BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test225.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test225.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test225.m	(revision 12027)
+@@ -1,34 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-
+-%control parameters
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'MaterialsRheologyBbar'};
+-md.inversion.min_parameters=10^6*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=2*10^9*ones(md.mesh.numberofvertices,1);
+-md.inversion.nsteps=2;
+-md.inversion.cost_functions=101*ones(md.inversion.nsteps,1);
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,1);
+-md.inversion.gradient_scaling=10^7*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=2*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.3*ones(md.inversion.nsteps,1);
+-md.inversion.vx_obs=md.initialization.vx; md.inversion.vy_obs=md.initialization.vy;
+-
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'MaterialsRheologyBbar' 'Pressure' 'Vel' 'Vx' 'Vy'};
+-field_tolerances={1e-12,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Gradient1),...
+-	md.results.DiagnosticSolution.J,...
+-	(md.results.DiagnosticSolution.MaterialsRheologyB),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test127.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test127.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test127.m	(revision 12027)
+@@ -1,14 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,BedSlopeSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'BedSlopeX','BedSlopeY'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.BedSlopeSolution.BedSlopeX),...
+-	(md.results.BedSlopeSolution.BedSlopeY),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test625.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test625.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test625.m	(revision 12027)
+@@ -1,40 +0,0 @@
+-md=triangle(model,'../Exp/79North.exp',10000);
+-md=meshconvert(md);
+-md=setmask(md,'../Exp/79NorthShelf.exp','');
+-md=parameterize(md,'../Par/79North.par');
+-md=setflowequation(md,'macayeal','all');
+-
+-%Ice sheet only
+-md=modelextract(md,md.mask.elementongroundedice);
+-pos=find(md.mesh.vertexonboundary);
+-md.balancethickness.spcthickness(pos)=md.geometry.thickness(pos);
+-
+-%control parameters
+-md.inversion.thickness_obs=md.geometry.thickness;
+-md.inversion.iscontrol=1;
+-md.inversion.thickness_obs=md.geometry.thickness;
+-md.inversion.nsteps=2;
+-md.inversion.control_parameters={'Vx' 'Vy'};
+-md.balancethickness.stabilization=1;
+-md.inversion.gradient_scaling=[10/md.constants.yts*ones(md.inversion.nsteps,1) 10/md.constants.yts*ones(md.inversion.nsteps,1)];
+-md.inversion.min_parameters=[-2000*ones(md.mesh.numberofvertices,1) -2000*ones(md.mesh.numberofvertices,1)];
+-md.inversion.max_parameters=[+2000*ones(md.mesh.numberofvertices,1) +2000*ones(md.mesh.numberofvertices,1)];
+-md.inversion.cost_functions=201*ones(md.inversion.nsteps,1);
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,1);
+-md.inversion.maxiter_per_step=4*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.99*ones(md.inversion.nsteps,1);
+-
+-md.cluster=none;
+-md=solve(md,BalancethicknessSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient1' 'Gradient2' 'Misfits' 'Vx' 'Vy' 'Thickness'};
+-field_tolerances={1e-12,1e-12,1e-12,1e-12,1e-12,1e-12};
+-field_values={...
+-	(md.results.BalancethicknessSolution.Gradient1),...
+-	(md.results.BalancethicknessSolution.Gradient2),...
+-	md.results.BalancethicknessSolution.J,...
+-	(md.results.BalancethicknessSolution.Vx),...
+-	(md.results.BalancethicknessSolution.Vy),...
+-	(md.results.BalancethicknessSolution.Thickness)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test463.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test463.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test463.m	(revision 12027)
+@@ -1,24 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,3,2);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md.timestepping.time_step=0;
+-md.thermal.isenthalpy=1;
+-md.initialization.waterfraction=zeros(md.mesh.numberofvertices,1);
+-md=solve(md,SteadystateSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure','Temperature','Water fraction','Enthalpy'};
+-field_tolerances={1e-09,1e-10,1e-09,1e-10,1e-13,1e-10,1e-10,1e-10};
+-field_values={...
+-	(md.results.SteadystateSolution.Vx),...
+-	(md.results.SteadystateSolution.Vy),...
+-	(md.results.SteadystateSolution.Vz),...
+-	(md.results.SteadystateSolution.Vel),...
+-	(md.results.SteadystateSolution.Pressure),...
+-	(md.results.SteadystateSolution.Temperature),...
+-	(md.results.SteadystateSolution.Waterfraction),...
+-	(md.results.SteadystateSolution.Enthalpy),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test527.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test527.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test527.m	(revision 12027)
+@@ -1,56 +0,0 @@
+-%Simple mesh 1
+-hVertices=10000*ones(27,1);
+-hVertices(1:5)=1000;
+-md=bamg(model,'domain','../Exp/Pig.exp','hmax',20000,'hVertices',hVertices,'gradation',3,'geometricalmetric',1);
+-x1=md.mesh.x;
+-y1=md.mesh.y;
+-
+-%Simple mesh 2
+-md=bamg(model,'domain','../Exp/Pig.exp','hmax',10000);
+-md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+-md=parameterize(md,'../Par/Pig.par');
+-x2=md.mesh.x;
+-y2=md.mesh.y;
+-
+-%refine existing mesh 1
+-hessian=ComputeHessian(md.mesh.elements,md.mesh.x,md.mesh.y,md.inversion.vy_obs,'node');
+-metric=ComputeMetric(hessian,2/9,1,1000,25*10^3,[]);
+-md.miscellaneous.dummy=metric;
+-md2=bamg(md,'metric',md.miscellaneous.dummy,'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1);
+-x3=md2.mesh.x;
+-y3=md2.mesh.y;
+-
+-%refine existing mesh 2
+-md2=bamg(md,'metric',md.miscellaneous.dummy,'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1,'anisomax',1);
+-x4=md2.mesh.x;
+-y4=md2.mesh.y;
+-
+-%refine existing mesh 3
+-hVertices=NaN*ones(md.mesh.numberofvertices,1);
+-hVertices(find(md.mesh.vertexonboundary))=500;
+-md2=bamg(md,'metric',md.miscellaneous.dummy,'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1,'anisomax',1,'hVertices',hVertices);
+-x5=md2.mesh.x;
+-y5=md2.mesh.y;
+-
+-%refine existing mesh 4
+-md2=bamg(md,'field',md.inversion.vy_obs,'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1,'Hessiantype',0,'err',1);
+-x6=md2.mesh.x;
+-y6=md2.mesh.y;
+-
+-%refine existing mesh 5
+-md2=bamg(md,'field',[md.inversion.vy_obs md.geometry.thickness],'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1,'Hessiantype',1,'err',[10 100]); 
+-x7=md2.mesh.x;
+-y7=md2.mesh.y;
+-
+-%Fields and tolerances to track changes
+-field_names     ={'x1' 'y1' 'x2' 'y2' 'x3' 'y3' 'x4' 'y4' 'x5' 'y5' 'x6' 'y6'  'x7' 'y7' };
+-field_tolerances={1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13};
+-field_values={...
+-	x1, y1,...
+-	y2, y2,...
+-	y3, y3,...
+-	y4, y4,...
+-	y5, y5,...
+-	y6, y6,...
+-	y7, y7,...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test267.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test267.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test267.m	(revision 12027)
+@@ -1,72 +0,0 @@
+-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-clean/trunk-jpl/test/NightlyRun/test429.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test429.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test429.m	(revision 12027)
+@@ -1,38 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',170000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-
+-%control parameters
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'FrictionCoefficient'};
+-md.inversion.min_parameters=1*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=200*ones(md.mesh.numberofvertices,1);
+-md.inversion.nsteps=2;
+-md.inversion.cost_functions=[103*ones(md.inversion.nsteps,1)  501*ones(md.inversion.nsteps,1)];
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,2); md.inversion.cost_functions_coefficients(:,2)=2*10^-7;
+-md.inversion.gradient_scaling=3*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=2*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.3*ones(md.inversion.nsteps,1);
+-md.timestepping.time_step=0;
+-md.inversion.vx_obs=md.initialization.vx; md.inversion.vy_obs=md.initialization.vy;
+-
+-md.cluster=none;
+-md=solve(md,SteadystateSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'FrictionCoefficient' 'Pressure' 'Vel' 'Vx' 'Vy' 'Vz' 'Temperature' 'BasalforcingsMeltingRate'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.SteadystateSolution.Gradient1),...
+-	md.results.SteadystateSolution.J,...
+-	(md.results.SteadystateSolution.FrictionCoefficient),...
+-	(md.results.SteadystateSolution.Pressure),...
+-	(md.results.SteadystateSolution.Vel),...
+-	(md.results.SteadystateSolution.Vx),...
+-	(md.results.SteadystateSolution.Vy),...
+-	(md.results.SteadystateSolution.Vz),...
+-	(md.results.SteadystateSolution.Temperature),...
+-	(md.results.SteadystateSolution.BasalforcingsMeltingRate)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test111.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test111.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test111.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=meshconvert(md);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md.prognostic.stabilization=3;
+-md.prognostic.spcthickness=md.geometry.thickness;
+-md=solve(md,PrognosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.PrognosticSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test511.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test511.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test511.m	(revision 12027)
+@@ -1,35 +0,0 @@
+-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);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+-						1e-12,1e-12,1e-12,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test251.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test251.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test251.m	(revision 12027)
+@@ -1,35 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md.timestepping.time_adapt=1;
+-md.timestepping.final_time=10;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test413.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test413.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test413.m	(revision 12027)
+@@ -1,19 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,4,1);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md.transient.isdiagnostic=0;
+-md.transient.isprognostic=0;
+-md.transient.isthermal=1;
+-md.transient.isgroundingline=0;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Temperature','BasalforcingsMeltingRate'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test315.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test315.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test315.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,3,1);
+-md.cluster=none;
+-md=setflowequation(md,'stokes','all');
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test217.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test217.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test217.m	(revision 12027)
+@@ -1,45 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2', ...
+-					   'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test119.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test119.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test119.m	(revision 12027)
+@@ -1,39 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-
+-
+-
+-
+-
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test617.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test617.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test617.m	(revision 12027)
+@@ -1,15 +0,0 @@
+-md=triangle(model,'../Exp/79North.exp',10000);
+-md=meshconvert(md);
+-md=setmask(md,'../Exp/79NorthShelf.exp','');
+-md=parameterize(md,'../Par/79North.par');
+-md=setflowequation(md,'macayeal','all');
+-md.balancethickness.stabilization=3;
+-md.cluster=none;
+-md=solve(md,BalancethicknessSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.BalancethicknessSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test455.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test455.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test455.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.diagnostic.isnewton=1;
+-md.diagnostic.restol=0.0001;
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test519.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test519.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test519.m	(revision 12027)
+@@ -1,22 +0,0 @@
+-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);
+-md=setflowequation(md,'stokes','all');
+-md.cluster=none;
+-md.timestepping.time_step=0;
+-md=solve(md,SteadystateSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure','Temperature','BasalforcingsMeltingRate'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-06
+-};
+-field_values={...
+-	(md.results.SteadystateSolution.Vx),...
+-	(md.results.SteadystateSolution.Vy),...
+-	(md.results.SteadystateSolution.Vz),...
+-	(md.results.SteadystateSolution.Vel),...
+-	(md.results.SteadystateSolution.Pressure),...
+-	(md.results.SteadystateSolution.Temperature),...
+-	(md.results.SteadystateSolution.BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test259.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test259.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test259.m	(revision 12027)
+@@ -1,69 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',350000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-
+-md.timestepping.time_step=1;
+-md.settings.output_frequency=1;
+-md.timestepping.final_time=4;
+-
+-%Set up transient
+-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;
+-
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SurfaceforcingsMassBalance1', ...
+-	'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SurfaceforcingsMassBalance2', ...
+-	'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SurfaceforcingsMassBalance3',...
+-	'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SurfaceMassbalance4'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+-	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+-	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+-	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).SurfaceforcingsMassBalance),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).SurfaceforcingsMassBalance),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).SurfaceforcingsMassBalance),...
+-	(md.results.TransientSolution(4).Vx),...
+-	(md.results.TransientSolution(4).Vy),...
+-	(md.results.TransientSolution(4).Vz),...
+-	(md.results.TransientSolution(4).Vel),...
+-	(md.results.TransientSolution(4).Pressure),...
+-	(md.results.TransientSolution(4).Bed),...
+-	(md.results.TransientSolution(4).Surface),...
+-	(md.results.TransientSolution(4).Thickness),...
+-	(md.results.TransientSolution(4).SurfaceforcingsMassBalance),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test201.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test201.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test201.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test103.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test103.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test103.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=extrude(md,3,2);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test601.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test601.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test601.m	(revision 12027)
+@@ -1,13 +0,0 @@
+-md=triangle(model,'../Exp/79North.exp',10000);
+-md=setmask(md,'../Exp/79NorthShelf.exp','');
+-md=parameterize(md,'../Par/79North.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,PrognosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.PrognosticSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test503.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test503.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test503.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-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);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test341.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test341.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test341.m	(revision 12027)
+@@ -1,34 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'pattyn','all');
+-
+-%control parameters
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'FrictionCoefficient'};
+-md.inversion.min_parameters=1*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=200*ones(md.mesh.numberofvertices,1);
+-md.inversion.nsteps=2;
+-md.inversion.cost_functions=[102*ones(md.inversion.nsteps,1)  501*ones(md.inversion.nsteps,1)];
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,2); md.inversion.cost_functions_coefficients(:,2)=2*10^-7;
+-md.inversion.gradient_scaling=3*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=2*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.3*ones(md.inversion.nsteps,1);
+-md.inversion.vx_obs=md.initialization.vx; md.inversion.vy_obs=md.initialization.vy;
+-
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'FrictionCoefficient' 'Pressure' 'Vel' 'Vx' 'Vy'};
+-field_tolerances={1e-09,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09};
+-field_values={...
+-	(md.results.DiagnosticSolution.Gradient1),...
+-	md.results.DiagnosticSolution.J,...
+-	(md.results.DiagnosticSolution.FrictionCoefficient),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test243.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test243.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test243.m	(revision 12027)
+@@ -1,34 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md.prognostic.hydrostatic_adjustment='Incremental';
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test405.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test405.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test405.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,5,1);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test307.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test307.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test307.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,3,2);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test209.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test209.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test209.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,2);
+-md=setflowequation(md,'pattyn','../Exp/SquareHalfRight.exp','fill','macayeal','coupling','penalties');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-05,1e-05,1e-05,1e-05,1e-05};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test609.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test609.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test609.m	(revision 12027)
+@@ -1,15 +0,0 @@
+-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);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md=solve(md,SurfaceSlopeSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'SurfaceSlopeX','SurfaceSlopeY'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.SurfaceSlopeSolution.SurfaceSlopeX),...
+-	(md.results.SurfaceSlopeSolution.SurfaceSlopeY),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test447.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test447.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test447.m	(revision 12027)
+@@ -1,39 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md.initialization.vx(:)=0;
+-md.initialization.vy(:)=0;
+-md.initialization.vel(:)=0;
+-md.geometry.bed=-700-abs(md.mesh.y-500000)/1000;
+-md.geometry.bathymetry=-700-abs(md.mesh.y-500000)/1000;
+-md.geometry.thickness(:)=1000;
+-md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+-md.surfaceforcings.mass_balance(:)=100;
+-md.transient.isdiagnostic=0;
+-md.transient.isgroundingline=1;
+-md.groundingline.migration='AgressiveMigration';
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Bed1','Surface1','Thickness1','Floatingice1',...
+-	'Bed2','Surface2','Thickness2','Floatingice2',...
+-	'Bed3','Surface3','Thickness3','Floatingice3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,...
+-	1e-13,1e-13,1e-13,1e-13,...
+-	1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).MaskElementonfloatingice),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).MaskElementonfloatingice),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).MaskElementonfloatingice),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test349.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test349.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test349.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.initialization.waterfraction=zeros(md.mesh.numberofvertices,1);
+-md.timestepping.time_step=0;
+-md.cluster=none;
+-md=solve(md,EnthalpySolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Enthalpy','Waterfraction','Temperature'};
+-field_tolerances={1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.EnthalpySolution.Enthalpy),...
+-	(md.results.EnthalpySolution.Waterfraction),...
+-	(md.results.EnthalpySolution.Temperature),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test431.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test431.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test431.m	(revision 12027)
+@@ -1,38 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',170000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'pattyn','all');
+-
+-%control parameters
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'FrictionCoefficient'};
+-md.inversion.min_parameters=1*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=200*ones(md.mesh.numberofvertices,1);
+-md.inversion.nsteps=2;
+-md.inversion.cost_functions=[102*ones(md.inversion.nsteps,1)  501*ones(md.inversion.nsteps,1)];
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,2); md.inversion.cost_functions_coefficients(:,2)=2*10^-7;
+-md.inversion.gradient_scaling=3*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=2*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.3*ones(md.inversion.nsteps,1);
+-md.timestepping.time_step=0;
+-md.inversion.vx_obs=md.initialization.vx; md.inversion.vy_obs=md.initialization.vy;
+-
+-md.cluster=none;
+-md=solve(md,SteadystateSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'FrictionCoefficient' 'Pressure' 'Vel' 'Vx' 'Vy' 'Vz' 'Temperature' 'BasalforcingsMeltingRate'};
+-field_tolerances={1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-06};
+-field_values={...
+-	(md.results.SteadystateSolution.Gradient1),...
+-	md.results.SteadystateSolution.J,...
+-	(md.results.SteadystateSolution.FrictionCoefficient),...
+-	(md.results.SteadystateSolution.Pressure),...
+-	(md.results.SteadystateSolution.Vel),...
+-	(md.results.SteadystateSolution.Vx),...
+-	(md.results.SteadystateSolution.Vy),...
+-	(md.results.SteadystateSolution.Vz),...
+-	(md.results.SteadystateSolution.Temperature),...
+-	(md.results.SteadystateSolution.BasalforcingsMeltingRate)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test333.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test333.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test333.m	(revision 12027)
+@@ -1,47 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2', ...
+-					   'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3'};
+-field_tolerances={1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
+-						1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
+-						1e-9,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test235.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test235.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test235.m	(revision 12027)
+@@ -1,92 +0,0 @@
+-md=squaremesh(model,1000000,1000000,5,5);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-
+-%redo the parameter file for this special shelf. 
+-%constant thickness, constrained (vy=0) flow into an icefront, 
+-%from 0 m/yr at the grounding line.
+-
+-%needed later
+-ymin=min(md.mesh.y);
+-ymax=max(md.mesh.y);
+-xmin=min(md.mesh.x);
+-xmax=max(md.mesh.x);
+-
+-di=md.materials.rho_ice/md.materials.rho_water;
+-
+-h=1000;
+-md.geometry.thickness=h*ones(md.mesh.numberofvertices,1);
+-md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+-md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+-
+-%Initial velocity and pressure
+-md.initialization.vx=zeros(md.mesh.numberofvertices,1);
+-md.initialization.vy=zeros(md.mesh.numberofvertices,1);
+-md.initialization.vz=zeros(md.mesh.numberofvertices,1);
+-md.initialization.pressure=zeros(md.mesh.numberofvertices,1);
+-
+-%Materials
+-md.initialization.temperature=(273-20)*ones(md.mesh.numberofvertices,1);
+-md.materials.rheology_B=paterson(md.initialization.temperature);
+-md.materials.rheology_n=3*ones(md.mesh.numberofelements,1);
+-
+-%Boundary conditions:
+-md.diagnostic.spcvx=NaN*ones(md.mesh.numberofvertices,1);
+-md.diagnostic.spcvy=NaN*ones(md.mesh.numberofvertices,1);
+-md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1);
+-
+-%constrain flanks to 0 normal velocity
+-pos=find(md.mesh.x==xmin | md.mesh.x==xmax);
+-md.diagnostic.spcvx(pos)=0;
+-md.diagnostic.spcvz(pos)=NaN;
+-
+-%constrain grounding line to 0 velocity
+-pos=find(md.mesh.y==ymin);
+-md.diagnostic.spcvx(pos)=0;
+-md.diagnostic.spcvy(pos)=0;
+-
+-%icefront
+-nodeonicefront=zeros(md.mesh.numberofvertices,1);
+-pos=find(md.mesh.y==ymax); nodeonicefront(pos)=1;
+-pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2))); diagnostic.icefront=md.mesh.segments(pos,:);
+-diagnostic.icefront=[diagnostic.icefront 1*md.mask.elementonfloatingice(diagnostic.icefront(:,end))];
+-md.diagnostic.icefront=diagnostic.icefront;
+-
+-%partitioning
+-md.qmu.numberofpartitions=md.mesh.numberofvertices;
+-md=partitioner(md,'package','linear','npart',md.qmu.numberofpartitions);
+-md.qmu.partition=md.qmu.partition-1;
+-
+-%Dakota options
+-%variables
+-md.qmu.variables.rheology_B=normal_uncertain('scaled_MaterialsRheologyB',1,.5);
+-
+-%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]);
+-
+-%method
+-md.qmu.method     =dakota_method('nond_l');
+-
+-%parameters
+-md.qmu.params.direct=true;
+-md.qmu.params.analysis_driver='diagnostic';
+-md.qmu.params.evaluation_concurrency=1;
+-md.qmu.params.interval_type='forward';
+-
+-%imperative! 
+-md.diagnostic.reltol=10^-10; %tighten for qmu analysese
+-md.qmu.isdakota=1;
+-
+-%solve
+-md=solve(md,DiagnosticSolutionEnum,'overwrite','y');
+-
+-%Fields and tolerances to track changes
+-md=tres(md,'dakota');
+-md.results.dakota.importancefactors=importancefactors(md,'scaled_MaterialsRheologyB','MaxVel')';
+-field_names     ={'importancefactors'};
+-field_tolerances={1e-10};
+-field_values={...
+-         md.results.dakota.importancefactors,...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test137.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test137.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test137.m	(revision 12027)
+@@ -1,25 +0,0 @@
+-
+-%Simple mesh
+-md=bamg(model,'domain','../Exp/Square.exp','hmax',100000);
+-x1=md.mesh.x;
+-y1=md.mesh.y;
+-
+-%hVertices
+-md=bamg(model,'domain','../Exp/Square.exp','hmax',300000,'hvertices',[10000 100000 400000 100000]');
+-x2=md.mesh.x;
+-y2=md.mesh.y;
+-
+-%big mesh
+-t0=clock;
+-md=bamg(model,'domain','../Exp/Square.exp','hmax',3000);
+-nbelements=md.mesh.numberofelements;
+-elapsedtime=etime(clock,t0);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'x1' 'y1' 'x2' 'y2' 'nbelements' 'elapsed time'};
+-field_tolerances={1e-13 1e-13 1e-13 1e-13 1e-13 0.5};
+-field_values={...
+-	x1, y1,...
+-	x2, y2,...
+-	nbelements,elapsedtime...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test439.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test439.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test439.m	(revision 12027)
+@@ -1,49 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-
+-%partitioning
+-md.qmu.numberofpartitions=10;
+-md=partitioner(md,'package','chaco','npart',md.qmu.numberofpartitions);
+-md.qmu.partition=md.qmu.partition-1;
+-md.qmu.isdakota=1;
+-
+-%Dakota options
+-%variables
+-md.qmu.variables.rho_ice=normal_uncertain('MaterialsRhoIce',md.materials.rho_ice,0.01);
+-
+-%responses
+-md.qmu.responses.MaxVel=response_function('scaled_Thickness',[],[0.0001 0.001 0.01 0.25 0.5 0.75 0.99 0.999 0.9999]);
+-
+-%method
+-md.qmu.method     =dakota_method('nond_l');
+-
+-%parameters
+-md.qmu.params.direct=true;
+-md.qmu.params.analysis_driver='diagnostic';
+-md.qmu.params.evaluation_concurrency=1;
+-md.qmu.params.interval_type='forward';
+-
+-
+-%imperative! 
+-md.diagnostic.reltol=10^-5; %tighten for qmu analysese
+-
+-%solve
+-md=solve(md,DiagnosticSolutionEnum,'overwrite','y');
+-md=tres(md,'dakota');
+-
+-%test on thickness
+-h=zeros(md.qmu.numberofpartitions,1);
+-for i=1:md.qmu.numberofpartitions,
+-	h(i)=md.qmu.results.dresp_out(i).mean;
+-end
+-
+-%project onto grid
+-thickness=h(md.qmu.partition+1);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-11};
+-field_values={thickness};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test121.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test121.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test121.m	(revision 12027)
+@@ -1,45 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2', ...
+-					   'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-05,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-05,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-05};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test521.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test521.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test521.m	(revision 12027)
+@@ -1,39 +0,0 @@
+-md=triangle(model,'../Exp/Pig.exp',10000);
+-md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
+-md=parameterize(md,'../Par/Pig.par');
+-
+-%impose hydrostatic equilibrium (required by Stokes)
+-md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+-md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+-md=extrude(md,3,1);
+-md=setflowequation(md,'stokes','all');
+-md=modelextract(md,md.mask.elementonfloatingice);
+-
+-%control parameters
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'MaterialsRheologyBbar'};
+-md.inversion.min_parameters=10^6*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=2*10^9*ones(md.mesh.numberofvertices,1);
+-md.inversion.nsteps=2;
+-md.inversion.cost_functions=101*ones(md.inversion.nsteps,1);
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,1);
+-md.inversion.gradient_scaling=10^8*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=2*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.99*ones(md.inversion.nsteps,1);
+-md.inversion.vx_obs=md.initialization.vx; md.inversion.vy_obs=md.initialization.vy;
+-
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'MaterialsRheologyB' 'Pressure' 'Vel' 'Vx' 'Vy'};
+-field_tolerances={1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10};
+-field_values={...
+-	(md.results.DiagnosticSolution.Gradient1),...
+-	md.results.DiagnosticSolution.J,...
+-	(md.results.DiagnosticSolution.MaterialsRheologyB),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test261.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test261.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test261.m	(revision 12027)
+@@ -1,69 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',350000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-
+-md.timestepping.time_step=1;
+-md.settings.output_frequency=1;
+-md.timestepping.final_time=4;
+-
+-%Set up transient
+-smb = ones(md.mesh.numberofvertices,1)*3.6;
+-smb=[ smb smb*2 ];
+-
+-md.surfaceforcings.mass_balance= smb;
+-md.surfaceforcings.mass_balance(end+1,:)=[1.5 3];
+-md.transient.isthermal=0;
+-
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SurfaceforcingsMassBalance1', ...
+-	'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SurfaceforcingsMassBalance2', ...
+-	'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SurfaceforcingsMassBalance3',...
+-	'Vx4','Vy4','Vz4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SurfaceMassbalance4'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+-	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+-	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+-	1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).SurfaceforcingsMassBalance),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).SurfaceforcingsMassBalance),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).SurfaceforcingsMassBalance),...
+-	(md.results.TransientSolution(4).Vx),...
+-	(md.results.TransientSolution(4).Vy),...
+-	(md.results.TransientSolution(4).Vz),...
+-	(md.results.TransientSolution(4).Vel),...
+-	(md.results.TransientSolution(4).Pressure),...
+-	(md.results.TransientSolution(4).Bed),...
+-	(md.results.TransientSolution(4).Surface),...
+-	(md.results.TransientSolution(4).Thickness),...
+-	(md.results.TransientSolution(4).SurfaceforcingsMassBalance),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test423.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test423.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test423.m	(revision 12027)
+@@ -1,45 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',300000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-
+-%partitioning
+-md.qmu.numberofpartitions=md.mesh.numberofvertices;
+-md=partitioner(md,'package','linear','npart',md.qmu.numberofpartitions);
+-md.qmu.partition=md.qmu.partition-1;
+-md.qmu.isdakota=1;
+-
+-%Dakota options
+-%variables
+-md.qmu.variables.rho_ice=normal_uncertain('MaterialsRhoIce',md.materials.rho_ice,0.01);
+-md.qmu.variables.drag_coefficient=normal_uncertain('scaled_FrictionCoefficient',1,.01);
+-%md.qmu.variables.drag_coefficient=normal_uncertain('scaled_FrictionCoefficient',1,.01*ones(md.qmu.numberofpartitions,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]);
+-
+-%method
+-md.qmu.method     =dakota_method('nond_l');
+-
+-%parameters
+-md.qmu.params.direct=true;
+-md.qmu.params.analysis_driver='diagnostic';
+-md.qmu.params.evaluation_concurrency=1;
+-md.qmu.params.interval_type='forward';
+-
+-
+-%imperative! 
+-md.diagnostic.reltol=10^-5; %tighten for qmu analysese
+-
+-%solve
+-md=solve(md,DiagnosticSolutionEnum,'overwrite','y');
+-
+-%Fields and tolerances to track changes
+-md=tres(md,'dakota');
+-md.results.dakota.importancefactors=importancefactors(md,'scaled_FrictionCoefficient','MaxVel')';
+-field_names     ={'importancefactors'};
+-field_tolerances={1e-10};
+-field_values={...
+-         md.results.dakota.importancefactors,...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test325.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test325.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test325.m	(revision 12027)
+@@ -1,19 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md.transient.isdiagnostic=0;
+-md.transient.isprognostic=0;
+-md.transient.isthermal=1;
+-md.transient.isgroundingline=0;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Temperature','BasalforcingsMeltingRate'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test227.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test227.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test227.m	(revision 12027)
+@@ -1,34 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'pattyn','all');
+-
+-%control parameters
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'MaterialsRheologyBbar'};
+-md.inversion.min_parameters=10^6*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=2*10^9*ones(md.mesh.numberofvertices,1);
+-md.inversion.nsteps=2;
+-md.inversion.cost_functions=101*ones(md.inversion.nsteps,1);
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,1);
+-md.inversion.gradient_scaling=10^7*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=2*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.3*ones(md.inversion.nsteps,1);
+-md.inversion.vx_obs=md.initialization.vx; md.inversion.vy_obs=md.initialization.vy;
+-
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'MaterialsRheologyBbar' 'Pressure' 'Vel' 'Vx' 'Vy'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09};
+-field_values={...
+-	(md.results.DiagnosticSolution.Gradient1),...
+-	md.results.DiagnosticSolution.J,...
+-	(md.results.DiagnosticSolution.MaterialsRheologyB),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test129.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test129.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test129.m	(revision 12027)
+@@ -1,15 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=extrude(md,5,1);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,BedSlopeSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'BedSlopeX','BedSlopeY'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.BedSlopeSolution.BedSlopeX),...
+-	(md.results.BedSlopeSolution.BedSlopeY),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test529.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test529.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test529.m	(revision 12027)
+@@ -1,22 +0,0 @@
+-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);
+-md=setflowequation(md,'pattyn','all');
+-md.thermal.stabilization=2;
+-md.transient.isdiagnostic=0;
+-md.transient.isprognostic=0;
+-md.transient.isthermal=1;
+-md.transient.isgroundingline=0;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Temperature2','BasalforcingsMeltingRate2'};
+-field_tolerances={1e-13,1e-9,1e-13,1e-9};
+-field_values={...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test211.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test211.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test211.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.timestepping.time_step=0;
+-md.cluster=none;
+-md=solve(md,ThermalSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Temperature','BasalforcingsMeltingRate'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.ThermalSolution.Temperature),...
+-	(md.results.ThermalSolution.BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test113.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test113.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test113.m	(revision 12027)
+@@ -1,14 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=setflowequation(md,'macayeal','all');
+-md=extrude(md,5,3);
+-md.cluster=none;
+-md=solve(md,PrognosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.PrognosticSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test611.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test611.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test611.m	(revision 12027)
+@@ -1,14 +0,0 @@
+-md=triangle(model,'../Exp/79North.exp',10000);
+-md=setmask(md,'../Exp/79NorthShelf.exp','');
+-md=parameterize(md,'../Par/79North.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,BedSlopeSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'BedSlopeX','BedSlopeY'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.BedSlopeSolution.BedSlopeX),...
+-	(md.results.BedSlopeSolution.BedSlopeY),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test513.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test513.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test513.m	(revision 12027)
+@@ -1,35 +0,0 @@
+-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);
+-md=setflowequation(md,'stokes','all');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-%The thickness wants to be lower than 1 so we contrain it to 1
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2'};
+-field_tolerances={1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test351.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test351.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test351.m	(revision 12027)
+@@ -1,30 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.initialization.waterfraction=zeros(md.mesh.numberofvertices,1);
+-md.cluster=none;
+-md.transient.isdiagnostic=0;
+-md.transient.isprognostic=0;
+-md.transient.isthermal=1;
+-md.transient.isgroundingline=0;
+-md.thermal.isenthalpy=1;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Enthalpy1','Waterfraction1','Temperature1',...
+-	'Enthalpy2','Waterfraction2','Temperature2',...
+-	'Enthalpy3','Waterfraction3','Temperature3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Enthalpy),...
+-	(md.results.TransientSolution(1).Waterfraction),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(2).Enthalpy),...
+-	(md.results.TransientSolution(2).Waterfraction),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(3).Enthalpy),...
+-	(md.results.TransientSolution(3).Waterfraction),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test253.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test253.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test253.m	(revision 12027)
+@@ -1,49 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md.timestepping.time_adapt=1;
+-md.timestepping.final_time=10;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2', ...
+-					   'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,...
+-						1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,...
+-						1e-09,1e-09,1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-06};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test415.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test415.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test415.m	(revision 12027)
+@@ -1,33 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test317.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test317.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test317.m	(revision 12027)
+@@ -1,13 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,PrognosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.PrognosticSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test219.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test219.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test219.m	(revision 12027)
+@@ -1,45 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2', ...
+-					   'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-06};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test619.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test619.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test619.m	(revision 12027)
+@@ -1,14 +0,0 @@
+-md=triangle(model,'../Exp/79North.exp',10000);
+-md=setmask(md,'../Exp/79NorthShelf.exp','');
+-md=parameterize(md,'../Par/79North.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,BalancethicknessSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.BalancethicknessSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test457.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test457.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test457.m	(revision 12027)
+@@ -1,20 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,5,1);
+-md=setflowequation(md,'pattyn','all');
+-md.diagnostic.isnewton=1;
+-md.diagnostic.restol=0.0001;
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test301.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test301.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test301.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test203.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test203.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test203.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,2);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test105.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test105.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test105.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=extrude(md,3,2);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test603.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test603.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test603.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-md=triangle(model,'../Exp/79North.exp',10000);
+-md=meshconvert(md);
+-md=setmask(md,'../Exp/79NorthShelf.exp','');
+-md=parameterize(md,'../Par/79North.par');
+-md=setflowequation(md,'macayeal','all');
+-md.prognostic.stabilization=3;
+-md.prognostic.spcthickness=md.geometry.thickness;
+-md.cluster=none;
+-md=solve(md,PrognosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.PrognosticSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test441.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test441.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test441.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,5,1);
+-md=setflowequation(md,'stokes','../Exp/SquareHalfRight.exp','fill','pattyn','coupling','tiling');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test505.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test505.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test505.m	(revision 12027)
+@@ -1,17 +0,0 @@
+-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);
+-md=setflowequation(md,'stokes','all');
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test343.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test343.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test343.m	(revision 12027)
+@@ -1,34 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'stokes','all');
+-
+-%control parameters
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'FrictionCoefficient'};
+-md.inversion.min_parameters=1*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=200*ones(md.mesh.numberofvertices,1);
+-md.inversion.nsteps=2;
+-md.inversion.cost_functions=[104*ones(md.inversion.nsteps,1)  501*ones(md.inversion.nsteps,1)];
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,2); md.inversion.cost_functions_coefficients(:,2)=2*10^-7;
+-md.inversion.gradient_scaling=3*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=2*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.3*ones(md.inversion.nsteps,1);
+-md.inversion.vx_obs=md.initialization.vx; md.inversion.vy_obs=md.initialization.vy;
+-
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'FrictionCoefficient' 'Pressure' 'Vel' 'Vx' 'Vy'};
+-field_tolerances={1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09};
+-field_values={...
+-	(md.results.DiagnosticSolution.Gradient1),...
+-	md.results.DiagnosticSolution.J,...
+-	(md.results.DiagnosticSolution.FrictionCoefficient),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test407.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test407.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test407.m	(revision 12027)
+@@ -1,17 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'stokes','all');
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test245.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test245.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test245.m	(revision 12027)
+@@ -1,35 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.geometry.bed=md.geometry.bed+50; md.geometry.surface=md.geometry.surface+50;
+-md.cluster=none;
+-md.prognostic.hydrostatic_adjustment='Incremental';
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test309.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test309.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test309.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,5,2);
+-md=setflowequation(md,'hutter','all');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test449.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test449.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test449.m	(revision 12027)
+@@ -1,39 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md.initialization.vx(:)=0;
+-md.initialization.vy(:)=0;
+-md.initialization.vel(:)=0;
+-md.geometry.bed=-700-abs(md.mesh.y-500000)/1000;
+-md.geometry.bathymetry=-700-abs(md.mesh.y-500000)/1000;
+-md.geometry.thickness(:)=1300;
+-md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+-md.surfaceforcings.mass_balance(:)=-150;
+-md.transient.isdiagnostic=0;
+-md.transient.isgroundingline=1;
+-md.groundingline.migration='SoftMigration';
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Bed1','Surface1','Thickness1','Floatingice1',...
+-	'Bed2','Surface2','Thickness2','Floatingice2',...
+-	'Bed3','Surface3','Thickness3','Floatingice3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,...
+-	1e-13,1e-13,1e-13,1e-13,...
+-	1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).MaskElementonfloatingice),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).MaskElementonfloatingice),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).MaskElementonfloatingice),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test131.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test131.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test131.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-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
+-pos=find(md.mesh.vertexonboundary);
+-md.balancethickness.spcthickness(pos)=md.geometry.thickness(pos);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,BalancethicknessSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.BalancethicknessSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test531.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test531.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test531.m	(revision 12027)
+@@ -1,17 +0,0 @@
+-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);
+-md=setflowequation(md,'pattyn','all');
+-md.thermal.stabilization=2;
+-md.timestepping.time_step=0;
+-md.thermal.penalty_threshold=40;
+-md=solve(md,ThermalSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Temperature','BasalforcingsMeltingRate'};
+-field_tolerances={1e-13,1e-12};
+-field_values={...
+-	(md.results.ThermalSolution.Temperature),...
+-	(md.results.ThermalSolution.BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test335.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test335.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test335.m	(revision 12027)
+@@ -1,23 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,4,1);
+-md=setflowequation(md,'hutter','all');
+-md.cluster=none;
+-md.timestepping.time_step=0;
+-md=solve(md,SteadystateSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure','Temperature','BasalforcingsMeltingRate'};
+-
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13
+-};
+-field_values={...
+-	(md.results.SteadystateSolution.Vx),...
+-	(md.results.SteadystateSolution.Vy),...
+-	(md.results.SteadystateSolution.Vz),...
+-	(md.results.SteadystateSolution.Vel),...
+-	(md.results.SteadystateSolution.Pressure),...
+-	(md.results.SteadystateSolution.Temperature),...
+-	(md.results.SteadystateSolution.BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test237.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test237.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test237.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,2);
+-md=setflowequation(md,'pattyn','../Exp/SquareHalfRight.exp','fill','macayeal');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-09,1e-09};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test139.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test139.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test139.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.timestepping.time_step=0;
+-md.cluster=none;
+-md.initialization.waterfraction=zeros(md.mesh.numberofvertices,1);
+-md=solve(md,EnthalpySolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Enthalpy','Waterfraction','Temperature'};
+-field_tolerances={1e-13,1e-10,1e-13};
+-field_values={...
+-	(md.results.EnthalpySolution.Enthalpy),...
+-	(md.results.EnthalpySolution.Waterfraction),...
+-	(md.results.EnthalpySolution.Temperature),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test221.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test221.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test221.m	(revision 12027)
+@@ -1,48 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'stokes','all');
+-md.diagnostic.reltol=NaN;
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2', ...
+-					   'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3'};
+-field_tolerances={1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,...
+-						1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,...
+-						1e-08,1e-08,1e-07,1e-08,1e-08,1e-08,1e-08,1e-08,1e-08,1e-06};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test123.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test123.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test123.m	(revision 12027)
+@@ -1,14 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,SurfaceSlopeSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'SurfaceSlopeX','SurfaceSlopeY'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.SurfaceSlopeSolution.SurfaceSlopeX),...
+-	(md.results.SurfaceSlopeSolution.SurfaceSlopeY),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test621.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test621.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test621.m	(revision 12027)
+@@ -1,31 +0,0 @@
+-md=triangle(model,'../Exp/79North.exp',10000);
+-md=setmask(md,'../Exp/79NorthShelf.exp','');
+-md=parameterize(md,'../Par/79North.par');
+-md=setflowequation(md,'macayeal','all');
+-
+-%control parameters
+-md.inversion.nsteps=2;
+-md.prognostic.stabilization=1;
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'BalancethicknessThickeningRate'};
+-md.inversion.thickness_obs=md.geometry.thickness;
+-md.inversion.min_parameters=-50*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=50*ones(md.mesh.numberofvertices,1);
+-md.inversion.cost_functions=201*ones(md.inversion.nsteps,1);
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,1);
+-md.inversion.gradient_scaling=10/md.constants.yts*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=4*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.99*ones(md.inversion.nsteps,1);
+-
+-md.cluster=none;
+-md=solve(md,BalancethicknessSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'BalancethicknessThickeningRate' 'Thickness'};
+-field_tolerances={1e-12,1e-12,1e-12,1e-12,1e-12,1e-12};
+-field_values={...
+-	(md.results.BalancethicknessSolution.Gradient1),...
+-	md.results.BalancethicknessSolution.J,...
+-	(md.results.BalancethicknessSolution.BalancethicknessThickeningRate),...
+-	(md.results.BalancethicknessSolution.Thickness)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test523.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test523.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test523.m	(revision 12027)
+@@ -1,34 +0,0 @@
+-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);
+-md=setflowequation(md,'pattyn','all');
+-
+-%control parameters
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'FrictionCoefficient'};
+-md.inversion.min_parameters=1*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=200*ones(md.mesh.numberofvertices,1);
+-md.inversion.nsteps=2;
+-md.inversion.cost_functions=[103*ones(md.inversion.nsteps,1)  501*ones(md.inversion.nsteps,1)];
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,2); md.inversion.cost_functions_coefficients(:,2)=2*10^-7;
+-md.inversion.gradient_scaling=3*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=2*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.99*ones(md.inversion.nsteps,1);
+-md.inversion.vx_obs=md.initialization.vx; md.inversion.vy_obs=md.initialization.vy;
+-
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'FrictionCoefficient' 'Pressure' 'Vel' 'Vx' 'Vy'};
+-field_tolerances={1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11,1e-11};
+-field_values={...
+-	(md.results.DiagnosticSolution.Gradient1),...
+-	md.results.DiagnosticSolution.J,...
+-	(md.results.DiagnosticSolution.FrictionCoefficient),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test425.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test425.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test425.m	(revision 12027)
+@@ -1,45 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-
+-%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.rho_ice=normal_uncertain('MaterialsRhoIce',md.materials.rho_ice,0.01);
+-md.qmu.variables.drag_coefficient=normal_uncertain('scaled_FrictionCoefficient',1,0.01);
+-
+-%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]);
+-
+-%method
+-md.qmu.method     =dakota_method('nond_l');
+-
+-%parameters
+-md.qmu.params.direct=true;
+-md.qmu.params.analysis_driver='diagnostic';
+-md.qmu.params.evaluation_concurrency=1;
+-md.qmu.params.interval_type='forward';
+-
+-
+-%imperative!
+-md.diagnostic.reltol=10^-5; %tighten for qmu analyses
+-md.qmu.isdakota=1;
+-
+-%solve
+-md=solve(md,DiagnosticSolutionEnum,'overwrite','y');
+-
+-%Fields and tolerances to track changes
+-md=tres(md,'dakota');
+-md.results.dakota.importancefactors=importancefactors(md,'scaled_FrictionCoefficient','MaxVel')';
+-field_names     ={'importancefactors'};
+-field_tolerances={1e-10};
+-field_values={...
+-         md.results.dakota.importancefactors,...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test263.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test263.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test263.m	(revision 12027)
+@@ -1,28 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md.thermal.spctemperature=[md.thermal.spctemperature, md.thermal.spctemperature+5, md.thermal.spctemperature+10, md.thermal.spctemperature+15; 1.5 2.5 3.5 4];
+-md.timestepping.time_step=1;
+-md.timestepping.final_time=4;
+-md.transient.isdiagnostic=0;
+-md.transient.isprognostic=0;
+-md.transient.isthermal=1;
+-md.transient.isgroundingline=0;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Temperature1','BasalforcingsMeltingRate1','Temperature2','BasalforcingsMeltingRate2','Temperature3','BasalforcingsMeltingRate3','Temperature4','BasalforcingsMeltingRate4'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(4).Temperature),...
+-	(md.results.TransientSolution(4).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test327.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test327.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test327.m	(revision 12027)
+@@ -1,37 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=setflowequation(md,'hutter','all');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1',...
+-						'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2',...
+-						'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+-						1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,...
+-						1e-10,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test229.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test229.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test229.m	(revision 12027)
+@@ -1,34 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'stokes','all');
+-
+-%control parameters
+-md.inversion.iscontrol=1;
+-md.inversion.control_parameters={'MaterialsRheologyBbar'};
+-md.inversion.min_parameters=10^6*ones(md.mesh.numberofvertices,1);
+-md.inversion.max_parameters=2*10^9*ones(md.mesh.numberofvertices,1);
+-md.inversion.nsteps=2;
+-md.inversion.cost_functions=101*ones(md.inversion.nsteps,1);
+-md.inversion.cost_functions_coefficients=ones(md.mesh.numberofvertices,1);
+-md.inversion.gradient_scaling=10^7*ones(md.inversion.nsteps,1);
+-md.inversion.maxiter_per_step=2*ones(md.inversion.nsteps,1);
+-md.inversion.step_threshold=0.3*ones(md.inversion.nsteps,1);
+-md.inversion.vx_obs=md.initialization.vx; md.inversion.vy_obs=md.initialization.vy;
+-
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Gradient' 'Misfits' 'MaterialsRheologyBbar' 'Pressure' 'Vel' 'Vx' 'Vy'};
+-field_tolerances={1e-08,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09,1e-09};
+-field_values={...
+-	(md.results.DiagnosticSolution.Gradient1),...
+-	md.results.DiagnosticSolution.J,...
+-	(md.results.DiagnosticSolution.MaterialsRheologyB),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy)
+-};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test311.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test311.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test311.m	(revision 12027)
+@@ -1,18 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,4,2);
+-md=setflowequation(md,'hutter','../Exp/SquareHalfRight.exp','fill','macayeal');
+-md.cluster=none;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test213.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test213.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test213.m	(revision 12027)
+@@ -1,23 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md.transient.isdiagnostic=0;
+-md.transient.isprognostic=0;
+-md.transient.isthermal=1;
+-md.transient.isgroundingline=0;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Temperature1','MeltingRate1','Temperature2','BasalforcingsMeltingRate2','Temperature3','BasalforcingsMeltingRate3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test115.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test115.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test115.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-md.timestepping.time_step=0;
+-md.cluster=none;
+-md=solve(md,ThermalSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Temperature','BasalforcingsMeltingRate'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.ThermalSolution.Temperature),...
+-	(md.results.ThermalSolution.BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test451.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test451.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test451.m	(revision 12027)
+@@ -1,42 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',350000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md.cluster=none;
+-md.initialization.vx(:)=0;
+-md.initialization.vy(:)=0;
+-md.initialization.vel(:)=0;
+-md.geometry.bed=-700-abs(md.mesh.y-500000)/1000;
+-md.geometry.bathymetry=-700-abs(md.mesh.y-500000)/1000;
+-md.geometry.thickness(:)=1000;
+-md.geometry.surface=md.geometry.bed+md.geometry.thickness;
+-md.surfaceforcings.mass_balance(:)=100;
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','all');
+-
+-md.transient.isdiagnostic=0;
+-md.transient.isgroundingline=1;
+-md.groundingline.migration='AgressiveMigration';
+-
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Bed1','Surface1','Thickness1','Floatingice1',...
+-	'Bed2','Surface2','Thickness2','Floatingice2',...
+-	'Bed3','Surface3','Thickness3','Floatingice3'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,...
+-	1e-13,1e-13,1e-13,1e-13,...
+-	1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).MaskElementonfloatingice),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).MaskElementonfloatingice),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).MaskElementonfloatingice),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test613.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test613.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test613.m	(revision 12027)
+@@ -1,15 +0,0 @@
+-md=triangle(model,'../Exp/79North.exp',10000);
+-md=setmask(md,'../Exp/79NorthShelf.exp','');
+-md=parameterize(md,'../Par/79North.par');
+-md=extrude(md,2,1);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md=solve(md,BedSlopeSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'BedSlopeX','BedSlopeY'};
+-field_tolerances={1e-13,1e-13};
+-field_values={...
+-	(md.results.BedSlopeSolution.BedSlopeX),...
+-	(md.results.BedSlopeSolution.BedSlopeY),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test353.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test353.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test353.m	(revision 12027)
+@@ -1,55 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',200000);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'pattyn','all');
+-md.cluster=none;
+-md.initialization.waterfraction=zeros(md.mesh.numberofvertices,1);
+-md.initialization.temperature(:)=272;
+-md.thermal.spctemperature(find(md.mesh.vertexonsurface))=272;
+-md.thermal.isenthalpy=1;
+-md.basalforcings.geothermalflux(:)=5;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','Enthalpy1','Waterfraction1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','Enthalpy2','Waterfraction2', ...
+-					   'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','Enthalpy3','Waterfraction3'};
+-field_tolerances={1e-09,1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
+-						1e-09,1e-09,1e-10,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
+-						1e-09,5e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).Enthalpy),...
+-	(md.results.TransientSolution(1).Waterfraction),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).Enthalpy),...
+-	(md.results.TransientSolution(2).Waterfraction),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).Enthalpy),...
+-	(md.results.TransientSolution(3).Waterfraction),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test515.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test515.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test515.m	(revision 12027)
+@@ -1,22 +0,0 @@
+-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);
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-md.timestepping.time_step=0;
+-md=solve(md,SteadystateSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure','Temperature','BasalforcingsMeltingRate'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13
+-};
+-field_values={...
+-	(md.results.SteadystateSolution.Vx),...
+-	(md.results.SteadystateSolution.Vy),...
+-	(md.results.SteadystateSolution.Vz),...
+-	(md.results.SteadystateSolution.Vel),...
+-	(md.results.SteadystateSolution.Pressure),...
+-	(md.results.SteadystateSolution.Temperature),...
+-	(md.results.SteadystateSolution.BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test417.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test417.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test417.m	(revision 12027)
+@@ -1,45 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'macayeal','../Exp/SquareHalfRight.exp','fill','pattyn','coupling','penalties');
+-md.cluster=none;
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx1','Vy1','Vz1','Vel1','Pressure1','Bed1','Surface1','Thickness1','Temperature1','BasalforcingsMeltingRate1', ...
+-				      'Vx2','Vy2','Vz2','Vel2','Pressure2','Bed2','Surface2','Thickness2','Temperature2','BasalforcingsMeltingRate2', ...
+-					   'Vx3','Vy3','Vz3','Vel3','Pressure3','Bed3','Surface3','Thickness3','Temperature3','BasalforcingsMeltingRate3'};
+-field_tolerances={1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05,1e-05};
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vz),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).Temperature),...
+-	(md.results.TransientSolution(1).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vz),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).Temperature),...
+-	(md.results.TransientSolution(2).BasalforcingsMeltingRate),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vz),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).Temperature),...
+-	(md.results.TransientSolution(3).BasalforcingsMeltingRate),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test255.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test255.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test255.m	(revision 12027)
+@@ -1,64 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelf.par');
+-md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+-
+-md.timestepping.time_step=1;
+-md.settings.output_frequency=1;
+-md.timestepping.final_time=4;
+-
+-%Set up transient
+-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;
+-
+-md=solve(md,TransientSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names={'Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SurfaceforcingsMassBalance1', ...
+-	'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SurfaceforcingsMassBalance2', ...
+-	'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SurfaceforcingsMassBalance3', ...
+-	'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SurfaceforcingsMassBalance4'};
+-field_tolerances={1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
+-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
+-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,...
+-	1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10};
+-
+-field_values={...
+-	(md.results.TransientSolution(1).Vx),...
+-	(md.results.TransientSolution(1).Vy),...
+-	(md.results.TransientSolution(1).Vel),...
+-	(md.results.TransientSolution(1).Pressure),...
+-	(md.results.TransientSolution(1).Bed),...
+-	(md.results.TransientSolution(1).Surface),...
+-	(md.results.TransientSolution(1).Thickness),...
+-	(md.results.TransientSolution(1).SurfaceforcingsMassBalance),...
+-	(md.results.TransientSolution(2).Vx),...
+-	(md.results.TransientSolution(2).Vy),...
+-	(md.results.TransientSolution(2).Vel),...
+-	(md.results.TransientSolution(2).Pressure),...
+-	(md.results.TransientSolution(2).Bed),...
+-	(md.results.TransientSolution(2).Surface),...
+-	(md.results.TransientSolution(2).Thickness),...
+-	(md.results.TransientSolution(2).SurfaceforcingsMassBalance),...
+-	(md.results.TransientSolution(3).Vx),...
+-	(md.results.TransientSolution(3).Vy),...
+-	(md.results.TransientSolution(3).Vel),...
+-	(md.results.TransientSolution(3).Pressure),...
+-	(md.results.TransientSolution(3).Bed),...
+-	(md.results.TransientSolution(3).Surface),...
+-	(md.results.TransientSolution(3).Thickness),...
+-	(md.results.TransientSolution(3).SurfaceforcingsMassBalance),...
+-	(md.results.TransientSolution(4).Vx),...
+-	(md.results.TransientSolution(4).Vy),...
+-	(md.results.TransientSolution(4).Vel),...
+-	(md.results.TransientSolution(4).Pressure),...
+-	(md.results.TransientSolution(4).Bed),...
+-	(md.results.TransientSolution(4).Surface),...
+-	(md.results.TransientSolution(4).Thickness),...
+-	(md.results.TransientSolution(4).SurfaceforcingsMassBalance),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test319.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test319.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test319.m	(revision 12027)
+@@ -1,16 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',150000);
+-md=meshconvert(md);
+-md=setmask(md,'','');
+-md=parameterize(md,'../Par/SquareSheetConstrained.par');
+-md=setflowequation(md,'macayeal','all');
+-md.prognostic.stabilization=3;
+-md.prognostic.spcthickness=md.geometry.thickness;
+-md.cluster=none;
+-md=solve(md,PrognosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Thickness'};
+-field_tolerances={1e-13};
+-field_values={...
+-	(md.results.PrognosticSolution.Thickness),...
+-	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test459.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test459.m	(revision 12026)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test459.m	(revision 12027)
+@@ -1,19 +0,0 @@
+-md=triangle(model,'../Exp/Square.exp',180000);
+-md=setmask(md,'../Exp/SquareShelf.exp','');
+-md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md=extrude(md,3,1);
+-md=setflowequation(md,'stokes','all');
+-md.diagnostic.isnewton=1;
+-md.diagnostic.restol=0.0001;
+-md=solve(md,DiagnosticSolutionEnum);
+-
+-%Fields and tolerances to track changes
+-field_names     ={'Vx','Vy','Vz','Vel','Pressure'};
+-field_tolerances={1e-13,1e-13,1e-13,1e-13,1e-13};
+-field_values={...
+-	(md.results.DiagnosticSolution.Vx),...
+-	(md.results.DiagnosticSolution.Vy),...
+-	(md.results.DiagnosticSolution.Vz),...
+-	(md.results.DiagnosticSolution.Vel),...
+-	(md.results.DiagnosticSolution.Pressure),...
+-	};
Index: /issm/oecreview/Archive/12010-12040/ISSM-12027-12028.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12027-12028.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12027-12028.diff	(revision 12325)
@@ -0,0 +1,178 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/nodeconnectivity.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/nodeconnectivity.m	(revision 12027)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/nodeconnectivity.m	(revision 12028)
+@@ -1,58 +0,0 @@
+-%
+-%  create a node connectivity table for the elements in the model.
+-%
+-%  [nodecon]=edgeadjacency(elem,nnodes,mxepg)
+-%
+-%  where the required input is:
+-%    elem          (numeric, element connectivity array (elems x nodes))
+-%
+-%  and the required output is:
+-%    nodecon       (numeric, node connectivity array (nnodes x mxepg+1))
+-%
+-%  the optional input is:
+-%    nnodes        (numeric, number of nodes)
+-%    mxepg         (numeric, max elements per node)
+-%
+-function [nodecon]=nodeconnectivity(elem,nnodes,mxepg)
+-
+-if ~nargin
+-    help nodeconnectivity
+-    return
+-end
+-
+-if ~exist('nnodes','var') || isempty(nnodes)
+-    nnodes=max(max(elem));
+-end
+-if ~exist('mxepg','var') || isempty(mxepg)
+-    mxepg=25;
+-end
+-
+-%%  create the node connectivity array
+-
+-nodecon=zeros(nnodes,mxepg+1);
+-
+-%  loop over the elements
+-
+-for i=1:size(elem,1)
+-
+-%  loop over the nodes for each element
+-
+-    for j=1:size(elem,2)
+-        if elem(i,j)
+-            nodecon(elem(i,j),nodecon(elem(i,j),end)+1)=i;
+-            nodecon(elem(i,j),end)=nodecon(elem(i,j),end)+1;
+-        end
+-    end
+-end
+-
+-%%  sort the node connectivity array
+-
+-%  loop over the nodes
+-
+-for i=1:size(nodecon,1)
+-    if (nodecon(i,end) > 1)
+-        nodecon(i,1:nodecon(i,end))=sort(nodecon(i,1:nodecon(i,end)));
+-    end
+-end
+-
+-end
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_unsh_edges.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_unsh_edges.m	(revision 12027)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_unsh_edges.m	(revision 12028)
+@@ -73,7 +73,7 @@
+ 
+ if (~exist('prtplt','var') || strncmpi(prtplt,'on' ,2) || strncmpi(prtplt,'y',1)) && ...
+     md.qmu.numberofpartitions
+-    [edgeadj]=edgeadjacency(md.mesh.elements,md.nodeconnectivity);
++    [edgeadj]=edgeadjacency(md.mesh.elements,md.kmlnodeconnectivity);
+     [icol,irow]=find(edgeadj'==0);
+     edgeuns=zeros(length(irow),2);
+     for i=1:length(irow)
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kmlnodeconnectivity.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kmlnodeconnectivity.m	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kmlnodeconnectivity.m	(revision 12028)
+@@ -0,0 +1,58 @@
++%
++%  create a node connectivity table for the elements in the model.
++%
++%  [nodecon]=edgeadjacency(elem,nnodes,mxepg)
++%
++%  where the required input is:
++%    elem          (numeric, element connectivity array (elems x nodes))
++%
++%  and the required output is:
++%    nodecon       (numeric, node connectivity array (nnodes x mxepg+1))
++%
++%  the optional input is:
++%    nnodes        (numeric, number of nodes)
++%    mxepg         (numeric, max elements per node)
++%
++function [nodecon]=kmlnodeconnectivity(elem,nnodes,mxepg)
++
++if ~nargin
++    help kmlnodeconnectivity
++    return
++end
++
++if ~exist('nnodes','var') || isempty(nnodes)
++    nnodes=max(max(elem));
++end
++if ~exist('mxepg','var') || isempty(mxepg)
++    mxepg=25;
++end
++
++%%  create the node connectivity array
++
++nodecon=zeros(nnodes,mxepg+1);
++
++%  loop over the elements
++
++for i=1:size(elem,1)
++
++%  loop over the nodes for each element
++
++    for j=1:size(elem,2)
++        if elem(i,j)
++            nodecon(elem(i,j),nodecon(elem(i,j),end)+1)=i;
++            nodecon(elem(i,j),end)=nodecon(elem(i,j),end)+1;
++        end
++    end
++end
++
++%%  sort the node connectivity array
++
++%  loop over the nodes
++
++for i=1:size(nodecon,1)
++    if (nodecon(i,end) > 1)
++        nodecon(i,1:nodecon(i,end))=sort(nodecon(i,1:nodecon(i,end)));
++    end
++end
++
++end
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_partitions.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_partitions.m	(revision 12027)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_partitions.m	(revision 12028)
+@@ -150,7 +150,7 @@
+         irow=unique(irow);
+         elemp=md.mesh.elements(irow,:);
+         epartp=epart(irow,:);
+-        nodeconp=nodeconnectivity(elemp,md.mesh.numberofvertices);
++        nodeconp=kmlnodeconnectivity(elemp,md.mesh.numberofvertices);
+         [edgeadjp]=edgeadjacency(elemp,nodeconp);
+         [edgeper,elemper,iloop]=edgeperimeter(elemp,nodeconp,edgeadjp);
+         iloop(end+1)=size(edgeper,1)+1;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/README.txt
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/README.txt	(revision 12027)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/README.txt	(revision 12028)
+@@ -60,7 +60,7 @@
+ 
+ There are some other utilities that are used in the construction of topological tables for the kml writing.
+ 
+-nodeconnectivity.m   - create a node connectivity table (nnodes x mxepg+1)
++kmlnodeconnectivity.m   - create a node connectivity table (nnodes x mxepg+1)
+ edgeadjacency.m      - create an edge adjacency array (elems x edges)
+ edgeperimeter.m      - create an edge perimeter (edgeper x 2) and element perimeter (edgeper x 1) list
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_part_edges.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_part_edges.m	(revision 12027)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/kml/kml_part_edges.m	(revision 12028)
+@@ -149,7 +149,7 @@
+         irow=unique(irow);
+         elemp=md.mesh.elements(irow,:);
+         epartp=epart(irow,:);
+-        nodeconp=nodeconnectivity(elemp,md.mesh.numberofvertices);
++        nodeconp=kmlnodeconnectivity(elemp,md.mesh.numberofvertices);
+         [edgeadjp]=edgeadjacency(elemp,nodeconp);
+         [edgeper,elemper,iloop]=edgeperimeter(elemp,nodeconp,edgeadjp);
+         iloop(end+1)=size(edgeper,1)+1;
Index: /issm/oecreview/Archive/12010-12040/ISSM-12028-12029.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12028-12029.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12028-12029.diff	(revision 12325)
@@ -0,0 +1,159 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/NodeConnectivity/NodeConnectivity.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/NodeConnectivity/NodeConnectivity.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/NodeConnectivity/NodeConnectivity.cpp	(revision 12029)
+@@ -0,0 +1,44 @@
++/*\file NodeConnectivity.c
++ *\brief: build node connectivity from elements. 
++ */
++
++#include "./NodeConnectivity.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	/*inputs: */
++	double* elements=NULL;
++	int     nel,nods;
++
++	/*outputs: */
++	double* connectivity=NULL;
++	int     width;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&NodeConnectivityUsage);
++        
++	/*Input datasets: */
++	FetchData(&elements,&nel,NULL,ELEMENTS);
++	FetchData(&nods,NUMNODES);
++
++	/*!Generate internal degree of freedom numbers: */
++	NodeConnectivityx(&connectivity, &width,elements,nel, nods);
++
++	/*write output datasets: */
++	WriteData(CONNECTIVITY,connectivity,nods,width);
++
++	/*Free ressources: */
++	xfree((void**)&elements);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void NodeConnectivityUsage(void) {
++	_printf_(true,"\n");
++	_printf_(true,"   usage: connectivity = %s(elements, numnodes);\n",__FUNCT__);
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/NodeConnectivity/NodeConnectivity.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/NodeConnectivity/NodeConnectivity.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/NodeConnectivity/NodeConnectivity.h	(revision 12029)
+@@ -0,0 +1,33 @@
++/*
++	NodeConnectivity.h
++*/
++
++#ifndef _NODECONNECTIVITY_H
++#define _NODECONNECTIVITY_H
++
++/* local prototypes: */
++void NodeConnectivityUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "NodeConnectivity"
++
++/* serial input macros: */
++#define ELEMENTS (mxArray*)prhs[0]
++#define NUMNODES (mxArray*)prhs[1]
++
++/* serial output macros: */
++#define CONNECTIVITY (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++#undef NRHS
++#define NRHS  2
++
++#endif  /* _NODECONNECTIVITY_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/ElementConnectivity/ElementConnectivity.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/ElementConnectivity/ElementConnectivity.h	(revision 12028)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/ElementConnectivity/ElementConnectivity.h	(revision 12029)
+@@ -1,9 +1,7 @@
+-
+ /*
+ 	ElementConnectivity.h
+ */
+ 
+-
+ #ifndef _ELEMENTCONNECTIVITY_H
+ #define _ELEMENTCONNECTIVITY_H
+ 
+@@ -32,6 +30,4 @@
+ #undef NRHS
+ #define NRHS  2
+ 
+-
+ #endif  /* _ELEMENTCONNECTIVITY_H */
+-
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am	(revision 12028)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am	(revision 12029)
+@@ -12,7 +12,7 @@
+ 				ContourToNodes \
+ 				ElementConnectivity\
+ 				EnumToString\
+-				StringToEnum\
++				Exp2Kml \
+ 				HoleFiller \
+ 				InternalFront\
+ 				InterpFromGridToMesh \
+@@ -23,22 +23,23 @@
+ 				KMLFileRead \
+ 				KMLMeshWrite \
+ 				KMLOverlay \
+-				Xy2ll \
++				Kml2Exp \
+ 				Ll2xy \
+-				Exp2Kml \
+-				Kml2Exp \
++				NodeConnectivity \
+ 				MeshPartition\
+ 				MeshProfileIntersection\
+ 				PointCloudFindNeighbors\
+ 				PropagateFlagsFromConnectivity\
+ 				Scotch\
+ 				Shp2Kml\
++				StringToEnum\
+ 				TriaSearch\
+ 				TriMesh\
+ 				TriMeshRifts\
+ 				TriMeshNoDensity\
+ 				TriMeshProcessRifts\
+-				TriMeshRefine
++				TriMeshRefine\
++				Xy2ll
+ endif
+ if PYTHON
+ bin_PROGRAMS = TriMesh
+@@ -147,6 +148,9 @@
+ MeshProfileIntersection_SOURCES = MeshProfileIntersection/MeshProfileIntersection.cpp\
+ 			  MeshProfileIntersection/MeshProfileIntersection.h
+ 
++NodeConnectivity_SOURCES = NodeConnectivity/NodeConnectivity.cpp\
++										NodeConnectivity/NodeConnectivity.h
++
+ PointCloudFindNeighbors_SOURCES = PointCloudFindNeighbors/PointCloudFindNeighbors.cpp\
+ 			  PointCloudFindNeighbors/PointCloudFindNeighbors.h
+ 
Index: /issm/oecreview/Archive/12010-12040/ISSM-12029-12030.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12029-12030.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12029-12030.diff	(revision 12325)
@@ -0,0 +1,75 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/modellist.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/modellist.m	(revision 12029)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/modellist.m	(revision 12030)
+@@ -6,7 +6,7 @@
+ classdef modellist
+ 	properties (SetAccess=public) 
+ 		models  = cell(0,1);
+-		cluster = none();
++		cluster = generic();
+ 	end
+ 	methods
+ 		function obj = modellist(varargin) % {{{
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/model/model.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/model/model.m	(revision 12029)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/model/model.m	(revision 12030)
+@@ -378,7 +378,7 @@
+ 			 else
+ 				 md.solver           = addoptions(md.solver,DiagnosticVertAnalysisEnum,iluasmoptions);
+ 			 end
+-			 md.cluster          = none();
++			 md.cluster          = generic();
+ 			 md.balancethickness = balancethickness();
+ 			 md.diagnostic       = diagnostic();
+ 			 md.hydrology        = hydrology();
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/generic.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/generic.m	(revision 12029)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/generic.m	(revision 12030)
+@@ -1,7 +1,6 @@
+ %GENERIC cluster class definition
+ %
+ %   Usage:
+-%      cluster=generic('name','astrid',);
+ %      cluster=generic('name','astrid','np',3);
+ %      cluster=generic('name',oshostname(),'np',3,'login','username');
+ 
+@@ -27,8 +26,7 @@
+ 			 options=pairoptions(varargin{:});
+ 
+ 			 %get name
+-			 if ~exist(options,'name'), error('option ''name'' has not been provided'); end
+-			 cluster.name=getfieldvalue(options,'name');
++			 cluster.name=getfieldvalue(options,'name',oshostname());
+ 
+ 			 %initialize cluster using user settings if provided
+ 			 if (exist([cluster.name '_settings'])==2), eval([cluster.name '_settings']); end
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/none.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/none.m	(revision 12029)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/none.m	(revision 12030)
+@@ -11,21 +11,8 @@
+     end
+     methods
+ 		 function cluster=none(varargin) % {{{1
+-			 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster);
++			 error('Cannot assign md.cluster to ''none'': ISSM is not available in serial model anymore');
+ 		 end
+ 		 %}}}
+-		 function disp(cluster) % {{{1
+-			 %  display the object
+-			 disp(sprintf('cluster class ''%s'' object ''%s'' = ',class(cluster),inputname(1)));
+-			 disp(sprintf('    name: %s',cluster.name));
+-		 end
+-		 %}}}
+-		 function checkconsistency(cluster,md,solution,analyses) % {{{1
+-		 end
+-		 %}}}
+-		 function BuildQueueScript(cluster,md) % {{{1
+-			 error('none.BuildQueueScript error message: serial cluster cannot build queue script');
+-		 end
+-		 %}}}
+ 	end
+ end
Index: /issm/oecreview/Archive/12010-12040/ISSM-12030-12031.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12030-12031.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12030-12031.diff	(revision 12325)
@@ -0,0 +1,592 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12030)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12031)
+@@ -201,8 +201,8 @@
+ 
+ 		AC_SUBST([MATLABINCL])
+ 		AC_SUBST([MEX])
+-		WRAPPEREXT=$MEXEXT
+-		AC_SUBST([WRAPPEREXT])
++		MATLABWRAPPEREXT=$MEXEXT
++		AC_SUBST([MATLABWRAPPEREXT])
+ 		AC_SUBST([MEXLIB]) 
+ 		AC_SUBST([MEXLINK])
+ 	fi
+@@ -319,8 +319,8 @@
+ 		AC_DEFINE([_HAVE_PYTHON_],[1],[with Python in ISSM src])
+ 		AC_SUBST([PYTHONINCL])
+ 		AC_SUBST([PYTHONLIB])
+-		WRAPPEREXT=$PYTHONEXT
+-		AC_SUBST([WRAPPEREXT])
++		PYTHONWRAPPEREXT=$PYTHONEXT
++		AC_SUBST([PYTHONWRAPPEREXT])
+ 		AC_SUBST([PYTHONLINK])
+ 	else
+ 		HAVE_PYTHON=no
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12030)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12031)
+@@ -13,6 +13,7 @@
+ #endif
+ /*}}}*/
+ 
++#ifdef _HAVE_MATLAB_
+ /* MODULEBOOT/MODULEEND {{{1*/
+ 
+ /*The following macros hide the error exception handling in a matlab module. Just put 
+@@ -33,15 +34,12 @@
+ 	}
+ //}}}
+ /* WRAPPER {{{1*/
+-#ifdef _HAVE_MATLAB_
+ #define WRAPPER(modulename,...) void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) 
+-#endif
+ 
+ /*}}}*/
+ /* CHECKARGUMENTS {{{1*/
+-#ifdef _HAVE_MATLAB_
+ #define CHECKARGUMENTS(NLHS,NRHS,functionpointer) CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,functionpointer)
+-#endif
+ /*}}}*/
++#endif
+ 
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/matlab-binding.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/matlab-binding.h	(revision 12030)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/matlab-binding.h	(revision 12031)
+@@ -3,4 +3,5 @@
+ 
+ #include "./io/matlabio.h"
+ #include "./include/matlab_macros.h"
++
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/include/python_macros.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/include/python_macros.h	(revision 12030)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/include/python_macros.h	(revision 12031)
+@@ -14,6 +14,7 @@
+ #endif
+ /*}}}*/
+ 
++#ifdef _HAVE_PYTHON_
+ /* MODULEBOOT/MODULEEND {{{1*/
+ 
+ /*The following macros hide the error exception handling in a matlab module. Just put 
+@@ -55,5 +56,6 @@
+ /* CHECKARGUMENTS {{{1*/
+ #define CHECKARGUMENTS(NLHS,NRHS,functionpointer) CheckNumPythonArguments(args, NRHS,functionpointer)
+ /*}}}*/
++#endif
+ 
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/issm-binding.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/issm-binding.h	(revision 12030)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/issm-binding.h	(revision 12031)
+@@ -7,11 +7,11 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
+-#ifdef  _HAVE_MATLAB_
++#ifdef  _HAVE_MATLAB_MODULES_
+ #include "./matlab/matlab-binding.h"
+ #endif
+ 
+-#ifdef  _HAVE_PYTHON_
++#ifdef  _HAVE_PYTHON_MODULES_
+ #include "./python/python-binding.h"
+ #endif
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/python/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/python/Makefile.am	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/python/Makefile.am	(revision 12031)
+@@ -0,0 +1,27 @@
++INCLUDES = @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
++EXEEXT=$(PYTHONWRAPPEREXT)
++#Bin programs {{{1
++if MODULES
++bin_PROGRAMS = TriMesh
++endif 
++#}}}
++#Flags and libraries {{{1
++LDADD = ../../c/libISSMCore.a ../../c/libISSMModules.a $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
++
++#Triangle library
++AM_CXXFLAGS =  -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
++
++#Python part
++AM_LDFLAGS   = $(PYTHONLINK)
++AM_CXXFLAGS +=  -D_HAVE_PYTHON_MODULES_ -DNPY_NO_DEPRECATED_API 
++LDADD       += $(BOOSTLIB) $(PYTHONLIB) ../../c/libISSMPython.a
++
++LDADD       += ../../c/libISSMCore.a ../../c/libISSMModules.a 
++
++#Optimization flags:
++AM_CXXFLAGS += $(CXXOPTFLAGS) 
++#}}}
++#Bin sources {{{1
++TriMesh_SOURCES = ../TriMesh/TriMesh.cpp\
++			  ../TriMesh/TriMesh.h
++#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/matlab/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/matlab/Makefile.am	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/matlab/Makefile.am	(revision 12031)
+@@ -0,0 +1,171 @@
++INCLUDES = @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
++EXEEXT=$(MATLABWRAPPEREXT)
++#Bin programs {{{1
++if MODULES
++bin_PROGRAMS =  AverageFilter\
++				BamgMesher\
++				BamgConvertMesh\
++				BamgTriangulate\
++				Chaco\
++				ContourToMesh \
++				ContourToNodes \
++				ElementConnectivity\
++				EnumToString\
++				Exp2Kml \
++				HoleFiller \
++				InternalFront\
++				InterpFromGridToMesh \
++				InterpFromMeshToMesh2d \
++				InterpFromMeshToMesh3d \
++				InterpFromMeshToGrid \
++				InterpFromMesh2d \
++				KMLFileRead \
++				KMLMeshWrite \
++				KMLOverlay \
++				Kml2Exp \
++				Ll2xy \
++				NodeConnectivity \
++				MeshPartition\
++				MeshProfileIntersection\
++				PointCloudFindNeighbors\
++				PropagateFlagsFromConnectivity\
++				Scotch\
++				Shp2Kml\
++				StringToEnum\
++				TriaSearch\
++				TriMesh\
++				TriMeshRifts\
++				TriMeshNoDensity\
++				TriMeshProcessRifts\
++				TriMeshRefine\
++				Xy2ll
++endif 
++#}}}
++#Flags and libraries {{{1
++LDADD = ../../c/libISSMCore.a ../../c/libISSMModules.a $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
++
++#Triangle library
++AM_CXXFLAGS =  -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
++
++#Matlab part
++AM_LDFLAGS   = $(MEXLINK)
++AM_CXXFLAGS +=  -D_HAVE_MATLAB_MODULES_ -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread 
++LDADD       += $(MEXLIB) ../../c/libISSMMatlab.a 
++
++LDADD       += ../../c/libISSMCore.a ../../c/libISSMModules.a 
++
++#Optimization flags:
++AM_CXXFLAGS += $(CXXOPTFLAGS) 
++#}}}
++#Bin sources {{{1
++AverageFilter_SOURCES = ../AverageFilter/AverageFilter.cpp\
++			  ../AverageFilter/AverageFilter.h
++
++BamgMesher_SOURCES = ../BamgMesher/BamgMesher.cpp\
++					../BamgMesher/BamgMesher.h
++
++BamgConvertMesh_SOURCES = ../BamgConvertMesh/BamgConvertMesh.cpp\
++					../BamgConvertMesh/BamgConvertMesh.h
++
++BamgTriangulate_SOURCES = ../BamgTriangulate/BamgTriangulate.cpp\
++								  ../BamgTriangulate/BamgTriangulate.h
++
++Chaco_SOURCES = ../Chaco/Chaco.cpp\
++					../Chaco/Chaco.h
++
++ContourToMesh_SOURCES = ../ContourToMesh/ContourToMesh.cpp\
++			  ../ContourToMesh/ContourToMesh.h
++
++ContourToNodes_SOURCES = ../ContourToNodes/ContourToNodes.cpp\
++			  ../ContourToNodes/ContourToNodes.h
++
++ElementConnectivity_SOURCES = ../ElementConnectivity/ElementConnectivity.cpp\
++			  ../ElementConnectivity/ElementConnectivity.h
++
++EnumToString_SOURCES = ../EnumToString/EnumToString.cpp\
++			  ../EnumToString/EnumToString.h
++
++StringToEnum_SOURCES = ../StringToEnum/StringToEnum.cpp\
++			  ../StringToEnum/StringToEnum.h
++
++HoleFiller_SOURCES = ../HoleFiller/HoleFiller.cpp\
++			  ../HoleFiller/HoleFiller.h
++
++InternalFront_SOURCES = ../InternalFront/InternalFront.cpp\
++										 ../InternalFront/InternalFront.h
++
++InterpFromGridToMesh_SOURCES = ../InterpFromGridToMesh/InterpFromGridToMesh.cpp\
++			  ../InterpFromGridToMesh/InterpFromGridToMesh.h
++
++InterpFromMeshToMesh2d_SOURCES = ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp\
++							../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
++
++InterpFromMeshToMesh3d_SOURCES = ../InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp\
++									../InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h
++
++InterpFromMeshToGrid_SOURCES = ../InterpFromMeshToGrid/InterpFromMeshToGrid.cpp\
++									../InterpFromMeshToGrid/InterpFromMeshToGrid.h
++
++InterpFromMesh2d_SOURCES = ../InterpFromMesh2d/InterpFromMesh2d.cpp\
++									../InterpFromMesh2d/InterpFromMesh2d.h
++
++KMLFileRead_SOURCES = ../KMLFileRead/KMLFileRead.cpp\
++			  ../KMLFileRead/KMLFileRead.h
++
++KMLMeshWrite_SOURCES = ../KMLMeshWrite/KMLMeshWrite.cpp\
++			  ../KMLMeshWrite/KMLMeshWrite.h
++
++KMLOverlay_SOURCES = ../KMLOverlay/KMLOverlay.cpp\
++			  ../KMLOverlay/KMLOverlay.h
++
++Xy2ll_SOURCES = ../Xy2ll/Xy2ll.cpp\
++			  ../Xy2ll/Xy2ll.h
++
++Ll2xy_SOURCES = ../Ll2xy/Ll2xy.cpp\
++			  ../Ll2xy/Ll2xy.h
++
++Exp2Kml_SOURCES = ../Exp2Kml/Exp2Kml.cpp\
++			  ../Exp2Kml/Exp2Kml.h
++
++Kml2Exp_SOURCES = ../Kml2Exp/Kml2Exp.cpp\
++			  ../Kml2Exp/Kml2Exp.h
++
++MeshPartition_SOURCES = ../MeshPartition/MeshPartition.cpp\
++			  ../MeshPartition/MeshPartition.h
++
++MeshProfileIntersection_SOURCES = ../MeshProfileIntersection/MeshProfileIntersection.cpp\
++			  ../MeshProfileIntersection/MeshProfileIntersection.h
++
++NodeConnectivity_SOURCES = ../NodeConnectivity/NodeConnectivity.cpp\
++										../NodeConnectivity/NodeConnectivity.h
++
++PointCloudFindNeighbors_SOURCES = ../PointCloudFindNeighbors/PointCloudFindNeighbors.cpp\
++			  ../PointCloudFindNeighbors/PointCloudFindNeighbors.h
++
++PropagateFlagsFromConnectivity_SOURCES = ../PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp\
++			  ../PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h
++
++Scotch_SOURCES = ../Scotch/Scotch.cpp\
++			  ../Scotch/Scotch.h
++
++Shp2Kml_SOURCES = ../Shp2Kml/Shp2Kml.cpp\
++			  ../Shp2Kml/Shp2Kml.h
++
++TriaSearch_SOURCES = ../TriaSearch/TriaSearch.cpp\
++			  ../TriaSearch/TriaSearch.h
++
++TriMesh_SOURCES = ../TriMesh/TriMesh.cpp\
++			  ../TriMesh/TriMesh.h
++
++TriMeshRifts_SOURCES = ../TriMeshRifts/TriMeshRifts.cpp\
++			  ../TriMeshRifts/TriMeshRifts.h
++
++TriMeshNoDensity_SOURCES = ../TriMeshNoDensity/TriMeshNoDensity.cpp\
++			  ../TriMeshNoDensity/TriMeshNoDensity.h
++
++TriMeshProcessRifts_SOURCES = ../TriMeshProcessRifts/TriMeshProcessRifts.cpp\
++			  ../TriMeshProcessRifts/TriMeshProcessRifts.h
++
++TriMeshRefine_SOURCES = ../TriMeshRefine/TriMeshRefine.cpp\
++			  ../TriMeshRefine/TriMeshRefine.h
++#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am	(revision 12030)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/Makefile.am	(revision 12031)
+@@ -1,183 +1,8 @@
+-INCLUDES = @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
+-EXEEXT=$(WRAPPEREXT)
+-#Bin programs {{{1
+-if MODULES
++SUBDIRS = 
+ if MATLAB
+-bin_PROGRAMS =  AverageFilter\
+-				BamgMesher\
+-				BamgConvertMesh\
+-				BamgTriangulate\
+-				Chaco\
+-				ContourToMesh \
+-				ContourToNodes \
+-				ElementConnectivity\
+-				EnumToString\
+-				Exp2Kml \
+-				HoleFiller \
+-				InternalFront\
+-				InterpFromGridToMesh \
+-				InterpFromMeshToMesh2d \
+-				InterpFromMeshToMesh3d \
+-				InterpFromMeshToGrid \
+-				InterpFromMesh2d \
+-				KMLFileRead \
+-				KMLMeshWrite \
+-				KMLOverlay \
+-				Kml2Exp \
+-				Ll2xy \
+-				NodeConnectivity \
+-				MeshPartition\
+-				MeshProfileIntersection\
+-				PointCloudFindNeighbors\
+-				PropagateFlagsFromConnectivity\
+-				Scotch\
+-				Shp2Kml\
+-				StringToEnum\
+-				TriaSearch\
+-				TriMesh\
+-				TriMeshRifts\
+-				TriMeshNoDensity\
+-				TriMeshProcessRifts\
+-				TriMeshRefine\
+-				Xy2ll
++SUBDIRS += matlab
+ endif
+-if PYTHON
+-bin_PROGRAMS = TriMesh
+-endif
+-endif 
+-#}}}
+-#Flags and libraries {{{1
+-LDADD = ../c/libISSMCore.a ../c/libISSMModules.a $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
+ 
+-#Triangle library
+-AM_CXXFLAGS =  -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
+-
+-if MATLAB
+-AM_LDFLAGS   = $(MEXLINK)
+-AM_CXXFLAGS +=  -D_HAVE_MATLAB_ -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread 
+-LDADD       += $(MEXLIB) ../c/libISSMMatlab.a 
+-endif
+-
+ if PYTHON
+-AM_LDFLAGS   = $(PYTHONLINK)
+-AM_CXXFLAGS +=  -D_HAVE_PYTHON_ -DNPY_NO_DEPRECATED_API 
+-LDADD       += $(BOOSTLIB) $(PYTHONLIB) ../c/libISSMPython.a
++SUBDIRS += python
+ endif
+-
+-LDADD       += ../c/libISSMCore.a ../c/libISSMModules.a 
+-
+-#Optimization flags:
+-AM_CXXFLAGS += $(CXXOPTFLAGS) 
+-#}}}
+-#Bin sources {{{1
+-AverageFilter_SOURCES = AverageFilter/AverageFilter.cpp\
+-			  AverageFilter/AverageFilter.h
+-
+-BamgMesher_SOURCES = BamgMesher/BamgMesher.cpp\
+-					BamgMesher/BamgMesher.h
+-
+-BamgConvertMesh_SOURCES = BamgConvertMesh/BamgConvertMesh.cpp\
+-					BamgConvertMesh/BamgConvertMesh.h
+-
+-BamgTriangulate_SOURCES = BamgTriangulate/BamgTriangulate.cpp\
+-								  BamgTriangulate/BamgTriangulate.h
+-
+-Chaco_SOURCES = Chaco/Chaco.cpp\
+-					Chaco/Chaco.h
+-
+-ContourToMesh_SOURCES = ContourToMesh/ContourToMesh.cpp\
+-			  ContourToMesh/ContourToMesh.h
+-
+-ContourToNodes_SOURCES = ContourToNodes/ContourToNodes.cpp\
+-			  ContourToNodes/ContourToNodes.h
+-
+-ElementConnectivity_SOURCES = ElementConnectivity/ElementConnectivity.cpp\
+-			  ElementConnectivity/ElementConnectivity.h
+-
+-EnumToString_SOURCES = EnumToString/EnumToString.cpp\
+-			  EnumToString/EnumToString.h
+-
+-StringToEnum_SOURCES = StringToEnum/StringToEnum.cpp\
+-			  StringToEnum/StringToEnum.h
+-
+-HoleFiller_SOURCES = HoleFiller/HoleFiller.cpp\
+-			  HoleFiller/HoleFiller.h
+-
+-InternalFront_SOURCES = InternalFront/InternalFront.cpp\
+-										 InternalFront/InternalFront.h
+-
+-InterpFromGridToMesh_SOURCES = InterpFromGridToMesh/InterpFromGridToMesh.cpp\
+-			  InterpFromGridToMesh/InterpFromGridToMesh.h
+-
+-InterpFromMeshToMesh2d_SOURCES = InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp\
+-							InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
+-
+-InterpFromMeshToMesh3d_SOURCES = InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp\
+-									InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h
+-
+-InterpFromMeshToGrid_SOURCES = InterpFromMeshToGrid/InterpFromMeshToGrid.cpp\
+-									InterpFromMeshToGrid/InterpFromMeshToGrid.h
+-
+-InterpFromMesh2d_SOURCES = InterpFromMesh2d/InterpFromMesh2d.cpp\
+-									InterpFromMesh2d/InterpFromMesh2d.h
+-
+-KMLFileRead_SOURCES = KMLFileRead/KMLFileRead.cpp\
+-			  KMLFileRead/KMLFileRead.h
+-
+-KMLMeshWrite_SOURCES = KMLMeshWrite/KMLMeshWrite.cpp\
+-			  KMLMeshWrite/KMLMeshWrite.h
+-
+-KMLOverlay_SOURCES = KMLOverlay/KMLOverlay.cpp\
+-			  KMLOverlay/KMLOverlay.h
+-
+-Xy2ll_SOURCES = Xy2ll/Xy2ll.cpp\
+-			  Xy2ll/Xy2ll.h
+-
+-Ll2xy_SOURCES = Ll2xy/Ll2xy.cpp\
+-			  Ll2xy/Ll2xy.h
+-
+-Exp2Kml_SOURCES = Exp2Kml/Exp2Kml.cpp\
+-			  Exp2Kml/Exp2Kml.h
+-
+-Kml2Exp_SOURCES = Kml2Exp/Kml2Exp.cpp\
+-			  Kml2Exp/Kml2Exp.h
+-
+-MeshPartition_SOURCES = MeshPartition/MeshPartition.cpp\
+-			  MeshPartition/MeshPartition.h
+-
+-MeshProfileIntersection_SOURCES = MeshProfileIntersection/MeshProfileIntersection.cpp\
+-			  MeshProfileIntersection/MeshProfileIntersection.h
+-
+-NodeConnectivity_SOURCES = NodeConnectivity/NodeConnectivity.cpp\
+-										NodeConnectivity/NodeConnectivity.h
+-
+-PointCloudFindNeighbors_SOURCES = PointCloudFindNeighbors/PointCloudFindNeighbors.cpp\
+-			  PointCloudFindNeighbors/PointCloudFindNeighbors.h
+-
+-PropagateFlagsFromConnectivity_SOURCES = PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp\
+-			  PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h
+-
+-Scotch_SOURCES = Scotch/Scotch.cpp\
+-			  Scotch/Scotch.h
+-
+-Shp2Kml_SOURCES = Shp2Kml/Shp2Kml.cpp\
+-			  Shp2Kml/Shp2Kml.h
+-
+-TriaSearch_SOURCES = TriaSearch/TriaSearch.cpp\
+-			  TriaSearch/TriaSearch.h
+-
+-TriMesh_SOURCES = TriMesh/TriMesh.cpp\
+-			  TriMesh/TriMesh.h
+-
+-TriMeshRifts_SOURCES = TriMeshRifts/TriMeshRifts.cpp\
+-			  TriMeshRifts/TriMeshRifts.h
+-
+-TriMeshNoDensity_SOURCES = TriMeshNoDensity/TriMeshNoDensity.cpp\
+-			  TriMeshNoDensity/TriMeshNoDensity.h
+-
+-TriMeshProcessRifts_SOURCES = TriMeshProcessRifts/TriMeshProcessRifts.cpp\
+-			  TriMeshProcessRifts/TriMeshProcessRifts.h
+-
+-TriMeshRefine_SOURCES = TriMeshRefine/TriMeshRefine.cpp\
+-			  TriMeshRefine/TriMeshRefine.h
+-#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.h	(revision 12030)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/mex/TriMesh/TriMesh.h	(revision 12031)
+@@ -27,7 +27,7 @@
+ #include "../../c/io/io.h"
+ #include "../../c/EnumDefinitions/EnumDefinitions.h"
+ 
+-#ifdef _HAVE_MATLAB_
++#ifdef _HAVE_MATLAB_MODULES_
+ /* serial input macros: */
+ #define DOMAINOUTLINE  (mxArray *)prhs[0]
+ #define AREA           (mxArray *)prhs[1]
+@@ -40,7 +40,7 @@
+ #define SEGMENTMARKERLIST (mxArray**)&plhs[4]
+ #endif
+ 
+-#ifdef _HAVE_PYTHON_
++#ifdef _HAVE_PYTHON_MODULES_
+ /* serial input macros: */
+ #define DOMAINOUTLINE PyTuple_GetItem(args,0)
+ #define AREA          PyTuple_GetItem(args,1)
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-bothapis.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-bothapis.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-bothapis.sh	(revision 12031)
+@@ -0,0 +1,30 @@
++#!/bin/sh
++
++#petsc 3.2
++#mpich 1.4
++
++./configure \
++	--prefix=$ISSM_TIER \
++	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
++	--with-matlab-dir=$MATLAB_DIR \
++	--with-python-dir=$ISSM_TIER/externalpackages/python/install\
++	--with-python-numpy-dir=$ISSM_TIER/externalpackages/python/install/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy\
++	--with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
++	--with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
++	--with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \
++	--with-chaco-dir=$ISSM_TIER/externalpackages/chaco/install \
++	--with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \
++	--with-math-lib="/usr/lib/libm.dylib" \
++	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
++	--with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5  -O3 -DNDEBUG -w "\
++	--with-numthreads=8 \
++	--with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install  \
++	--with-petsc-arch=$ISSM_ARCH \
++	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
++	--with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
++	--with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/include/ " \
++	--with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++	--with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++	--with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ 
++	#--with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
++	#--with-boost-dir=$ISSM_TIER/externalpackages/boost/install/ \
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-bothapis.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac	(revision 12030)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac	(revision 12031)
+@@ -37,6 +37,8 @@
+ 			src/Makefile
+ 			src/c/Makefile
+ 			src/mex/Makefile
++			src/mex/python/Makefile
++			src/mex/matlab/Makefile
+ 			src/m/Makefile
+ 			bin/Makefile])
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh	(revision 12030)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh	(revision 12031)
+@@ -258,8 +258,8 @@
+ 
+ #PYTHON
+ export PATH="$PYTHON_DIR/bin:$PATH"
+-export PYTHONPATH="$PYTHONPATH:$ISSM_TIER/src/mex"
+-export LD_LIBRARY_PATH=$ISSM_TIER/src/mex:$LD_LIBRARY_PATH
++export PYTHONPATH="$PYTHONPATH:$ISSM_TIER/src/mex/python"
++export LD_LIBRARY_PATH=$ISSM_TIER/src/mex/python:$LD_LIBRARY_PATH
+ 
+ #MODELE
+ export PATH="$MODELE_DIR/src/exec:$PATH"
Index: /issm/oecreview/Archive/12010-12040/ISSM-12031-12032.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12031-12032.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12031-12032.diff	(revision 12325)
@@ -0,0 +1,6688 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/python/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/python/Makefile.am	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/python/Makefile.am	(revision 12032)
+@@ -0,0 +1,27 @@
++INCLUDES = @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
++EXEEXT=$(PYTHONWRAPPEREXT)
++#Bin programs {{{1
++if MODULES
++bin_PROGRAMS = TriMesh
++endif 
++#}}}
++#Flags and libraries {{{1
++LDADD = ../../c/libISSMCore.a ../../c/libISSMModules.a $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
++
++#Triangle library
++AM_CXXFLAGS =  -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
++
++#Python part
++AM_LDFLAGS   = $(PYTHONLINK)
++AM_CXXFLAGS +=  -D_HAVE_PYTHON_MODULES_ -DNPY_NO_DEPRECATED_API 
++LDADD       += $(BOOSTLIB) $(PYTHONLIB) ../../c/libISSMPython.a
++
++LDADD       += ../../c/libISSMCore.a ../../c/libISSMModules.a 
++
++#Optimization flags:
++AM_CXXFLAGS += $(CXXOPTFLAGS) 
++#}}}
++#Bin sources {{{1
++TriMesh_SOURCES = ../TriMesh/TriMesh.cpp\
++			  ../TriMesh/TriMesh.h
++#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Scotch/Scotch.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Scotch/Scotch.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Scotch/Scotch.cpp	(revision 12032)
+@@ -0,0 +1,267 @@
++/*\file Scotch.c
++ *\brief:  Scotch partitioner mex module
++ */
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++
++#include "./Scotch.h"
++
++/******************************/
++/*                            */
++/* This is the main function. */
++/*                            */
++/******************************/
++
++void mexFunction( int nlhs,
++				  mxArray *plhs[],
++				  int nrhs,
++				  const mxArray *prhs[] )
++{
++
++#ifndef _HAVE_SCOTCH_ //only works if scotch library has been compiled in.
++	_error_(" Scotch not available! Cannot carry out Scotch partitioning!");
++	#else
++
++	int     argcm;
++	char    **argvm=NULL;
++	int     nvert =0,nedge2=0,napar =0;
++	mwIndex *ir=NULL,*jc=NULL;
++	int     *adjir=NULL,*adjjc=NULL;
++	double  *vld=NULL,*vwd=NULL,*ewd=NULL,*apd=NULL;
++	int     *vli=NULL,*vwi=NULL,*ewi=NULL,*api=NULL;
++	char    *archtyp=NULL;
++	int     (*maptabi)[2]=NULL;
++	double* maptabd=NULL;
++	int     i,j,k,imi=0,imo=0,isi=0,ierr;
++
++	/* Check for proper number of arguments */
++   
++	if      (nrhs == 0 && nlhs == 0) {
++		GmapUsage();
++		return;
++	}
++	else if (nrhs <  6 || nlhs >  1) {
++		GmapUsage();
++		mexErrMsgTxt(" ");
++	}
++
++/*  load matlab argument list and convert to integer (note that converting here
++	and in the x-layer is inefficient, but it makes the x-layer more general)  */
++
++	argvm = (char **) calloc(nrhs,sizeof(char *));
++
++	if (!(mxIsNumeric(prhs[imi]) &&
++		  (mxGetM(prhs[imi]) == 1 && mxGetN(prhs[imi]) == 1))) {
++		argvm[isi] = (char *) calloc(4+1,sizeof(char));
++		strcpy(argvm[isi],"gmap");
++		mexPrintf("%s -- Using \"%s\" entry point.\n",
++				  __FUNCT__,argvm[isi]);
++		isi++;
++	}
++	else {
++		argvm[isi] = (char *) calloc(5+1,sizeof(char));
++		strcpy(argvm[isi],"gpart");
++		mexPrintf("%s -- Using \"%s\" entry point.\n",
++				  __FUNCT__,argvm[isi]);
++		isi++;
++
++		argvm[isi] = (char *) calloc(17,sizeof(char));
++		sprintf(argvm[isi],"%d",(int)mxGetScalar(prhs[imi]));
++		mexPrintf("%s -- Number of parts is %s.\n",
++				  __FUNCT__,argvm[isi]);
++		isi++;
++		imi++;
++	}
++
++	if (!mxIsNumeric(prhs[imi]) || (!mxIsEmpty(prhs[imi]) && !mxIsSparse(prhs[imi]))) {
++		mexPrintf("%s -- Adjacency matrix must be numeric and sparse.\n",__FUNCT__);
++		mexErrMsgTxt(" ");
++	}
++	else {
++		nvert =mxGetM(prhs[imi]);
++		nedge2=mxGetNzmax(prhs[imi]);
++		if (mxGetNzmax(prhs[imi])) {
++			ir    =mxGetIr(prhs[imi]);
++			adjir = (int *) malloc(mxGetNzmax(prhs[imi])*sizeof(int));
++			for (i=0; i<mxGetNzmax(prhs[imi]); i++)
++				adjir[i]=(int)ir[i];
++		}
++		if (mxGetN(prhs[imi])) {
++			jc    =mxGetJc(prhs[imi]);
++			adjjc = (int *) malloc((mxGetN(prhs[imi])+1)*sizeof(int));
++			for (i=0; i<(mxGetN(prhs[imi])+1); i++)
++				adjjc[i]=(int)jc[i];
++		}
++		mexPrintf("%s -- Adjacency matrix is of size %d by %d with %d non-zeroes.\n",
++				  __FUNCT__,mxGetM(prhs[imi]),mxGetN(prhs[imi]),mxGetNzmax(prhs[imi]));
++	}
++	imi++;
++
++	if (!mxIsNumeric(prhs[imi])) {
++		mexPrintf("%s -- Vertex label vector must be numeric.\n",__FUNCT__);
++		mexErrMsgTxt(" ");
++	}
++	else {
++		if (mxGetM(prhs[imi])*mxGetN(prhs[imi])) {
++			vld=mxGetPr(prhs[imi]);
++			vli = (int *) malloc(mxGetM(prhs[imi])*mxGetN(prhs[imi])*sizeof(int));
++			for (i=0; i<mxGetM(prhs[imi])*mxGetN(prhs[imi]); i++)
++				vli[i]=(int)vld[i];
++		}
++		mexPrintf("%s -- Vertex label vector is of size %d by %d.\n",
++				  __FUNCT__,mxGetM(prhs[imi]),mxGetN(prhs[imi]));
++	}
++	imi++;
++
++	if (!mxIsNumeric(prhs[imi])) {
++		mexPrintf("%s -- Vertex weight vector must be numeric.\n",__FUNCT__);
++		mexErrMsgTxt(" ");
++	}
++	else {
++		if (mxGetM(prhs[imi])*mxGetN(prhs[imi])) {
++			vwd=mxGetPr(prhs[imi]);
++			vwi = (int *) malloc(mxGetM(prhs[imi])*mxGetN(prhs[imi])*sizeof(int));
++			for (i=0; i<mxGetM(prhs[imi])*mxGetN(prhs[imi]); i++)
++				vwi[i]=(int)vwd[i];
++		}
++		mexPrintf("%s -- Vertex weight vector is of size %d by %d.\n",
++				  __FUNCT__,mxGetM(prhs[imi]),mxGetN(prhs[imi]));
++	}
++	imi++;
++
++	if (!mxIsNumeric(prhs[imi]) || (!mxIsEmpty(prhs[imi]) && !mxIsSparse(prhs[imi]))) {
++		mexPrintf("%s -- Edge weight matrix must be numeric and sparse.\n",__FUNCT__);
++		mexErrMsgTxt(" ");
++	}
++	else {
++		if (mxGetM(prhs[imi])) {
++			ewd=mxGetPr(prhs[imi]);
++			ewi = (int *) malloc(mxGetM(prhs[imi])*sizeof(int));
++			for (i=0; i<mxGetNzmax(prhs[imi]); i++)
++				ewi[i]=(int)ewd[i];
++		}
++		mexPrintf("%s -- Edge weight matrix is of size %d by %d with %d non-zeroes.\n",
++				  __FUNCT__,mxGetM(prhs[imi]),mxGetN(prhs[imi]),mxGetNzmax(prhs[imi]));
++	}
++	imi++;
++
++	if (!((strlen (argvm[0]) >= 5) &&
++		  (strncmp (argvm[0] + strlen (argvm[0]) - 5, "gpart", 5) == 0))) {
++		if (!mxIsChar(prhs[imi])) {
++			mexPrintf("%s -- Architecture type must be character.\n",__FUNCT__);
++			mexErrMsgTxt(" ");
++		}
++		else {
++			if (mxGetM(prhs[imi])*mxGetN(prhs[imi])) {
++				archtyp = (char *) calloc(mxGetM(prhs[imi])*mxGetN(prhs[imi])+1,sizeof(char));
++				mxGetString(prhs[imi],archtyp,mxGetM(prhs[imi])*mxGetN(prhs[imi])+1);
++			}
++			mexPrintf("%s -- Architecture type is \"%s\".\n",
++					  __FUNCT__,archtyp);
++		}
++		imi++;
++
++		if (!mxIsNumeric(prhs[imi])) {
++			mexPrintf("%s -- Architecture parameter vector must be numeric.\n",__FUNCT__);
++			mexErrMsgTxt(" ");
++		}
++		else {
++			napar =mxGetM(prhs[imi])*mxGetN(prhs[imi]);
++			if (mxGetM(prhs[imi])*mxGetN(prhs[imi])) {
++				apd=mxGetPr(prhs[imi]);
++				api = (int *) malloc(mxGetM(prhs[imi])*mxGetN(prhs[imi])*sizeof(int));
++				for (i=0; i<mxGetM(prhs[imi])*mxGetN(prhs[imi]); i++)
++					api[i]=(int)apd[i];
++			}
++			mexPrintf("%s -- Architecture parameter vector is of size %d by %d.\n",
++					  __FUNCT__,mxGetM(prhs[imi]),mxGetN(prhs[imi]));
++		}
++		imi++;
++	}
++
++	while (imi < nrhs) {
++		if (!mxIsChar(prhs[imi])) {
++			mexPrintf("%s -- prhs[%d] must be character.\n",__FUNCT__,imi);
++			mexErrMsgTxt(" ");
++		}
++		else {
++			argvm[isi] = (char *) calloc(mxGetM(prhs[imi])*mxGetN(prhs[imi])+1,sizeof(char));
++			mxGetString(prhs[imi],argvm[isi],mxGetM(prhs[imi])*mxGetN(prhs[imi])+1);
++		}
++		isi++;
++		imi++;
++	}
++	argcm=isi;
++	mexPrintf("argcm=%d\n",argcm);
++	for (i=0; i<argcm; i++)
++		mexPrintf("argvm[%d]=\"%s\"\n",i,argvm[i]);
++
++	/* Do the actual computations in a subroutine */
++
++	mexPrintf("Gmapx:\n");
++	ierr=gmapx(&maptabi,
++			   argcm,
++			   argvm,
++			   nvert,
++			   nedge2,
++			   adjir,
++			   adjjc,
++			   vli,
++			   vwi,
++			   ewi,
++			   archtyp,
++			   napar,
++			   api);
++	mexPrintf("%s -- Error %d from Gmapx.\n",__FUNCT__,ierr);
++
++/*  for (i=0; i<nvert; i++)
++		mexPrintf("maptabi[%d][0]=%d, maptabi[%d][1]=%d\n",
++			 	  i,maptabi[i][0],i,maptabi[i][1]); */
++
++	/* Create matrices for the return arguments */
++
++	if (maptabi) {
++		plhs[imo]=mxCreateDoubleMatrix(nvert, 2, mxREAL);
++		maptabd = mxGetPr(plhs[imo]);
++		k=0;
++		for (j=0; j<2; j++)
++			for (i=0; i<nvert; i++)
++				maptabd[k++]=(double)maptabi[i][j];
++		//free(maptabi);
++	}
++	else {
++		plhs[imo]=mxCreateDoubleMatrix(0, 2, mxREAL);
++	}
++	imo++;
++
++	/*if (argvm)
++		for (i=argcm-1; i>=0; i--)
++			free(argvm[i]);
++	if (api)     free(api);
++	if (archtyp) free(archtyp);
++	if (ewi)     free(ewi);
++	if (vwi)     free(vwi);
++	if (vli)     free(vli);
++	if (adjjc)   free(adjjc);
++	if (adjir)   free(adjir);*/
++
++	return;
++#endif //#ifndef _HAVE_SCOTCH_
++}
++
++void GmapUsage( void )
++{
++
++    mexPrintf("\n");
++    mexPrintf("Usage: [maptab]=Scotch(adjmat,vertlb,vertwt,edgewt,archtyp,archpar,\n");
++    mexPrintf("                         Scotch-specific parameters);\n");
++    mexPrintf("\n");
++
++    return;
++}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Scotch/Scotch.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Scotch/Scotch.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Scotch/Scotch.h	(revision 12032)
+@@ -0,0 +1,40 @@
++/*!\file:  Scotch.h
++ * \brief header file for Scotch module.
++ */ 
++
++#ifndef _SCOTCH_H
++#define _SCOTCH_H
++
++/* local prototypes: */
++void GmapUsage(void);
++
++#include <stdio.h>
++#include <string.h>    /*  strcasecmp  */
++#include <time.h>      /*  clock,time,difftime  */
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++    
++#undef __FUNCT__ 
++#define __FUNCT__  "Scotch"
++
++/*  Scotch structures and prototypes  */
++#ifdef MATLAB
++		#include "mat.h"
++		#include "mex.h"
++		#include "matrix.h"
++
++		#define printf mexPrintf
++		#define fprintf(file,...) (file == stdout || file == stderr ? mexPrintf(__VA_ARGS__) : fprintf(file,__VA_ARGS__))
++		#define malloc mxMalloc
++		#define calloc mxCalloc
++		#define realloc mxRealloc
++		#define free mxFree
++		#define exit(status) mexErrMsgTxt("exit=" #status)
++#endif
++
++
++#endif  /* _SCOTCH_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp	(revision 12032)
+@@ -0,0 +1,44 @@
++/*\file NodeConnectivity.c
++ *\brief: build node connectivity from elements. 
++ */
++
++#include "./NodeConnectivity.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	/*inputs: */
++	double* elements=NULL;
++	int     nel,nods;
++
++	/*outputs: */
++	double* connectivity=NULL;
++	int     width;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&NodeConnectivityUsage);
++        
++	/*Input datasets: */
++	FetchData(&elements,&nel,NULL,ELEMENTS);
++	FetchData(&nods,NUMNODES);
++
++	/*!Generate internal degree of freedom numbers: */
++	NodeConnectivityx(&connectivity, &width,elements,nel, nods);
++
++	/*write output datasets: */
++	WriteData(CONNECTIVITY,connectivity,nods,width);
++
++	/*Free ressources: */
++	xfree((void**)&elements);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void NodeConnectivityUsage(void) {
++	_printf_(true,"\n");
++	_printf_(true,"   usage: connectivity = %s(elements, numnodes);\n",__FUNCT__);
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.h	(revision 12032)
+@@ -0,0 +1,33 @@
++/*
++	NodeConnectivity.h
++*/
++
++#ifndef _NODECONNECTIVITY_H
++#define _NODECONNECTIVITY_H
++
++/* local prototypes: */
++void NodeConnectivityUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "NodeConnectivity"
++
++/* serial input macros: */
++#define ELEMENTS (mxArray*)prhs[0]
++#define NUMNODES (mxArray*)prhs[1]
++
++/* serial output macros: */
++#define CONNECTIVITY (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++#undef NRHS
++#define NRHS  2
++
++#endif  /* _NODECONNECTIVITY_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12032)
+@@ -0,0 +1,86 @@
++/*\file BamgConvertMesh.c
++ *\brief: bamg module.
++ */
++#include "./BamgConvertMesh.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	/*input: */
++	double* index=NULL;
++	int     index_rows;
++	double* x=NULL;
++	int     x_cols;
++	double* y=NULL;
++	int     y_rows;
++	int     y_cols;
++
++	/*Output*/
++	BamgMesh* bamgmesh=NULL;
++	BamgGeom* bamggeom=NULL;
++	mxArray* bamgmesh_mat=NULL;
++	mxArray* bamggeom_mat=NULL;
++
++	/*Intermediary*/
++	int nods;
++	int nels;
++	int verbose=0;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&BamgConvertMeshUsage);
++
++	/*Initialize Bamg outputs*/
++	bamggeom=new BamgGeom();
++	bamgmesh=new BamgMesh();
++
++	/*Input datasets: */
++	if (verbose) printf("Fetching inputs\n");
++	FetchData(&index,&nels,&index_rows,INDEXHANDLE);
++	FetchData(&x,&nods,&x_cols,XHANDLE);
++	FetchData(&y,&y_rows,&y_cols,YHANDLE);
++
++	/*Check inputs*/
++	if (nels<0){
++		_error_("Number of elements must be positive, check index number of lines");
++	}
++	if (nods<0){
++		_error_("Number of nods must be positive, check x and y sizes");
++	}
++	if (index_rows!=3){
++		_error_("index should have 3 columns");
++	}
++	if (y_rows!=nods){
++		_error_("x and y do not have the same length");
++	}
++	if (x_cols>1 || y_cols>1){
++		_error_("x and y should have only one column");
++	}
++
++	/* Run core computations: */
++	if (verbose) printf("Call core\n");
++	BamgConvertMeshx(bamgmesh,bamggeom,index,x,y,nods,nels);
++
++	/*Generate output Matlab Structures*/
++	bamggeom->SetStructureFields((void*)BAMGGEOMOUT);
++	bamgmesh->SetStructureFields((void*)BAMGMESHOUT);
++
++	/*Clean up*/
++	delete bamggeom;
++	delete bamgmesh;
++
++	/*end module: */
++	MODULEEND();
++}
++
++void BamgConvertMeshUsage(void)
++{
++	_printf_(true,"BAMGCONVERTMESH - convert [x y index] to a bamg geom and mesh geom");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"      [bamggeom bamgmesh]=BamgConvertMesh(index,x,y);\n");
++	_printf_(true,"      index: index of the mesh\n");
++	_printf_(true,"      x,y: coordinates of the nodes\n");
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.h	(revision 12032)
+@@ -0,0 +1,36 @@
++/*!\file BamgConvertMesh.h
++ * \brief: prototype for Data Interpolation mex module.
++ */
++
++#ifndef _BAMGCONVERTMESH_H
++#define _BAMGCONVERTMESH_H
++
++/* local prototypes: */
++void BamgConvertMeshUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "BamgConvertMesh"
++
++
++/* serial input macros: */
++#define INDEXHANDLE prhs[0]
++#define XHANDLE prhs[1]
++#define YHANDLE prhs[2]
++
++/* serial output macros: */
++#define BAMGMESHOUT    (mxArray**)&plhs[0]
++#define BAMGGEOMOUT    (mxArray**)&plhs[1]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  2
++#undef NRHS
++#define NRHS  3
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12032)
+@@ -0,0 +1,149 @@
++/*\file KMLOverlay.c
++ *\brief: KML file overlay mex module.
++ */
++#include "./KMLOverlay.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	int i,verbose=1;
++
++	/*input: */
++	char*   filkml=NULL;
++	char*   filkmz=NULL;
++
++	FILE*   fid=NULL;
++
++	Options* options=NULL;
++	int      nlat=0,nlong=0;
++	double*  lataxis =NULL;
++	double*  longaxis=NULL;
++	int      nimages=0;
++	char**   pimages=NULL;
++	double   dzip=0;
++	char*    czip=NULL;
++
++	/* output: */
++	int     ierror=0;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	if (nlhs > NLHS) {
++		KMLOverlayUsage();
++		_error_("KMLOverlay usage error");
++	}
++	if (nrhs < NRHS) {
++		KMLOverlayUsage();
++		_error_("KMLOverlay usage error");
++	}
++
++	/*Input datasets: */
++	if (verbose) printf("Fetching inputs:\n");
++	FetchData(&filkml,FILENAME);
++	if (verbose) printf("  filkml=\"%s\"\n",filkml);
++
++	if (verbose) printf("Parsing options:\n");
++	options=new Options(NRHS,nrhs,prhs);
++//	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
++	options->Get(&lataxis ,&nlat ,"lataxis" );
++	if (verbose && lataxis) for (i=0; i<nlat; i++) printf("  lataxis [%d]=%g\n",i,lataxis[i]);
++	options->Get(&longaxis,&nlong,"longaxis");
++	if (verbose && longaxis) for (i=0; i<nlong; i++) printf("  longaxis[%d]=%g\n",i,longaxis[i]);
++//	((Option*)options->GetOption("images"))->DeepEcho();
++	options->Get(&pimages,&nimages,"images");
++	if (verbose && pimages) for (i=0; i<nimages; i++) printf("  pimages[%d]=\"%s\"\n",i,pimages[i]);
++	options->Get(&dzip,"zip",0.);
++	if (verbose) printf("  dzip=%g\n",dzip);
++
++	/*some checks*/
++	if (verbose) printf("Checking inputs:\n");
++
++	if (nlat  != 2) _error_("Latitudinal axes \"lataxis\" require two double values, not %d.",nlat);
++	if (nlong != 2) _error_("Longitudinal axes \"longaxis\" require two double values, not %d.",nlong);
++	if (!nimages) _error_("No image files provided.");
++
++	if ((int)dzip) {
++		filkmz=filkml;
++		filkml=(char *) xmalloc(8*sizeof(char));
++		strcpy(filkml,"doc.kml");
++	}
++
++	if (!strlen(filkml))
++		strcpy(filkml,"stdout");
++
++	if (verbose) printf("Opening kml overlay file \"%s\".\n",filkml);
++	fid=fopen(filkml,"w");
++
++	/* Run core computations: */
++	if (verbose) printf("Calling core:\n");
++	KMLOverlayx(&ierror,
++				lataxis,longaxis,
++				nimages,pimages,
++				fid);
++
++	if (verbose) printf("Closing file \"%s\".\n",filkml);
++	fclose(fid);
++
++	/* Create kmz file, if specified: */
++	if ((int)dzip) {
++		czip=(char *) xmalloc((5+strlen(filkmz)+1+strlen(filkml)+1)*sizeof(char));
++		czip[0]='\0';
++		strcat(czip,"!zip ");
++		strcat(czip,filkmz);
++		strcat(czip," ");
++		strcat(czip,filkml);
++		for (i=0; i<nimages; i++)
++			if (strlen(pimages[i]) && strncmp(pimages[i],"http",4)) {
++				czip=(char *) xrealloc(czip,(strlen(czip)+1+strlen(pimages[i])+1)*sizeof(char));
++				strcat(czip," ");
++				strcat(czip,pimages[i]);
++			}
++		if (verbose) printf("Zipping file \"%s\".\n",filkmz);
++		if (verbose) printf("%s\n",czip);
++
++		if (mexEvalString(czip)) _error_("Error zipping file \"%s\".",filkmz);
++		xfree((void**)&czip);
++		xfree((void**)&filkmz);
++	}
++
++	/*Write data: */
++	WriteData(ERRORFLAG,ierror);
++
++	/*Clean-up*/
++	if (pimages) {
++		for (i=nimages; i>0; i--) xfree((void**)&(pimages[i-1]));
++		xfree((void**)&pimages);
++	}
++	xfree((void**)&longaxis);
++	xfree((void**)&lataxis);
++	delete options;
++	xfree((void**)&filkml);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void KMLOverlayUsage(void)
++{
++	_printf_(true,"KMLOverlay - KML file overlay module:\n");
++	_printf_(true,"\n");
++	_printf_(true,"   This module reads a list of image files and writes a KML or KMZ overlay file.\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"      ierror=KMLOverlay(kmlfile,'param name',param,...);\n");
++	_printf_(true,"\n");
++	_printf_(true,"      kmlfile     KML or KMZ file name (string)\n");
++	_printf_(true,"\n");
++	_printf_(true,"      lataxis     latitude axis (double vector [south north], required)\n");
++	_printf_(true,"      longaxis    longitude axis (double vector [west east], required)\n");
++	_printf_(true,"      images      relative or http image file names (string or array of strings or cell array of strings, required)\n");
++	_printf_(true,"      zip         flag to zip the doc.kml and image files into kmzfile (double, non-zero for kmz)\n");
++	_printf_(true,"\n");
++	_printf_(true,"      ierror     error flag (double, non-zero for error)\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Example:\n");
++	_printf_(true,"      KMLOverlay(kmlfile,'lataxis',[south north],'longaxis',[west east],'images',{'file1.png','http://issm/file2.png'},'zip',1);\n");
++	_printf_(true,"\n");
++}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.h	(revision 12032)
+@@ -0,0 +1,33 @@
++/*!\file KMLOverlay.h
++ * \brief: prototype for KML file overlay mex module.
++ */
++
++#ifndef _KMLOVERLAY_H
++#define _KMLOVERLAY_H
++
++/* local prototypes: */
++void KMLOverlayUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "KMLOverlay"
++
++
++/* serial input macros: */
++#define FILENAME      prhs[0]
++
++/* serial output macros: */
++#define ERRORFLAG (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NRHS
++#define NRHS  1
++#undef NLHS
++#define NLHS  1
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToNodes/.dirstamp
+===================================================================
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp	(revision 12032)
+@@ -0,0 +1,114 @@
++/*! \file  ContourtoNodes
++    \brief: takes a  contour file, and figures out which nodes  (x,y list)
++    are inside this contour. 
++
++	usage:
++	[flags]=ContourToNodes(x,y,contours,interptype,edgevalue);
++	
++	where:
++
++	input:
++
++		x,y: node cooredinates
++		
++		contours: structure holding sets of vertices making open contours. 
++		
++		interptype: string definining type of interpolation ('element', or 'node', or 'element and node');
++
++		edgevalue: integer (0, 1 or 2) defining the value associated to the nodes on the edges of the polygons
++
++	output:
++		flags: vector of flags (0 or 1), of size nods 
++*/
++	
++#include "./ContourToNodes.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
++
++	int i,j;
++
++	/* required input: */
++	double* x=NULL;
++	double* y=NULL;
++	int     edgevalue;
++	char*   interptype=NULL;
++
++	/* output: */
++	Vector*  flags=NULL;
++	int  nods;
++
++	//contours
++	mxArray*  matlabstructure=NULL;
++	int numcontours;
++	Contour** contours=NULL;
++	Contour*  contouri=NULL;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ContourToNodesUsage);
++
++	
++	/*Fetch inputs: */
++	FetchData(&x,&nods,NULL,XHANDLE);
++	FetchData(&y,NULL,NULL,YHANDLE);
++	FetchData(&edgevalue,EDGEVALUEHANDLE);
++
++	//Fetch contours
++
++	if(mxIsChar(FILENAME)){
++		/*Call expread on filename to build a contour array in the matlab workspace: */
++		mexCallMATLAB( 1, &matlabstructure, 1, (mxArray**)&FILENAME, "expread");
++	}
++	else{
++		/*FILENAME is actually a structure, coming directly from expread: */
++		matlabstructure=(mxArray*)FILENAME;
++	}
++
++	numcontours=mxGetNumberOfElements(matlabstructure);
++	contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
++	for(i=0;i<numcontours;i++){
++		//allocate
++		contouri=(Contour*)xmalloc(sizeof(Contour));
++		//retrieve dimension of this contour.
++		contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
++		//set pointers.
++		contouri->x=mxGetPr(mxGetField(matlabstructure,i,"x"));
++		contouri->y=mxGetPr(mxGetField(matlabstructure,i,"y"));
++		*(contours+i)=contouri;
++	}
++
++	/* Debugging of contours :{{{1*/
++	/*for(i=0;i<numcontours;i++){
++		printf("\nContour echo: contour number  %i / %i\n",i+1,numcontours);
++		contouri=*(contours+i);
++		printf("   Number of nodes %i\n",contouri->nods);
++		for (j=0;j<contouri->nods;j++){
++			printf("   %lf %lf\n",*(contouri->x+j),*(contouri->y+j));
++		}
++	}*/
++	/*}}}*/
++
++	/*Run interpolation routine: */
++	ContourToNodesx(&flags,x,y,nods,contours,numcontours,edgevalue);
++
++	/* output: */
++	WriteData(FLAGS,flags);
++
++	/*end module: */
++	MODULEEND();
++
++}
++
++void ContourToNodesUsage(void){
++	printf("   usage:\n");
++	printf("   [flags]=ContourToNodes(x,y,contourname,edgevalue);\n\n");
++	printf("   where:\n");
++	printf("      x,y: list of nodes.\n");
++	printf("      contourname: name of .exp file containing the contours, or resulting structure from call to expread.\n");
++	printf("      interptype: string definining type of interpolation ('element', or 'node').\n");
++	printf("      edgevalue: integer (0, 1 or 2) defining the value associated to the nodes on the edges of the polygons.\n");
++	printf("      flags: vector of flags (0 or 1), of size nods.\n");
++	printf("\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.h	(revision 12032)
+@@ -0,0 +1,44 @@
++
++/*
++	ContourToNodes.h
++*/
++
++
++#ifndef _CONTOURTONODES_H
++#define _CONTOURTONODES_H
++
++/* local prototypes: */
++void ContourToNodesUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__
++#define __FUNCT__ "ContourToNodes"
++
++
++#ifndef ALL
++#define ALL 0
++#endif
++
++/* input macros: */
++#define XHANDLE prhs[0]
++#define YHANDLE prhs[1]
++#define FILENAME prhs[2]
++#define EDGEVALUEHANDLE prhs[3]
++
++/* serial output macros: */
++#define FLAGS (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS 1
++#undef NRHS
++#define NRHS 4
++
++
++#endif  /* _CONTOURTONODES_H */
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/HoleFiller/HoleFiller.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/HoleFiller/HoleFiller.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/HoleFiller/HoleFiller.cpp	(revision 12032)
+@@ -0,0 +1,69 @@
++/*!\file:  HoleFiller.cpp
++ * \brief fill holes in matlab velocity array
++	this matlab module is an adaptation of a routine written by Robber 
++	Crippen.  The original routine was designed for the SRTM mission at JPL, 
++	and can be found in the current directory, under the name 
++	HoleFillerCrippen.  It fills void holes in an image, using an interpolation 
++	algorithm, and optionnally a smoothing algorithm. 
++	This matlab module extends the Crippen routine to be used in Matlab, 
++	using double arrays found in the workspace, and loaded directly into memory.
++*/
++
++
++#include "./HoleFiller.h"
++
++void mexFunction( int nlhs, mxArray* plhs[],
++				  int nrhs, const mxArray* prhs[])
++{
++
++	int i,j;
++
++	/* required input: */
++	double* imagein=NULL;
++	int     imagein_rows,imagein_cols;
++	int     smooth_flag;
++	int     smooth;
++
++
++	/* output: */
++	mxArray* pfield=NULL;
++	double* imageout=NULL;
++	int     imageout_rows,imageout_cols;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&HoleFillerUsage);
++
++	/*Fetch data: */
++	FetchData(&imagein,&imagein_rows,&imagein_cols,IMAGEIN);
++	FetchData(&smooth_flag,SMOOTH);
++	
++	/*Get smooth flag setup: */
++	if (smooth_flag==0)
++		smooth=1;
++	else
++		smooth=0;
++
++	/*Run core hole filler routine: */
++	HoleFillerx( &imageout,imagein,imagein_rows,imagein_cols,smooth);
++
++	/* output: */
++	WriteData(IMAGEOUT,imageout,imagein_rows,imagein_cols);
++
++	/*end module: */
++	MODULEEND();
++}
++
++
++void HoleFillerUsage(void)
++{
++	printf("   HoleFiller usage:\n");
++	printf("   [image_out]=HoleFiller(image_in,smooth);\n\n");
++	printf("   where:\n");
++	printf("      image_in in double format\n");
++	printf("      smooth: 1 to smooth with a box filer, 0 to leave data raw\n");
++	printf("      image_out in double format\n");
++	printf("\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/HoleFiller/HoleFiller.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/HoleFiller/HoleFiller.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/HoleFiller/HoleFiller.h	(revision 12032)
+@@ -0,0 +1,36 @@
++
++/*
++	HoleFiller.h
++*/
++
++
++#ifndef _HOLEFILLER_H
++#define _HOLEFILLER_H
++
++/* local prototypes: */
++void HoleFillerUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "HoleFiller"
++
++
++/* serial input macros: */
++#define IMAGEIN prhs[0]
++#define SMOOTH prhs[1]
++
++/* serial output macros: */
++#define IMAGEOUT &plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++#undef NRHS
++#define NRHS  2
++
++#endif  /* _HOLEFILLER_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 12032)
+@@ -0,0 +1,114 @@
++/*! \file  MeshProfileIntersection.cpp
++    \brief: takes a  .exp file (made of several profiles), and figures out its intersection 
++	with a mesh.
++
++	usage:
++	[segments]=MeshProfileIntersection(index,x,y,filename);
++
++	where:
++	input:
++		index,x,y is a triangulation
++		filename: name of Argus style .exp file containing the segments (can be groups of disconnected segments)
++	output:
++		segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremitis for a segment 
++		belonging to the elemnt_id element. there are as many lines in segments as there are segments intersecting the 
++		mesh.
++*/
++	
++#include "./MeshProfileIntersection.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
++
++	int i,j;
++
++	/* required input: */
++	//mesh
++	double* double_index=NULL;
++	int*    index=NULL;
++	int     nel;
++	double* x=NULL;
++	double* y=NULL;
++	int     nods;
++	int     dummy;
++	
++	//contours
++	mxArray*  matlabstructure=NULL;
++	Contour** contours=NULL;
++	int       numcontours;
++	Contour*  contouri=NULL;
++
++	/* output: */
++	double* segments=NULL;
++	int     numsegs;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&MeshProfileIntersectionUsage);
++
++	/*First, call expread on filename to build a contour array in the matlab workspace: */
++	mexCallMATLAB( 1, &matlabstructure, 1, (mxArray**)&FILENAME, "expread");
++
++	/*Fetch inputs: */
++	//index
++	FetchData(&double_index,&nel,&dummy,INDEX);
++	if(dummy!=3 && dummy!=6)_error_(" element triangulation should be of 3 or 6 column width!");
++	index=(int*)xmalloc(nel*3*sizeof(int));
++	for(i=0;i<nel;i++){
++		for(j=0;j<3;j++){
++			*(index+3*i+j)=(int)*(double_index+dummy*i+j)-1; //"C" style indexing
++		}
++	}
++	//x and y
++	FetchData(&x,&nods,X);
++	FetchData(&y,&dummy,Y);
++
++	//contours
++	numcontours=mxGetNumberOfElements(matlabstructure);
++	contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
++	for(i=0;i<numcontours;i++){
++		//allocate
++		contouri=(Contour*)xmalloc(sizeof(Contour));
++		//retrieve dimension of this contour.
++		contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
++		//set pointers.
++		contouri->x=mxGetPr(mxGetField(matlabstructure,i,"x"));
++		contouri->y=mxGetPr(mxGetField(matlabstructure,i,"y"));
++		*(contours+i)=contouri;
++	}
++
++	/* Debugging of contours :{{{1*/
++	/*for(i=0;i<numcontours;i++){
++		printf("\nContour echo: contour number  %i / %i\n",i+1,numcontours);
++		contouri=*(contours+i);
++		printf("   Number of vertices %i\n",contouri->nods);
++		for (j=0;j<contouri->nods;j++){
++			printf("   %lf %lf\n",*(contouri->x+j),*(contouri->y+j));
++		}
++	}*/
++	/*}}}*/
++
++	/*Run interpolation routine: */
++	MeshProfileIntersectionx(&segments,&numsegs,index,x,y,nel,nods,contours,numcontours);
++
++	/* output: */
++	WriteData(SEGMENTS,segments,numsegs,5);
++
++	/*end module: */
++	MODULEEND();
++
++}
++
++void MeshProfileIntersectionUsage(void){
++	printf("   usage:\n");
++	printf("   [segments]=MeshProfileIntersection(index,x,y,filename);\n");
++	printf("   where:\n");
++	printf("   input:\n");
++	printf("        index,x,y is a triangulation\n");
++	printf("        filename: name of Argus style .exp file containing the segments (can be groups of disconnected segments)\n");
++	printf("   output:\n");
++	printf("        segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremitis for a segment \n");
++	printf("        belonging to the elemnt_id element. there are as many lines in segments as there are segments intersecting the \n");
++	printf("        mesh.\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.h	(revision 12032)
+@@ -0,0 +1,38 @@
++
++/*
++	MeshProfileIntersection.h
++*/
++
++
++#ifndef _MESHPROFILEINTERSECTION_H
++#define _MESHPROFILEINTERSECTION_H
++
++/* local prototypes: */
++void MeshProfileIntersectionUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__
++#define __FUNCT__ "MeshProfileIntersection"
++
++/* input macros: */
++#define INDEX prhs[0]
++#define X prhs[1]
++#define Y prhs[2]
++#define FILENAME prhs[3]
++
++/* serial output macros: */
++#define SEGMENTS (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS 1
++#undef NRHS
++#define NRHS 4
++
++#endif  /* _MESHPROFILEINTERSECTION_H */
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.cpp	(revision 12032)
+@@ -0,0 +1,327 @@
++/*!\file:  TriMeshRefine
++ * \brief refine a mesh output by TriMesh:
++ */ 
++
++#include "./TriMeshRefine.h"
++
++
++void mexFunction(	int nlhs, mxArray* plhs[],
++					int nrhs, const mxArray* prhs[] )
++{
++
++
++	/*Matlab arrays: */
++	mxArray* pmxa_array=NULL;
++	mxArray* pmxa_array2=NULL;
++	mxArray* pmxa_array3=NULL;
++	int i,j,k,counter;
++	
++	/* returned quantities: */
++
++	double* index=NULL;
++	double* x=NULL;
++	double* y=NULL;
++	double* segments=NULL;
++	double* segmentmarkerlist=NULL;
++	
++	/* input: */
++	double* area=NULL;
++	double* tindex_in=NULL;
++	double*    index_in=NULL;
++	int     nel;
++	double* x_inm=NULL; //matlab vector
++	double* x_in=NULL; //copy of matlab vector
++	int     nods;
++	double* y_inm=NULL;//matlab vector
++	double* y_in=NULL;//copy of matlab vector
++	double* tsegments_in=NULL;
++	double* segments_in=NULL;
++	double* tsegmentmarkers_in=NULL;
++	double* segmentmarkers_in=NULL;
++
++	int     num_seg;
++	char*   order=NULL;
++
++	/* Triangle structures: */
++	struct triangulateio in,out;
++	char   options[256];
++
++	/* verify correct usage: */
++	if (nlhs==0 && nrhs==0) {
++		/* special case: */
++		TriMeshRefineUsage();
++		return;
++	}
++
++	if (!(  (nlhs==5) || (nrhs==6) || (nrhs==7)  )){
++		mexPrintf("   %s format error.\n", __FUNCT__);
++		TriMeshRefineUsage();
++		printf("   ");
++		mexErrMsgTxt(" ");
++	}
++
++	/*Fetch index_in: */
++	if(mxIsDouble(prhs[0])){
++		nel=mxGetM(prhs[0]);
++		tindex_in=mxGetPr(prhs[0]);
++		index_in=(double*)xmalloc(nel*3*sizeof(double));
++		for (i=0;i<nel;i++){
++			for (j=0;j<3;j++){
++				*(index_in+3*i+j)=*(tindex_in+nel*j+i)-1;
++			}
++		}
++	}
++	else{
++		printf("%s%s\n",__FUNCT__," error message: first argument should be the element list!");
++		mexErrMsgTxt(" ");
++	}
++
++	/*Fetch x_in: */
++	if(mxIsDouble(prhs[1])){
++		nods=mxGetM(prhs[1]);
++		x_inm=mxGetPr(prhs[1]);
++		x_in=(double*)xmalloc(nods*sizeof(double));
++		for (i=0;i<nods;i++){
++			x_in[i]=x_inm[i];
++		}
++	}
++	else{
++		printf("%s%s\n",__FUNCT__," error message: second argument should be the x corrdinate list!");
++		mexErrMsgTxt(" ");
++	}
++
++	/*Fetch y_in: */
++	if(mxIsDouble(prhs[2])){
++		y_inm=mxGetPr(prhs[2]);
++		y_in=(double*)xmalloc(nods*sizeof(double));
++		for (i=0;i<nods;i++){
++			y_in[i]=y_inm[i];
++		}
++	}
++	else{
++		printf("%s%s\n",__FUNCT__," error message: third argument should be the y corrdinate list!");
++		mexErrMsgTxt(" ");
++	}	
++
++	/*Fetch segments_in: */
++	if(mxIsDouble(prhs[3])){
++		num_seg=mxGetM(prhs[3]);
++		tsegments_in=mxGetPr(prhs[3]);
++		segments_in=(double*)xmalloc(num_seg*3*sizeof(double));
++		for (i=0;i<num_seg;i++){
++			for (j=0;j<3;j++){
++				*(segments_in+3*i+j)=*(tsegments_in+num_seg*j+i)-1;
++			}
++		}
++	}
++	else{
++		printf("%s%s\n",__FUNCT__," error message: fourth argument should be the segments list!");
++		mexErrMsgTxt(" ");
++	}
++
++	/*Fetch segment markers: */
++	if(mxIsDouble(prhs[4])){
++		tsegmentmarkers_in=mxGetPr(prhs[4]);
++		segmentmarkers_in=(double*)xmalloc(num_seg*sizeof(double));
++		for (i=0;i<num_seg;i++){
++			segmentmarkers_in[i]=tsegmentmarkers_in[i];
++		}
++	}
++	else{
++		printf("%s%s\n",__FUNCT__," error message: fourth argument should be the segmentmarkers list!");
++		mexErrMsgTxt(" ");
++	}
++	
++	/*Fetch area: */
++	if(mxIsDouble(prhs[5])){
++		if (mxGetM(prhs[5])!=nel){
++			printf("%s%s\n",__FUNCT__," error message: area vector should be of the same size as index\n");
++			mexErrMsgTxt(" ");
++		}
++		area=mxGetPr(prhs[5]);
++	}
++	else{
++		printf("%s%s\n",__FUNCT__," error message: fifth argument should be the area list!");
++		mexErrMsgTxt(" ");
++	}
++
++	/*Optionaly, recover desired order: */
++	if(nrhs==7){
++		if (!mxIsChar(prhs[6])){
++			mexPrintf("%s%s\n",__FUNCT__," error message; sixth argument should be a string ('yes' or 'no')!");
++			mexErrMsgTxt(" ");
++		}
++		order = (char *) xmalloc((mxGetN(prhs[6])+1)*sizeof(char));
++		mxGetString(prhs[6],order,mxGetN(prhs[6])+1);
++	}
++
++	/*printf("Index: \n");
++	for (i=0;i<nel;i++){
++		for(j=0;j<3;j++){
++			printf("%lf ",*(index_in+3*i+j));
++		}
++		printf("\n");
++	}*/
++	/*printf("x,y: \n");
++	for (i=0;i<nods;i++){
++		printf("%16.16lf %16.16lf\n",x_in[i],y_in[i]);
++	}*/
++	/*printf("segments:\n");
++	for (i=0;i<num_seg;i++){
++		for(j=0;j<3;j++){
++			printf("%lf ",*(segments_in+3*i+j));
++		}
++		printf("%lf ",segmentmarkers_in[i]);
++		printf("\n");
++	}*/
++	/*printf("area: \n");
++	for (i=0;i<nel;i++){
++		printf("%16.16lf \n",area[i]);
++	}*/
++	//if(nrhs==6)printf("Order: %s\n",order);
++
++	/*Create initial triangulation to call triangulate():*/
++	in.numberoftriangles=nel;
++	in.numberoftriangleattributes=1;
++	in.numberofcorners=3;
++	
++	in.trianglelist = (int *) xmalloc(3*in.numberoftriangles * sizeof(int));
++	for(i=0;i<in.numberoftriangles;i++){
++		for(j=0;j<3;j++){
++			in.trianglelist[3*i+j]=(int)index_in[3*i+j];
++		}
++	}
++	in.triangleattributelist = (REAL *) xmalloc(in.numberoftriangles * in.numberoftriangleattributes * sizeof(REAL));
++	for(i=0;i<in.numberoftriangles;i++){
++		in.triangleattributelist[i]=0.0;
++	}
++	in.trianglearealist = (REAL *) xmalloc(in.numberoftriangles * sizeof(REAL));
++	for(i=0;i<in.numberoftriangles;i++){
++		in.trianglearealist[i]=area[i];
++	}
++
++	in.numberofpoints=nods;
++	in.numberofpointattributes=1;
++	in.pointlist = (REAL *) xmalloc(in.numberofpoints * 2 * sizeof(REAL));
++	for (i=0;i<nods;i++){
++		in.pointlist[2*i+0]=x_in[i];
++		in.pointlist[2*i+1]=y_in[i];
++	}
++	in.pointattributelist = (REAL *) xmalloc(in.numberofpoints * in.numberofpointattributes * sizeof(REAL));
++	for (i=0;i<nods;i++){
++		in.pointattributelist[i] = 0.0;
++	}	
++
++	in.numberofsegments = num_seg;
++	in.segmentlist = (int *) xmalloc(in.numberofsegments * 2 * sizeof(REAL));
++	in.segmentmarkerlist = (int *) mxCalloc(in.numberofsegments,sizeof(int));
++	for (i=0;i<num_seg;i++){
++		in.segmentlist[2*i+0]=(int)segments_in[3*i+0];
++		in.segmentlist[2*i+1]=(int)segments_in[3*i+1];
++		in.segmentmarkerlist[i]=(int)segmentmarkers_in[i];
++	}
++	
++	in.numberofholes = 0;
++
++	/* Make necessary initializations so that Triangle can return a */
++	/*   triangulation in `out'.  */
++
++	out.pointlist = (REAL *) NULL;            
++	out.pointattributelist = (REAL *) NULL;
++	out.pointmarkerlist = (int *) NULL; 
++	out.trianglelist = (int *) NULL;          
++	out.triangleattributelist = (REAL *) NULL;
++	out.neighborlist = (int *) NULL;         
++	out.segmentlist = (int *) NULL;
++	out.segmentmarkerlist = (int *) NULL;
++	out.edgelist = (int *) NULL;             
++	out.edgemarkerlist = (int *) NULL;   
++
++	/* Triangulate the points:.  Switches are chosen to read and write a  */
++	/*   PSLG (p), preserve the convex hull (c), number everything from  */
++	/*   zero (z), assign a regional attribute to each element (A), and  */
++	/*   produce an edge list (e), a Voronoi diagram (v), and a triangle */
++	/*   neighbor list (n).                                              */
++
++	sprintf(options,"%s%lf","QzDq30iarp",area); //replace V by Q to quiet down the logging
++
++
++	triangulate(options, &in, &out, NULL);
++	
++	/*Allocate index, x and y: */
++	index=(double*)xmalloc(3*out.numberoftriangles*sizeof(double));
++	x=(double*)xmalloc(out.numberofpoints*sizeof(double));
++	y=(double*)xmalloc(out.numberofpoints*sizeof(double));
++	segments=(double*)xmalloc(3*out.numberofsegments*sizeof(double));
++	segmentmarkerlist=(double*)xmalloc(out.numberofsegments*sizeof(double));
++
++	for (i = 0; i < out.numberoftriangles; i++) {
++		for (j = 0; j < out.numberofcorners; j++) {
++			*(index+3*i+j)=(double)out.trianglelist[i * out.numberofcorners + j]+1;
++		}
++	}
++	for (i = 0; i < out.numberofpoints; i++) {
++		x[i]=out.pointlist[i * 2 + 0];
++		y[i]=out.pointlist[i * 2 + 1];
++	}
++	
++	for (i = 0; i < out.numberofsegments; i++) {
++		segments[3*i+0]=(double)out.segmentlist[i*2+0]+1;
++		segments[3*i+1]=(double)out.segmentlist[i*2+1]+1;
++		segmentmarkerlist[i]=(double)out.segmentmarkerlist[i];
++	}
++
++	/*Associate elements with segments: */
++	AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles);
++
++	/*Order segments so that their normals point outside the domain: */
++	if(!strcmp(order,"yes")){
++		OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
++	}
++	
++	/*Output : */
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,3);
++	mxSetN(pmxa_array,out.numberoftriangles);
++	mxSetPr(pmxa_array,index);
++	mexCallMATLAB( 1, &plhs[0], 1, &pmxa_array, "transpose");
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,1);
++	mxSetN(pmxa_array,out.numberofpoints);
++	mxSetPr(pmxa_array,x);
++	mexCallMATLAB( 1, &plhs[1], 1, &pmxa_array, "transpose");
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,1);
++	mxSetN(pmxa_array,out.numberofpoints);
++	mxSetPr(pmxa_array,y);
++	mexCallMATLAB( 1, &plhs[2], 1, &pmxa_array, "transpose");
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,3);
++	mxSetN(pmxa_array,out.numberofsegments);
++	mxSetPr(pmxa_array,segments);
++	mexCallMATLAB( 1, &plhs[3], 1, &pmxa_array, "transpose");
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,1);
++	mxSetN(pmxa_array,out.numberofsegments);
++	mxSetPr(pmxa_array,segmentmarkerlist);
++	mexCallMATLAB( 1, &plhs[4], 1, &pmxa_array, "transpose");
++
++	return;
++}
++
++
++void TriMeshRefineUsage(void)
++{
++	printf("\n");
++	printf("   usage: [index2,x2,y2,segments2,segmentmarkers2]=TriMeshRefine(index1,x1,y1,segments1,segmentmarkers1,area,order) \n");
++	printf("      where: (index1,x1,y1,segments1,segmentmarkers1) is an initial triangulation (segment1 does not need to be ordered).\n");
++	printf("      area is a vector of element areas determining which elements will be refined.\n");
++	printf("      order is an optional argument that determines whether segments are output in the \n");
++	printf("      order they are made by Triangle (ie none), or ordered counter clockwise around the domain outline.\n");
++	printf("      (index2,x2,y2,segments2,segmentmarkers2) is the resulting refined triangulation.\n");
++	printf("   note: order is an optional arguments\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.h	(revision 12032)
+@@ -0,0 +1,22 @@
++/*!\file:  TriMeshRefine.h
++ * \brief header prototype
++ */ 
++
++#ifndef _TRIMESH_REFINE_H_
++#define _TRIMESH_REFINE_H_
++
++#include "mex.h"
++#include "triangle.h"
++#include "string.h"
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++void TriMeshRefineUsage(void);
++#undef __FUNCT__ 
++#define __FUNCT__ "TriMeshRefine"
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h	(revision 12032)
+@@ -0,0 +1,44 @@
++/*!\file InterpFromMeshToMesh3d.h
++ * \brief: prototype for Data Interpolation mex module.
++ */
++
++#ifndef _INTERPFROMMESH3D_H
++#define _INTERPFROMMESH3D_H
++
++/* local prototypes: */
++void InterpFromMeshToMesh3dUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "InterpFromMeshToMesh3d"
++
++#undef CLEANUP
++#define CLEANUP InterpFromMeshToMesh3dLocalCleanup();
++
++
++/* serial input macros: */
++#define INDEXHANDLE prhs[0]
++#define XHANDLE prhs[1]
++#define YHANDLE prhs[2]
++#define ZHANDLE prhs[3]
++#define DATAHANDLE prhs[4]
++#define XPRIMEHANDLE prhs[5]
++#define YPRIMEHANDLE prhs[6]
++#define ZPRIMEHANDLE prhs[7]
++#define DEFAULTHANDLE prhs[8]
++
++/* serial output macros: */
++#define DATAPRIME (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++#undef NRHS
++#define NRHS  9
++
++#endif  /* _INTERPFROMMESHTOMESH3D_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp	(revision 12032)
+@@ -0,0 +1,119 @@
++/*!\file InterpFromMeshToMesh3d.c
++ * \brief: data interpolation from a list of (x,y,values) into mesh vertices
++ 
++	InterpFromMeshToMesh3d.c
++
++	usage:
++	data_mesh=InterpFromMeshToMesh3d(index,x,y,z,data,x_mesh,y_mesh,z_mesh);
++	
++	where:
++
++		input:
++		x,y,z: coordinates of matrix data
++		data - matrix holding the data to be interpolated onto the mesh.
++		x_mesh,y_mesh,z_mesh: coordinates of the mesh vertices onto which we interpolate.
++		
++		output: 
++		data_mesh:  vector of mesh interpolated data.
++
++*/
++	
++#include "./InterpFromMeshToMesh3d.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
++
++	/*input: */
++	double* index_data=NULL;
++	int     index_data_rows;
++
++	double* x_data=NULL;
++	double* y_data=NULL;
++	double* z_data=NULL;
++
++	int     x_data_rows;
++	int     y_data_rows;
++	int     z_data_rows;
++
++	double* data=NULL; 
++	int     data_rows;
++	int     data_cols;
++
++	double* x_prime=NULL;
++	double* y_prime=NULL;
++	double* z_prime=NULL;
++	
++	int     x_prime_rows;
++	int     y_prime_rows;
++	int     z_prime_rows;
++
++	double  default_value;
++
++	/*Intermediary*/
++	int nods_data;
++	int nels_data;
++	int nods_prime;
++
++	/* output: */
++	Vector*  data_prime=NULL;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InterpFromMeshToMesh3dUsage);
++
++	/*Input datasets: */
++	FetchData(&index_data,&index_data_rows,NULL,INDEXHANDLE);
++	FetchData(&x_data,&x_data_rows,NULL,XHANDLE);
++	FetchData(&y_data,&y_data_rows,NULL,YHANDLE);
++	FetchData(&z_data,&z_data_rows,NULL,ZHANDLE);
++	FetchData(&data,&data_rows,&data_cols,DATAHANDLE);
++	FetchData(&x_prime,&x_prime_rows,NULL,XPRIMEHANDLE);
++	FetchData(&y_prime,&y_prime_rows,NULL,YPRIMEHANDLE);
++	FetchData(&z_prime,&z_prime_rows,NULL,ZPRIMEHANDLE);
++	FetchData(&default_value,DEFAULTHANDLE);
++
++	/*some checks*/
++	if (x_data_rows!=y_data_rows || x_data_rows!=z_data_rows){
++		_error_("vectors x, y and z should have the same length!");
++	}
++	if (x_prime_rows!=y_prime_rows || x_prime_rows!=z_prime_rows){
++		_error_("vectors x_prime, y_prime and z_prime should have the same length!");
++	}
++	/*get number of elements and number of nodes in the data*/
++	nels_data=index_data_rows;
++	nods_data=x_data_rows;
++	nods_prime=x_prime_rows;
++
++	/* Run core computations: */
++	InterpFromMeshToMesh3dx(&data_prime,index_data,x_data,y_data,z_data,nods_data,nels_data,data,data_rows,x_prime,y_prime,z_prime,nods_prime,default_value);
++
++	/*Write data: */
++	WriteData(DATAPRIME,data_prime);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void InterpFromMeshToMesh3dUsage(void)
++{
++	_printf_(true,"INTERPFROMMESHTOMESH3D - interpolation from a 3d hexahedron mesh onto a list of point\n");
++	_printf_(true,"\n");
++	_printf_(true,"   This function is a multi-threaded mex file that interpolates a field\n");
++	_printf_(true,"   defined on a triangular mesh onto a list of point\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"      data_prime=InterpFromMeshToMesh3d(index,x,y,z,data,x_prime,y_prime,z_prime,default_value);\n");
++	_printf_(true,"\n");
++	_printf_(true,"      index: index of the mesh where data is defined\n");
++	_printf_(true,"      x,y,z: coordinates of the nodes where data is defined\n");
++	_printf_(true,"      data: matrix holding the data to be interpolated onto the mesh.\n");
++	_printf_(true,"      x_prime,y_prime,z_prime: coordinates of the points onto which we interpolate.\n");
++	_printf_(true,"      default_value: default value if no data is found (holes).\n");
++	_printf_(true,"      data_prime: vector of mesh interpolated data.\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Example:\n");
++	_printf_(true,"      load('temperature.mat');\n");
++	_printf_(true,"      md.initialization.temperature=InterpFromMeshToMesh3d(index,x,y,z,temperature,md.mesh.x,md.mesh.y,md.mesh.z,253);\n");
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Ll2xy/Ll2xy.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Ll2xy/Ll2xy.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Ll2xy/Ll2xy.h	(revision 12032)
+@@ -0,0 +1,37 @@
++/*!\file Ll2xy.h
++ * \brief: prototype for lat/long to x/y coordinate mex module.
++ */
++
++#ifndef _LL2XY_H
++#define _LL2XY_H
++
++/* local prototypes: */
++void Ll2xyUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "Ll2xy"
++
++
++/* serial input macros: */
++#define LAT_IN    prhs[0]
++#define LON_IN    prhs[1]
++#define SGN_IN    prhs[2]
++
++/* serial output macros: */
++#define X_OUT    (mxArray**)&plhs[0]
++#define Y_OUT    (mxArray**)&plhs[1]
++
++/* serial arg counts: */
++#undef NRHS
++#define NRHS  3
++#undef NLHS
++#define NLHS  2
++
++#endif
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 12032)
+@@ -0,0 +1,121 @@
++/*\file Ll2xy.c
++ *\brief: lat/long to x/y coordinate mex module.
++ */
++#include "./Ll2xy.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	int i,verbose=1;
++
++	/*input: */
++	double  *lat=NULL,*lon=NULL;
++	int     nlat,nlon,ncoord;
++	int     sgn;
++
++	Options* options=NULL;
++	double   cm=0.,sp=0.;
++
++	/* output: */
++	double  *x=NULL,*y=NULL;
++	int     iret=0;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	if (nlhs > NLHS) {
++		Ll2xyUsage();
++		_error_("Ll2xy usage error");
++	}
++	if (nrhs < NRHS) {
++		Ll2xyUsage();
++		_error_("Ll2xy usage error");
++	}
++
++	/*Input datasets: */
++	if (verbose) printf("Fetching inputs:\n");
++	FetchData(&lat,&nlat,LAT_IN);
++	if (verbose)
++		if   (nlat == 1) printf("  lat=%g\n",lat[0]);
++		else             printf("  lat=[%d values]\n",nlat);
++//	for (i=0; i<nlat; i++) printf("  lat[%d]=%g\n",i,lat[i]);
++	FetchData(&lon,&nlon,LON_IN);
++	if (verbose)
++		if   (nlon == 1) printf("  lon=%g\n",lon[0]);
++		else             printf("  lon=[%d values]\n",nlon);
++//	for (i=0; i<nlon; i++) printf("  lon[%d]=%g\n",i,lon[i]);
++	FetchData(&sgn,SGN_IN);
++	if (verbose) printf("  sgn=%d\n",sgn);
++
++	if (verbose) printf("Parsing options:\n");
++	options=new Options(NRHS,nrhs,prhs);
++	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
++	/*  defaults are in Ll2xydef, so don't duplicate them here, and only use user values if both have been specified  */
++	if (options->GetOption("central_meridian") || options->GetOption("standard_parallel")) {
++		options->Get(&cm,"central_meridian");
++		if (verbose) printf("  cm=%g\n",cm);
++		options->Get(&sp,"standard_parallel");
++		if (verbose) printf("  sp=%g\n",sp);
++	}
++
++	/*some checks*/
++	if (verbose) printf("Checking inputs:\n");
++
++	if   (nlat != nlon) _error_("Must have same number of lat[%d] and lon[%d] coordinates.",nlat,nlon);
++	else                ncoord=nlat;
++	if (sgn != +1 && sgn != -1) _error_("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);
++	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
++	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
++
++	x=(double *)xmalloc(ncoord*sizeof(double));
++	y=(double *)xmalloc(ncoord*sizeof(double));
++
++	/* Run core computations: */
++	if (verbose) printf("Calling core:\n");
++	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
++		iret=Ll2xyx(x,y,
++					lat,lon,ncoord,
++					sgn,cm,sp);
++	else
++		iret=Ll2xyx(x,y,
++					lat,lon,ncoord,
++					sgn);
++	if (verbose) printf("  iret=%d\n",iret);
++
++	/*Write data: */
++	WriteData(X_OUT,x,ncoord);
++	WriteData(Y_OUT,y,ncoord);
++
++	/*Clean-up*/
++	delete options;
++
++	/*end module: */
++	MODULEEND();
++}
++
++void Ll2xyUsage(void)
++{
++	_printf_(true,"Ll2xy - lat/long to x/y coordinate transformation module:\n");
++	_printf_(true,"\n");
++	_printf_(true,"   This module transforms lat/long to x/y coordinates.\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"      [x,y]=Ll2xy(lat,lon,sgn,'param name',param,...);\n");
++	_printf_(true,"\n");
++	_printf_(true,"      lat         latitude coordinates (double vector)\n");
++	_printf_(true,"      lon         longitude coordinates (double vector)\n");
++	_printf_(true,"      sgn         sign for hemisphere (double, +1 (north) or -1 (south))\n");
++	_printf_(true,"\n");
++	_printf_(true,"      central_meridian     central meridian (double, optional, but must specify with sp)\n");
++	_printf_(true,"      standard_parallel    standard parallel (double, optional, but must specify with cm)\n");
++	_printf_(true,"\n");
++	_printf_(true,"      x           x coordinates (double vector)\n");
++	_printf_(true,"      y           y coordinates (double vector)\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Examples:\n");
++	_printf_(true,"      [x,y]=Ll2xy(lat,lon, 1);\n");
++	_printf_(true,"      [x,y]=Ll2xy(lat,lon, 1,'central_meridian',45,'standard_parallel',70);\n");
++	_printf_(true,"      [x,y]=Ll2xy(lat,lon,-1,'central_meridian', 0,'standard_parallel',71);\n");
++	_printf_(true,"\n");
++}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.h	(revision 12032)
+@@ -0,0 +1,36 @@
++/*
++	BamgMesherUsage.h
++*/
++
++#ifndef _BAMG_MESHER_H_
++#define _BAMG_MESHER_H_
++
++/* local prototypes: */
++void BamgMesherUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "BamgMesher"
++    
++/* serial input macros: */
++#define BAMGMESHIN  (mxArray*)prhs[0]
++#define BAMGGEOMIN  (mxArray*)prhs[1]
++#define BAMGOPTIONS (mxArray*)prhs[2]
++
++/* serial output macros: */
++#define BAMGMESHOUT    (mxArray**)&plhs[0]
++#define BAMGGEOMOUT    (mxArray**)&plhs[1]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  2
++#undef NRHS
++#define NRHS  3
++
++#endif  /* _BAMG_MESHER_H_ */
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12032)
+@@ -0,0 +1,56 @@
++/*\file BamgMesher.c
++ *\brief: mesher that uses the bamg library
++ */
++#include "./BamgMesher.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	/*Outputs*/
++	mxArray* bamgmesh_mat=NULL;
++	mxArray* bamggeom_mat=NULL;
++
++	/*diverse: */
++	BamgOpts *bamgopts=NULL;
++	BamgMesh *bamgmesh_in=NULL;
++	BamgGeom *bamggeom_in=NULL;
++	BamgMesh *bamgmesh_out=NULL;
++	BamgGeom *bamggeom_out=NULL;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&BamgMesherUsage);
++
++	/*Initialize variables*/
++	bamgopts   = new BamgOpts(BAMGOPTIONS);
++	bamggeom_in= new BamgGeom(BAMGGEOMIN);
++	bamgmesh_in= new BamgMesh(BAMGMESHIN);
++
++	/*Initialize outputs*/
++	bamggeom_out=new BamgGeom();
++	bamgmesh_out=new BamgMesh();
++
++	/*!Generate internal degree of freedom numbers: */
++	Bamgx(bamgmesh_out,bamggeom_out,bamgmesh_in,bamggeom_in,bamgopts);
++
++	/*Generate output Matlab Structures*/
++	bamggeom_out->SetStructureFields((void*)BAMGGEOMOUT);
++	bamgmesh_out->SetStructureFields((void*)BAMGMESHOUT);
++
++	/*Free ressources: */
++	delete bamgopts;
++	delete bamggeom_in;
++	delete bamggeom_out;
++	delete bamgmesh_in;
++	delete bamgmesh_out;
++
++	/*end module: */
++	MODULEEND();
++}
++
++void BamgMesherUsage(void){
++	_printf_(true,"\n");
++	_printf_(true,"   usage: [bamgmesh,bamggeom]=%s(bamgmesh,bamggeom,bamgoptions);\n",__FUNCT__);
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.h	(revision 12032)
+@@ -0,0 +1,42 @@
++/*!\file InterpFromGridToMesh.h
++ * \brief: prototype for Data Interpolation mex module.
++ */
++
++#ifndef _InterpFromGridToMesh_H
++#define _InterpFromGridToMesh_H
++
++/* local prototypes: */
++void InterpFromGridToMeshUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "InterpFromGridToMesh"
++
++#undef CLEANUP
++#define CLEANUP InterpFromGridToMeshLocalCleanup();
++
++
++/* serial input macros: */
++#define XHANDLE prhs[0]
++#define YHANDLE prhs[1]
++#define DATAHANDLE prhs[2]
++#define XMESHHANDLE prhs[3]
++#define YMESHHANDLE prhs[4]
++#define DEFAULTHANDLE prhs[5]
++#define INTERPENUM prhs[6]
++
++/* serial output macros: */
++#define DATAMESH (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++#undef NRHS
++#define NRHS  6
++
++#endif  /* _INTERPFROMGRIDTOMESH_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 12032)
+@@ -0,0 +1,95 @@
++/*!\file InterpFromGridToMesh.c
++ * \brief: data interpolation from a list of (x,y,values) into mesh vertices
++ 
++	InterpFromGridToMesh.c
++
++	usage:
++	data_mesh=InterpFromGridToMesh(x,y,data,x_mesh,y_mesh);
++	
++	where:
++
++		input:
++		x,y: coordinates of matrix data
++		data - matrix holding the data to be interpolated onto the mesh.
++		x_mesh,y_mesh: coordinates of the mesh vertices onto which we interpolate.
++		
++		output: 
++		data_mesh:  vector of mesh interpolated data.
++*/
++	
++#include "./InterpFromGridToMesh.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
++
++	int i,j;
++
++	/*input: */
++	double* x=NULL;
++	double* y=NULL;
++	int     x_rows,y_rows;
++	double* data=NULL; 
++	int     data_rows,data_cols;
++	double* x_mesh=NULL;
++	double* y_mesh=NULL;
++	int     x_mesh_rows,y_mesh_rows;
++	double  default_value;
++	int     interpolationenum;
++
++	/* output: */
++	Vector*  data_mesh=NULL;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	//CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InterpFromGridToMeshUsage);
++	if((nlhs!=NLHS) || (nrhs!=6 && nrhs!=7)){
++		InterpFromGridToMeshUsage();
++		_error_(" usage. See above");
++	}
++
++	/*Input datasets: */
++	FetchData(&x,&x_rows,NULL,XHANDLE);
++	FetchData(&y,&y_rows,NULL,YHANDLE);
++	FetchData(&data,&data_rows,&data_cols,DATAHANDLE);
++	FetchData(&x_mesh,&x_mesh_rows,NULL,XMESHHANDLE);
++	FetchData(&y_mesh,&y_mesh_rows,NULL,YMESHHANDLE);
++	FetchData(&default_value,DEFAULTHANDLE);
++
++	/* Run core computations: */
++	if(nrhs==7){
++		FetchData(&interpolationenum,INTERPENUM);
++		InterpFromGridToMeshx(&data_mesh, x, x_rows,  y, y_rows, data, data_rows,data_cols, x_mesh, y_mesh, x_mesh_rows,default_value,interpolationenum);
++	}
++	else{
++		InterpFromGridToMeshx(&data_mesh, x, x_rows,  y, y_rows, data, data_rows,data_cols, x_mesh, y_mesh, x_mesh_rows,default_value);
++	}
++
++	/*Write data: */
++	WriteData(DATAMESH,data_mesh);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void InterpFromGridToMeshUsage(void)
++{
++	_printf_(true,"INTERPFROMGRIDTOMESH - interpolation from a grid onto a list of points\n");
++	_printf_(true,"\n");
++	_printf_(true,"   This function is a multi-threaded mex file that interpolates a field\n");
++	_printf_(true,"   defined on a grid onto a list of points\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"      data_mesh=InterpFromGridToMesh(x,y,data,x_mesh,y_mesh,default_value);\n");
++	_printf_(true,"\n");
++	_printf_(true,"      data: matrix holding the data to be interpolated onto the mesh.\n");
++	_printf_(true,"      x,y: coordinates of matrix data. (x and y must be in increasing order)\n");
++	_printf_(true,"      x_mesh,y_mesh: coordinates of the points onto which we interpolate.\n");
++	_printf_(true,"      default_value: default value if no data is found (holes).\n");
++	_printf_(true,"      data_mesh: vector of mesh interpolated data.\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Example:\n");
++	_printf_(true,"      load('velocities.mat');\n");
++	_printf_(true,"      md.inversion.vx_obs=InterpFromGridToMesh(x_n,y_m,vx,md.mesh.x,md.mesh.y,0);\n");
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.h	(revision 12032)
+@@ -0,0 +1,46 @@
++
++/*
++	InterpFromMeshToGrid.h
++*/
++
++
++#ifndef _INTERPFROMMESHTOGRID_H
++#define _INTERPFROMMESHTOGRID_H
++
++/* local prototypes: */
++void InterpFromMeshToGridUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "InterpFromMeshToGrid"
++
++/* serial input macros: */
++#define INDEX (mxArray*)prhs[0]
++#define X (mxArray*)prhs[1]
++#define Y (mxArray*)prhs[2]
++#define MESHDATA (mxArray*)prhs[3]
++#define XMIN (mxArray*)prhs[4]
++#define YMAX (mxArray*)prhs[5]
++#define XPOSTING (mxArray*)prhs[6]
++#define YPOSTING (mxArray*)prhs[7]
++#define NLINES (mxArray*)prhs[8]
++#define NCOLS (mxArray*)prhs[9]
++#define DEFAULTVALUE (mxArray*)prhs[10]
++
++/* serial output macros: */
++#define XM (mxArray**)&plhs[0]
++#define YM (mxArray**)&plhs[1]
++#define GRIDDATA (mxArray**)&plhs[2]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  3
++#undef NRHS
++#define NRHS  11
++
++#endif  /* _INTERPFROMMESHTOGRID_H*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp	(revision 12032)
+@@ -0,0 +1,79 @@
++/*\file InterpFromMeshToGrid.c
++ *\brief: compute diff between observed and modeled velocity
++ */
++
++#include "./InterpFromMeshToGrid.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	/*input datasets: */
++	double* index=NULL;
++	int     nel;
++	double* x=NULL;
++	int     nods;
++	double* y=NULL;
++	double* meshdata=NULL;
++	int     meshdata_length;
++	double  xmin;
++	double  ymax;
++	double  xposting;
++	double  yposting;
++	int     nlines,ncols;
++	double  default_value;
++
++	/* output datasets: */
++	double* griddata=NULL;
++	double* x_m=NULL;
++	double* y_m=NULL;
++
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InterpFromMeshToGridUsage);
++
++	/*Input datasets: */
++	FetchData(&index,&nel,NULL,INDEX);
++	FetchData(&x,&nods,NULL,X);
++	FetchData(&y,NULL,NULL,Y);
++	FetchData(&meshdata,&meshdata_length,NULL,MESHDATA);
++	FetchData(&xmin,XMIN);
++	FetchData(&ymax,YMAX);
++	FetchData(&xposting,XPOSTING);
++	FetchData(&yposting,YPOSTING);
++	FetchData(&nlines,NLINES);
++	FetchData(&ncols,NCOLS);
++	FetchData(&default_value,DEFAULTVALUE);
++
++	/*Call core of computation: */
++	InterpFromMeshToGridx(&x_m,&y_m,&griddata,index,x,y,nods,nel,meshdata,meshdata_length,xmin,ymax,xposting,yposting,nlines,ncols,default_value);
++
++	/*Write results: */
++	WriteData(XM,x_m,ncols);
++	WriteData(YM,y_m,nlines);
++	WriteData(GRIDDATA,griddata,nlines,ncols);
++
++	/*Free ressources: */
++	//let matlab do this.
++	
++	/*end module: */
++	MODULEEND();
++}
++
++void InterpFromMeshToGridUsage(void)
++{
++	_printf_(true,"INTERPFROMMESHTOGRID - interpolation of a data defined on a mesh onto a grid\n");
++	_printf_(true,"\n");
++	_printf_(true,"   This function is a multi-threaded mex file that interpolates a field\n");
++	_printf_(true,"   defined on a triangular mesh onto a regular grid\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"      [x_m,y_m,griddata]=InterpFromMeshToGrid(index,x,y,data,xmin,ymax,xposting,yposting,nlines,ncols,default_value)\n");
++	_printf_(true,"\n");
++	_printf_(true,"      index,x,y: delaunay triangulation defining the mesh.\n");
++	_printf_(true,"      meshdata: vertex values of data to be interpolated.\n");
++	_printf_(true,"      xmin,ymax,posting,nlines,ncols: parameters that define the grid\n");
++	_printf_(true,"      default_value: value of points located out of the mesh.\n");
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 12032)
+@@ -0,0 +1,151 @@
++/*\file KMLFileRead.c
++ *\brief: KML file reader module.
++ */
++#include "./KMLFileRead.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	int i,j,nnodes=0,verbose=1;
++	KML_Object* kobj;
++
++	/*input: */
++	char*   name=NULL;
++
++	char*   notes=NULL;
++	const mxArray* notesi;
++	mwIndex        nindex;
++
++	int*    elem=NULL;
++	int     melem=0,nelem=0;
++
++	int*    nodecon=NULL;
++	int     mncon=0,nncon=0;
++
++	double* lat=NULL;
++	int     mlat=0,nlat=0,llat=0;
++
++	double* lng=NULL;
++	int     mlng=0,nlng=0,llng=0;
++
++	int     nparts=0;
++
++	int*    part=NULL;
++	int     mprt=0,nprt=0,lprt=0;
++
++	double* data=NULL;
++	int     mdata=0,ndata=0;
++
++	double* cmap=NULL;
++	int     mcmap=0,ncmap=0;
++
++	char*   filnam=NULL;
++
++	FILE*   fidi=NULL;
++	FILE*   fido=NULL;
++
++	Options* options=NULL;
++	char*    echo    =NULL;
++	char*    deepecho=NULL;
++	char*    write   =NULL;
++
++	/* output: */
++	int     ierror=0;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	if (nlhs > NLHS) {
++		KMLFileReadUsage();
++		_error_("KMLFileRead usage error");
++	}
++	if (nrhs < NRHS) {
++		KMLFileReadUsage();
++		_error_("KMLFileRead usage error");
++	}
++
++	/*Input datasets: */
++	if (verbose) printf("Fetching inputs:\n");
++	FetchData(&filnam,FILENAME);
++	if (verbose) printf("  filnam =\"%s\"\n",filnam);
++
++	if (verbose) printf("Parsing options:\n");
++	options=new Options(NRHS,nrhs,prhs);
++	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
++	options->Get(&echo    ,"echo"    ,"off");
++	options->Get(&deepecho,"deepecho","off");
++	options->Get(&write   ,"write"   ,"off");
++
++	/*some checks*/
++	if (verbose) printf("Checking inputs:\n");
++
++	if (!strlen(filnam))
++		strcpy(filnam,"stdout");
++
++	if (verbose) printf("Opening file \"%s\".\n",filnam);
++	fidi=fopen(filnam,"r");
++
++	/* Run core computations: */
++	if (verbose) printf("Calling core:\n");
++	kobj=KMLFileReadx(fidi);
++
++	if (verbose) printf("Closing file \"%s\".\n",filnam);
++	fclose(fidi);
++
++	if (kobj) {
++		if (!strncmp(echo    ,"on",2) || !strncmp(echo    ,"y",1))
++			kobj->Echo();
++		if (!strncmp(deepecho,"on",2) || !strncmp(deepecho,"y",1))
++			kobj->DeepEcho();
++		if (strncmp(write,"off",3) && strncmp(write,"no",2)) {
++			if (!strncmp(write,"on",2) || !strncmp(write,"yes",3) || !strncmp(write,"stdout",6)) {
++				kobj->Write(stdout,"");
++			}
++			else {
++				if (verbose) printf("Opening file \"%s\".\n",write);
++				fido=fopen(write,"w");
++				kobj->Write(fido,"");
++				if (verbose) printf("Closing file \"%s\".\n",write);
++				ierror=fclose(fido);
++			}
++		}
++
++		delete kobj;
++	}
++
++	/*Write data: */
++	WriteData(ERRORFLAG,ierror);
++
++	/*Clean-up*/
++	xfree((void**)&write);
++	xfree((void**)&deepecho);
++	xfree((void**)&echo);
++	delete options;
++
++	/*end module: */
++	MODULEEND();
++}
++
++void KMLFileReadUsage(void)
++{
++	_printf_(true,"KMLFileRead - KML file reader module:\n");
++	_printf_(true,"\n");
++	_printf_(true,"   This module reads a KML file.\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"      [ierror]=KMLFileRead(kmlfile,'param name',param,...);\n");
++	_printf_(true,"\n");
++	_printf_(true,"      kmlfile      file name of kml file to be read (char)\n");
++	_printf_(true,"\n");
++	_printf_(true,"      echo         echo command (char, optional, 'off'/'on')\n");
++	_printf_(true,"      deepecho     deep echo command (char, optional, 'off'/'on')\n");
++	_printf_(true,"      write        write command (char, optional, 'off'/'stdout'/kmlfile)\n");
++	_printf_(true,"\n");
++	_printf_(true,"      ierror       return code (non-zero for error)\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Examples:\n");
++	_printf_(true,"      [ierror]=KMLFileRead('file.kml','deepecho','on');\n");
++	_printf_(true,"      [ierror]=KMLFileRead('filin.kml','echo','on','write','filout.kml');\n");
++	_printf_(true,"\n");
++}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.h	(revision 12032)
+@@ -0,0 +1,33 @@
++/*!\file KMLFileRead.h
++ * \brief: prototype for KML file reader mex module.
++ */
++
++#ifndef _KMLFILEREAD_H
++#define _KMLFILEREAD_H
++
++/* local prototypes: */
++void KMLFileReadUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "KMLFileRead"
++
++
++/* serial input macros: */
++#define FILENAME      prhs[0]
++
++/* serial output macros: */
++#define ERRORFLAG (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NRHS
++#define NRHS  1
++#undef NLHS
++#define NLHS  1
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/AverageFilter/AverageFilter.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/AverageFilter/AverageFilter.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/AverageFilter/AverageFilter.cpp	(revision 12032)
+@@ -0,0 +1,62 @@
++/*!\file:  AverageFilter.cpp
++ * \brief fill holes in matlab velocity array
++	this matlab module is an adaptation of a routine written by Robber 
++	Crippen.  The original routine was designed for the SRTM mission at JPL, 
++	and can be found in the current directory, under the name 
++	AverageFilterCrippen.  It fills void holes in an image, using an interpolation 
++	algorithm, and optionnally a smoothing algorithm. 
++	This matlab module extends the Crippen routine to be used in Matlab, 
++	using double arrays found in the workspace, and loaded directly into memory.
++*/
++
++
++#include "./AverageFilter.h"
++
++void mexFunction( int nlhs, mxArray* plhs[],
++				  int nrhs, const mxArray* prhs[])
++{
++
++	int i,j;
++
++	/* required input: */
++	double* imagein=NULL;
++	int     imagein_rows,imagein_cols;
++	int     smooth;
++
++
++	/* output: */
++	mxArray* pfield=NULL;
++	double* imageout=NULL;
++	int     imageout_rows,imageout_cols;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&AverageFilterUsage);
++
++	/*Fetch data: */
++	FetchData(&imagein,&imagein_rows,&imagein_cols,IMAGEIN);
++	FetchData(&smooth,SMOOTH);
++	
++	/*Run core hole filler routine: */
++	AverageFilterx( &imageout,imagein,imagein_rows,imagein_cols,smooth);
++
++	/* output: */
++	WriteData(IMAGEOUT,imageout,imagein_rows,imagein_cols);
++
++	/*end module: */
++	MODULEEND();
++}
++
++
++void AverageFilterUsage(void)
++{
++	printf("   AverageFilter usage:\n");
++	printf("   [image_out]=AverageFilter(image_in,pixels);\n\n");
++	printf("   where:\n");
++	printf("      image_in in double format\n");
++	printf("      pixels: characteristic size of smoothing\n");
++	printf("      image_out in double format\n");
++	printf("\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/AverageFilter/AverageFilter.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/AverageFilter/AverageFilter.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/AverageFilter/AverageFilter.h	(revision 12032)
+@@ -0,0 +1,36 @@
++
++/*
++	AverageFilter.h
++*/
++
++
++#ifndef _AVERAGEFILTER_H
++#define _AVERAGEFILTER_H
++
++/* local prototypes: */
++void AverageFilterUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "AverageFilter"
++
++
++/* serial input macros: */
++#define IMAGEIN prhs[0]
++#define SMOOTH prhs[1]
++
++/* serial output macros: */
++#define IMAGEOUT &plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++#undef NRHS
++#define NRHS  2
++
++#endif  /* _AVERAGEFILTER_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12032)
+@@ -0,0 +1,117 @@
++/*\file Shp2Kml.c
++ *\brief: shp to kml file conversion mex module.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include "./Shp2Kml.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	int i,verbose=1;
++
++	/*input: */
++	char    *filshp=NULL,*filkml=NULL;
++	int     sgn;
++
++	Options* options=NULL;
++	double   cm=0.,sp=0.;
++
++	/* output: */
++	int     iret=0;
++
++	#ifndef _HAVE_SHAPELIB_ //only works if shapelib library has been compiled in.
++	_error_(" Shapelib not available! Cannot carry out shp file translation!");
++	#endif
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	if (nlhs > NLHS) {
++		Shp2KmlUsage();
++		_error_("Shp2Kml usage error");
++	}
++	if (nrhs < NRHS) {
++		Shp2KmlUsage();
++		_error_("Shp2Kml usage error");
++	}
++
++	/*Input datasets: */
++	if (verbose) printf("Fetching inputs:\n");
++	FetchData(&filshp,SHP_IN);
++	if (verbose) printf("  filshp=\"%s\"\n",filshp);
++	FetchData(&filkml,KML_IN);
++	if (verbose) printf("  filkml=\"%s\"\n",filkml);
++	FetchData(&sgn,SGN_IN);
++	if (verbose) printf("  sgn=%d\n",sgn);
++
++	if (verbose) printf("Parsing options:\n");
++	options=new Options(NRHS,nrhs,prhs);
++	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
++	/*  defaults are in Xy2lldef, so don't duplicate them here, and only use user values if both have been specified  */
++	if (options->GetOption("central_meridian") || options->GetOption("standard_parallel")) {
++		options->Get(&cm,"central_meridian");
++		if (verbose) printf("  cm=%g\n",cm);
++		options->Get(&sp,"standard_parallel");
++		if (verbose) printf("  sp=%g\n",sp);
++	}
++
++	/*some checks*/
++	if (verbose) printf("Checking inputs:\n");
++
++	if (sgn < -1 || sgn > +1) _error_("Hemisphere sgn=%d must be +1 (north), -1 (south), or 0 (no translation).",sgn);
++	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
++	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
++
++	/* Run core computations: */
++	if (verbose) printf("Calling core:\n");
++	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
++		iret=Shp2Kmlx(filshp,filkml,
++					  sgn,cm,sp);
++	else
++		iret=Shp2Kmlx(filshp,filkml,
++					  sgn);
++	if (verbose) printf("  iret=%d\n",iret);
++
++	/*Write data: */
++	WriteData(RET_OUT,iret);
++
++	/*Clean-up*/
++	delete options;
++	xfree((void**)&filkml);
++	xfree((void**)&filshp);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void Shp2KmlUsage(void)
++{
++	_printf_(true,"Shp2Kml - shp to kml file conversion module:\n");
++	_printf_(true,"\n");
++	_printf_(true,"   This module converts a file from shp to kml format.\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"      [ret]=Shp2Kml(filshp,filkml,sgn,'param name',param,...);\n");
++	_printf_(true,"\n");
++	_printf_(true,"      filshp      file name of shp file to be read (char, extension optional)\n");
++	_printf_(true,"      filkml      file name of kml file to be written (char)\n");
++	_printf_(true,"      sgn         sign for hemisphere (double, +1 (north); -1 (south); or 0 (no translation))\n");
++	_printf_(true,"\n");
++	_printf_(true,"      central_meridian     central meridian (double, optional, but must specify with sp)\n");
++	_printf_(true,"      standard_parallel    standard parallel (double, optional, but must specify with cm)\n");
++	_printf_(true,"\n");
++	_printf_(true,"      ret         return code (non-zero for warning)\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Examples:\n");
++	_printf_(true,"      [ret]=Shp2Kml('file.shp','file.kml', 0);\n");
++	_printf_(true,"      [ret]=Shp2Kml('file.shp','file.kml', 1,'central_meridian',45,'standard_parallel',70);\n");
++	_printf_(true,"      [ret]=Shp2Kml('file.shp','file.kml',-1,'central_meridian', 0,'standard_parallel',71);\n");
++	_printf_(true,"\n");
++}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.h	(revision 12032)
+@@ -0,0 +1,36 @@
++/*!\file Shp2Kml.h
++ * \brief: prototype for shp to kml file conversion mex module.
++ */
++
++#ifndef _SHP2KML_H
++#define _SHP2KML_H
++
++/* local prototypes: */
++void Shp2KmlUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "Shp2Kml"
++
++
++/* serial input macros: */
++#define SHP_IN    prhs[0]
++#define KML_IN    prhs[1]
++#define SGN_IN    prhs[2]
++
++/* serial output macros: */
++#define RET_OUT    (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NRHS
++#define NRHS  3
++#undef NLHS
++#define NLHS  1
++
++#endif
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 12032)
+@@ -0,0 +1,328 @@
++/*!\file:  TriMeshProcessRifts.cpp
++ * \brief split a mesh where a rift (or fault) is present
++ */ 
++
++#include "./TriMeshProcessRifts.h"
++
++void mexFunction(	int nlhs, mxArray* plhs[],
++					int nrhs, const mxArray* prhs[] ) {
++
++
++	/*Matlab arrays: */
++	mxArray* pmxa_array=NULL;
++	mxArray* pmxa_array2=NULL;
++	mxArray* pmxa_array3=NULL;
++	int i,j,k,counter;
++	
++	/* returned quantities: */
++	int      out_numrifts;
++	int*     out_riftsnumsegments=NULL;
++	double** out_riftssegments=NULL; 
++	int*     out_riftsnumpairs=NULL;
++	double** out_riftspairs=NULL;
++	double*  out_riftstips=NULL;
++	double** out_riftspenaltypairs=NULL;
++	int*     out_riftsnumpenaltypairs=NULL;
++
++	/*empty rifts structure: */
++	double* pNaN=NULL;
++	const	char*	fnames[10];
++	mwSize     ndim=2;
++	mwSize		dimensions[2] = {1,1};
++	double* pair=NULL;
++
++	
++	/* input: */
++	double* tindex_in=NULL;
++	double* index_in=NULL;
++	int     nel;
++	double* x_inm=NULL; //matlab vector
++	double* x_in=NULL; //copy of matlab vector
++	int     nods;
++	double* y_inm=NULL;//matlab vector
++	double* y_in=NULL;//copy of matlab vector
++	double* tsegments_in=NULL;
++	double* segments_in=NULL;
++	double* tsegmentmarkers_in=NULL;
++	double* segmentmarkers_in=NULL;
++
++	/* state: */
++	double* state=NULL;
++
++	int     num_seg;
++
++	/*rifts: */
++	int     riftflag;
++	int     numrifts;
++
++	/* verify correct usage: */
++	if (nlhs==0 && nrhs==0) {
++		/* special case: */
++		TriMeshProcessRiftsUsage();
++		return;
++	}
++	
++	if (!(  (nlhs==6) || (nrhs==5))){
++		mexPrintf("   %s format error.\n", __FUNCT__);
++		TriMeshProcessRiftsUsage();
++		printf("   ");
++		mexErrMsgTxt(" ");
++	}
++
++	/*Fetch index_in: */
++	if(mxIsDouble(prhs[0])){
++		nel=mxGetM(prhs[0]);
++		tindex_in=mxGetPr(prhs[0]);
++		index_in=(double*)xmalloc(nel*3*sizeof(double));
++		for (i=0;i<nel;i++){
++			for (j=0;j<3;j++){
++				*(index_in+3*i+j)=*(tindex_in+nel*j+i);
++			}
++		}
++	}
++	else{
++		printf("%s%s\n",__FUNCT__," error message: first argument should be the element list!");
++		mexErrMsgTxt(" ");
++	}
++
++	/*Fetch x_in: */
++	if(mxIsDouble(prhs[1])){
++		nods=mxGetM(prhs[1]);
++		x_inm=mxGetPr(prhs[1]);
++		x_in=(double*)xmalloc(nods*sizeof(double));
++		for (i=0;i<nods;i++){
++			x_in[i]=x_inm[i];
++		}
++	}
++	else{
++		printf("%s%s\n",__FUNCT__," error message: second argument should be the x corrdinate list!");
++		mexErrMsgTxt(" ");
++	}
++
++	/*Fetch y_in: */
++	if(mxIsDouble(prhs[2])){
++		y_inm=mxGetPr(prhs[2]);
++		y_in=(double*)xmalloc(nods*sizeof(double));
++		for (i=0;i<nods;i++){
++			y_in[i]=y_inm[i];
++		}
++	}
++	else{
++		printf("%s%s\n",__FUNCT__," error message: third argument should be the y corrdinate list!");
++		mexErrMsgTxt(" ");
++	}	
++
++	/*Fetch segments_in: */
++	if(mxIsDouble(prhs[3])){
++		num_seg=mxGetM(prhs[3]);
++		tsegments_in=mxGetPr(prhs[3]);
++		segments_in=(double*)xmalloc(num_seg*3*sizeof(double));
++		for (i=0;i<num_seg;i++){
++			for (j=0;j<3;j++){
++				*(segments_in+3*i+j)=*(tsegments_in+num_seg*j+i);
++			}
++		}
++	}
++	else{
++		printf("%s%s\n",__FUNCT__," error message: fourth argument should be the segments list!");
++		mexErrMsgTxt(" ");
++	}
++
++	/*Fetch segment markers: */
++	if(mxIsDouble(prhs[4])){
++		tsegmentmarkers_in=mxGetPr(prhs[4]);
++		segmentmarkers_in=(double*)xmalloc(num_seg*sizeof(double));
++		for (i=0;i<num_seg;i++){
++			segmentmarkers_in[i]=tsegmentmarkers_in[i];
++		}
++	}
++	else{
++		printf("%s%s\n",__FUNCT__," error message: fourth argument should be the segmentmarkers list!");
++		mexErrMsgTxt(" ");
++	}
++
++	/*
++	printf("Index: \n");
++	for (i=0;i<nel;i++){
++		for(j=0;j<3;j++){
++			printf("%lf ",*(index_in+3*i+j));
++		}
++		printf("\n");
++	}
++	printf("x,y: \n");
++	for (i=0;i<nods;i++){
++		printf("%16.16lf %16.16lf\n",x_in[i],y_in[i]);
++	}
++	printf("segments:\n");
++	for (i=0;i<num_seg;i++){
++		for(j=0;j<3;j++){
++			printf("%lf ",*(segments_in+3*i+j));
++		}
++		printf("%lf ",segmentmarkers_in[i]);
++		printf("\n");
++	}
++	*/
++
++	/*First, do some fixing on the existing mesh: we do not want any element belonging entirely to the segment list (ie: 
++	 *all the nodes of this element belong to the segments (tends to happen when there are corners: */
++	RemoveCornersFromRifts(&index_in,&nel,&x_in,&y_in,&nods,segments_in,segmentmarkers_in,num_seg);
++
++	/*Figure out if we have rifts, and how many: */
++	IsRiftPresent(&riftflag,&numrifts,segmentmarkers_in,num_seg);
++	
++	if(riftflag){	
++		SplitMeshForRifts(&nel,&index_in,&nods,&x_in,&y_in,&num_seg,&segments_in,&segmentmarkers_in);
++	}
++
++	/*Order segments so that their normals point outside the domain: */
++	OrderSegments(&segments_in,num_seg, index_in,nel);
++
++	
++	if(riftflag){
++		
++		/*We do not want to output segments mixed with rift segments: wring out the rifts from the segments, using the 
++		 *segmentmarkerlist:*/
++		SplitRiftSegments(&segments_in,&segmentmarkers_in,&num_seg,&out_numrifts,&out_riftsnumsegments,&out_riftssegments,numrifts);
++
++		/*Using rift segments, associate rift faces in pairs, each pair face representing opposite flanks of the rifts facing one another directly: */
++		PairRiftElements(&out_riftsnumpairs,&out_riftspairs,out_numrifts,out_riftsnumsegments,out_riftssegments,x_in,y_in);
++		
++		/*Order rifts so that they start from one tip, go to the other tip, and back: */
++		OrderRifts(&out_riftstips, out_riftssegments,out_riftspairs,numrifts,out_riftsnumsegments,x_in,y_in);
++
++		/*Create penalty pairs, used by Imp: */
++		PenaltyPairs(&out_riftspenaltypairs,&out_riftsnumpenaltypairs,numrifts,out_riftssegments,out_riftsnumsegments,out_riftspairs,out_riftstips,x_in,y_in);
++	}
++
++
++	/*Output : */
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,3);
++	mxSetN(pmxa_array,nel);
++	mxSetPr(pmxa_array,index_in);
++	mexCallMATLAB( 1, &plhs[0], 1, &pmxa_array, "transpose");
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,1);
++	mxSetN(pmxa_array,nods);
++	mxSetPr(pmxa_array,x_in);
++	mexCallMATLAB( 1, &plhs[1], 1, &pmxa_array, "transpose");
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,1);
++	mxSetN(pmxa_array,nods);
++	mxSetPr(pmxa_array,y_in);
++	mexCallMATLAB( 1, &plhs[2], 1, &pmxa_array, "transpose");
++
++	
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,3);
++	mxSetN(pmxa_array,num_seg);
++	mxSetPr(pmxa_array,segments_in);
++	mexCallMATLAB( 1, &plhs[3], 1, &pmxa_array, "transpose");
++	
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,1);
++	mxSetN(pmxa_array,num_seg);
++	mxSetPr(pmxa_array,segmentmarkers_in);
++	mexCallMATLAB( 1, &plhs[4], 1, &pmxa_array, "transpose");
++
++	if(riftflag){
++		/*Create a structure rifts where if i is a rift number, we have the following fields rifts(i).segments and rifts(i).numsegs: */
++
++		fnames[0] = "numsegs";
++		fnames[1] = "segments";
++		fnames[2] = "pairs";
++		fnames[3] = "tips";
++		fnames[4] = "penaltypairs";
++		fnames[5] = "fill";
++		fnames[6] = "friction";
++		fnames[7] = "fraction";
++		fnames[8] = "fractionincrement";
++		fnames[9] = "state";
++
++		dimensions[0]=out_numrifts;
++
++		pmxa_array=mxCreateStructArray( ndim,dimensions,10,fnames);
++		
++		for (i=0;i<out_numrifts;i++){
++			/*Segments: */
++			pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
++			mxSetM(pmxa_array2,3);
++			mxSetN(pmxa_array2,out_riftsnumsegments[i]);
++			mxSetPr(pmxa_array2,out_riftssegments[i]);
++			mexCallMATLAB( 1, &pmxa_array3, 1, &pmxa_array2, "transpose");
++			
++			mxSetField(pmxa_array,i,"segments",pmxa_array3);
++			mxSetField(pmxa_array,i,"numsegs",mxCreateDoubleScalar((double)out_riftsnumsegments[i]));
++
++			/*Element pairs: */
++			pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
++			mxSetM(pmxa_array2,2);
++			mxSetN(pmxa_array2,out_riftsnumpairs[i]);
++			mxSetPr(pmxa_array2,out_riftspairs[i]);
++			mexCallMATLAB( 1, &pmxa_array3, 1, &pmxa_array2, "transpose");
++			
++			mxSetField(pmxa_array,i,"pairs",pmxa_array3);
++
++			/*Tips: */
++			pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
++			mxSetM(pmxa_array2,1);
++			pair=(double*)xmalloc(2*sizeof(double));
++			pair[0]=*(out_riftstips+2*i+0);
++			pair[1]=*(out_riftstips+2*i+1);
++			mxSetN(pmxa_array2,2);
++			mxSetPr(pmxa_array2,pair);
++			mxSetField(pmxa_array,i,"tips",pmxa_array2);
++
++			/*Penalty pairs: */
++			pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
++			mxSetM(pmxa_array2,7);
++			mxSetN(pmxa_array2,out_riftsnumpenaltypairs[i]);
++			mxSetPr(pmxa_array2,out_riftspenaltypairs[i]);
++			mexCallMATLAB( 1, &pmxa_array3, 1, &pmxa_array2, "transpose");
++			
++			mxSetField(pmxa_array,i,"penaltypairs",pmxa_array3);
++
++			/*Friction fraction, fractionincrement  and fill: */
++			mxSetField(pmxa_array,i,"friction",mxCreateDoubleScalar(0));
++			mxSetField(pmxa_array,i,"fill",mxCreateDoubleScalar(IceEnum)); //default is ice
++			mxSetField(pmxa_array,i,"fraction",mxCreateDoubleScalar(0)); //default is ice
++			mxSetField(pmxa_array,i,"fractionincrement",mxCreateDoubleScalar(0.1)); 
++
++			/*State: */
++			state=(double*)xmalloc(out_riftsnumpenaltypairs[i]*sizeof(double));
++			for(j=0;j<out_riftsnumpenaltypairs[i];j++)state[j]=FreeEnum;
++			pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
++			mxSetM(pmxa_array2,1);
++			mxSetN(pmxa_array2,out_riftsnumpenaltypairs[i]);
++			mxSetPr(pmxa_array2,state);
++			mexCallMATLAB( 1, &pmxa_array3, 1, &pmxa_array2, "transpose");
++			
++			mxSetField(pmxa_array,i,"state",pmxa_array3);
++		}
++	}
++	else{
++		/*output NaN :*/
++		pNaN=(double*)xmalloc(sizeof(double));
++		*pNaN=NAN;
++		pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++		mxSetM(pmxa_array,1);
++		mxSetN(pmxa_array,1);
++		mxSetPr(pmxa_array,pNaN);
++		
++	}
++	plhs[5]=pmxa_array;
++
++	return;
++}
++
++
++void TriMeshProcessRiftsUsage(void)
++{
++	printf("\n");
++	printf("   usage: [index2,x2,y2,segments2,segmentmarkers2,rifts2]=TriMeshProcessrifts(index1,x1,y1,segments1,segmentmarkers1) \n");
++	printf("      where: (index1,x1,y1,segments1,segmentmarkers1) is an initial triangulation.\n");
++	printf("      index2,x2,y2,segments2,segmentmarkers2,rifts2 is the resulting triangulation where rifts have been processed.\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.h	(revision 12032)
+@@ -0,0 +1,23 @@
++/*!\file:  TriMeshProcessRifts.h
++ * \brief header prototype
++ */ 
++
++#ifndef _TRIMESH_PROCESSRIFTS_H_
++#define _TRIMESH_PROCESSRIFTS_H_
++
++#include "mex.h"
++#include "triangle.h"
++#include "string.h"
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++#include "../../c/EnumDefinitions/EnumDefinitions.h"
++
++void TriMeshProcessRiftsUsage(void);
++#undef __FUNCT__ 
++#define __FUNCT__ "TriMeshProcessRifts"
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 12032)
+@@ -0,0 +1,115 @@
++/*\file Exp2Kml.c
++ *\brief: exp to kml file conversion mex module.
++ */
++#include "./Exp2Kml.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	int i,verbose=1;
++
++	/*input: */
++	char    *filexp=NULL,*filkml=NULL;
++	int     sgn;
++
++	Options* options=NULL;
++	char     *choles=NULL;
++	bool     holes=false;
++	double   cm=0.,sp=0.;
++
++	/* output: */
++	int     iret=0;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	if (nlhs > NLHS) {
++		Exp2KmlUsage();
++		_error_("Exp2Kml usage error");
++	}
++	if (nrhs < NRHS) {
++		Exp2KmlUsage();
++		_error_("Exp2Kml usage error");
++	}
++
++	/*Input datasets: */
++	if (verbose) printf("Fetching inputs:\n");
++	FetchData(&filexp,EXP_IN);
++	if (verbose) printf("  filexp=\"%s\"\n",filexp);
++	FetchData(&filkml,KML_IN);
++	if (verbose) printf("  filkml=\"%s\"\n",filkml);
++	FetchData(&sgn,SGN_IN);
++	if (verbose) printf("  sgn=%d\n",sgn);
++
++	if (verbose) printf("Parsing options:\n");
++	options=new Options(NRHS,nrhs,prhs);
++	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
++	options->Get(&choles,"holes","no");
++	if (!strncmp(choles,"y",1) || !strncmp(choles,"on",2))
++		holes=true;
++	/*  defaults are in Xy2lldef, so don't duplicate them here, and only use user values if both have been specified  */
++	if (options->GetOption("central_meridian") || options->GetOption("standard_parallel")) {
++		options->Get(&cm,"central_meridian");
++		if (verbose) printf("  cm=%g\n",cm);
++		options->Get(&sp,"standard_parallel");
++		if (verbose) printf("  sp=%g\n",sp);
++	}
++
++	/*some checks*/
++	if (verbose) printf("Checking inputs:\n");
++
++	if (sgn != +1 && sgn != -1) _error_("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);
++	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
++	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
++
++	/* Run core computations: */
++	if (verbose) printf("Calling core:\n");
++	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
++		iret=Exp2Kmlx(filexp,filkml,
++					  sgn,cm,sp,
++					  holes);
++	else
++		iret=Exp2Kmlx(filexp,filkml,
++					  sgn,
++					  holes);
++	if (verbose) printf("  iret=%d\n",iret);
++
++	/*Write data: */
++	WriteData(RET_OUT,iret);
++
++	/*Clean-up*/
++	xfree((void**)&choles);
++	delete options;
++	xfree((void**)&filkml);
++	xfree((void**)&filexp);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void Exp2KmlUsage(void)
++{
++	_printf_(true,"Exp2Kml - exp to kml file conversion module:\n");
++	_printf_(true,"\n");
++	_printf_(true,"   This module converts a file from exp to kml format.\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"      [ret]=Exp2Kml(filexp,filkml,sgn,'param name',param,...);\n");
++	_printf_(true,"\n");
++	_printf_(true,"      filexp      file name of exp file to be read (char)\n");
++	_printf_(true,"      filkml      file name of kml file to be written (char)\n");
++	_printf_(true,"      sgn         sign for hemisphere (double, +1 (north) or -1 (south))\n");
++	_printf_(true,"\n");
++	_printf_(true,"      central_meridian     central meridian (double, optional, but must specify with sp)\n");
++	_printf_(true,"      standard_parallel    standard parallel (double, optional, but must specify with cm)\n");
++	_printf_(true,"      holes       flag for treatment of multiple profiles (char, optional, 'yes' for holes))\n");
++	_printf_(true,"\n");
++	_printf_(true,"      ret         return code (non-zero for warning)\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Examples:\n");
++	_printf_(true,"      [ret]=Exp2Kml('file.exp','file.kml', 1);\n");
++	_printf_(true,"      [ret]=Exp2Kml('file.exp','file.kml', 1,'central_meridian',45,'standard_parallel',70,'holes','yes');\n");
++	_printf_(true,"      [ret]=Exp2Kml('file.exp','file.kml',-1,'central_meridian', 0,'standard_parallel',71,'holes','yes');\n");
++	_printf_(true,"\n");
++}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.h	(revision 12032)
+@@ -0,0 +1,36 @@
++/*!\file Exp2Kml.h
++ * \brief: prototype for exp to kml file conversion mex module.
++ */
++
++#ifndef _EXP2KML_H
++#define _EXP2KML_H
++
++/* local prototypes: */
++void Exp2KmlUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "Exp2Kml"
++
++
++/* serial input macros: */
++#define EXP_IN    prhs[0]
++#define KML_IN    prhs[1]
++#define SGN_IN    prhs[2]
++
++/* serial output macros: */
++#define RET_OUT    (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NRHS
++#define NRHS  3
++#undef NLHS
++#define NLHS  1
++
++#endif
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 12032)
+@@ -0,0 +1,106 @@
++/*\file Kml2Exp.c
++ *\brief: kml to exp file conversion mex module.
++ */
++#include "./Kml2Exp.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	int i,verbose=1;
++
++	/*input: */
++	char    *filkml=NULL,*filexp=NULL;
++	int     sgn;
++
++	Options* options=NULL;
++	double   cm=0.,sp=0.;
++
++	/* output: */
++	int     iret=0;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	if (nlhs > NLHS) {
++		Kml2ExpUsage();
++		_error_("Kml2Exp usage error");
++	}
++	if (nrhs < NRHS) {
++		Kml2ExpUsage();
++		_error_("Kml2Exp usage error");
++	}
++
++	/*Input datasets: */
++	if (verbose) printf("Fetching inputs:\n");
++	FetchData(&filkml,KML_IN);
++	if (verbose) printf("  filkml=\"%s\"\n",filkml);
++	FetchData(&filexp,EXP_IN);
++	if (verbose) printf("  filexp=\"%s\"\n",filexp);
++	FetchData(&sgn,SGN_IN);
++	if (verbose) printf("  sgn=%d\n",sgn);
++
++	if (verbose) printf("Parsing options:\n");
++	options=new Options(NRHS,nrhs,prhs);
++	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
++	/*  defaults are in Ll2xydef, so don't duplicate them here, and only use user values if both have been specified  */
++	if (options->GetOption("central_meridian") || options->GetOption("standard_parallel")) {
++		options->Get(&cm,"central_meridian");
++		if (verbose) printf("  cm=%g\n",cm);
++		options->Get(&sp,"standard_parallel");
++		if (verbose) printf("  sp=%g\n",sp);
++	}
++
++	/*some checks*/
++	if (verbose) printf("Checking inputs:\n");
++
++	if (sgn != +1 && sgn != -1) _error_("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);
++	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
++	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
++
++	/* Run core computations: */
++	if (verbose) printf("Calling core:\n");
++	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
++		iret=Kml2Expx(filkml,filexp,
++					  sgn,cm,sp);
++	else
++		iret=Kml2Expx(filkml,filexp,
++					  sgn);
++	if (verbose) printf("  iret=%d\n",iret);
++
++	/*Write data: */
++	WriteData(RET_OUT,iret);
++
++	/*Clean-up*/
++	delete options;
++	xfree((void**)&filexp);
++	xfree((void**)&filkml);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void Kml2ExpUsage(void)
++{
++	_printf_(true,"Kml2Exp - kml to exp file conversion module:\n");
++	_printf_(true,"\n");
++	_printf_(true,"   This module converts a file from kml to exp format.\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"      [ret]=Kml2Exp(filexp,filkml,sgn,'param name',param,...);\n");
++	_printf_(true,"\n");
++	_printf_(true,"      filkml      file name of kml file to be read (char)\n");
++	_printf_(true,"      filexp      file name of exp file to be written (char)\n");
++	_printf_(true,"      sgn         sign for hemisphere (double, +1 (north) or -1 (south))\n");
++	_printf_(true,"\n");
++	_printf_(true,"      central_meridian     central meridian (double, optional, but must specify with sp)\n");
++	_printf_(true,"      standard_parallel    standard parallel (double, optional, but must specify with cm)\n");
++	_printf_(true,"\n");
++	_printf_(true,"      ret         return code (non-zero for warning)\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Examples:\n");
++	_printf_(true,"      [ret]=Kml2Exp('file.kml','file.exp', 1);\n");
++	_printf_(true,"      [ret]=Kml2Exp('file.kml','file.exp', 1,'central_meridian',45,'standard_parallel',70);\n");
++	_printf_(true,"      [ret]=Kml2Exp('file.kml','file.exp',-1,'central_meridian', 0,'standard_parallel',71);\n");
++	_printf_(true,"\n");
++}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.h	(revision 12032)
+@@ -0,0 +1,36 @@
++/*!\file Kml2Exp.h
++ * \brief: prototype for kml to exp file conversion mex module.
++ */
++
++#ifndef _KML2EXP_H
++#define _KML2EXP_H
++
++/* local prototypes: */
++void Kml2ExpUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "Kml2Exp"
++
++
++/* serial input macros: */
++#define KML_IN    prhs[0]
++#define EXP_IN    prhs[1]
++#define SGN_IN    prhs[2]
++
++/* serial output macros: */
++#define RET_OUT    (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NRHS
++#define NRHS  3
++#undef NLHS
++#define NLHS  1
++
++#endif
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.cpp	(revision 12032)
+@@ -0,0 +1,52 @@
++/*! \file  PointCloudFindNeighbors
++    \brief: flag points that are too near one another, within an array of point coordinates
++*/
++	
++#include "./PointCloudFindNeighbors.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
++
++	int i,j;
++
++	/* required input: */
++	double* x=NULL;
++	double* y=NULL;
++	int     nods;
++	double  mindistance;
++	double  multithread;
++
++	/* output: */
++	Vector*  flags=NULL;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&PointCloudFindNeighborsUsage);
++
++	/*Fetch inputs: */
++	FetchData(&x,&nods,NULL,XHANDLE);  
++	FetchData(&y,NULL,NULL,YHANDLE);
++	FetchData(&mindistance,MINDISTANCE);
++	FetchData(&multithread,MULTITHREAD);
++
++	/*Run core routine: */
++	PointCloudFindNeighborsx(&flags,x,y,nods,mindistance,multithread);
++
++	/* output: */
++	WriteData(FLAGS,flags);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void PointCloudFindNeighborsUsage(void){
++	printf("   usage:\n");
++	printf("   [flags]=PointCloudFindNeighbors(x,y,mindistance,multithread);\n\n");
++	printf("   where:\n");
++	printf("      x,y: list of points.\n");
++	printf("      mindistance: minimum distance that should exist between points in the cloud.\n");
++	printf("      multithread: run multithreaded or not. with multithreads, flags can get 1 and 2 values in duplicates.\n");
++	printf("      flags: array of flags (flag==1 means point is within mindistance of another point)\n");
++	printf("\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.h	(revision 12032)
+@@ -0,0 +1,44 @@
++
++/*
++	PointCloudFindNeighbors.h
++*/
++
++
++#ifndef _POINTCLOUDFINDNEIGHBORS_H
++#define _POINTCLOUDFINDNEIGHBORS_H
++
++/* local prototypes: */
++void PointCloudFindNeighborsUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__
++#define __FUNCT__ "PointCloudFindNeighbors"
++
++
++#ifndef ALL
++#define ALL 0
++#endif
++
++/* input macros: */
++#define XHANDLE prhs[0]
++#define YHANDLE prhs[1]
++#define MINDISTANCE prhs[2]
++#define MULTITHREAD prhs[3]
++
++/* serial output macros: */
++#define FLAGS (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS 1
++#undef NRHS
++#define NRHS 4
++
++
++#endif  /* _POINTCLOUDFINDNEIGHBORS_H */
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp	(revision 12032)
+@@ -0,0 +1,47 @@
++/*\file PropagateFlagsFromConnectivity.c
++ *\brief: propagate flags onto mesh, element by element, using connectivity.
++ */
++
++#include "./PropagateFlagsFromConnectivity.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	/*input/output datasets: */
++	double* connectivity=NULL;
++	int     nel;
++	double* pool=NULL;
++	double* flags=NULL;
++	int     index;
++	int     dummy;
++	
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&PropagateFlagsFromConnectivityUsage);
++        
++	/*Input datasets: */
++	FetchData(&connectivity,&nel,&dummy,CONNECTIVITY);
++	FetchData(&pool,&dummy,POOL);
++	FetchData(&index,INDEX);
++	FetchData(&flags,&dummy,FLAGS);
++
++	/*!Generate internal degree of freedom numbers: */
++	PropagateFlagsFromConnectivityx(pool,connectivity,index,flags);
++
++	/*write output datasets: */
++	WriteData(POOLOUT,pool,nel);
++
++	/*Free ressources: */
++	xfree((void**)&connectivity);
++	xfree((void**)&flags);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void PropagateFlagsFromConnectivityUsage(void) {
++	printf("\n");
++	printf("   usage: [pool] = %s(connectivity,pool,index,flags);\n",__FUNCT__);
++	printf("\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h	(revision 12032)
+@@ -0,0 +1,40 @@
++
++/*
++	PropagateFlagsFromConnectivity.h
++*/
++
++
++#ifndef _PROPAGATEFLAGSFROMCONNECTIVITY_H
++#define _PROPAGATEFLAGSFROMCONNECTIVITY_H
++
++/* local prototypes: */
++void PropagateFlagsFromConnectivityUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "PropagateFlagsFromConnectivity"
++
++/* serial input macros: */
++#define CONNECTIVITY (mxArray*)prhs[0]
++#define POOL (mxArray*)prhs[1]
++#define INDEX (mxArray*)prhs[2]
++#define FLAGS (mxArray*)prhs[3]
++
++/* serial output macros: */
++#define POOLOUT (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++#undef NRHS
++#define NRHS  4
++
++
++#endif  /* _PROPAGATEFLAGSFROMCONNECTIVITY_H */
++
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.cpp	(revision 12032)
+@@ -0,0 +1,322 @@
++/*
++ * TriMeshRifts: out of a domain outline file ( Argus format ), 
++ * use the Triangle package to create a triangular mesh 
++ *
++ */
++
++#include "./TriMeshRifts.h"
++
++void mexFunction(	int nlhs, mxArray* plhs[],
++					int nrhs, const mxArray* prhs[] )
++{
++
++
++	/*Matlab arrays: */
++	mxArray* pmxa_array=NULL;
++	int i,j;
++	int counter,counter2,backcounter;
++	int prhs_counter;
++	
++	/* returned quantities: */
++
++	double* index=NULL;
++	double* x=NULL;
++	double* y=NULL;
++	double* segments=NULL;
++	double*    segmentmarkerlist=NULL;
++
++	/* input: */
++	char*  domainname=NULL;
++	char*  riftname=NULL;
++	double area;
++	char*  order=NULL;
++	
++	/*Domain outline variables: */
++	int      nprof;
++	int*     profnvertices=NULL;
++	double** pprofx=NULL;
++	double** pprofy=NULL;
++	double*  xprof=NULL;
++	double*  yprof=NULL;
++	int      numberofpoints;
++
++	/*Rift outline variables: */
++	int      numrifts;
++	int*     riftsnumvertices=NULL;
++	double** riftsverticesx=NULL;
++	double** riftsverticesy=NULL;
++
++	/* Triangle structures: */
++	struct triangulateio in,out;
++	char   options[256];
++
++	/* verify correct usage: */
++	if (nlhs==0 && nrhs==0) {
++		/* special case: */
++		TriMeshRiftsUsage();
++		return;
++	}
++
++	if (!(  (nlhs==5) ||(nrhs==2) || (nrhs==3)  || (nrhs==4) )){
++		mexPrintf("   %s format error.\n", __FUNCT__);
++		TriMeshRiftsUsage();
++		printf("   ");
++		mexErrMsgTxt(" ");
++	}
++
++	/*Fetch data needed by Triangle: */
++
++	prhs_counter=0;
++	/*First recover the domain outline file name: */
++	if (!mxIsChar(prhs[prhs_counter])){
++		mexPrintf("%s%s\n",__FUNCT__," error message; first argument should be the domain outline file name!");
++		mexErrMsgTxt(" ");
++	}
++	domainname = (char *) mxMalloc((mxGetN(prhs[prhs_counter])+1)*sizeof(char));
++	mxGetString(prhs[prhs_counter],domainname,mxGetN(prhs[prhs_counter])+1);
++
++	/*Look for optional rifts file name: */
++	prhs_counter++;
++	if (mxIsChar(prhs[prhs_counter])){
++		riftname = (char *) mxMalloc((mxGetN(prhs[prhs_counter])+1)*sizeof(char));
++		mxGetString(prhs[prhs_counter],riftname,mxGetN(prhs[prhs_counter])+1);
++		prhs_counter++;
++	}
++
++	/*Recover the mesh density desired:*/
++	area=mxGetScalar(prhs[prhs_counter]);
++
++	/*Optionaly, recover desired order: */
++	prhs_counter++;
++	if (mxIsChar(prhs[prhs_counter])){
++		order = (char *) mxMalloc((mxGetN(prhs[prhs_counter])+1)*sizeof(char));
++		mxGetString(prhs[prhs_counter],order,mxGetN(prhs[prhs_counter])+1);
++	}
++	
++	/*Start reading the domain outline file: */
++	if(!DomainOutlineRead(&nprof,&profnvertices,&pprofx,&pprofy,NULL,domainname,false)){
++		printf("%s%s%s\n",__FUNCT__," error message reading domain outline ",domainname);
++		mexErrMsgTxt(" ");
++	}
++
++	/*Read rifts file if present: */
++	if(riftname){
++		if(!DomainOutlineRead(&numrifts,&riftsnumvertices,&riftsverticesx,&riftsverticesy,NULL,riftname,false)){
++			printf("%s%s%s\n",__FUNCT__," error message reading rifts outline ",riftname);
++			mexErrMsgTxt(" ");
++		}
++	}
++
++	/*Create initial triangulation to call triangulate():*/
++	numberofpoints=0;
++	for (i=0;i<nprof;i++){
++		numberofpoints+=profnvertices[i];
++	}
++	if (riftname){
++		for (i=0;i<numrifts;i++){
++			numberofpoints+=riftsnumvertices[i];
++		}
++	}
++	in.numberofpoints=numberofpoints;
++
++	in.numberofpointattributes=1;
++	in.pointlist = (REAL *) mxMalloc(in.numberofpoints * 2 * sizeof(REAL));
++
++	counter=0;
++	for (i=0;i<nprof;i++){
++		xprof=pprofx[i];
++		yprof=pprofy[i];
++		for (j=0;j<profnvertices[i];j++){
++			in.pointlist[2*counter+0]=xprof[j];
++			in.pointlist[2*counter+1]=yprof[j];
++			counter++;
++		}
++	}
++	if(riftname){
++		for (i=0;i<numrifts;i++){
++			xprof=riftsverticesx[i];
++			yprof=riftsverticesy[i];
++			for (j=0;j<riftsnumvertices[i];j++){
++				in.pointlist[2*counter+0]=xprof[j];
++				in.pointlist[2*counter+1]=yprof[j];
++				counter++;
++			}
++		}
++	}
++	
++	in.pointattributelist = (REAL *) mxMalloc(in.numberofpoints *
++										  in.numberofpointattributes *
++										  sizeof(REAL));
++	for (i=0;i<in.numberofpoints;i++){
++		in.pointattributelist[i] = 0.0;
++	}
++	in.pointmarkerlist = (int *) mxMalloc(in.numberofpoints * sizeof(int));
++	for(i=0;i<in.numberofpoints;i++){
++		in.pointmarkerlist[i] = 0;
++	}
++
++	/*Build segments: */
++	/*Figure out number of segments: holes and closed outlines have as many segments as vertices, 
++	 *for rifts, we have one less segment as we have vertices*/
++	in.numberofsegments=0;
++	for (i=0;i<nprof;i++){
++		in.numberofsegments+=profnvertices[i];
++	}
++	if (riftname){
++		for (i=0;i<numrifts;i++){
++			in.numberofsegments+=riftsnumvertices[i]-1;
++		}
++	}
++	
++	in.segmentlist = (int *) mxMalloc(in.numberofsegments * 2 * sizeof(int));
++	in.segmentmarkerlist = (int *) mxCalloc(in.numberofsegments,sizeof(int));
++	counter=0;
++	backcounter=0;
++	for (i=0;i<nprof;i++){
++		for (j=0;j<(profnvertices[i]-1);j++){
++			in.segmentlist[2*counter+0]=counter;
++			in.segmentlist[2*counter+1]=counter+1;
++			in.segmentmarkerlist[counter]=0;
++			counter++;
++		}
++		/*Close this profile: */
++		 in.segmentlist[2*counter+0]=counter;
++		 in.segmentlist[2*counter+1]=backcounter;
++		 in.segmentmarkerlist[counter]=0;
++		 counter++;
++		 backcounter=counter;
++	}
++	counter2=counter;
++	if(riftname){
++		for (i=0;i<numrifts;i++){
++			for (j=0;j<(riftsnumvertices[i]-1);j++){
++				in.segmentlist[2*counter2+0]=counter;
++				in.segmentlist[2*counter2+1]=counter+1;
++				in.segmentmarkerlist[counter2]=2+i;
++				counter2++;
++				counter++;
++			}
++			counter++;
++		}
++	}
++
++	
++	/*Build regions: */
++	in.numberofregions = 0;
++
++	/*Build holes: */
++	in.numberofholes = nprof-1; /*everything is a hole, but for the first profile.*/
++	in.holelist = (REAL *) mxMalloc(in.numberofholes * 2 * sizeof(REAL));
++	for (i=0;i<nprof-1;i++){
++		/*We are looking for a vertex that lies inside the hole: */
++		GridInsideHole(&in.holelist[2*i+0],&in.holelist[2*i+1],profnvertices[i+1],pprofx[i+1],pprofy[i+1]);
++	}
++
++	/* Make necessary initializations so that Triangle can return a */
++	/*   triangulation in `out': */
++
++	out.pointlist = (REAL *) NULL;            
++	out.pointattributelist = (REAL *) NULL;
++	out.pointmarkerlist = (int *) NULL; 
++	out.trianglelist = (int *) NULL;          
++	out.triangleattributelist = (REAL *) NULL;
++	out.neighborlist = (int *) NULL;         
++	out.segmentlist = (int *) NULL;
++	out.segmentmarkerlist = (int *) NULL;
++	out.edgelist = (int *) NULL;             
++	out.edgemarkerlist = (int *) NULL;   
++
++	/* Triangulate the points:.  Switches are chosen to read and write a  */
++	/*   PSLG (p), preserve the convex hull (c), number everything from  */
++	/*   zero (z), assign a regional attribute to each element (A), and  */
++	/*   produce an edge list (e), a Voronoi diagram (v), and a triangle */
++	/*   neighbor list (n).                                              */
++
++	sprintf(options,"%s%lf","pQzDq30ia",area); /*replace V by Q to quiet down the logging*/
++  
++	triangulate(options, &in, &out, NULL);
++	/*report(&out, 0, 1, 1, 1, 1, 0);*/
++
++	/*Allocate index, x and y: */
++	index=(double*)mxMalloc(3*out.numberoftriangles*sizeof(double));
++	x=(double*)mxMalloc(out.numberofpoints*sizeof(double));
++	y=(double*)mxMalloc(out.numberofpoints*sizeof(double));
++	segments=(double*)mxMalloc(3*out.numberofsegments*sizeof(double));
++	segmentmarkerlist=(double*)mxMalloc(out.numberofsegments*sizeof(double));
++
++	for (i = 0; i < out.numberoftriangles; i++) {
++		for (j = 0; j < out.numberofcorners; j++) {
++			*(index+3*i+j)=(double)out.trianglelist[i * out.numberofcorners + j]+1;
++		}
++	}
++	for (i = 0; i < out.numberofpoints; i++) {
++		x[i]=out.pointlist[i * 2 + 0];
++		y[i]=out.pointlist[i * 2 + 1];
++	}
++	
++	for (i = 0; i < out.numberofsegments; i++) {
++		segments[3*i+0]=(double)out.segmentlist[i*2+0]+1;
++		segments[3*i+1]=(double)out.segmentlist[i*2+1]+1;
++		segmentmarkerlist[i]=(double)out.segmentmarkerlist[i];
++	}
++
++	/*Associate elements with segments: */
++	AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles);
++
++	/*Order segments so that their normals point outside the domain: */
++	if(!strcmp(order,"yes")){
++		OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
++	}
++
++	/*Output : */
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,3);
++	mxSetN(pmxa_array,out.numberoftriangles);
++	mxSetPr(pmxa_array,index);
++	mexCallMATLAB( 1, &plhs[0], 1, &pmxa_array, "transpose");
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,1);
++	mxSetN(pmxa_array,out.numberofpoints);
++	mxSetPr(pmxa_array,x);
++	mexCallMATLAB( 1, &plhs[1], 1, &pmxa_array, "transpose");
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,1);
++	mxSetN(pmxa_array,out.numberofpoints);
++	mxSetPr(pmxa_array,y);
++	mexCallMATLAB( 1, &plhs[2], 1, &pmxa_array, "transpose");
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,3);
++	mxSetN(pmxa_array,out.numberofsegments);
++	mxSetPr(pmxa_array,segments);
++	mexCallMATLAB( 1, &plhs[3], 1, &pmxa_array, "transpose");
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,1);
++	mxSetN(pmxa_array,out.numberofsegments);
++	mxSetPr(pmxa_array,segmentmarkerlist);
++	mexCallMATLAB( 1, &plhs[4], 1, &pmxa_array, "transpose");
++	
++	return;
++}
++
++void TriMeshRiftsUsage(void)
++{
++	printf("\n");
++	printf("   usage: [index,x,y,segments,segmentmarkers]=TriMeshRifts(domainoutlinefilename,riftsoutlinename,area,ordered) \n");
++	printf("      where: index,x,y defines a triangulation, segments is an array made \n");
++	printf("      of exterior segments to the mesh domain outline, segmentmarkers is an array flagging each segment \n");
++	printf("      (if rifts are present, markers >=2 flag them ), outlinefilename an Argus domain outline file.\n");
++	printf("      riftsoutlinename is an Argus domain file, defining rifts (ie: open profiles), \n");
++	printf("      area is the maximum area desired for any element of the resulting mesh. \n");
++	printf("      and ordered is a string ('yes' or 'no') that determines whether segments are output in the \n");
++	printf("      order they are made by Triangle (ie none), or ordered counter clockwise around the domain outline.\n");
++	printf("      riftsoutlinename and ordered are optional arguments.\n");
++	printf("\n");
++}
++
++
++
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.h	(revision 12032)
+@@ -0,0 +1,23 @@
++/*!\file:  TriMeshRifts.h
++ * \brief header prototype
++ */ 
++
++#ifndef _TRIMESHRIFTS_H_
++#define _TRIMESHRIFTS_H_
++
++#include "mex.h"
++#include "triangle.h"
++#include "string.h"
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++void TriMeshRiftsUsage(void);
++
++#undef __FUNCT__ 
++#define __FUNCT__ "TriMeshRifts"
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp	(revision 12032)
+@@ -0,0 +1,66 @@
++/*\file TriaSearch.c
++ *\brief: TriaSearch module. See TriaSearchx for more details.
++ */
++#include "./TriaSearch.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	int i;
++
++	/*input: */
++	double* index=NULL;
++	int     nel;
++	int     dummy;
++
++	double* x=NULL;
++	double* y=NULL;
++	int     nods;
++
++	double* x0=NULL;
++	double* y0=NULL;
++	int     numberofnodes;
++
++	/* output: */
++	double*  tria=NULL;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&TriaSearchUsage);
++
++	/*Input datasets: */
++	FetchData(&index,&nel,&dummy,INDEXHANDLE);
++	FetchData(&x,&nods,XHANDLE);
++	FetchData(&y,&nods,YHANDLE);
++	FetchData(&x0,&numberofnodes,X0HANDLE);
++	FetchData(&y0,&numberofnodes,Y0HANDLE);
++
++	/* Echo: {{{1*/
++	//printf("(x0,y0)=(%g,%g)\n",x0,y0);
++	/*}}}*/
++
++	/* Run core computations: */
++	TriaSearchx(&tria,index,nel,x,y,nods,x0,y0,numberofnodes);
++
++	/* c to matlab: */
++	for(i=0;i<numberofnodes;i++)tria[i]++;
++
++	/*Write data: */
++	WriteData(TRIA,tria,numberofnodes);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void TriaSearchUsage(void)
++{
++	_printf_(true,"TriaSearch- find triangle holding a point (x0,y0) in a mesh\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"         tria=TriaSearch(index,x,y,x0,y0);\n");
++	_printf_(true,"      index,x,y: mesh triangulatrion\n");
++	_printf_(true,"      x0,y0: coordinates of the point for which we are trying to find a triangle\n");
++	_printf_(true,"      x0,y0 can be an array of points\n");
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriaSearch/TriaSearch.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriaSearch/TriaSearch.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriaSearch/TriaSearch.h	(revision 12032)
+@@ -0,0 +1,37 @@
++/*!\file TriaSearch.h
++ */
++
++#ifndef _TRIASEARCH_H
++#define _TRIASEARCH_H
++
++/* local prototypes: */
++void TriaSearchUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "TriaSearch"
++
++
++/* serial input macros: */
++#define INDEXHANDLE prhs[0]
++#define XHANDLE prhs[1]
++#define YHANDLE prhs[2]
++#define X0HANDLE prhs[3]
++#define Y0HANDLE prhs[4]
++
++/* serial output macros: */
++#define TRIA (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++
++#undef NRHS
++#define NRHS  5
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InternalFront/InternalFront.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 12032)
+@@ -0,0 +1,99 @@
++/*\file InternalFront.c
++ *\brief: build pressureload
++ */
++
++#include "./InternalFront.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	bool*   elementonwater=NULL;
++	int*    elements=NULL;
++	int*    connectivity=NULL;
++	int*    elementconnectivity=NULL;
++	int*    front=NULL;
++	double* front2=NULL;
++	bool    found;
++	int     numberofelements,numberofsegments;
++	int     N,M;
++	int     i,j,ii,jj,id;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&InternalFrontUsage);
++
++	/*Fetch required fields*/
++	FetchData(&numberofelements,mxGetAssignedField(MODEL,0,"numberofelements"));
++	if(numberofelements<=0) _error_("No elements found in the model");
++	FetchData(&elements,&M,&N,mxGetAssignedField(MODEL,0,"elements"));
++	if(M!=numberofelements || N!=3) _error_("Field 'elements' should be of size [md.numberofelements 3]");
++	FetchData(&elementonwater,&M,&N,mxGetAssignedField(MODEL,0,"elementonwater"));
++	if(M!=numberofelements || N!=1) _error_("Field 'elementonwater' should be of size [md.numberofelements 1]");
++	FetchData(&elementconnectivity,&M,&N,mxGetAssignedField(MODEL,0,"elementconnectivity"));
++	if(M!=numberofelements || N!=3) _error_("Field 'elementconnectivity' should be of size [md.numberofelements 3]");
++
++	/*Allocate and initialize all variables*/
++	numberofsegments=0;
++	front=(int*)xmalloc(3*numberofelements*4*sizeof(int));
++
++	/*Loop over all elements on water*/
++	for(i=0;i<numberofelements;i++){
++
++		/*Skip if on water*/
++		if(!elementonwater[i]) continue;
++
++		/*Loop over all three adjacent elements*/
++		for(j=0;j<3;j++){
++
++			/*Skip if adjacent element does not exist or is on water*/
++			id=elementconnectivity[i*3+j];
++			if(id==0) continue;
++			if(elementonwater[id-1]) continue;
++
++			/*We have an ice front to add here, let's go!*/
++			for(ii=0;ii<3;ii++){
++
++				found=false;
++				for(jj=0;jj<3;jj++){
++					if(elements[(id-1)*3+ii]==elements[i*3+jj]){
++						found=true;
++						break;
++					}
++				}
++
++				/*OK, we just found the node of id, which is not in i. We have the segment*/
++				if(!found){
++					front[numberofsegments*4+0]=elements[(id-1)*3+(ii+1)%3];
++					front[numberofsegments*4+1]=elements[(id-1)*3+(ii+2)%3];
++					front[numberofsegments*4+2]=id;
++					front[numberofsegments*4+3]=IceEnum;
++					numberofsegments+=1;
++					break;
++				}
++			}
++
++			/*In debugging mode, check that the segment has been found*/
++			_assert_(!found);
++		}
++	}
++
++	/*Now that we know how many segments there is we can allocate the final matrix*/
++	if(numberofsegments){
++		front2=(double*)xmalloc(4*numberofsegments*sizeof(double));
++		for(i=0;i<4*numberofsegments;i++) front2[i]=(double)front[i];
++	}
++	xfree((void**)&front);
++
++	/*write output datasets: */
++	WriteData(FRONT,front2,numberofsegments,4);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void InternalFrontUsage(void) {
++	_printf_(true,"\n");
++	_printf_(true,"   usage: icefront = %s(md);\n",__FUNCT__);
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InternalFront/InternalFront.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InternalFront/InternalFront.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InternalFront/InternalFront.h	(revision 12032)
+@@ -0,0 +1,33 @@
++
++/*
++	InternalFront.h
++*/
++
++
++#ifndef _INTERNALFRONT_H
++#define _INTERNALFRONT_H
++
++/* local prototypes: */
++void InternalFrontUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++#include "../../c/io/io.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "InternalFront"
++
++/* serial input macros: */
++#define MODEL (mxArray*)prhs[0]
++
++/* serial output macros: */
++#define FRONT (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++#undef NRHS
++#define NRHS  1
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp	(revision 12032)
+@@ -0,0 +1,104 @@
++/*!\file:  MeshPartition.cpp
++ * \brief: partition mesh according to number of areas, using Metis library.
++
++	usage:
++	[element_partitioning,node_partitioning]=MeshPartition(model,numareas)
++	
++	%Info needed from model are the following: 
++	%mesh info: 
++	numberofelements,numberofvertices,elements,elements_width
++	%Non-extruded 2d mesh info
++	nel2d,nods2d,elements2d,
++	%Extruded 2d mesh info
++	nel2d_ext,nods2d_ext,elements2d_ext,
++	%Diverse
++	numberoflayers,dim)
++
++	output:
++	vector of partitioning area numbers, for every element.
++	vector of partitioning area numbers, for every node.
++*/
++	
++#include "./MeshPartition.h"
++
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
++
++
++	/*Indexing: */
++	int i,j;
++
++	/* required input: */
++	int     dim;
++	int     numberofelements;
++	int     numberofvertices;
++	double *elements         = NULL;
++	int     elements_width;
++
++	int numberofelements2d;
++	int numberofvertices2d;
++	double* elements2d=NULL;
++
++	int numberoflayers;
++	int numareas=1;
++
++	/* output: */
++	int    *int_element_partitioning = NULL;
++	int    *int_node_partitioning    = NULL;
++	double *element_partitioning     = NULL;
++	double *node_partitioning        = NULL;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&MeshPartitionUsage);
++
++	/*Fetch data: */
++	FetchData(&dim,mxGetAssignedField(MODEL,0,"dimension"));
++	FetchData(&numberofelements,mxGetAssignedField(MODEL,0,"numberofelements"));
++	FetchData(&numberofvertices,mxGetAssignedField(MODEL,0,"numberofvertices"));
++	FetchData(&elements,NULL,&elements_width,mxGetAssignedField(MODEL,0,"elements"));
++
++	if (dim==3){
++		FetchData(&numberofelements2d,mxGetAssignedField(MODEL,0,"numberofelements2d"));
++		FetchData(&numberofvertices2d,mxGetAssignedField(MODEL,0,"numberofvertices2d"));
++		FetchData(&elements2d,NULL,NULL,mxGetAssignedField(MODEL,0,"elements2d"));
++	}
++	FetchData(&numberoflayers,mxGetAssignedField(MODEL,0,"numberoflayers"));
++	FetchData(&numareas,NUMAREAS);
++
++	/*Run partitioning algorithm based on a "clever" use of the Metis partitioner: */
++	MeshPartitionx(&int_element_partitioning,&int_node_partitioning,numberofelements,numberofvertices,elements,
++		numberofelements2d,numberofvertices2d,elements2d,numberoflayers,elements_width,dim,numareas);
++
++	/*Post process node_partitioning and element_partitioning to be in double format. Metis needed them in int* format: */
++	element_partitioning=(double*)xmalloc(numberofelements*sizeof(double));
++	for (i=0;i<numberofelements;i++){
++		element_partitioning[i]=(double)int_element_partitioning[i]+1; //Metis indexing from 0, matlab from 1.
++	}
++	
++	node_partitioning=(double*)xmalloc(numberofvertices*sizeof(double));
++	for (i=0;i<numberofvertices;i++){
++		node_partitioning[i]=(double)int_node_partitioning[i]+1; //Metis indexing from 0, matlab from 1.
++	}
++
++	/*Write data:*/
++	WriteData(ELEMENTPARTITIONING,element_partitioning,numberofelements);
++	WriteData(NODEPARTITIONING,node_partitioning,numberofvertices);
++	
++	/*Free ressources:*/
++	//don't! let matlab do it.
++
++	/*end module: */
++	MODULEEND();
++}
++
++void MeshPartitionUsage(void){
++	printf("   usage:\n");
++	printf("   [element_partitioning,node_partitioning]=MeshPartition(md.mesh,numpartitions)");
++	printf("   where:\n");
++	printf("      element_partitioning is a vector of partitioning area numbers, for every element.\n");
++	printf("      node_partitioning is a vector of partitioning area numbers, for every node.\n");
++	printf("\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshPartition/MeshPartition.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshPartition/MeshPartition.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshPartition/MeshPartition.h	(revision 12032)
+@@ -0,0 +1,41 @@
++
++/*
++	MeshPartition.h
++*/
++
++
++#ifndef _MESHPARTITION_H
++#define _MESHPARTITION_H
++
++/* local prototypes: */
++void MeshPartitionUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef CLEANUP
++#define CLEANUP MeshPartitionLocalCleanup();
++
++#undef __FUNCT__ 
++#define __FUNCT__  "MeshPartition"
++
++/* serial input macros: */
++#define MODEL (mxArray*)prhs[0]
++#define NUMAREAS (mxArray*)prhs[1]
++
++/* serial output macros: */
++#define ELEMENTPARTITIONING (mxArray**)&plhs[0]
++#define NODEPARTITIONING (mxArray**)&plhs[1]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  2
++#undef NRHS
++#define NRHS  2
++
++
++#endif  /* _MESHPARTITION_H */
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12032)
+@@ -0,0 +1,169 @@
++/*!\file InterpFromMesh2d.c
++ * \brief: data interpolation from a list of (x,y,values) into mesh vertices
++ 
++	InterpFromMesh2d.c
++
++	usage:
++	data_mesh=InterpFromMesh2d(index,x,y,data,x_mesh,y_mesh);
++	
++	where:
++
++		input:
++		x,y: coordinates of matrix data
++		data - matrix holding the data to be interpolated onto the mesh.
++		x_mesh,y_mesh: coordinates of the mesh vertices onto which we interpolate.
++		
++		output: 
++		data_mesh:  vector of mesh interpolated data.
++
++*/
++	
++#include "./InterpFromMesh2d.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
++
++	/*input: */
++	double* index_data=NULL;
++	int     index_data_rows;
++	int     dummy;
++
++	double* x_data=NULL;
++	int     x_data_rows;
++	
++	double* y_data=NULL;
++	int     y_data_rows;
++
++	double* data=NULL; 
++	int     data_rows;
++	int     data_cols;
++
++	double* x_prime=NULL;
++	double* y_prime=NULL;
++	
++	int     x_prime_rows;
++	int     y_prime_rows;
++
++
++	double* default_values=NULL;
++	int     num_default_values=0;
++
++	//contours
++	mxArray*  matlabstructure=NULL;
++	Contour** contours=NULL;
++	int       numcontours;
++	Contour*  contouri=NULL;
++	int       i;
++
++	/*Intermediary*/
++	int nods_data;
++	int nels_data;
++	int nods_prime;
++
++	/* output: */
++	Vector*  data_prime=NULL;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	if(nlhs!=NLHS){
++		InterpFromMesh2dUsage();
++		_error_("InterpFromMeshToMesh2dUsage usage error");
++	}
++	if((nrhs!=6) && (nrhs!=7) && (nrhs!=8)){
++		InterpFromMesh2dUsage();
++		_error_("InterpFromMeshToMesh2dUsage usage error");
++	}
++
++	/*Input datasets: */
++	FetchData(&index_data,&index_data_rows,&dummy,INDEXHANDLE);
++	FetchData(&x_data,&x_data_rows,NULL,XHANDLE);
++	FetchData(&y_data,&y_data_rows,NULL,YHANDLE);
++	FetchData(&data,&data_rows,&data_cols,DATAHANDLE);
++	FetchData(&x_prime,&x_prime_rows,NULL,XPRIMEHANDLE);
++	FetchData(&y_prime,&y_prime_rows,NULL,YPRIMEHANDLE);
++
++	if(nrhs>=7){
++		/*default values: */
++		FetchData(&default_values,&num_default_values,DEFAULTHANDLE);
++	}
++	else{
++		default_values=NULL;
++		num_default_values=0;
++	}
++
++	if(nrhs>=8){
++		
++		/*Call expread on filename to build a contour array in the matlab workspace: */
++		mexCallMATLAB( 1, &matlabstructure, 1, (mxArray**)&FILENAME, "expread");
++
++		/*contours: */
++		numcontours=mxGetNumberOfElements(matlabstructure);
++		contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
++		for(i=0;i<numcontours;i++){
++			//allocate
++			contouri=(Contour*)xmalloc(sizeof(Contour));
++			//retrieve dimension of this contour.
++			contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
++			//set pointers.
++			contouri->x=mxGetPr(mxGetField(matlabstructure,i,"x"));
++			contouri->y=mxGetPr(mxGetField(matlabstructure,i,"y"));
++			*(contours+i)=contouri;
++		}
++
++		/* Debugging of contours :{{{1*/
++		/*for(i=0;i<numcontours;i++){
++		  printf("\nContour echo: contour number  %i / %i\n",i+1,numcontours);
++		  contouri=*(contours+i);
++		  printf("   Number of vertices %i\n",contouri->nods);
++		  for (j=0;j<contouri->nods;j++){
++		  printf("   %lf %lf\n",*(contouri->x+j),*(contouri->y+j));
++		  }
++		  }*/
++		/*}}}*/
++	}
++	else{
++		numcontours=0;
++		contours=NULL;
++	}
++
++
++	/*some checks*/
++	if (x_data_rows!=y_data_rows){
++		_error_("vectors x and y should have the same length!");
++	}
++	if (x_prime_rows!=y_prime_rows){
++		_error_("vectors x_prime and y_prime should have the same length!");
++	}
++	
++	/*get number of elements and number of nodes in the data*/
++	nels_data=index_data_rows;
++	nods_data=x_data_rows;
++	nods_prime=x_prime_rows;
++
++	/* Run core computations: */
++	InterpFromMesh2dx(&data_prime,index_data,x_data,y_data,nods_data,nels_data,data,data_rows,x_prime,y_prime,nods_prime,default_values,num_default_values,contours,numcontours);
++
++	/*Write data: */
++	WriteData(DATAPRIME,data_prime);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void InterpFromMesh2dUsage(void)
++{
++	_printf_(true,"   usage:\n");
++	_printf_(true,"         data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime);\n\n");
++	_printf_(true,"      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value);\n\n");
++	_printf_(true,"      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value,contourname);\n\n");
++	_printf_(true,"   where:\n");
++	_printf_(true,"      x,y: coordinates of the nodes where data is defined\n");
++	_printf_(true,"      index: index of the mesh where data is defined\n");
++	_printf_(true,"      data - vector holding the data to be interpolated onto the points.\n");
++	_printf_(true,"      x_prime,y_prime: coordinates of the mesh vertices onto which we interpolate.\n");
++	_printf_(true,"      default_value: a scalar or vector of size length(x_prime).\n");
++	_printf_(true,"      contourname: linear interpolation will happen on all x_interp,y_interp inside the contour, default value will be adopted on the rest of the mesh.\n");
++	_printf_(true,"      data_prime:  vector of prime interpolated data.\n");
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.h	(revision 12032)
+@@ -0,0 +1,40 @@
++/*!\file InterpFromMesh2d.h
++ * \brief: prototype for Data Interpolation mex module.
++ */
++
++#ifndef _INTERPFROMMESH2D_H
++#define _INTERPFROMMESH2D_H
++
++/* local prototypes: */
++void InterpFromMesh2dUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "InterpFromMesh2d"
++
++#undef CLEANUP
++#define CLEANUP InterpFromMesh2dLocalCleanup();
++
++/* serial input macros: */
++#define INDEXHANDLE prhs[0]
++#define XHANDLE prhs[1]
++#define YHANDLE prhs[2]
++#define DATAHANDLE prhs[3]
++#define XPRIMEHANDLE prhs[4]
++#define YPRIMEHANDLE prhs[5]
++#define DEFAULTHANDLE prhs[6]
++#define FILENAME prhs[7]
++
++/* serial output macros: */
++#define DATAPRIME (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++
++#endif  /* _INTERPFROMMESH2D_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp	(revision 12032)
+@@ -0,0 +1,46 @@
++/*\file ElementConnectivity.c
++ *\brief: build element connectivity using node connectivity and elements. 
++ */
++
++#include "./ElementConnectivity.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	/*inputs: */
++	double* elements=NULL;
++	double* nodeconnectivity=NULL;
++	int     nel,nods;
++	int     width;
++
++	/*outputs: */
++	double* elementconnectivity=NULL;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ElementConnectivityUsage);
++        
++	/*Input datasets: */
++	FetchData(&elements,&nel,NULL,ELEMENTS);
++	FetchData(&nodeconnectivity,&nods,&width,NODECONNECTIVITY);
++
++	/*!Generate internal degree of freedom numbers: */
++	ElementConnectivityx(&elementconnectivity, elements,nel, nodeconnectivity, nods, width);
++
++	/*write output datasets: */
++	WriteData(ELEMENTCONNECTIVITY,elementconnectivity,nel,3);
++
++	/*Free ressources: */
++	xfree((void**)&elements);
++	xfree((void**)&nodeconnectivity);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void ElementConnectivityUsage(void) {
++	_printf_(true,"\n");
++	_printf_(true,"   usage: elementconnectivity = %s(elements, nodeconnectivity);\n",__FUNCT__);
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.h	(revision 12032)
+@@ -0,0 +1,33 @@
++/*
++	ElementConnectivity.h
++*/
++
++#ifndef _ELEMENTCONNECTIVITY_H
++#define _ELEMENTCONNECTIVITY_H
++
++/* local prototypes: */
++void ElementConnectivityUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "ElementConnectivity"
++
++/* serial input macros: */
++#define ELEMENTS (mxArray*)prhs[0]
++#define NODECONNECTIVITY (mxArray*)prhs[1]
++
++/* serial output macros: */
++#define ELEMENTCONNECTIVITY (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++#undef NRHS
++#define NRHS  2
++
++#endif  /* _ELEMENTCONNECTIVITY_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/EnumToString/EnumToString.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/EnumToString/EnumToString.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/EnumToString/EnumToString.cpp	(revision 12032)
+@@ -0,0 +1,32 @@
++/*\file EnumToString.c
++ *\brief:convert enum (int) to string
++ */
++
++#include "./EnumToString.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	char    *name    = NULL;
++	int      enum_in;
++
++	/*checks on arguments on the matlab side: */
++	if(nrhs!=NRHS){
++		EnumToStringUsage(); _error_(" usage. See above");
++	}
++
++	/*Fetch inputs: */
++	FetchData(&enum_in,ENUMIN);
++
++	/*Run core function: */
++	EnumToStringx(&name,enum_in);
++
++	/* output: */
++	WriteData(NAME,name);
++}
++
++void EnumToStringUsage(void)
++{
++	_printf_(true,"\n");
++	_printf_(true,"   usage: %sstring = EnumToString(enum);\n",__FUNCT__);
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/EnumToString/EnumToString.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/EnumToString/EnumToString.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/EnumToString/EnumToString.h	(revision 12032)
+@@ -0,0 +1,32 @@
++/*!\file:  EnumToString.h
++ * \brief header file for EnumToString module.
++ */ 
++
++#ifndef _ENUMTOSTRING_H
++#define _ENUMTOSTRING_H
++
++/* local prototypes: */
++void EnumToStringUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++    
++/* serial input macros: */
++#define ENUMIN (mxArray*)prhs[0]
++
++/* serial output macros: */
++#define NAME (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++#undef NRHS
++#define NRHS  1
++
++#undef __FUNCT__ 
++#define __FUNCT__  "EnumToString"
++
++#endif  /* _TEST_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp	(revision 12032)
+@@ -0,0 +1,32 @@
++/*\file StringToEnum.c
++ *\brief:convert enum (int) to string
++ */
++
++#include "./StringToEnum.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	char    *name    = NULL;
++	int      enum_out;
++
++	/*checks on arguments on the matlab side: */
++	if(nrhs!=NRHS){
++		StringToEnumUsage(); _error_(" usage. See above");
++	}
++
++	/*Fetch inputs: */
++	FetchData(&name,NAME);
++
++	/*Run core function: */
++	enum_out=StringToEnumx(name);
++
++	/* output: */
++	WriteData(ENUMOUT,enum_out);
++}
++
++void StringToEnumUsage(void)
++{
++	_printf_(true,"\n");
++	_printf_(true,"   usage: %senum = StringToEnum(string);\n",__FUNCT__);
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/StringToEnum/StringToEnum.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/StringToEnum/StringToEnum.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/StringToEnum/StringToEnum.h	(revision 12032)
+@@ -0,0 +1,32 @@
++/*!\file:  StringToEnum.h
++ * \brief header file for StringToEnum module.
++ */ 
++
++#ifndef _STRINGTOENUM_H
++#define _STRINGTOENUM_H
++
++/* local prototypes: */
++void StringToEnumUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++    
++/* serial input macros: */
++#define NAME (mxArray*)prhs[0]
++
++/* serial output macros: */
++#define ENUMOUT (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++#undef NRHS
++#define NRHS  1
++
++#undef __FUNCT__ 
++#define __FUNCT__  "StringToEnum"
++
++#endif  /* _TEST_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/matlab/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/matlab/Makefile.am	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/matlab/Makefile.am	(revision 12032)
+@@ -0,0 +1,171 @@
++INCLUDES = @MATLABINCL@ @PETSCINCL@ @MPIINCL@ @METISINCL@ @TRIANGLEINCL@ @CHACOINCL@ @SCOTCHINCL@ @SHAPELIBINCL@ @BOOSTINCL@ @PYTHONINCL@ @PYTHON_NUMPYINCL@
++EXEEXT=$(MATLABWRAPPEREXT)
++#Bin programs {{{1
++if MODULES
++bin_PROGRAMS =  AverageFilter\
++				BamgMesher\
++				BamgConvertMesh\
++				BamgTriangulate\
++				Chaco\
++				ContourToMesh \
++				ContourToNodes \
++				ElementConnectivity\
++				EnumToString\
++				Exp2Kml \
++				HoleFiller \
++				InternalFront\
++				InterpFromGridToMesh \
++				InterpFromMeshToMesh2d \
++				InterpFromMeshToMesh3d \
++				InterpFromMeshToGrid \
++				InterpFromMesh2d \
++				KMLFileRead \
++				KMLMeshWrite \
++				KMLOverlay \
++				Kml2Exp \
++				Ll2xy \
++				NodeConnectivity \
++				MeshPartition\
++				MeshProfileIntersection\
++				PointCloudFindNeighbors\
++				PropagateFlagsFromConnectivity\
++				Scotch\
++				Shp2Kml\
++				StringToEnum\
++				TriaSearch\
++				TriMesh\
++				TriMeshRifts\
++				TriMeshNoDensity\
++				TriMeshProcessRifts\
++				TriMeshRefine\
++				Xy2ll
++endif 
++#}}}
++#Flags and libraries {{{1
++LDADD = ../../c/libISSMCore.a ../../c/libISSMModules.a $(TRIANGLELIB) $(PETSCLIB) $(FLIBS) $(PLAPACKLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLACSLIB) $(HYPRELIB) $(MLLIB) $(DAKOTALIB) $(METISLIB) $(CHACOLIB) $(SCOTCHLIB) $(BLASLAPACKLIB) $(MPILIB) $(MATHLIB) $(FORTRANLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(SHAPELIBLIB) $(GSLLIB)
++
++#Triangle library
++AM_CXXFLAGS =  -DTRILIBRARY -DANSI_DECLARATORS -DNO_TIMER
++
++#Matlab part
++AM_LDFLAGS   = $(MEXLINK)
++AM_CXXFLAGS +=  -D_HAVE_MATLAB_MODULES_ -D_GNU_SOURCE -fPIC -fno-omit-frame-pointer -pthread 
++LDADD       += $(MEXLIB) ../../c/libISSMMatlab.a 
++
++LDADD       += ../../c/libISSMCore.a ../../c/libISSMModules.a 
++
++#Optimization flags:
++AM_CXXFLAGS += $(CXXOPTFLAGS) 
++#}}}
++#Bin sources {{{1
++AverageFilter_SOURCES = ../AverageFilter/AverageFilter.cpp\
++			  ../AverageFilter/AverageFilter.h
++
++BamgMesher_SOURCES = ../BamgMesher/BamgMesher.cpp\
++					../BamgMesher/BamgMesher.h
++
++BamgConvertMesh_SOURCES = ../BamgConvertMesh/BamgConvertMesh.cpp\
++					../BamgConvertMesh/BamgConvertMesh.h
++
++BamgTriangulate_SOURCES = ../BamgTriangulate/BamgTriangulate.cpp\
++								  ../BamgTriangulate/BamgTriangulate.h
++
++Chaco_SOURCES = ../Chaco/Chaco.cpp\
++					../Chaco/Chaco.h
++
++ContourToMesh_SOURCES = ../ContourToMesh/ContourToMesh.cpp\
++			  ../ContourToMesh/ContourToMesh.h
++
++ContourToNodes_SOURCES = ../ContourToNodes/ContourToNodes.cpp\
++			  ../ContourToNodes/ContourToNodes.h
++
++ElementConnectivity_SOURCES = ../ElementConnectivity/ElementConnectivity.cpp\
++			  ../ElementConnectivity/ElementConnectivity.h
++
++EnumToString_SOURCES = ../EnumToString/EnumToString.cpp\
++			  ../EnumToString/EnumToString.h
++
++StringToEnum_SOURCES = ../StringToEnum/StringToEnum.cpp\
++			  ../StringToEnum/StringToEnum.h
++
++HoleFiller_SOURCES = ../HoleFiller/HoleFiller.cpp\
++			  ../HoleFiller/HoleFiller.h
++
++InternalFront_SOURCES = ../InternalFront/InternalFront.cpp\
++										 ../InternalFront/InternalFront.h
++
++InterpFromGridToMesh_SOURCES = ../InterpFromGridToMesh/InterpFromGridToMesh.cpp\
++			  ../InterpFromGridToMesh/InterpFromGridToMesh.h
++
++InterpFromMeshToMesh2d_SOURCES = ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp\
++							../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
++
++InterpFromMeshToMesh3d_SOURCES = ../InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp\
++									../InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h
++
++InterpFromMeshToGrid_SOURCES = ../InterpFromMeshToGrid/InterpFromMeshToGrid.cpp\
++									../InterpFromMeshToGrid/InterpFromMeshToGrid.h
++
++InterpFromMesh2d_SOURCES = ../InterpFromMesh2d/InterpFromMesh2d.cpp\
++									../InterpFromMesh2d/InterpFromMesh2d.h
++
++KMLFileRead_SOURCES = ../KMLFileRead/KMLFileRead.cpp\
++			  ../KMLFileRead/KMLFileRead.h
++
++KMLMeshWrite_SOURCES = ../KMLMeshWrite/KMLMeshWrite.cpp\
++			  ../KMLMeshWrite/KMLMeshWrite.h
++
++KMLOverlay_SOURCES = ../KMLOverlay/KMLOverlay.cpp\
++			  ../KMLOverlay/KMLOverlay.h
++
++Xy2ll_SOURCES = ../Xy2ll/Xy2ll.cpp\
++			  ../Xy2ll/Xy2ll.h
++
++Ll2xy_SOURCES = ../Ll2xy/Ll2xy.cpp\
++			  ../Ll2xy/Ll2xy.h
++
++Exp2Kml_SOURCES = ../Exp2Kml/Exp2Kml.cpp\
++			  ../Exp2Kml/Exp2Kml.h
++
++Kml2Exp_SOURCES = ../Kml2Exp/Kml2Exp.cpp\
++			  ../Kml2Exp/Kml2Exp.h
++
++MeshPartition_SOURCES = ../MeshPartition/MeshPartition.cpp\
++			  ../MeshPartition/MeshPartition.h
++
++MeshProfileIntersection_SOURCES = ../MeshProfileIntersection/MeshProfileIntersection.cpp\
++			  ../MeshProfileIntersection/MeshProfileIntersection.h
++
++NodeConnectivity_SOURCES = ../NodeConnectivity/NodeConnectivity.cpp\
++										../NodeConnectivity/NodeConnectivity.h
++
++PointCloudFindNeighbors_SOURCES = ../PointCloudFindNeighbors/PointCloudFindNeighbors.cpp\
++			  ../PointCloudFindNeighbors/PointCloudFindNeighbors.h
++
++PropagateFlagsFromConnectivity_SOURCES = ../PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp\
++			  ../PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h
++
++Scotch_SOURCES = ../Scotch/Scotch.cpp\
++			  ../Scotch/Scotch.h
++
++Shp2Kml_SOURCES = ../Shp2Kml/Shp2Kml.cpp\
++			  ../Shp2Kml/Shp2Kml.h
++
++TriaSearch_SOURCES = ../TriaSearch/TriaSearch.cpp\
++			  ../TriaSearch/TriaSearch.h
++
++TriMesh_SOURCES = ../TriMesh/TriMesh.cpp\
++			  ../TriMesh/TriMesh.h
++
++TriMeshRifts_SOURCES = ../TriMeshRifts/TriMeshRifts.cpp\
++			  ../TriMeshRifts/TriMeshRifts.h
++
++TriMeshNoDensity_SOURCES = ../TriMeshNoDensity/TriMeshNoDensity.cpp\
++			  ../TriMeshNoDensity/TriMeshNoDensity.h
++
++TriMeshProcessRifts_SOURCES = ../TriMeshProcessRifts/TriMeshProcessRifts.cpp\
++			  ../TriMeshProcessRifts/TriMeshProcessRifts.h
++
++TriMeshRefine_SOURCES = ../TriMeshRefine/TriMeshRefine.cpp\
++			  ../TriMeshRefine/TriMeshRefine.h
++#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp	(revision 12032)
+@@ -0,0 +1,58 @@
++/*\file BamgTriangulate.c
++ *\brief: bamg module.
++ */
++#include "./BamgTriangulate.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	/*input: */
++	double* x=NULL;
++	double* y=NULL;
++	int     x_cols;
++	int     y_rows,y_cols;
++	int nods;
++
++	/*Output*/
++	int* index=NULL;
++	int  nels;
++
++	/*Intermediary*/
++	int verbose=0;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&BamgTriangulateUsage);
++
++	/*Input datasets: */
++	if (verbose) printf("Fetching inputs\n");
++	FetchData(&x,&nods,&x_cols,XHANDLE);
++	FetchData(&y,&y_rows,&y_cols,YHANDLE);
++
++	/*Check inputs*/
++	if(y_rows!=nods)         _error_("x and y do not have the same length");
++	if(x_cols>1 || y_cols>1) _error_("x and y should have only one column");
++	if(nods<3)               _error_("At least 3 points are required");
++
++	/* Run core computations: */
++	if (verbose) printf("Call core\n");
++	BamgTriangulatex(&index,&nels,x,y,nods);
++
++	/*Write output*/
++	WriteData(INDEX,index,nels,3);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void BamgTriangulateUsage(void)
++{
++	_printf_(true,"BAMGTRIANGULATE - Delaunay Triangulation of a list of points");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"      index=BamgTriangulate(x,y);\n");
++	_printf_(true,"      index: index of the triangulation\n");
++	_printf_(true,"      x,y: coordinates of the nodes\n");
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.h	(revision 12032)
+@@ -0,0 +1,34 @@
++/*!\file BamgTriangulate.h
++ * \brief: prototype for Data Interpolation mex module.
++ */
++
++#ifndef _BAMGTRIANGULATE_H
++#define _BAMGTRIANGULATE_H
++
++/* local prototypes: */
++void BamgTriangulateUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "BamgTriangulate"
++
++
++/* serial input macros: */
++#define XHANDLE prhs[0]
++#define YHANDLE prhs[1]
++
++/* serial output macros: */
++#define INDEX (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++#undef NRHS
++#define NRHS  2
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12032)
+@@ -0,0 +1,162 @@
++/*\file InterpFromMeshToMesh2d.c
++ *\brief: bamg module.
++ */
++#include "./InterpFromMeshToMesh2d.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	int i;
++
++	/*input: */
++	double* index=NULL;
++	int     index_cols;
++
++	double* x_data=NULL;
++	int     x_data_rows;
++
++	double* y_data=NULL;
++	int     y_data_rows;
++
++	double* data=NULL; 
++	int     data_rows;
++	int     data_cols;
++
++	double* x_interp=NULL;
++	double* y_interp=NULL;
++
++	int     x_interp_rows;
++	int     y_interp_rows;
++
++	double* default_values=NULL;
++	int     num_default_values=0;
++
++	//contours
++	mxArray*  matlabstructure=NULL;
++	Contour** contours=NULL;
++	int       numcontours;
++	Contour*  contouri=NULL;
++
++	/*Intermediary*/
++	int nods_data;
++	int nels_data;
++	int nods_interp;
++	int verbose=0;
++
++	/* output: */
++	double* data_interp=NULL;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	if(nlhs!=NLHS){
++		InterpFromMeshToMesh2dUsage();
++		_error_("InterpFromMeshToMesh2dUsage usage error");
++	}
++	if((nrhs!=6) & (nrhs!=8)){
++		InterpFromMeshToMesh2dUsage();
++		_error_("InterpFromMeshToMesh2dUsage usage error");
++	}
++
++	/*Input datasets: */
++	if (verbose) printf("Fetching inputs\n");
++	FetchData(&index,&nels_data,&index_cols,INDEXHANDLE);
++	FetchData(&x_data,&x_data_rows,NULL,XHANDLE);
++	FetchData(&y_data,&y_data_rows,NULL,YHANDLE);
++	FetchData(&data,&data_rows,&data_cols,DATAHANDLE);
++	FetchData(&x_interp,&x_interp_rows,NULL,XINTERPHANDLE);
++	FetchData(&y_interp,&y_interp_rows,NULL,YINTERPHANDLE);
++
++	if(nrhs==8){
++		
++		/*Call expread on filename to build a contour array in the matlab workspace: */
++		mexCallMATLAB( 1, &matlabstructure, 1, (mxArray**)&FILENAME, "expread");
++
++		/*default values: */
++		FetchData(&default_values,&num_default_values,DEFAULTHANDLE);
++
++		/*contours: */
++		numcontours=mxGetNumberOfElements(matlabstructure);
++		contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
++		for(i=0;i<numcontours;i++){
++			//allocate
++			contouri=(Contour*)xmalloc(sizeof(Contour));
++			//retrieve dimension of this contour.
++			contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
++			//set pointers.
++			contouri->x=mxGetPr(mxGetField(matlabstructure,i,"x"));
++			contouri->y=mxGetPr(mxGetField(matlabstructure,i,"y"));
++			*(contours+i)=contouri;
++		}
++
++		/* Debugging of contours :{{{1*/
++		/*for(i=0;i<numcontours;i++){
++		  printf("\nContour echo: contour number  %i / %i\n",i+1,numcontours);
++		  contouri=*(contours+i);
++		  printf("   Number of vertices %i\n",contouri->nods);
++		  for (j=0;j<contouri->nods;j++){
++		  printf("   %lf %lf\n",*(contouri->x+j),*(contouri->y+j));
++		  }
++		  }*/
++		/*}}}*/
++	}
++	else{
++		num_default_values=0;
++		default_values=NULL;
++		numcontours=0;
++		contours=NULL;
++	}
++
++	/*some checks*/
++	if (verbose) printf("Checking inputs\n");
++	if (x_data_rows!=y_data_rows){
++		_error_("vectors x and y should have the same length!");
++	}
++	if (x_interp_rows!=y_interp_rows){
++		_error_("vectors x_interp and y_interp should have the same length!");
++	}
++	if (index_cols!=3){
++		_error_("index should have 3 columns (input provided has %i columns)",index_cols);
++	}
++
++	/*get number of elements and number of nodes in the data*/
++	nods_data=x_data_rows;
++	nods_interp=x_interp_rows;
++
++	/* Run core computations: */
++	if (verbose) printf("Call core\n");
++	InterpFromMeshToMesh2dx(&data_interp,index,x_data,y_data,nods_data,nels_data,data,data_rows,data_cols,x_interp,y_interp,nods_interp,default_values,num_default_values,contours,numcontours);
++
++	/*Write data: */
++	WriteData(DATAINTERP,data_interp,nods_interp,data_cols);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void InterpFromMeshToMesh2dUsage(void)
++{
++	_printf_(true,"INTERFROMMESHTOMESH2D - interpolation from a 2d triangular mesh onto a list of point\n");
++	_printf_(true,"\n");
++	_printf_(true,"   This function is a multi-threaded mex file that interpolates a field\n");
++	_printf_(true,"   defined on a triangular mesh onto a list of point\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"         data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp);\n");
++	_printf_(true,"      or data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp,default_value,contourname);\n");
++	_printf_(true,"\n");
++	_printf_(true,"      index: index of the mesh where data is defined\n");
++	_printf_(true,"      x,y: coordinates of the nodes where data is defined\n");
++	_printf_(true,"      data: matrix holding the data to be interpolated onto the mesh. (one column per field)\n");
++	_printf_(true,"      x_interp,y_interp: coordinates of the points onto which we interpolate.\n");
++	_printf_(true,"      if default_value and contourname not specified: linear interpolation will happen on all x_interp,y_interp.\n");
++	_printf_(true,"      if (default_value,contourname) specified: linear interpolation will happen on all x_interp,y_interp inside the contour, default value will be adopted on the rest of the mesh.\n");
++	_printf_(true,"      note that default_value is either a scalar, or a vector of size  length(x_interp)\n");
++	_printf_(true,"      data_interp: vector of mesh interpolated data.\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Example:\n");
++	_printf_(true,"      load('temperature.mat');\n");
++	_printf_(true,"      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y);\n");
++	_printf_(true,"      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y,253,'Contour.exp');\n");
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h	(revision 12032)
+@@ -0,0 +1,38 @@
++/*!\file InterpFromMeshToMesh2d.h
++ * \brief: prototype for Data Interpolation mex module.
++ */
++
++#ifndef _INTERPFROMMESHTOMESH2d_H
++#define _INTERPFROMMESHTOMESH2d_H
++
++/* local prototypes: */
++void InterpFromMeshToMesh2dUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "InterpFromMeshToMesh2d"
++
++
++/* serial input macros: */
++#define INDEXHANDLE prhs[0]
++#define XHANDLE prhs[1]
++#define YHANDLE prhs[2]
++#define DATAHANDLE prhs[3]
++#define XINTERPHANDLE prhs[4]
++#define YINTERPHANDLE prhs[5]
++#define DEFAULTHANDLE prhs[6]
++#define FILENAME prhs[7]
++
++/* serial output macros: */
++#define DATAINTERP (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshNoDensity/TriMeshNoDensity.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshNoDensity/TriMeshNoDensity.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshNoDensity/TriMeshNoDensity.cpp	(revision 12032)
+@@ -0,0 +1,305 @@
++/*
++ * TriMeshNoDensity: out of a domain outline file ( Argus format ), 
++ * use the Triangle package to create a triangular mesh 
++ *
++ */
++
++#include "./TriMeshNoDensity.h"
++
++
++void mexFunction(	int nlhs, mxArray* plhs[],
++					int nrhs, const mxArray* prhs[] )
++{
++
++
++	/*Matlab arrays: */
++	mxArray* pmxa_array=NULL;
++	int i,j;
++	int counter,counter2,backcounter;
++	int prhs_counter;
++	
++	/* returned quantities: */
++
++	double* index=NULL;
++	double* x=NULL;
++	double* y=NULL;
++	double* segments=NULL;
++	double*    segmentmarkerlist=NULL;
++
++	/* input: */
++	char*  domainname=NULL;
++	char*  riftname=NULL;
++	
++	/*Domain outline variables: */
++	int      nprof;
++	int*     profnvertices=NULL;
++	double** pprofx=NULL;
++	double** pprofy=NULL;
++	double*  xprof=NULL;
++	double*  yprof=NULL;
++	int      numberofpoints;
++
++	/*Rift outline variables: */
++	int      numrifts;
++	int*     riftsnumvertices=NULL;
++	double** riftsverticesx=NULL;
++	double** riftsverticesy=NULL;
++
++	/* Triangle structures: */
++	struct triangulateio in,out;
++	char   options[256];
++
++	/* verify correct usage: */
++	if (nlhs==0 && nrhs==0) {
++		/* special case: */
++		TriMeshNoDensityUsage();
++		return;
++	}
++
++	if (!(  (nlhs==5) ||(nrhs==2) || (nrhs==3)  )){
++		mexPrintf("   %s format error.\n", __FUNCT__);
++		TriMeshNoDensityUsage();
++		printf("   ");
++		mexErrMsgTxt(" ");
++	}
++
++	/*Fetch data needed by Triangle: */
++
++	prhs_counter=0;
++	/*First recover the domain outline file name: */
++	if (!mxIsChar(prhs[prhs_counter])){
++		mexPrintf("%s%s\n",__FUNCT__," error message; first argument should be the domain outline file name!");
++		mexErrMsgTxt(" ");
++	}
++	domainname = (char *) mxMalloc((mxGetN(prhs[prhs_counter])+1)*sizeof(char));
++	mxGetString(prhs[prhs_counter],domainname,mxGetN(prhs[prhs_counter])+1);
++
++	/*Look for optional rifts file name: */
++	if (nrhs==2){
++		prhs_counter++;
++		if (mxIsChar(prhs[prhs_counter])){
++			riftname = (char *) mxMalloc((mxGetN(prhs[prhs_counter])+1)*sizeof(char));
++			mxGetString(prhs[prhs_counter],riftname,mxGetN(prhs[prhs_counter])+1);
++			prhs_counter++;
++		}
++	}
++	
++	/*Start reading the domain outline file: */
++	if(!DomainOutlineRead(&nprof,&profnvertices,&pprofx,&pprofy,NULL,domainname,false)){
++		printf("%s%s%s\n",__FUNCT__," error message reading domain outline ",domainname);
++		mexErrMsgTxt(" ");
++	}
++
++	/*Read rifts file if present: */
++	if(riftname){
++		if(!DomainOutlineRead(&numrifts,&riftsnumvertices,&riftsverticesx,&riftsverticesy,NULL,riftname,false)){
++			printf("%s%s%s\n",__FUNCT__," error message reading rifts outline ",riftname);
++			mexErrMsgTxt(" ");
++		}
++	}
++
++	/*Create initial triangulation to call triangulate():*/
++	numberofpoints=0;
++	for (i=0;i<nprof;i++){
++		numberofpoints+=profnvertices[i];
++	}
++	if (riftname){
++		for (i=0;i<numrifts;i++){
++			numberofpoints+=riftsnumvertices[i];
++		}
++	}
++	in.numberofpoints=numberofpoints;
++
++	in.numberofpointattributes=1;
++	in.pointlist = (REAL *) mxMalloc(in.numberofpoints * 2 * sizeof(REAL));
++
++	counter=0;
++	for (i=0;i<nprof;i++){
++		xprof=pprofx[i];
++		yprof=pprofy[i];
++		for (j=0;j<profnvertices[i];j++){
++			in.pointlist[2*counter+0]=xprof[j];
++			in.pointlist[2*counter+1]=yprof[j];
++			counter++;
++		}
++	}
++	if(riftname){
++		for (i=0;i<numrifts;i++){
++			xprof=riftsverticesx[i];
++			yprof=riftsverticesy[i];
++			for (j=0;j<riftsnumvertices[i];j++){
++				in.pointlist[2*counter+0]=xprof[j];
++				in.pointlist[2*counter+1]=yprof[j];
++				counter++;
++			}
++		}
++	}
++	
++	in.pointattributelist = (REAL *) mxMalloc(in.numberofpoints *
++										  in.numberofpointattributes *
++										  sizeof(REAL));
++	for (i=0;i<in.numberofpoints;i++){
++		in.pointattributelist[i] = 0.0;
++	}
++	in.pointmarkerlist = (int *) mxMalloc(in.numberofpoints * sizeof(int));
++	for(i=0;i<in.numberofpoints;i++){
++		in.pointmarkerlist[i] = 0;
++	}
++	
++
++	/*Build segments: */
++	/*Figure out number of segments: holes and closed outlines have as many segments as vertices, 
++	 *for rifts, we have one less segment as we have vertices*/
++	in.numberofsegments=0;
++	for (i=0;i<nprof;i++){
++		in.numberofsegments+=profnvertices[i];
++	}
++	if (riftname){
++		for (i=0;i<numrifts;i++){
++			in.numberofsegments+=riftsnumvertices[i]-1;
++		}
++	}
++	
++	in.segmentlist = (int *) mxMalloc(in.numberofsegments * 2 * sizeof(int));
++	in.segmentmarkerlist = (int *) mxCalloc(in.numberofsegments,sizeof(int));
++	counter=0;
++	backcounter=0;
++	for (i=0;i<nprof;i++){
++		for (j=0;j<(profnvertices[i]-1);j++){
++			in.segmentlist[2*counter+0]=counter;
++			in.segmentlist[2*counter+1]=counter+1;
++			in.segmentmarkerlist[counter]=0;
++			counter++;
++		}
++		/*Close this profile: */
++		 in.segmentlist[2*counter+0]=counter;
++		 in.segmentlist[2*counter+1]=backcounter;
++		 in.segmentmarkerlist[counter]=0;
++		 counter++;
++		 backcounter=counter;
++	}
++	counter2=counter;
++	if(riftname){
++		for (i=0;i<numrifts;i++){
++			for (j=0;j<(riftsnumvertices[i]-1);j++){
++				in.segmentlist[2*counter2+0]=counter;
++				in.segmentlist[2*counter2+1]=counter+1;
++				in.segmentmarkerlist[counter2]=2+i;
++				counter2++;
++				counter++;
++			}
++			counter++;
++		}
++	}
++
++	
++	/*Build regions: */
++	in.numberofregions = 0;
++
++	/*Build holes: */
++	in.numberofholes = nprof-1; /*everything is a hole, but for the first profile.*/
++	in.holelist = (REAL *) mxMalloc(in.numberofholes * 2 * sizeof(REAL));
++	for (i=0;i<nprof-1;i++){
++		/*We are looking for a vertex that lies inside the hole: */
++		GridInsideHole(&in.holelist[2*i+0],&in.holelist[2*i+1],profnvertices[i+1],pprofx[i+1],pprofy[i+1]);
++	}
++
++	/* Make necessary initializations so that Triangle can return a */
++	/*   triangulation in `out': */
++
++	out.pointlist = (REAL *) NULL;            
++	out.pointattributelist = (REAL *) NULL;
++	out.pointmarkerlist = (int *) NULL; 
++	out.trianglelist = (int *) NULL;          
++	out.triangleattributelist = (REAL *) NULL;
++	out.neighborlist = (int *) NULL;         
++	out.segmentlist = (int *) NULL;
++	out.segmentmarkerlist = (int *) NULL;
++	out.edgelist = (int *) NULL;             
++	out.edgemarkerlist = (int *) NULL;   
++
++	/* Triangulate the points:.  Switches are chosen to read and write a  */
++	/*   PSLG (p), preserve the convex hull (c), number everything from  */
++	/*   zero (z), assign a regional attribute to each element (A), and  */
++	/*   produce an edge list (e), a Voronoi diagram (v), and a triangle */
++	/*   neighbor list (n).                                              */
++
++	sprintf(options,"%s%lf","pQzDq30i"); /*replace V by Q to quiet down the logging*/
++  
++	triangulate(options, &in, &out, NULL);
++	/*report(&out, 0, 1, 1, 1, 1, 0);*/
++
++	/*Allocate index, x and y: */
++	index=(double*)mxMalloc(3*out.numberoftriangles*sizeof(double));
++	x=(double*)mxMalloc(out.numberofpoints*sizeof(double));
++	y=(double*)mxMalloc(out.numberofpoints*sizeof(double));
++	segments=(double*)mxMalloc(3*out.numberofsegments*sizeof(double));
++	segmentmarkerlist=(double*)mxMalloc(out.numberofsegments*sizeof(double));
++
++	for (i = 0; i < out.numberoftriangles; i++) {
++		for (j = 0; j < out.numberofcorners; j++) {
++			*(index+3*i+j)=(double)out.trianglelist[i * out.numberofcorners + j]+1;
++		}
++	}
++	for (i = 0; i < out.numberofpoints; i++) {
++		x[i]=out.pointlist[i * 2 + 0];
++		y[i]=out.pointlist[i * 2 + 1];
++	}
++	
++	for (i = 0; i < out.numberofsegments; i++) {
++		segments[3*i+0]=(double)out.segmentlist[i*2+0]+1;
++		segments[3*i+1]=(double)out.segmentlist[i*2+1]+1;
++		segmentmarkerlist[i]=(double)out.segmentmarkerlist[i];
++	}
++
++	/*Associate elements with segments: */
++	AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles);
++
++	/*Order segments so that their normals point outside the domain: */
++	OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
++
++	/*Output : */
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,3);
++	mxSetN(pmxa_array,out.numberoftriangles);
++	mxSetPr(pmxa_array,index);
++	mexCallMATLAB( 1, &plhs[0], 1, &pmxa_array, "transpose");
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,1);
++	mxSetN(pmxa_array,out.numberofpoints);
++	mxSetPr(pmxa_array,x);
++	mexCallMATLAB( 1, &plhs[1], 1, &pmxa_array, "transpose");
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,1);
++	mxSetN(pmxa_array,out.numberofpoints);
++	mxSetPr(pmxa_array,y);
++	mexCallMATLAB( 1, &plhs[2], 1, &pmxa_array, "transpose");
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,3);
++	mxSetN(pmxa_array,out.numberofsegments);
++	mxSetPr(pmxa_array,segments);
++	mexCallMATLAB( 1, &plhs[3], 1, &pmxa_array, "transpose");
++
++	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pmxa_array,1);
++	mxSetN(pmxa_array,out.numberofsegments);
++	mxSetPr(pmxa_array,segmentmarkerlist);
++	mexCallMATLAB( 1, &plhs[4], 1, &pmxa_array, "transpose");
++	
++	return;
++}
++
++void TriMeshNoDensityUsage(void)
++{
++	printf("\n");
++	printf("   usage: [index,x,y,segments,segmentmarkers]=TriMeshNoDensity(domainoutlinefilename,riftsoutlinename) \n");
++	printf("      where: index,x,y defines a triangulation, segments is an array made \n");
++	printf("      of exterior segments to the mesh domain outline, segmentmarkers is an array flagging each segment \n");
++	printf("      (if rifts are present, markers >=2 flag them ), outlinefilename an Argus domain outline file.\n");
++	printf("      riftsoutlinename is an Argus domain file, defining rifts (ie: open profiles), \n");
++	printf("      riftsoutlinename is an optional arguments.\n");
++	printf("\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshNoDensity/TriMeshNoDensity.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshNoDensity/TriMeshNoDensity.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshNoDensity/TriMeshNoDensity.h	(revision 12032)
+@@ -0,0 +1,23 @@
++/*!\file:  TriMeshNoDensity.h
++ * \brief header prototype
++ */ 
++
++#ifndef _TRIMESH_H_
++#define _TRIMESH_H_
++
++#include "mex.h"
++#include "triangle.h"
++#include "string.h"
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++void TriMeshNoDensityUsage(void);
++
++#undef __FUNCT__ 
++#define __FUNCT__ "TriMeshNoDensity"
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Makefile.am	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Makefile.am	(revision 12032)
+@@ -0,0 +1,8 @@
++SUBDIRS = 
++if MATLAB
++SUBDIRS += matlab
++endif
++
++if PYTHON
++SUBDIRS += python
++endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.h	(revision 12032)
+@@ -0,0 +1,47 @@
++
++/*
++	ContourToMesh.h
++*/
++
++
++#ifndef _CONTOURTOMESH_H
++#define _CONTOURTOMESH_H
++
++/* local prototypes: */
++void ContourToMeshUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__
++#define __FUNCT__ "ContourToMesh"
++
++
++#ifndef ALL
++#define ALL 0
++#endif
++
++/* input macros: */
++#define INDEXHANDLE prhs[0]
++#define XHANDLE prhs[1]
++#define YHANDLE prhs[2]
++#define FILENAME prhs[3]
++#define INTERPTYPEHANDLE prhs[4]
++#define EDGEVALUEHANDLE prhs[5]
++
++/* serial output macros: */
++#define PLHS0 (mxArray**)&plhs[0]
++#define PLHS1 (mxArray**)&plhs[1]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  2
++#undef NRHS
++#define NRHS 6
++
++
++#endif  /* _CONTOURTOMESH_H */
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/.dirstamp
+===================================================================
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/.deps/.dirstamp
+===================================================================
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12032)
+@@ -0,0 +1,135 @@
++/*! \file  ContourtoMesh
++    \brief: takes an  contour file, and figures out which nodes or elements from the mesh  
++    are inside this contour. 
++	usage:
++	[in_nod,in_elem]=ContourToMesh(index,x,y,contours,interptype,edgevalue);
++	
++	input:
++
++		index,x,y: delaunay triangulation.
++		contours: structure holding sets of vertices making open contours. 
++		interptype: string definining type of interpolation ('element', or 'node', or 'element and node');
++		edgevalue: integer (0, 1 or 2) defining the value associated to the nodes on the edges of the polygons
++
++	output:
++		in_nod: vector of flags (0 or 1), of size nods if interptype is set to 'node' or 'element and node', 
++				or of size 0 otherwise.
++		in_elem: vector of flags (0 or 1), of size nel if interptype is set to 'element' or 'element and node', 
++				or of size 0 otherwise.
++*/
++	
++#include "./ContourToMesh.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
++
++	int i,j;
++
++	/* required input: */
++	double* index=NULL;
++	double* x=NULL;
++	double* y=NULL;
++	int     edgevalue;
++	char*   interptype=NULL;
++
++	/* output: */
++	Vector*  in_nod=NULL;
++	int  nods;
++	Vector*  in_elem=NULL;
++	int  nel;
++
++	//contours
++	mxArray*  matlabstructure=NULL;
++	int numcontours;
++	Contour** contours=NULL;
++	Contour*  contouri=NULL;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	//CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ContourToMeshUsage); Cant' use it here, as we have variable  outputs.
++	if((nlhs!=1 && nlhs!=2) || (nrhs!=NRHS)){
++		ContourToMeshUsage();
++		_error_(" usage. See above");
++	}
++
++	/*First, call expread on filename to build a contour array in the matlab workspace: */
++	mexCallMATLAB( 1, &matlabstructure, 1, (mxArray**)&FILENAME, "expread");
++
++	/*Fetch inputs: */
++	FetchData(&index,&nel,NULL,INDEXHANDLE);
++	FetchData(&x,&nods,NULL,XHANDLE);
++	FetchData(&y,NULL,NULL,YHANDLE);
++	FetchData(&edgevalue,EDGEVALUEHANDLE);
++
++	//Fetch contours
++	numcontours=mxGetNumberOfElements(matlabstructure);
++	contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
++	for(i=0;i<numcontours;i++){
++		//allocate
++		contouri=(Contour*)xmalloc(sizeof(Contour));
++		//retrieve dimension of this contour.
++		contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
++		//set pointers.
++		contouri->x=mxGetPr(mxGetField(matlabstructure,i,"x"));
++		contouri->y=mxGetPr(mxGetField(matlabstructure,i,"y"));
++		*(contours+i)=contouri;
++	}
++
++	/*Fetch  interptype: */
++	FetchData(&interptype,INTERPTYPEHANDLE);
++
++	/* Debugging of contours :{{{1*/
++	/*for(i=0;i<numcontours;i++){
++		printf("\nContour echo: contour number  %i / %i\n",i+1,numcontours);
++		contouri=*(contours+i);
++		printf("   Number of vertices %i\n",contouri->nods);
++		for (j=0;j<contouri->nods;j++){
++			printf("   %lf %lf\n",*(contouri->x+j),*(contouri->y+j));
++		}
++	}*/
++	/*}}}*/
++
++	/*Run interpolation routine: */
++	ContourToMeshx( &in_nod,&in_elem,index,x,y,contours,numcontours,interptype,nel,nods,edgevalue);
++
++	/* output: */
++	if (strcmp(interptype,"node")==0){
++		WriteData(PLHS0,in_nod);
++	}
++	else if (strcmp(interptype,"element")==0){
++		WriteData(PLHS0,in_elem);
++	}
++	else if (strcmp(interptype,"element and node")==0){
++		WriteData(PLHS0,in_nod);
++		WriteData(PLHS1,in_elem);
++	}
++	else _error_(" wrong interpolation type");
++
++	/*end module: */
++	MODULEEND();
++	
++}
++
++void ContourToMeshUsage(void)
++{
++	printf("CONTOURTOMESH - Flag the elements or nodes inside a contour\n");
++	printf("\n");
++	printf("      Usage: \n");
++	printf("         [in_nod,in_elem]=ContourToMesh(index,x,y,contourname,interptype,edgevalue)\n\n");
++	printf("\n");
++	printf("         index,x,y: mesh triangulation.\n");
++	printf("         contourname: name of .exp file containing the contours.\n");
++	printf("         interptype: string definining type of interpolation ('element', or 'node').\n");
++	printf("         edgevalue: integer (0, 1 or 2) defining the value associated to the nodes on the edges of the polygons.\n");
++	printf("         in_nod: vector of flags (0 or 1), of size nods if interptype is set to 'node' or 'element and node', \n");
++	printf("            or of size 0 otherwise.\n");
++	printf("         in_elem: vector of flags (0 or 1), of size nel if interptype is set to 'element' or 'element and node', \n");
++	printf("            or of size 0 otherwise.\n");
++	printf("\n");
++	printf("      Example: \n");
++	printf("         in_nod=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','node',1)\n");
++	printf("         in_elements=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','element',0)\n");
++	printf("         [in_nodes,in_elements]=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','element and node',0)\n");
++	printf("\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Xy2ll/Xy2ll.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Xy2ll/Xy2ll.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Xy2ll/Xy2ll.h	(revision 12032)
+@@ -0,0 +1,37 @@
++/*!\file Xy2ll.h
++ * \brief: prototype for x/y to lat/long coordinate mex module.
++ */
++
++#ifndef _XY2LL_H
++#define _XY2LL_H
++
++/* local prototypes: */
++void Xy2llUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "Xy2ll"
++
++
++/* serial input macros: */
++#define X_IN      prhs[0]
++#define Y_IN      prhs[1]
++#define SGN_IN    prhs[2]
++
++/* serial output macros: */
++#define LAT_OUT    (mxArray**)&plhs[0]
++#define LON_OUT    (mxArray**)&plhs[1]
++
++/* serial arg counts: */
++#undef NRHS
++#define NRHS  3
++#undef NLHS
++#define NLHS  2
++
++#endif
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 12032)
+@@ -0,0 +1,121 @@
++/*\file Xy2ll.c
++ *\brief: x/y to lat/long coordinate mex module.
++ */
++#include "./Xy2ll.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	int i,verbose=1;
++
++	/*input: */
++	double  *x=NULL,*y=NULL;
++	int     nx,ny,ncoord;
++	int     sgn;
++
++	Options* options=NULL;
++	double   cm=0.,sp=0.;
++
++	/* output: */
++	double  *lat=NULL,*lon=NULL;
++	int     iret=0;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	if (nlhs > NLHS) {
++		Xy2llUsage();
++		_error_("Xy2ll usage error");
++	}
++	if (nrhs < NRHS) {
++		Xy2llUsage();
++		_error_("Xy2ll usage error");
++	}
++
++	/*Input datasets: */
++	if (verbose) printf("Fetching inputs:\n");
++	FetchData(&x,&nx,X_IN);
++	if (verbose)
++		if   (nx == 1) printf("  x=%g\n",x[0]);
++		else           printf("  x=[%d values]\n",nx);
++//	for (i=0; i<nx; i++) printf("  x[%d]=%g\n",i,x[i]);
++	FetchData(&y,&ny,Y_IN);
++	if (verbose)
++		if   (ny == 1) printf("  y=%g\n",y[0]);
++		else           printf("  y=[%d values]\n",ny);
++//	for (i=0; i<ny; i++) printf("  y[%d]=%g\n",i,y[i]);
++	FetchData(&sgn,SGN_IN);
++	if (verbose) printf("  sgn=%d\n",sgn);
++
++	if (verbose) printf("Parsing options:\n");
++	options=new Options(NRHS,nrhs,prhs);
++	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
++	/*  defaults are in Xy2lldef, so don't duplicate them here, and only use user values if both have been specified  */
++	if (options->GetOption("central_meridian") || options->GetOption("standard_parallel")) {
++		options->Get(&cm,"central_meridian");
++		if (verbose) printf("  cm=%g\n",cm);
++		options->Get(&sp,"standard_parallel");
++		if (verbose) printf("  sp=%g\n",sp);
++	}
++
++	/*some checks*/
++	if (verbose) printf("Checking inputs:\n");
++
++	if   (nx != ny) _error_("Must have same number of x[%d] and y[%d] coordinates.",nx,ny);
++	else            ncoord=nx;
++	if (sgn != +1 && sgn != -1) _error_("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);
++	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
++	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
++
++	lat=(double *)xmalloc(ncoord*sizeof(double));
++	lon=(double *)xmalloc(ncoord*sizeof(double));
++
++	/* Run core computations: */
++	if (verbose) printf("Calling core:\n");
++	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
++		iret=Xy2llx(lat,lon,
++					x,y,ncoord,
++					sgn,cm,sp);
++	else
++		iret=Xy2llx(lat,lon,
++					x,y,ncoord,
++					sgn);
++	if (verbose) printf("  iret=%d\n",iret);
++
++	/*Write data: */
++	WriteData(LAT_OUT,lat,ncoord);
++	WriteData(LON_OUT,lon,ncoord);
++
++	/*Clean-up*/
++	delete options;
++
++	/*end module: */
++	MODULEEND();
++}
++
++void Xy2llUsage(void)
++{
++	_printf_(true,"Xy2ll - x/y to lat/long coordinate transformation module:\n");
++	_printf_(true,"\n");
++	_printf_(true,"   This module transforms x/y to lat/long coordinates.\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"      [lat,lon]=Xy2ll(x,y,sgn,'param name',param,...);\n");
++	_printf_(true,"\n");
++	_printf_(true,"      x           x coordinates (double vector)\n");
++	_printf_(true,"      y           y coordinates (double vector)\n");
++	_printf_(true,"      sgn         sign for hemisphere (double, +1 (north) or -1 (south))\n");
++	_printf_(true,"\n");
++	_printf_(true,"      central_meridian     central meridian (double, optional, but must specify with sp)\n");
++	_printf_(true,"      standard_parallel    standard parallel (double, optional, but must specify with cm)\n");
++	_printf_(true,"\n");
++	_printf_(true,"      lat         latitude coordinates (double vector)\n");
++	_printf_(true,"      lon         longitude coordinates (double vector)\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Examples:\n");
++	_printf_(true,"      [lat,lon]=Xy2ll(x,y, 1);\n");
++	_printf_(true,"      [lat,lon]=Xy2ll(x,y, 1,'central_meridian',45,'standard_parallel',70);\n");
++	_printf_(true,"      [lat,lon]=Xy2ll(x,y,-1,'central_meridian', 0,'standard_parallel',71);\n");
++	_printf_(true,"\n");
++}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.h	(revision 12032)
+@@ -0,0 +1,68 @@
++/*
++	TriMesh.h
++*/
++
++#ifndef _TRIMESH_H
++#define _TRIMESH_H
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++/*Very important definition in case we are compiling a python module!: needs to come before header files inclusion*/
++#ifdef _HAVE_PYTHON_
++#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
++#endif
++
++/*Header files: */
++#include "../../c/include/globals.h"
++#include "../../c/toolkits/toolkits.h"
++#include "../../c/include/include.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++#include "../../c/io/io.h"
++#include "../../c/EnumDefinitions/EnumDefinitions.h"
++
++#ifdef _HAVE_MATLAB_MODULES_
++/* serial input macros: */
++#define DOMAINOUTLINE  (mxArray *)prhs[0]
++#define AREA           (mxArray *)prhs[1]
++#define ORDER          (mxArray *)prhs[2]
++/* serial output macros: */
++#define INDEX             (mxArray**)&plhs[0]
++#define X                 (mxArray**)&plhs[1]
++#define Y                 (mxArray**)&plhs[2]
++#define SEGMENTS          (mxArray**)&plhs[3]
++#define SEGMENTMARKERLIST (mxArray**)&plhs[4]
++#endif
++
++#ifdef _HAVE_PYTHON_MODULES_
++/* serial input macros: */
++#define DOMAINOUTLINE PyTuple_GetItem(args,0)
++#define AREA          PyTuple_GetItem(args,1)
++#define ORDER         PyTuple_GetItem(args,2)
++/* serial output macros: */
++#define INDEX             output,0
++#define X                 output,1
++#define Y                 output,2
++#define SEGMENTS          output,3
++#define SEGMENTMARKERLIST output,4
++#endif
++
++#undef __FUNCT__ 
++#define __FUNCT__  "TriMesh"
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  5
++#undef NRHS
++#define NRHS  3
++
++/* local prototypes: */
++void TriMeshUsage(void);
++
++#endif  /* _TRIMESH_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.cpp	(revision 12032)
+@@ -0,0 +1,72 @@
++/*
++ * TriMesh: mesh a domain using an .exp file
++ */
++
++#include "./TriMesh.h"
++
++WRAPPER(TriMesh){
++	
++	/* input: */
++	char*  domainname=NULL;
++	double area;
++	bool   order;
++
++	/*intermediary: */
++	DataSet* domain=NULL;
++
++	/* output: */
++	Matrix* index=NULL;
++	Vector* x=NULL;
++	Vector* y=NULL;
++	Matrix* segments=NULL;
++	Vector* segmentmarkerlist=NULL;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CHECKARGUMENTS(NLHS,NRHS,&TriMeshUsage);
++	
++	/*Fetch data needed for meshing: */
++	FetchData(&domainname,DOMAINOUTLINE);
++	FetchData(&area,AREA);
++	FetchData(&order,ORDER);
++
++	/*Read domain outline: */
++	domain=DomainOutlineRead(domainname,false);
++
++	/*call x core: */
++	TriMeshx(&index,&x,&y,&segments,&segmentmarkerlist,domain,area,order);
++	
++	/*write outputs: */
++	WriteData(INDEX,index);
++	WriteData(X,x);
++	WriteData(Y,y);
++	WriteData(SEGMENTS,segments);
++	WriteData(SEGMENTMARKERLIST,segmentmarkerlist);
++
++	/*free ressources: */
++	delete domain;
++	xdelete_module(&index);
++	xdelete_module(&x);
++	xdelete_module(&y);
++	xdelete_module(&segments);
++	xdelete_module(&segmentmarkerlist);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void TriMeshUsage(void) //{{{1
++{
++	printf("\n");
++	printf("   usage: [index,x,y,segments,segmentmarkers]=TriMesh(domainoutlinefilename,area,ordered) \n");
++	printf("      where: index,x,y defines a triangulation, segments is an array made \n");
++	printf("      of exterior segments to the mesh domain outline, segmentmarkers is an array flagging each segment, \n");
++	printf("      outlinefilename an Argus domain outline file, \n");
++	printf("      area is the maximum area desired for any element of the resulting mesh, \n");
++	printf("      and ordered is a bool that determines whether segments are output in the \n");
++	printf("      order they are made by Triangle (ie none), or ordered counter clockwise around the domain outline.\n");
++	printf("\n");
++}
++//}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.h	(revision 12032)
+@@ -0,0 +1,42 @@
++/*!\file KMLMeshWrite.h
++ * \brief: prototype for KML mesh writer mex module.
++ */
++
++#ifndef _KMLMESHWRITE_H
++#define _KMLMESHWRITE_H
++
++/* local prototypes: */
++void KMLMeshWriteUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "KMLMeshWrite"
++
++
++/* serial input macros: */
++#define NAME          prhs[0]
++#define NOTES         prhs[1]
++#define ELEMHANDLE    prhs[2]
++#define NODECONHANDLE prhs[3]
++#define LATHANDLE     prhs[4]
++#define LNGHANDLE     prhs[5]
++#define PARTHANDLE    prhs[6]
++#define DATAHANDLE    prhs[7]
++#define CMAPHANDLE    prhs[8]
++#define FILENAME      prhs[9]
++
++/* serial output macros: */
++#define ERRORFLAG (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NRHS
++#define NRHS 10
++#undef NLHS
++#define NLHS  1
++
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12032)
+@@ -0,0 +1,198 @@
++/*\file KMLMeshWrite.c
++ *\brief: KML mesh writer module.
++ */
++#include "./KMLMeshWrite.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	int i,j,nnodes=0,verbose=1;
++
++	/*input: */
++	char*   name=NULL;
++
++	char*   notes=NULL;
++	const mxArray* notesi;
++	mwIndex        nindex;
++
++	int*    elem=NULL;
++	int     melem=0,nelem=0;
++
++	int*    nodecon=NULL;
++	int     mncon=0,nncon=0;
++
++	double* lat=NULL;
++	int     mlat=0,nlat=0,llat=0;
++
++	double* lng=NULL;
++	int     mlng=0,nlng=0,llng=0;
++
++	int     nparts=0;
++
++	int*    part=NULL;
++	int     mprt=0,nprt=0,lprt=0;
++
++	double* data=NULL;
++	int     mdata=0,ndata=0;
++
++	double* cmap=NULL;
++	int     mcmap=0,ncmap=0;
++
++	char*   filnam=NULL;
++
++	FILE*   fid=NULL;
++
++	Options* options=NULL;
++
++	/* output: */
++	int     ierror=0;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	if (nlhs > NLHS) {
++		KMLMeshWriteUsage();
++		_error_("KMLMeshWrite usage error");
++	}
++	if (nrhs < NRHS) {
++		KMLMeshWriteUsage();
++		_error_("KMLMeshWrite usage error");
++	}
++
++	/*Input datasets: */
++	if (verbose) printf("Fetching inputs:\n");
++	FetchData(&name,NAME);
++	if (verbose) printf("  name   =\"%s\"\n",name);
++
++/*  notes is typically a cell array of character strings  */
++	if (mxIsCell(NOTES)) {
++		for (nindex=0; nindex<mxGetNumberOfElements(NOTES); nindex++) {
++			notesi=mxGetCell(NOTES,nindex);
++			if (notesi && mxIsChar(notesi) && mxGetNumberOfElements(notesi)) {
++				if (!notes) {
++					notes=(char *) xmalloc((mxGetNumberOfElements(notesi)+1)*sizeof(char));
++					mxGetString(notesi,notes,mxGetNumberOfElements(notesi)+1);
++				}
++				else {
++/*  note that strlen does not include trailing null  */
++					notes=(char *) xrealloc(notes,(strlen(notes)+1+mxGetNumberOfElements(notesi)+1)*sizeof(char));
++					strcat(notes,"\n");
++					mxGetString(notesi,&notes[strlen(notes)],mxGetNumberOfElements(notesi)+1);
++				}
++			}
++		}
++	}
++	else
++		FetchData(&notes,NOTES);
++	if (verbose) printf("  notes  =\"%s\"\n",notes);
++
++	FetchData(&elem,&melem,&nelem,ELEMHANDLE);
++	if (verbose) printf("  elem   =size [%d x %d]\n",melem,nelem);
++	FetchData(&nodecon,&mncon,&nncon,NODECONHANDLE);
++	if (verbose) printf("  nodecon=size [%d x %d]\n",mncon,nncon);
++	FetchData(&lat,&mlat,&nlat,LATHANDLE);
++	llat=mlat*nlat;
++	if (verbose) printf("  lat    =length [%d]\n",llat);
++	FetchData(&lng,&mlng,&nlng,LNGHANDLE);
++	llng=mlng*nlng;
++	if (verbose) printf("  lng    =length [%d]\n",llng);
++	FetchData(&part,&mprt,&nprt,PARTHANDLE);
++	lprt=mprt*nprt;
++	if (verbose) printf("  part   =length [%d]\n",lprt);
++	FetchData(&data,&mdata,&ndata,DATAHANDLE);
++	if (verbose) printf("  data   =size [%d x %d]\n",mdata,ndata);
++	FetchData(&cmap,&mcmap,&ncmap,CMAPHANDLE);
++	if (verbose) printf("  cmap   =size [%d x %d]\n",mcmap,ncmap);
++	FetchData(&filnam,FILENAME);
++	if (verbose) printf("  filnam =\"%s\"\n",filnam);
++
++	if (verbose) printf("Parsing options:\n");
++	options=new Options(NRHS,nrhs,prhs);
++//	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
++
++	/*some checks*/
++	if (verbose) printf("Checking inputs:\n");
++
++	for (i=0; i<melem*nelem; i++)
++		if (elem[i] > nnodes)
++			nnodes=elem[i];
++	if (verbose) printf("  nnodes =%d\n",nnodes);
++	if (part)
++		for (i=0; i<lprt; i++)
++			if (part[i]+1 > nparts)
++				nparts=part[i]+1;
++	if (verbose) printf("  nparts =%d\n",nparts);
++
++	if      (nodecon && (mncon != nnodes))
++		_error_("Nodal connectivity table, if supplied, must be supplied for all nodes.");
++	else if (!nodecon)
++		mncon=nnodes;
++	if ((llat != nnodes) || (llng != nnodes) || (llat != llng))
++		_error_("Latitude and longitude vectors must be supplied for all nodes.");
++	if (part && (lprt != nnodes))
++		_error_("Partitioning vector, if supplied, must be supplied for all nodes.");
++	if (data && !((mdata == nnodes) || (mdata == melem)))
++		_error_("Data matrix, if supplied, must be supplied for all nodes or all elements.");
++	if (cmap && (ncmap != 3))
++		_error_("Colormap matrix, if supplied, must have three columns for rgb.");
++
++	if (!strlen(filnam))
++		strcpy(filnam,"stdout");
++
++	if (verbose) printf("Opening file \"%s\".\n",filnam);
++	fid=fopen(filnam,"w");
++
++	/* Run core computations: */
++	if (verbose) printf("Calling core:\n");
++	KMLMeshWritex(&ierror,
++				  name,
++				  notes,
++				  elem,melem,nelem,
++				  nodecon,mncon,nncon,
++				  lat,lng,
++				  part,
++				  data,mdata,ndata,
++				  cmap,mcmap,ncmap,
++				  fid);
++
++	if (verbose) printf("Closing file \"%s\".\n",filnam);
++	fclose(fid);
++
++	/*Write data: */
++	WriteData(ERRORFLAG,ierror);
++
++	/*Clean-up*/
++	delete options;
++	if (mxIsCell(NOTES) && notes) xfree((void**)&notes);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void KMLMeshWriteUsage(void)
++{
++	_printf_(true,"KMLMeshWrite - KML mesh writer module:\n");
++	_printf_(true,"\n");
++	_printf_(true,"   This module writes the mesh of a model as KML polygons into the specified KML file.\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Usage:\n");
++	_printf_(true,"      ierror=KMLMeshWrite(name,notes,elem,nodecon,lat,long,part,data,cmap,kmlfile);\n");
++	_printf_(true,"\n");
++	_printf_(true,"      name       model name (string, may be empty)\n");
++	_printf_(true,"      notes      model notes (string or cell array of strings, may be empty)\n");
++	_printf_(true,"      elem       elements (double array)\n");
++	_printf_(true,"      nodecon    nodal connectivity array (double array, may be empty)\n");
++	_printf_(true,"      lat        nodal latititudes (double vector)\n");
++	_printf_(true,"      long       nodal longitudes (double vector)\n");
++	_printf_(true,"      part       nodal partitions (double vector, may be empty)\n");
++	_printf_(true,"      data       nodal or element data (double vector, may be empty)\n");
++	_printf_(true,"      cmap       color map (double nx3 array, may be empty)\n");
++	_printf_(true,"      kmlfile    KML file name (string)\n");
++	_printf_(true,"\n");
++	_printf_(true,"      ierror     error flag (double, non-zero for error)\n");
++	_printf_(true,"\n");
++	_printf_(true,"   Example:\n");
++	_printf_(true,"      KMLMeshWrite(md.name,md.notes,md.elements,md.nodeconnectivity,md.lat,md.long,md.part,md.fm_criterion,options.cmap,filekml);\n");
++	_printf_(true,"\n");
++}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.h	(revision 12032)
+@@ -0,0 +1,44 @@
++/*!\file:  Chaco.h
++ * \brief header file for Chaco module.
++ */ 
++
++#ifndef _CHACO_H
++#define _CHACO_H
++
++/* local prototypes: */
++void ChacoUsage(void);
++
++#include <stdio.h>
++#include <string.h>    /*  strcasecmp  */
++#include <time.h>      /*  clock,time,difftime  */
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/Container/Container.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++    
++/* serial input macros: */
++#define A_IN (mxArray*)prhs[0]
++#define VWGTS_IN (mxArray*)prhs[1]
++#define EWGTS_IN (mxArray*)prhs[2]
++#define X_IN (mxArray*)prhs[3]
++#define Y_IN (mxArray*)prhs[4]
++#define Z_IN (mxArray*)prhs[5]
++#define OPTNS_IN (mxArray*)prhs[6]
++#define NPARTS_IN (mxArray*)prhs[7]
++#define GOAL_IN (mxArray*)prhs[8]
++
++/* serial output macros: */
++#define ASSGN_OUT (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++#undef NRHS
++#define NRHS  9
++
++#undef __FUNCT__ 
++#define __FUNCT__  "Chaco"
++
++#endif  /* _CHACO_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12032)
+@@ -0,0 +1,146 @@
++/*\file Chaco.c
++ *\brief:  Chaco partitioner mex module
++ */
++
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++
++#include "./Chaco.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++   
++	int i;
++	int nterms;
++
++	/*Inputs: */
++	int       nvtxs;		/* number of vertices in graph */
++    int      *start;		/* start of edge list for each vertex */
++    int      *adjacency;	/* edge list data */
++    int      *vwgts=NULL;	/* weights for all vertices */
++	int       nedges;
++    float    *ewgts=NULL;	/* weights for all edges */
++    float    *x=NULL;
++    float    *y=NULL;
++    float    *z=NULL;		/* coordinates for inertial method */
++    double    options[10]={1,1,0,0,1,1,50,0,.001,7654321}; /* architecture and partitioning options */
++    double*   in_options=NULL;
++    int      *nparts=NULL;	/* number of parts options */
++	int       npart;
++    double   *goal=NULL;	/* desired set sizes */
++
++	/*intermediary pointers: */
++	mwIndex *mwstart, *mwadjacency;
++	double  *doublepointer;
++
++	/*output: */
++    short    *assignment=NULL;	/* set number of each vtx (length nvtxs+1) */
++	double   *doubleassignment=NULL;	/*holds assignment, in double format, to return to matlab*/
++
++
++	#ifndef _HAVE_CHACO_ //only works if dakota library has been compiled in.
++	_error_(" Chaco not available! Cannot carry out Chaco partitioning!");
++	#endif
++
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ChacoUsage);
++
++
++	/*Fetch adjacency matrix: */
++	nvtxs = mxGetN(A_IN);
++
++	mwstart = mxGetJc(A_IN);
++	start=(int*)xmalloc(nvtxs*sizeof(int));
++	for (i=0; i<nvtxs+1;i++)start[i]=(int)mwstart[i];
++
++	mwadjacency = mxGetIr(A_IN);
++	adjacency = (int*)xmalloc(mxGetNzmax(A_IN)*sizeof(int));
++	for (i=0; i<mxGetNzmax(A_IN); i++) adjacency[i]= (int)mwadjacency[i];
++
++	nedges = start[nvtxs];
++	if(!mxIsEmpty(EWGTS_IN)){
++		ewgts = (float *) xcalloc(nedges, sizeof(float));
++		doublepointer=mxGetPr(A_IN);
++		for (i = 0; i < nedges; i++)ewgts[i] = (float)doublepointer[i];
++	}
++	else ewgts=NULL;
++
++	/*Fetch rest of data: */
++	FetchData(&vwgts,&nterms,VWGTS_IN); 
++
++	FetchData(&x,&nterms,X_IN); 
++	FetchData(&y,&nterms,Y_IN); 
++	FetchData(&z,&nterms,Z_IN); 
++	
++	FetchData(&in_options,&nterms,OPTNS_IN); 
++	for (i=0;i<(nterms<10?nterms:10);i++) options[i]=in_options[i]; //copy in_options into default options
++	
++	FetchData(&npart,NPARTS_IN); 
++	nparts=(int*)xmalloc(sizeof(int)); nparts[0]=npart; //weird Chacox interface ain't it?
++
++	FetchData(&goal,&nterms,GOAL_IN); 
++	
++	/*Some debugging print: {{{*/
++	#ifdef _DEBUG_
++	printf("nvtxs: %i\n",nvtxs);
++	printf("options: [");
++	for(i=0;i<10;i++)printf("%g|",options[i]);
++	printf("]\n");
++	printf("start: \n");
++	for (i=0; i<nvtxs+1;i++)printf("%i ",start[i]);
++	printf("\n");
++	printf("adjacency: \n");
++	for (i=0; i<mxGetNzmax(A_IN);i++)printf("%i ",adjacency[i]);
++	printf("\n");
++	printf("nedges: %i %p\n",nedges,ewgts);
++	if(ewgts) for (i = 0; i < nedges; i++)printf("%g ",ewgts[i]);
++	printf("\n");
++	printf("vwgts:\n");
++	for (i = 0; i < nvtxs; i++)printf("%g ",vwgts[i]);
++	printf("\n");
++	printf("nparts: %i\n",nparts[0]);
++	printf("goal: %p\n",goal);
++	#endif
++	/*}}}*/
++	
++	/*Allocate output: */
++	assignment = (short *) xcalloc(nvtxs, sizeof(short));
++	
++    /*Call core: */
++	Chacox(nvtxs, start, adjacency, vwgts, ewgts, x, y, z, assignment, options, nparts, goal);
++
++    /*Output data: */
++	doubleassignment=(double*)xmalloc(nvtxs*sizeof(double));
++	for (i=0;i<nvtxs;i++) doubleassignment[i]=(double)assignment[i];
++	WriteData(ASSGN_OUT,doubleassignment,nvtxs);
++
++	/*Free ressources:*/
++	xfree((void**)&assignment); 
++	xfree((void**)&goal);
++	xfree((void**)&nparts);
++	xfree((void**)&z);
++	xfree((void**)&y);
++	xfree((void**)&x);
++	xfree((void**)&ewgts);
++	xfree((void**)&vwgts);
++	xfree((void**)&adjacency);
++	xfree((void**)&start);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void ChacoUsage( void )
++{
++	_printf_(true,"\n");
++	_printf_(true,"Usage: [assgn] = Chaco(A,vwgts,ewgts,x,y,z,options,nparts,goal);\n");
++	_printf_(true,"\n");
++}
++
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules
+___________________________________________________________________
+Added: svn:ignore
+   + __pycache__
+Makefile
+.ignore.txt
+Makefile.in
+*.mexa64
+.deps
+*.exe
+*.exp
+*.lib
+*.obj
+*.mexw64
+*.mexw64.manifest
+*.mexw64.map
+*.mexw32
+*.mexw32.manifest
+*.mexw32.map
+*.exe.manifest
+
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/Makefile.am	(revision 12031)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/Makefile.am	(revision 12032)
+@@ -1,2 +1,2 @@
+ EXTRA_DIST =  perl  pro
+-SUBDIRS = c mex m
++SUBDIRS = c modules m
Index: /issm/oecreview/Archive/12010-12040/ISSM-12032-12033.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12032-12033.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12032-12033.diff	(revision 12325)
@@ -0,0 +1,14 @@
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/python
+___________________________________________________________________
+Added: svn:ignore
+   + Makefile
+
+
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/matlab
+___________________________________________________________________
+Added: svn:ignore
+   + Makefile
+
+
Index: /issm/oecreview/Archive/12010-12040/ISSM-12034-12035.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12034-12035.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12034-12035.diff	(revision 12325)
@@ -0,0 +1,32 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac	(revision 12034)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac	(revision 12035)
+@@ -36,9 +36,9 @@
+ AC_CONFIG_FILES([Makefile
+ 			src/Makefile
+ 			src/c/Makefile
+-			src/mex/Makefile
+-			src/mex/python/Makefile
+-			src/mex/matlab/Makefile
++			src/modules/Makefile
++			src/modules/python/Makefile
++			src/modules/matlab/Makefile
+ 			src/m/Makefile
+ 			bin/Makefile])
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh	(revision 12034)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh	(revision 12035)
+@@ -258,8 +258,8 @@
+ 
+ #PYTHON
+ export PATH="$PYTHON_DIR/bin:$PATH"
+-export PYTHONPATH="$PYTHONPATH:$ISSM_TIER/src/mex/python"
+-export LD_LIBRARY_PATH=$ISSM_TIER/src/mex/python:$LD_LIBRARY_PATH
++export PYTHONPATH="$PYTHONPATH:$ISSM_TIER/src/modules/python"
++export LD_LIBRARY_PATH=$ISSM_TIER/src/modules/python:$LD_LIBRARY_PATH
+ 
+ #MODELE
+ export PATH="$MODELE_DIR/src/exec:$PATH"
Index: /issm/oecreview/Archive/12010-12040/ISSM-12035-12036.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12035-12036.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12035-12036.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py	(revision 12035)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py	(revision 12036)
+@@ -35,7 +35,7 @@
+ 				file=os.path.splitext(file)[0]
+ 				#__import__(file)
+ 				
+-sys.path.append(ISSM_TIER + '/src/mex')
++sys.path.append(ISSM_TIER + '/src/modules/python')
+ 
+ #Deal with scipy import: 
+ import scipy 
Index: /issm/oecreview/Archive/12010-12040/ISSM-12036-12037.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12036-12037.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12036-12037.diff	(revision 12325)
@@ -0,0 +1,47 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12036)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12037)
+@@ -32,7 +32,7 @@
+ 		matrix->matrix->GetSize(&rows,cols);
+ 		#endif
+ 
+-		/*Now transpose the matrix: */
++		/*Now transpose the matrix and allocate with Matlab's memory manager: */
+ 		tmatrix_ptr=(double*)mxMalloc(rows*cols*sizeof(double));
+ 		for(i=0;i<cols;i++){
+ 			for(j=0;j<rows;j++){
+@@ -62,6 +62,7 @@
+ 	
+ 	mxArray* dataref=NULL;
+ 	double*  vector_ptr=NULL;
++	double*  vector_ptr2=NULL;
+ 	int      rows;
+ 	
+ 	if(vector){
+@@ -73,17 +74,22 @@
+ 		vector->vector->GetSize(&rows);
+ 		#endif
+ 		
+-		/*now create the matlab vector: */
++		/*now create the matlab vector with Matlab's memory manager */
++		vector_ptr2=(double*)mxMalloc(rows*sizeof(double));
++		for(int i=0;i<rows;i++) vector_ptr2[i]=vector_ptr[i];
++
+ 		dataref = mxCreateDoubleMatrix(0,0,mxREAL);                         
+ 		mxSetM(dataref,rows);
+ 		mxSetN(dataref,1);                                                                                          
+-		mxSetPr(dataref,vector_ptr);           
++		mxSetPr(dataref,vector_ptr2);           
+ 	}
+ 	else{
+ 		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+ 	}
++
++	/*Clean-up and return*/
++	xfree((void**)&vector_ptr);
+ 	*pdataref=dataref;
+-
+ }
+ /*}}}*/
+ /*FUNCTION WriteData(mxArray** pdataref,double* matrix, int M,int N){{{1*/
Index: /issm/oecreview/Archive/12010-12040/ISSM-12037-12038.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12037-12038.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12037-12038.diff	(revision 12325)
@@ -0,0 +1,1505 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/thermal.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/thermal.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/thermal.py	(revision 12038)
+@@ -0,0 +1,26 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class thermal:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.spctemperature    = float('NaN')
++		self.penalty_threshold = 0
++		self.stabilization     = 0
++		self.maxiter           = 0
++		self.penalty_lock      = 0
++		self.penalty_factor    = 0
++		self.isenthalpy        = 0
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string='   Thermal solution parameters:'
++		string="%s\n\n%s"%(string,fielddisplay(obj,'spctemperature','temperature constraints (NaN means no constraint)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'stabilization','0->no, 1->artificial_diffusivity, 2->SUPG'))
++		string="%s\n%s"%(string,fielddisplay(obj,'maxiter','maximum number of non linear iterations'))
++		string="%s\n%s"%(string,fielddisplay(obj,'penalty_lock','stabilize unstable thermal constraints that keep zigzagging after n iteration (default is 0, no stabilization)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'penalty_threshold','threshold to declare convergence of thermal solution (default is 0)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'isenthalpy','use an enthalpy formulation to include temperate ice (default is 0)'))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/settings.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/settings.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/settings.py	(revision 12038)
+@@ -0,0 +1,24 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class settings:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.io_gather           = 0;
++		self.lowmem              = 0;
++		self.results_as_patches  = 0;
++		self.output_frequency    = 0;
++		self.waitonlock          = 0;
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string="   general settings parameters:"
++
++		string="%s\n%s"%(string,fielddisplay(obj,"io_gather","I/O gathering strategy for result outputs (default 1)"))
++		string="%s\n%s"%(string,fielddisplay(obj,"lowmem","is the memory limited ? (0 or 1)"))
++		string="%s\n%s"%(string,fielddisplay(obj,"results_as_patches","provide results as patches for each element (0 or 1)"))
++		string="%s\n%s"%(string,fielddisplay(obj,"output_frequency","frequency at which results are saved in all solutions with multiple time_steps"))
++		string="%s\n%s"%(string,fielddisplay(obj,"waitonlock","maximum number of minutes to wait for batch results, or return 0"))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/balancethickness.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/balancethickness.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/balancethickness.py	(revision 12038)
+@@ -0,0 +1,20 @@
++#module imports
++from fielddisplay import fielddisplay
++class balancethickness:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.spcthickness = float('NaN')
++		self.thickening_rate           = float('NaN')
++		self.stabilization           = 0
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		
++		string='   balance thickness solution parameters:' 
++		
++		string="%s\n\n%s"%(string,fielddisplay(obj,'spcthickness','thickness constraints (NaN means no constraint)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'thickening_rate','ice thickening rate used in the mass conservation (dh/dt)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'stabilization','0: None, 1: SU, 2: MacAyeal''s artificial diffusivity, 3:DG'))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/groundingline.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/groundingline.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/groundingline.py	(revision 12038)
+@@ -0,0 +1,18 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class groundingline:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.migration=''
++		self.melting_rate=float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string='   grounding line solution parameters:'
++
++		string="%s\n\n%s"%(string,fielddisplay(obj,'migration','type of grounding line migration: ''SoftMigration'',''AgressiveMigration'' or ''None'''))
++		string="%s\n%s"%(string,fielddisplay(obj,'melting_rate','melting rate applied when previously grounded parts start floating'))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/transient.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/transient.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/transient.py	(revision 12038)
+@@ -0,0 +1,23 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class transient:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.isprognostic      = 0
++		self.isdiagnostic      = 0
++		self.isthermal         = 0
++		self.isgroundingline   = 0
++		self.requested_outputs = float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string='   transient solution parameters:'
++		string="%s\n%s"%(string,fielddisplay(obj,'isprognostic','indicates if a prognostic solution is used in the transient'))
++		string="%s\n%s"%(string,fielddisplay(obj,'isthermal','indicates if a thermal solution is used in the transient'))
++		string="%s\n%s"%(string,fielddisplay(obj,'isdiagnostic','indicates if a diagnostic solution is used in the transient'))
++		string="%s\n%s"%(string,fielddisplay(obj,'isgroundingline','indicates if a groundingline migration is used in the transient'))
++		string="%s\n%s"%(string,fielddisplay(obj,'requested_outputs','list of additional outputs requested'))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/hydrology.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/hydrology.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/hydrology.py	(revision 12038)
+@@ -0,0 +1,29 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class hydrology:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.spcwatercolumn = float('NaN')
++		self.n              = 0
++		self.CR             = 0
++		self.p              = 0
++		self.q              = 0
++		self.kn             = 0
++		self.stabilization  = 0
++	
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		
++		string='   hydrology solution parameters:'
++		string="%s\n\n%s"%(string,fielddisplay(obj,'spcwatercolumn','water thickness constraints (NaN means no constraint)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'n','Manning roughness coefficient'))
++		string="%s\n%s"%(string,fielddisplay(obj,'CR','tortuosity parameter'))
++		string="%s\n%s"%(string,fielddisplay(obj,'p','dimensionless exponent in Manning velocity formula'))
++		string="%s\n%s"%(string,fielddisplay(obj,'q','dimensionless exponent in Manning velocity formula'))
++		string="%s\n%s"%(string,fielddisplay(obj,'kn','parameter in effective pressure formula'))
++		string="%s\n%s"%(string,fielddisplay(obj,'stabilization','artificial diffusivity (default is 1). can be more than 1 to increase diffusivity.'))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/surfaceforcings.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/surfaceforcings.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/surfaceforcings.py	(revision 12038)
+@@ -0,0 +1,19 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class surfaceforcings:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.precipitation = float('NaN')
++		self.mass_balance  = float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string="   surface forcings parameters:"
++
++		string="%s\n\n%s"%(string,fielddisplay(obj,'precipitation','surface precipitation [m/yr water eq]'))
++		string="%s\n%s"%(string,fielddisplay(obj,'mass_balance','surface mass balance [m/yr ice eq]'))
++
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/rifts.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/rifts.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/rifts.py	(revision 12038)
+@@ -0,0 +1,18 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class rifts:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.riftstruct     = float('NaN')
++		self.riftproperties = float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string='   rifts parameters:'
++
++		string="%s\n\n%s"%(string,fielddisplay(obj,'riftstruct','structure containing all rift information (vertices coordinates, segments, type of melange, ...)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'riftproperties',''))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/mesh.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/mesh.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/mesh.py	(revision 12038)
+@@ -0,0 +1,108 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class mesh:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.x                           = float('NaN');
++		self.y                           = float('NaN');
++		self.z                           = float('NaN');
++		self.elements                    = float('NaN');
++		self.dimension                   = 0;
++		self.numberoflayers              = 0;
++		self.numberofelements            = 0;
++		self.numberofvertices            = 0;
++		self.numberofedges               = 0;
++		
++		self.lat                         = float('NaN');
++		self.long                        = float('NaN');
++		self.hemisphere                  = float('NaN');
++
++		self.elementonbed                = float('NaN');
++		self.elementonsurface            = float('NaN');
++		self.vertexonbed                 = float('NaN');
++		self.vertexonsurface             = float('NaN');
++		self.lowerelements               = float('NaN');
++		self.lowervertex                 = float('NaN');
++		self.upperelements               = float('NaN');
++		self.uppervertex                 = float('NaN');
++		self.vertexonboundary            = float('NaN');
++
++		self.edges                       = float('NaN');
++		self.segments                    = float('NaN');
++		self.segmentmarkers              = float('NaN');
++		self.vertexconnectivity          = float('NaN');
++		self.elementconnectivity         = float('NaN');
++		self.average_vertex_connectivity = 0;
++
++		self.x2d                         = float('NaN');
++		self.y2d                         = float('NaN');
++		self.elements2d                  = float('NaN');
++		self.numberofvertices2d          = 0;
++		self.numberofelements2d          = 0;
++
++		self.extractedvertices           = float('NaN');
++		self.extractedelements           = float('NaN');
++
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++
++		if obj.dimension==3:
++			string="\n%s"%("      Elements and vertices of the original 2d mesh:")
++			
++			string="%s\n%s"%(string,fielddisplay(obj,"numberofelements2d","number of elements"))
++			string="%s\n%s"%(string,fielddisplay(obj,"numberofvertices2d","number of vertices"))
++			string="%s\n%s"%(string,fielddisplay(obj,"elements2d","index into (x,y,z), coordinates of the vertices"))
++			string="%s\n%s"%(string,fielddisplay(obj,"x2d","vertices x coordinate"))
++			string="%s\n%s"%(string,fielddisplay(obj,"y2d","vertices y coordinate"))
++
++			string="%s\n%s" %(string,"Elements and vertices of the extruded 3d mesh:")
++		else:
++			string="\n%s"%("      Elements and vertices:")
++
++		string="%s\n%s"%(string,fielddisplay(obj,"numberofelements","number of elements"))
++		
++
++
++
++		string="%s\n%s"%(string,fielddisplay(obj,"numberofvertices","number of vertices"))
++		string="%s\n%s"%(string,fielddisplay(obj,"elements","index into (x,y,z), coordinates of the vertices"))
++		string="%s\n%s"%(string,fielddisplay(obj,"x","vertices x coordinate"))
++		string="%s\n%s"%(string,fielddisplay(obj,"y","vertices y coordinate"))
++		string="%s\n%s"%(string,fielddisplay(obj,"z","vertices z coordinate"))
++		string="%s\n%s"%(string,fielddisplay(obj,"edges","edges of the 2d mesh (vertex1 vertex2 element1 element2)"))
++		string="%s\n%s"%(string,fielddisplay(obj,"numberofedges","number of edges of the 2d mesh"))
++
++		string="%s%s"%(string,"\n      Properties:")
++		
++		string="%s\n%s"%(string,fielddisplay(obj,"dimension","mesh dimension (2d or 3d)"))
++		string="%s\n%s"%(string,fielddisplay(obj,"numberoflayers","number of extrusion layers"))
++		string="%s\n%s"%(string,fielddisplay(obj,"vertexonbed","lower vertices flags list"))
++		string="%s\n%s"%(string,fielddisplay(obj,"elementonbed","lower elements flags list"))
++		string="%s\n%s"%(string,fielddisplay(obj,"vertexonsurface","upper vertices flags list"))
++		string="%s\n%s"%(string,fielddisplay(obj,"elementonsurface","upper elements flags list"))
++		string="%s\n%s"%(string,fielddisplay(obj,"uppervertex","upper vertex list (NaN for vertex on the upper surface)"))
++		string="%s\n%s"%(string,fielddisplay(obj,"upperelements","upper element list (NaN for element on the upper layer)"))
++		string="%s\n%s"%(string,fielddisplay(obj,"lowervertex","lower vertex list (NaN for vertex on the lower surface)"))
++		string="%s\n%s"%(string,fielddisplay(obj,"lowerelements","lower element list (NaN for element on the lower layer"))
++		string="%s\n%s"%(string,fielddisplay(obj,"vertexonboundary","vertices on the boundary of the domain flag list"))
++		
++		string="%s\n%s"%(string,fielddisplay(obj,"segments","edges on domain boundary (vertex1 vertex2 element)"))
++		string="%s\n%s"%(string,fielddisplay(obj,"segmentmarkers","number associated to each segment"))
++		string="%s\n%s"%(string,fielddisplay(obj,"vertexconnectivity","list of vertices connected to vertex_i"))
++		string="%s\n%s"%(string,fielddisplay(obj,"elementconnectivity","list of vertices connected to element_i"))
++		string="%s\n%s"%(string,fielddisplay(obj,"average_vertex_connectivity","average number of vertices connected to one vertex"))
++
++		string="%s%s"%(string,"\n      Extracted model:")
++
++		string="%s\n%s"%(string,fielddisplay(obj,"extractedvertices","vertices extracted from the model"))
++		string="%s\n%s"%(string,fielddisplay(obj,"extractedelements","elements extracted from the model"))
++
++		string="%s%s"%(string,"\n      Projection:")
++		string="%s\n%s"%(string,fielddisplay(obj,"lat","vertices latitude"))
++		string="%s\n%s"%(string,fielddisplay(obj,"long","vertices longitude"))
++		string="%s\n%s"%(string,fielddisplay(obj,"hemisphere","Indicate hemisphere ""n"" or ""s"" "))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/timestepping.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/timestepping.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/timestepping.py	(revision 12038)
+@@ -0,0 +1,21 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class timestepping:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.time_step       = 0;
++		self.final_time      = 0;
++		self.time_adapt      = 0;
++		self.cfl_coefficient = 0;
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string="   timestepping parameters:"
++		string="%s\n\n%s"%(string,fielddisplay(obj,"time_step","length of time steps [yrs]"))
++		string="%s\n%s"%(string,fielddisplay(obj,"final_time","final time to stop the simulation [yrs]"))
++		string="%s\n%s"%(string,fielddisplay(obj,"time_adapt","use cfl condition to define time step ? (0 or 1) "))
++		string="%s\n%s"%(string,fielddisplay(obj,"cfl_coefficient","coefficient applied to cfl condition"))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/constants.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/constants.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/constants.py	(revision 12038)
+@@ -0,0 +1,21 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class constants:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.g                    = 0
++		self.yts                  = 0
++		self.referencetemperature = 0
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string="   constants parameters:"
++		string="%s\n\n%s"%(string,fielddisplay(obj,"g","gravitational acceleration"))
++		string="%s\n%s"%(string,fielddisplay(obj,"yts","number of seconds in a year"))
++		string="%s\n%s"%(string,fielddisplay(obj,"referencetemperature","reference temperature used in the enthalpy model"))
++
++
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/generic.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/generic.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/generic.py	(revision 12038)
+@@ -0,0 +1,217 @@
++#GENERIC cluster class definition
++#
++#   Usage:
++#      cluster=generic('name','astrid',);
++#      cluster=generic('name','astrid','np',3);
++#      cluster=generic('name',oshostname(),'np',3,'login','username');
++
++
++class generic:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.name=''
++		self.login=''
++		self.np=1
++		self.port=0
++		self.interactive=1
++		self.codepath=issmtier() + '/bin'
++		self.executionpath=issmtier() + '/execution'
++		self.valgrind=issmtier() + '/externalpackages/valgrind/install/bin/valgrind'
++		self.valgrindlib=issmtier() + '/externalpackages/valgrind/install/lib/libmpidebug.so'
++		self.valgrindsup=issmtier() + '/externalpackages/valgrind/issm.supp'
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		
++		string="class 'generic' object:"
++		string="%s\n\n%s"%(string,"%s%s"%('    name: ',obj.name))
++		string="%s\n%s"%(string,"%s%i"%('    np: ',obj.np))
++		string="%s\n%s"%(string,"%s%i"%('    port: ',obj.port))
++		string="%s\n%s"%(string,"%s%s"%('    codepath: ',obj.codepath))
++		string="%s\n%s"%(string,"%s%s"%('    executionpath: ',obj.executionpath))
++		string="%s\n%s"%(string,"%s%s"%('    valgrind: ',obj.valgrind))
++		string="%s\n%s"%(string,"%s%s"%('    valgrindlib: ',obj.valgrindlib))
++		string="%s\n%s"%(string,"%s%s"%('    valgrindsup: ',obj.valgrindsup))
++		return string
++		#}}}
++		
++
++#old matlab
++#		function cluster=generic(varargin) % {{{1
++#
++#			 %use provided options to change fields
++#			 options=pairoptions(varargin{:});
++#
++#			 %get name
++#			 if ~exist(options,'name'), error('option ''name'' has not been provided'); end
++#			 cluster.name=getfieldvalue(options,'name');
++#
++#			 %initialize cluster using user settings if provided
++#			 if (exist([cluster.name '_settings'])==2), eval([cluster.name '_settings']); end
++#
++#			 %OK get other fields
++#			 for i=1:size(options.list,1),
++#				 fieldname=options.list{i,1};
++#				 fieldvalue=options.list{i,2};
++#				 if ismember(fieldname,properties('generic')),
++#					 cluster.(fieldname)=fieldvalue;
++#				 else
++#					 disp(['''' fieldname ''' is not a property of cluster generic']);
++#				 end
++#			 end
++#		 end
++#		 %}}}
++#		 function checkconsistency(cluster,md,solution,analyses) % {{{1
++#			 if cluster.np<1
++#				 checkmessage(['number of processors should be at least 1']);
++#			 end
++#			 if isnan(cluster.np),
++#				 checkessage('number of processors should not be NaN!');
++#			 end
++#		 end
++#		 %}}}
++#		 function BuildQueueScript(cluster,md) % {{{1
++#		 
++#			 %retrieve parameters
++#			 modelname=md.miscellaneous.name;
++#			 solution=md.private.solution;
++#			 isvalgrind=md.debug.valgrind;
++#			 isgprof=md.debug.gprof;
++#
++#			 %open file for writing: 
++#			 if ~ispc,
++#				 fid=fopen([modelname '.queue'],'w');
++#			 else
++#				 fid=fopen([modelname '.bat'],'w');
++#			 end
++#
++#			 %write instructions for launching a job on the cluster
++#			 if ~ispc,
++#				 fprintf(fid,'#!/bin/sh\n');
++#			 else
++#				 fprintf(fid,'@echo off\n');
++#			 end
++#			 
++#			 if ~isvalgrind,
++#				 if cluster.interactive
++#					 if ~ispc,
++#						 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s ',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
++#					 else
++#						 fprintf(fid,'"%s/issm.exe" %s "%s" %s ',cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
++#					 end
++#				 else
++#					 if ~ispc,
++#						 fprintf(fid,'mpiexec -np %i %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',cluster.np,cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
++#					 else
++#						 fprintf(fid,'"%s/issm.exe" %s "%s" %s 2> %s.errlog >%s.outlog ',cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
++#					 end
++#				 end
++#			 else
++#				 if ~ispc,
++#					 %Add --gen-suppressions=all to get suppression lines
++#					 fprintf(fid,'LD_PRELOAD=%s \\\n',cluster.valgrindlib);
++#					 fprintf(fid,'mpiexec -np %i %s --leak-check=full --suppressions=%s %s/issm.exe %s %s %s 2> %s.errlog >%s.outlog ',...
++#					 cluster.np,cluster.valgrind,cluster.valgrindsup, cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
++#				 else
++#					 error('valgrind not supported on windows platforms');
++#				 end
++#			 end
++#
++#			 if isgprof,
++#				 if ~ispc,
++#					 fprintf(fid,'\n gprof %s/issm.exe gmon.out > %s.performance',cluster.codepath,modelname);
++#				 else
++#					 error('gprof not supported on windows platforms');
++#				 end
++#
++#			 end
++#
++#			 if ~md.settings.io_gather,
++#				 if ~ispc,
++#					 %concatenate the output files:
++#					 fprintf(fid,'\ncat %s.outbin.* > %s.outbin',modelname,modelname);
++#				 else
++#					 error('iogather not supported on windows platforms');
++#				 end
++#
++#			 end
++#			 
++#			 %close file: 
++#			 fclose(fid);
++#
++#			 %in interactive mode, create a run file, and errlog and outlog file
++#			 if cluster.interactive,
++#				 fid=fopen([modelname '.errlog'],'w'); fclose(fid);
++#				 fid=fopen([modelname '.outlog'],'w'); fclose(fid);
++#			 end
++#
++#
++#		 end
++#		 %}}}
++#		 function LaunchQueueJob(cluster,md,options)% {{{1
++#			 
++#			 if ~ispc,
++#					 %lauch command, to be executed via ssh
++#					 launchcommand=['cd ' cluster.executionpath ' && rm -rf ./' md.private.runtimename ' && mkdir ' md.private.runtimename ...
++#					 ' && cd ' md.private.runtimename ' && mv ../' md.private.runtimename '.tar.gz ./ && tar -zxf ' md.private.runtimename '.tar.gz  && source  ' md.miscellaneous.name '.queue '];
++#
++#					 if ~strcmpi(options.batch,'yes'),
++#
++#						 %compress the files into one zip.
++#						 compressstring=['tar -zcf ' md.private.runtimename '.tar.gz ' md.miscellaneous.name '.bin ' md.miscellaneous.name '.queue '  md.miscellaneous.name '.petsc '];
++#						 if md.qmu.isdakota,
++#							 compressstring=[compressstring md.miscellaneous.name '.qmu.in'];
++#					end
++#					if cluster.interactive,
++#						compressstring=[compressstring ' ' md.miscellaneous.name '.errlog ' md.miscellaneous.name '.outlog '];
++#					end
++#					system(compressstring);
++#
++#					disp('uploading input file and queueing script');
++#					issmscpout(cluster.name,cluster.executionpath,cluster.login,cluster.port,{[md.private.runtimename '.tar.gz']});
++#
++#					disp('launching solution sequence on remote cluster');
++#					issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
++#				else
++#					disp('batch mode requested: not launching job interactively');
++#					disp('launch solution sequence on remote cluster by hand');
++#				end
++#			else
++#				%launch right here, do not compress or archive.
++#				system([md.miscellaneous.name '.bat']);
++#			end
++#
++#		end %}}}
++#		 function Download(cluster,md)% {{{1
++#
++#			if ~ispc,
++#				%some check
++#				if isempty(md.private.runtimename),
++#					error('supply runtime name for results to be loaded!');
++#				end
++#
++#				%Figure out the  directory where all the files are in: 
++#				directory=[cluster.executionpath '/' md.private.runtimename '/'];
++#
++#				%What packages are we picking up from remote cluster
++#				packages={[md.miscellaneous.name '.outlog'],[md.miscellaneous.name '.errlog']};
++#				if md.qmu.isdakota,
++#					packages{end+1}=[md.miscellaneous.name '.qmu.err'];
++#					packages{end+1}=[md.miscellaneous.name '.qmu.out'];
++#					if isfield(md.qmu.params,'tabular_graphics_data'),
++#						if md.qmu.params.tabular_graphics_data==true,
++#							packages{end+1}='dakota_tabular.dat'; 
++#						end
++#					end
++#				else
++#					packages{end+1}=[md.miscellaneous.name '.outbin'];
++#				end
++#
++#				%copy files from cluster to present directory
++#				issmscpin(cluster.name, cluster.login, cluster.port, directory, packages);
++#			else
++#				%do nothing!
++#			end
++#		end %}}}
++#
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/none.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/none.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/none.py	(revision 12038)
+@@ -0,0 +1,24 @@
++#NONE cluster class definition
++#
++#   Usage:
++#      cluster=none();
++#      cluster=none('np',3);
++#      cluster=none('np',3,'login','username');
++
++class none:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.name='none'
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		
++		string="class 'none' object:"
++		string="%s\n\n%s"%(string,"%s%s"%('    name: ',obj.name))
++		return string
++		#}}}
++	def checkconsistency(cluster,md,solution,analyses):
++		pass
++	def BuildQueueScript(cluster,md):
++			 raise RuntimeError('none.BuildQueueScript error message: serial cluster cannot build queue script')
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/friction.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/friction.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/friction.py	(revision 12038)
+@@ -0,0 +1,19 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class friction:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.coefficient = float('NaN')
++		self.p           = float('NaN')
++		self.q           = float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string="Sigma= drag^2 * Neff ^r * u ^s, with Neff=rho_ice*g*thickness+rho_water*g*bed, r=q/p and s=1/p"
++		string="%s\n\n%s"%(string,fielddisplay(obj,"coefficient","friction coefficient [SI]"))
++		string="%s\n%s"%(string,fielddisplay(obj,"p","p exponent"))
++		string="%s\n%s"%(string,fielddisplay(obj,"q","q exponent"))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/materials.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/materials.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/materials.py	(revision 12038)
+@@ -0,0 +1,41 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class materials:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.rho_ice                    = 0;
++		self.rho_water                  = 0;
++		self.mu_water                   = 0;
++		self.heatcapacity               = 0;
++		self.latentheat                 = 0;
++		self.thermalconductivity        = 0;
++		self.meltingpoint               = 0;
++		self.beta                       = 0;
++		self.mixed_layer_capacity       = 0;
++		self.thermal_exchange_velocity  = 0;
++		self.rheology_B   = float('NaN')
++		self.rheology_n   = float('NaN')
++		self.rheology_law = "";
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string="   Materials:"
++
++		string="%s\n\n%s"%(string,fielddisplay(obj,"rho_ice","ice density [kg/m^3]"))
++		string="%s\n%s"%(string,fielddisplay(obj,"rho_water","water density [kg/m^3]"))
++		string="%s\n%s"%(string,fielddisplay(obj,"mu_water","water viscosity [N s/m^2]"))
++		string="%s\n%s"%(string,fielddisplay(obj,"heatcapacity","heat capacity [J/kg/K]"))
++		string="%s\n%s"%(string,fielddisplay(obj,"thermalconductivity","ice thermal conductivity [W/m/K]"))
++		string="%s\n%s"%(string,fielddisplay(obj,"meltingpoint","melting point of ice at 1atm in K"))
++		string="%s\n%s"%(string,fielddisplay(obj,"latentheat","latent heat of fusion [J/m^3]"))
++		string="%s\n%s"%(string,fielddisplay(obj,"beta","rate of change of melting point with pressure [K/Pa]"))
++		string="%s\n%s"%(string,fielddisplay(obj,"mixed_layer_capacity","mixed layer capacity [W/kg/K]"))
++		string="%s\n%s"%(string,fielddisplay(obj,"thermal_exchange_velocity","thermal exchange velocity [m/s]"))
++		string="%s\n%s"%(string,fielddisplay(obj,"rheology_B","flow law parameter [Pa/s^(1/n)]"))
++		string="%s\n%s"%(string,fielddisplay(obj,"rheology_n","Glen""s flow law exponent"))
++		string="%s\n%s"%(string,fielddisplay(obj,"rheology_law","law for the temperature dependance of the rheology: ""None"", ""Paterson"" or ""Arrhenius"""))
++
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/diagnostic.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/diagnostic.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/diagnostic.py	(revision 12038)
+@@ -0,0 +1,63 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class diagnostic:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.spcvx                    = float('NaN')
++		self.spcvy                    = float('NaN')
++		self.spcvz                    = float('NaN')
++		self.restol                   = 0
++		self.reltol                   = 0
++		self.abstol                   = 0
++		self.isnewton                 = 0
++		self.stokesreconditioning     = 0
++		self.viscosity_overshoot      = 0
++		self.icefront                 = float('NaN')
++		self.maxiter                  = 0
++		self.shelf_dampening          = 0
++		self.vertex_pairing           = float('NaN')
++		self.penalty_factor           = float('NaN')
++		self.rift_penalty_lock        = float('NaN')
++		self.rift_penalty_threshold   = 0
++		self.referential              = float('NaN')
++		self.requested_outputs        = float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		
++		
++		string='\n   Diagnostic solution parameters:'
++		string="%s\n\n%s"%(string,'      Convergence criteria:')
++			
++		string="%s\n%s"%(string,fielddisplay(obj,'restol','mechanical equilibrium residual convergence criterion'))
++		string="%s\n%s"%(string,fielddisplay(obj,'reltol','velocity relative convergence criterion, NaN -> not applied'))
++		string="%s\n%s"%(string,fielddisplay(obj,'abstol','velocity absolute convergence criterion, NaN -> not applied'))
++		string="%s\n%s"%(string,fielddisplay(obj,'isnewton','Apply Newton''s method instead of a Picard fixed point method'))
++		string="%s\n%s"%(string,fielddisplay(obj,'maxiter','maximum number of nonlinear iterations'))
++		string="%s\n%s"%(string,fielddisplay(obj,'viscosity_overshoot','over-shooting constant new=new+C*(new-old)'))
++
++		string="%s\n%s"%(string,'      boundary conditions:')
++
++		string="%s\n%s"%(string,fielddisplay(obj,'spcvx','x-axis velocity constraint (NaN means no constraint)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'spcvy','y-axis velocity constraint (NaN means no constraint)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'spcvz','z-axis velocity constraint (NaN means no constraint)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'icefront','segments on ice front list (last column 0-> Air, 1-> Water, 2->Ice'))
++
++		string="%s\n%s"%(string,'      Rift options:')
++		string="%s\n%s"%(string,fielddisplay(obj,'rift_penalty_threshold','threshold for instability of mechanical constraints'))
++		string="%s\n%s"%(string,fielddisplay(obj,'rift_penalty_lock','number of iterations before rift penalties are locked'))
++
++		string="%s\n%s"%(string,'      Penalty options:')
++		string="%s\n%s"%(string,fielddisplay(obj,'penalty_factor','offset used by penalties: penalty = Kmax*10^offset'))
++		string="%s\n%s"%(string,fielddisplay(obj,'vertex_pairing','pairs of vertices that are penalized'))
++
++		string="%s\n%s"%(string,'      Other:')
++		string="%s\n%s"%(string,fielddisplay(obj,'shelf_dampening','use dampening for floating ice ? Only for Stokes model'))
++		string="%s\n%s"%(string,fielddisplay(obj,'stokesreconditioning','multiplier for incompressibility equation. Only for Stokes model'))
++		string="%s\n%s"%(string,fielddisplay(obj,'referential','local referential'))
++		string="%s\n%s"%(string,fielddisplay(obj,'requested_outputs','additional outputs requested'))
++
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/debug.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/debug.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/debug.py	(revision 12038)
+@@ -0,0 +1,18 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class debug:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.valgrind=False
++		self.gprof   = False
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string="   debug parameters:"
++
++		string="%s\n\n%s"%(string,fielddisplay(obj,"valgrind","use Valgrind to debug (0 or 1)"))
++		string="%s\n%s"%(string,fielddisplay(obj,"gprof","use gnu-profiler to find out where the time is spent"))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/initialization.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/initialization.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/initialization.py	(revision 12038)
+@@ -0,0 +1,32 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class initialization:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		
++		self.vx            = float('NaN')
++		self.vy            = float('NaN')
++		self.vz            = float('NaN')
++		self.vel           = float('NaN')
++		self.pressure      = float('NaN')
++		self.temperature   = float('NaN')
++		self.watercolumn   = float('NaN')
++		self.waterfraction = float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string='   initial field values:'
++
++		string="%s\n%s"%(string,fielddisplay(obj,'vx','x component of velocity'))
++		string="%s\n%s"%(string,fielddisplay(obj,'vy','y component of velocity'))
++		string="%s\n%s"%(string,fielddisplay(obj,'vz','z component of velocity'))
++		string="%s\n%s"%(string,fielddisplay(obj,'vel','velocity norm'))
++		string="%s\n%s"%(string,fielddisplay(obj,'pressure','pressure field'))
++		string="%s\n%s"%(string,fielddisplay(obj,'temperature','temperature in Kelvins'))
++		string="%s\n%s"%(string,fielddisplay(obj,'watercolumn','thickness of subglacial water'))
++		string="%s\n%s"%(string,fielddisplay(obj,'waterfraction','fraction of water in the ice'))
++
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/prognostic.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/prognostic.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/prognostic.py	(revision 12038)
+@@ -0,0 +1,24 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class prognostic:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.spcthickness           = float('NaN')
++		self.min_thickness          = 0
++		self.hydrostatic_adjustment = 0
++		self.stabilization          = 0
++		self.vertex_pairing         = float('NaN')
++		self.penalty_factor         = 0
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string='   Prognostic solution parameters:'
++		string="%s\n\n%s"%(string,fielddisplay(obj,'spcthickness','thickness constraints (NaN means no constraint)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'min_thickness','minimum ice thickness allowed'))
++		string="%s\n%s"%(string,fielddisplay(obj,'hydrostatic_adjustment','adjustment of ice shelves surface and bed elevations: ''Incremental'' or ''Absolute'' '))
++		string="%s\n%s"%(string,fielddisplay(obj,'stabilization','0->no, 1->artificial_diffusivity, 2->streamline upwinding, 3->discontinuous Galerkin'))
++
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/mask.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/mask.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/mask.py	(revision 12038)
+@@ -0,0 +1,26 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class mask:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.elementonfloatingice = float('NaN')
++		self.elementongroundedice = float('NaN')
++		self.elementonwater       = float('NaN')
++		self.vertexonfloatingice  = float('NaN')
++		self.vertexongroundedice  = float('NaN')
++		self.vertexonwater        = float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++
++		string="";
++		string="%s\n%s"%(string,fielddisplay(obj,"elementonfloatingice","element on floating ice flags list"))
++		string="%s\n%s"%(string,fielddisplay(obj,"vertexonfloatingice","vertex on floating ice flags list"))
++		string="%s\n%s"%(string,fielddisplay(obj,"elementongroundedice","element on grounded ice  list"))
++		string="%s\n%s"%(string,fielddisplay(obj,"vertexongroundedice","vertex on grounded ice flags list"))
++		string="%s\n%s"%(string,fielddisplay(obj,"elementonwater","element on water flags list"))
++		string="%s\n%s"%(string,fielddisplay(obj,"vertexonwater","vertex on water flags list"))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/radaroverlay.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/radaroverlay.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/radaroverlay.py	(revision 12038)
+@@ -0,0 +1,19 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class radaroverlay:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.pwr = float('NaN')
++		self.x   = float('NaN')
++		self.y   = float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string='   radaroverlay parameters:'
++		string="%s\n\n%s"%(string,fielddisplay(obj,'pwr','radar power image (matrix)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'x','corresponding x coordinates'))
++		string="%s\n%s"%(string,fielddisplay(obj,'y','corresponding y coordinates'))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/model.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/model.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/model.py	(revision 12038)
+@@ -0,0 +1,115 @@
++#module imports {{{
++from mesh import mesh
++from mask import mask
++from geometry import geometry
++from constants import constants
++from surfaceforcings import surfaceforcings
++from basalforcings import basalforcings
++from materials import materials
++from friction import friction
++from flowequation import flowequation
++from timestepping import timestepping
++from initialization import initialization
++from rifts import rifts
++from debug import debug
++from verbose import verbose
++from settings import settings
++from solver import solver
++from none import none
++from balancethickness import balancethickness
++from diagnostic import diagnostic
++from groundingline import groundingline
++from hydrology import hydrology
++from prognostic import prognostic
++from thermal import thermal
++from steadystate import steadystate
++from transient import transient
++from autodiff import autodiff
++from flaim import flaim
++from inversion import inversion
++from qmu import qmu
++from radaroverlay import radaroverlay
++from miscellaneous import miscellaneous
++from private import private
++#}}}
++class model:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.mesh             = mesh()
++		self.mask             = mask()
++		self.geometry         = geometry()
++		self.constants        = constants()
++		self.surfaceforcings  = surfaceforcings()
++		self.basalforcings    = basalforcings()
++		self.materials        = materials()
++		self.friction         = friction()
++		self.flowequation     = flowequation()
++		self.timestepping     = timestepping()
++		self.initialization   = initialization()
++		self.rifts            = rifts()
++
++		self.debug            = debug()
++		self.verbose          = verbose()
++		self.settings         = settings()
++		self.solver           = solver()
++		self.cluster          = none()
++
++		self.balancethickness = balancethickness()
++		self.diagnostic       = diagnostic()
++		self.groundingline    = groundingline()
++		self.hydrology        = hydrology()
++		self.prognostic       = prognostic()
++		self.thermal          = thermal()
++		self.steadystate      = steadystate()
++		self.transient        = transient()
++
++		self.autodiff         = autodiff()
++		self.flaim            = flaim()
++		self.inversion        = inversion()
++		self.qmu              = qmu()
++
++		self.results          = [];
++		self.radaroverlay     = radaroverlay()
++		self.miscellaneous    = miscellaneous()
++		self.private          = private()
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++
++		#print "Here %s the number: %d" % ("is", 37)
++		string="%19s: %-22s -- %s" % ("mesh","[%s,%s]" % ("1x1",obj.mesh.__class__.__name__),"mesh properties")
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("mask","[%s,%s]" % ("1x1",obj.mask.__class__.__name__),"defines grounded and floating elements"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("geometry","[%s,%s]" % ("1x1",obj.geometry.__class__.__name__),"surface elevation, bedrock topography, ice thickness,..."))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("constants","[%s,%s]" % ("1x1",obj.constants.__class__.__name__),"physical constants"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("surfaceforcings","[%s,%s]" % ("1x1",obj.surfaceforcings.__class__.__name__),"surface forcings"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("basalforcings","[%s,%s]" % ("1x1",obj.basalforcings.__class__.__name__),"bed forcings"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("materials","[%s,%s]" % ("1x1",obj.materials.__class__.__name__),"material properties"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("friction","[%s,%s]" % ("1x1",obj.friction.__class__.__name__),"basal friction/drag properties"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("flowequation","[%s,%s]" % ("1x1",obj.flowequation.__class__.__name__),"flow equations"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("timestepping","[%s,%s]" % ("1x1",obj.timestepping.__class__.__name__),"time stepping for transient models"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("initialization","[%s,%s]" % ("1x1",obj.initialization.__class__.__name__),"initial guess/state"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("rifts","[%s,%s]" % ("1x1",obj.rifts.__class__.__name__),"rifts properties'"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("debug","[%s,%s]" % ("1x1",obj.debug.__class__.__name__),"debugging tools (valgrind, gprof"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("verbose","[%s,%s]" % ("1x1",obj.verbose.__class__.__name__),"verbosity level in solve"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("settings","[%s,%s]" % ("1x1",obj.settings.__class__.__name__),"settings properties"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("solver","[%s,%s]" % ("1x1",obj.solver.__class__.__name__),"PETSc options for each solution'"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("cluster","[%s,%s]" % ("1x1",obj.cluster.__class__.__name__),"cluster parameters (number of cpus...)"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("balancethickness","[%s,%s]" % ("1x1",obj.balancethickness.__class__.__name__),"parameters for balancethickness solution"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("diagnostic","[%s,%s]" % ("1x1",obj.diagnostic.__class__.__name__),"parameters for diagnostic solution"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("groundingline","[%s,%s]" % ("1x1",obj.groundingline.__class__.__name__),"parameters for groundingline solution"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("hydrology","[%s,%s]" % ("1x1",obj.hydrology.__class__.__name__),"parameters for hydrology solution"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("prognostic","[%s,%s]" % ("1x1",obj.prognostic.__class__.__name__),"parameters for prognostic solution"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("thermal","[%s,%s]" % ("1x1",obj.thermal.__class__.__name__),"parameters for thermal solution"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("steadystate","[%s,%s]" % ("1x1",obj.steadystate.__class__.__name__),"parameters for steadystate solution"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("transient","[%s,%s]" % ("1x1",obj.transient.__class__.__name__),"parameters for transient solution"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("autodiff","[%s,%s]" % ("1x1",obj.autodiff.__class__.__name__),"automatic differentiation parameters"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("flaim","[%s,%s]" % ("1x1",obj.flaim.__class__.__name__),"flaim parameters"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("inversion","[%s,%s]" % ("1x1",obj.inversion.__class__.__name__),"parameters for inverse methods"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("qmu","[%s,%s]" % ("1x1",obj.qmu.__class__.__name__),"dakota properties"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("results","[%s,%s]" % ("1x1",obj.results.__class__.__name__),"model results'"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("radaroverlay","[%s,%s]" % ("1x1",obj.radaroverlay.__class__.__name__),"radar image for plot overlay"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("miscellaneous","[%s,%s]" % ("1x1",obj.miscellaneous.__class__.__name__),"miscellaneous fields"))
++		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("miscellaneous","[%s,%s]" % ("1x1",obj.miscellaneous.__class__.__name__),"miscellaneous fields"))
++		return string;
++		 #}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/autodiff.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/autodiff.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/autodiff.py	(revision 12038)
+@@ -0,0 +1,19 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class autodiff:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.isautodiff = False
++		self.forward    = True
++		self.reverse    = False
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string='   automatic differentiation parameters:'
++		string="%s\n%s"%(string,fielddisplay(obj,'isautodiff','indicates if the automatic differentiation is activated'))
++		string="%s\n%s"%(string,fielddisplay(obj,'forward','forward differentiation'))
++		string="%s\n%s"%(string,fielddisplay(obj,'reverse','backward differentiation'))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/verbose.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/verbose.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/verbose.py	(revision 12038)
+@@ -0,0 +1,27 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class verbose:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.mprocessor  = False
++		self.module      = False
++		self.solution    = False
++		self.solver      = False
++		self.convergence = False
++		self.control     = False
++		self.qmu         = False
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string="%s%s%s\n\n"%("class '",obj.__class__.__name__,"'=")
++		string="%s%s\n"%(string,"   %15s : %s"%("mprocessor",obj.mprocessor))
++		string="%s%s\n"%(string,"   %15s : %s"%("module",obj.module))
++		string="%s%s\n"%(string,"   %15s : %s"%("solution",obj.solution))
++		string="%s%s\n"%(string,"   %15s : %s"%("solver",obj.solver))
++		string="%s%s\n"%(string,"   %15s : %s"%("convergence",obj.convergence))
++		string="%s%s\n"%(string,"   %15s : %s"%("control",obj.control))
++		string="%s%s\n"%(string,"   %15s : %s"%("qmu",obj.qmu))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/pairoptions.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/pairoptions.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/pairoptions.py	(revision 12038)
+@@ -0,0 +1,38 @@
++class pairoptions:
++	#properties
++	def __init__(self,*args):
++		# {{{ Properties
++		if len(args)%2==1:
++			raise RuntimeError('pairoption error message: an even number of options is required')
++
++		#create a pairoption object
++		if len(args)==0:
++			self.list=[]
++		else:
++			self.list=[]
++			for i in range(int(round(len(args)/2))):
++				if isinstance(args[2*i],str):
++					self.list.append([args[2*i],args[2*i+1]])
++				else:
++					#option is not a string, ignore it
++					print("%s%i%s"%('buildlist info: option number ',i,' is not a string, it will be ignored'))
++					continue
++
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		if not obj.list:
++			string='   list: empty'
++		else:
++			string="   list: (%i)"%(len(obj.list))
++			for i in range(len(obj.list)):
++				if isinstance(obj.list[i][1],str):
++					string2="     field: %-10s value: '%s'"%(obj.list[i][0],obj.list[i][1])
++				elif isinstance(obj.list[i][1],float):
++					string2="     field: %-10s value: %g"%(obj.list[i][0],obj.list[i][1])
++				elif isinstance(obj.list[i][1],int):
++					string2="     field: %-10s value: %i"%(obj.list[i][0],obj.list[i][1])
++				else:
++					string2="     field: %-10s value: (%i)"%(len(obj.list[i][1]))
++				string="%s\n%s"%(string,string2)
++		return string
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/solver.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/solver.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/solver.py	(revision 12038)
+@@ -0,0 +1,49 @@
++#module imports {{{
++import fielddisplay 
++import ismumps
++from  mumpsoptions import *
++from  iluasmoptions import *
++#}}}
++class solver:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		if ismumps:
++			self.options=[["NoneAnalysis",mumpsoptions()]]
++		else:
++			self.options=[["NoneAnalysis",iluasmoptions()]]
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		
++		string2="   solver parameters:"
++		for i in range(len(obj.options)):
++			option=obj.options[i]
++			analysis=option[0]
++			ioptions=option[1]
++
++			string=""
++			for i in range(len(ioptions)):
++				option=ioptions[i]
++				if not option:
++					#do nothing
++					pass
++				elif len(option)==1:
++					#this option has only one argument
++					string="%s%s%s"%(string," -",option[0])
++				elif len(option)==2:
++					#option with value. value can be string or scalar
++					if isinstance(option[1],float):
++						string="%s%s%s%s%s"%(string," -",option[0]," ","%g"%(option[1]))
++					elif isinstance(option[1],str):
++						string="%s%s%s%s%s"%(string," -",option[0]," ",option[1])
++					elif isinstance(option[1],int):
++						string="%s%s%s%s%s"%(string," -",option[0]," ","%i"%(option[1]))
++					else:
++						raise RuntimeError("%s%s%s"%("PetscString error: option #","%i"%(i)," is not well formatted"))
++				else:
++					raise RuntimeError("%s%s%s"%("PetscString error: option #","%i"%(i)," is not well formatted"))
++
++			string2="%s\n%s"%(string2,"   %s -> '%s'"%(analysis,string))
++		return string2
++	#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/flaim.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/flaim.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/flaim.py	(revision 12038)
+@@ -0,0 +1,50 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class flaim:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.targets            = ''
++		self.tracks             = ''
++		self.flightreqs         = {}
++		self.criterion          = float('NaN')
++		self.gridsatequator     = 200000
++		self.usevalueordering   = True
++		self.split_antimeridian = True
++		self.solution           = ''
++		self.quality            = 0
++		self.path_optimize      = False
++		self.opt_ndir           = 1
++		self.opt_dist           = 25
++		self.opt_niter          = 30000
++		#}}}
++	def __repr__(obj):
++		# {{{ Displa
++		string='   FLAIM - Flight Line Adaptation using Ice sheet Modeling:'
++
++		string="%s\n\n%s"%(string,'      Input:')
++		string="%s\n%s"%(string,fielddisplay(obj,'targets'            ,'name of kml output targets file '))
++		string="%s\n%s"%(string,fielddisplay(obj,'tracks'             ,'name of kml input tracks file '))
++		string="%s\n%s"%(string,fielddisplay(obj,'flightreqs'         ,'structure of kml flight requirements (not used yet)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'criterion'          ,'element or nodal criterion for flight path evaluation (metric)'))
++
++		string="%s\n\n%s"%(string,'      Arguments:')
++		string="%s\n%s"%(string,fielddisplay(obj,'gridsatequator'     ,'number of grids at equator (determines resolution)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'usevalueordering'   ,'flag to consider target values for flight path evaluation'))
++		string="%s\n%s"%(string,fielddisplay(obj,'split_antimeridian' ,'flag to split polygons on the antimeridian'))
++		
++		string="%s\n\n%s"%(string,'      Optimization:')
++		string="%s\n%s"%(string,fielddisplay(obj,'path_optimize'     ,'optimize? (default false)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'opt_ndir'     ,['number of directions to test when moving a point.  If this value = 1, a random direction is tested.',\
++										  'A value > 1 results in directions equally spaced from [0, 2*PI] being tested.',\
++										  'For example, 4 would result in directions [0, PI/2, PI, 3PI/2].']))
++		string="%s\n%s"%(string,fielddisplay(obj,'opt_dist'     ,'specifies the distance in km (default 25) to move a randomly selected path point on each iteration'))
++		string="%s\n%s"%(string,fielddisplay(obj,'opt_niter'     ,['number of iterations (default 30,000) to run for flightplan optimization',\
++										   'i.e. the number of times to randomly select a point and move it.']))
++
++		string="%s\n\n%s"%(string,'      Output:')
++		string="%s\n%s"%(string,fielddisplay(obj,'solution'           ,'name of kml solution file'))
++		string="%s\n%s"%(string,fielddisplay(obj,'quality'            ,'quality of kml solution'))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/steadystate.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/steadystate.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/steadystate.py	(revision 12038)
+@@ -0,0 +1,19 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class steadystate:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.reltol            = 0
++		self.maxiter           = 0
++		self.requested_outputs = float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string='   steadystate solution parameters:'
++		string="%s\n%s"%(string,fielddisplay(obj,'reltol','relative tolerance criterion'))
++		string="%s\n%s"%(string,fielddisplay(obj,'maxiter','maximum number of iterations'))
++		string="%s\n%s"%(string,fielddisplay(obj,'requested_outputs','additional requested outputs'))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/geometry.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/geometry.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/geometry.py	(revision 12038)
+@@ -0,0 +1,25 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class geometry:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.surface           = float('NaN')
++		self.thickness         = float('NaN')
++		self.bed               = float('NaN')
++		self.bathymetry        = float('NaN')
++		self.hydrostatic_ratio = float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++
++		string="   geometry parameters:"
++
++		string="%s\n\n%s"%(string,fielddisplay(obj,'surface','surface elevation'))
++		string="%s\n%s"%(string,fielddisplay(obj,'thickness','ice thickness'))
++		string="%s\n%s"%(string,fielddisplay(obj,'bed','bed elevation'))
++		string="%s\n%s"%(string,fielddisplay(obj,'bathymetry','bathymetry elevation'))
++		string="%s\n%s"%(string,fielddisplay(obj,'hydrostatic_ratio','coefficient for ice shelves'' thickness correction: hydrostatic_ratio H_obs+ (1-hydrostatic_ratio) H_hydro'))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/qmu.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/qmu.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/qmu.py	(revision 12038)
+@@ -0,0 +1,29 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class qmu:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.isdakota                    = 0
++		self.variables                   = {}
++		self.responses                   = {}
++		self.method                      = {}
++		self.params                      = {}
++		self.results                     = {}
++		self.partition                   = float('NaN')
++		self.numberofpartitions          = 0
++		self.numberofresponses           = 0
++		self.variabledescriptors         = []
++		self.responsedescriptors         = []
++		self.mass_flux_profile_directory = float('NaN')
++		self.mass_flux_profiles          = float('NaN')
++		self.mass_flux_segments          = []
++		self.adjacency                   = float('NaN')
++		self.vertex_weight               = float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string="   qmu parameters: not implemented yet!"
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/miscellaneous.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/miscellaneous.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/miscellaneous.py	(revision 12038)
+@@ -0,0 +1,20 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class miscellaneous:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.notes = ''
++		self.name  = ''
++		self.dummy = {}
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string='   miscellaneous parameters:'
++
++		string="%s\n\n%s"%(string,fielddisplay(obj,'notes','notes in a cell of strings'))
++		string="%s\n%s"%(string,fielddisplay(obj,'name','model name'))
++		string="%s\n%s"%(string,fielddisplay(obj,'dummy','empty field to store some data'))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/private.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/private.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/private.py	(revision 12038)
+@@ -0,0 +1,19 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class private:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.runtimename = ''
++		self.bamg        = {}
++		self.solution    = '';
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string='   private parameters: do not change'
++		string="%s\n%s"%(string,fielddisplay(obj,'runtimename','name of the run launched'))
++		string="%s\n%s"%(string,fielddisplay(obj,'bamg','structure with mesh properties construced if bamg is used to mesh the domain'))
++		string="%s\n%s"%(string,fielddisplay(obj,'solution','type of solution launched'))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/inversion.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/inversion.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/inversion.py	(revision 12038)
+@@ -0,0 +1,59 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class inversion:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.iscontrol                   = 0
++		self.tao                         = 0
++		self.incomplete_adjoint          = 0
++		self.control_parameters          = float('NaN')
++		self.nsteps                      = 0
++		self.maxiter_per_step            = float('NaN')
++		self.cost_functions              = float('NaN')
++		self.cost_functions_coefficients = float('NaN')
++		self.gradient_scaling            = float('NaN')
++		self.cost_function_threshold     = 0
++		self.min_parameters              = float('NaN')
++		self.max_parameters              = float('NaN')
++		self.step_threshold              = float('NaN')
++		self.gradient_only               = 0
++		self.vx_obs                      = float('NaN')
++		self.vy_obs                      = float('NaN')
++		self.vz_obs                      = float('NaN')
++		self.vel_obs                     = float('NaN')
++		self.thickness_obs               = float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string='\n   Inversion parameters:'
++		string="%s\n%s"%(string,fielddisplay(obj,'iscontrol','is inversion activated?'))
++		string="%s\n%s"%(string,fielddisplay(obj,'incomplete_adjoint','do we assume linear viscosity?'))
++		string="%s\n%s"%(string,fielddisplay(obj,'control_parameters','parameter where inverse control is carried out; ex: {''FrictionCoefficient''}, or {''MaterialsRheologyBbar''}'))
++		string="%s\n%s"%(string,fielddisplay(obj,'nsteps','number of optimization searches'))
++		string="%s\n%s"%(string,fielddisplay(obj,'cost_functions','indicate the type of response for each optimization step'))
++		string="%s\n%s"%(string,fielddisplay(obj,'cost_functions_coefficients','cost_functions_coefficients applied to the misfit of each vertex and for each control_parameter'))
++		string="%s\n%s"%(string,fielddisplay(obj,'cost_function_threshold','misfit convergence criterion. Default is 1%, NaN if not applied'))
++		string="%s\n%s"%(string,fielddisplay(obj,'maxiter_per_step','maximum iterations during each optimization step'))
++		string="%s\n%s"%(string,fielddisplay(obj,'gradient_scaling','scaling factor on gradient direction during optimization, for each optimization step'))
++		string="%s\n%s"%(string,fielddisplay(obj,'step_threshold','decrease threshold for misfit, default is 30%'))
++		string="%s\n%s"%(string,fielddisplay(obj,'min_parameters','absolute minimum acceptable value of the inversed parameter on each vertex'))
++		string="%s\n%s"%(string,fielddisplay(obj,'max_parameters','absolute maximum acceptable value of the inversed parameter on each vertex'))
++		string="%s\n%s"%(string,fielddisplay(obj,'gradient_only','stop control method solution at gradient'))
++		string="%s\n%s"%(string,fielddisplay(obj,'vx_obs','observed velocity x component [m/a]'))
++		string="%s\n%s"%(string,fielddisplay(obj,'vy_obs','observed velocity y component [m/a]'))
++		string="%s\n%s"%(string,fielddisplay(obj,'vel_obs','observed velocity magnitude [m/a]'))
++		string="%s\n%s"%(string,fielddisplay(obj,'thickness_obs','observed thickness [m]'))
++		string="%s\n%s"%(string,'Available cost functions:')
++		string="%s\n%s"%(string,'   101: SurfaceAbsVelMisfit')
++		string="%s\n%s"%(string,'   102: SurfaceRelVelMisfit')
++		string="%s\n%s"%(string,'   103: SurfaceLogVelMisfit')
++		string="%s\n%s"%(string,'   104: SurfaceLogVxVyMisfit')
++		string="%s\n%s"%(string,'   105: SurfaceAverageVelMisfit')
++		string="%s\n%s"%(string,'   201: ThicknessAbsMisfit')
++		string="%s\n%s"%(string,'   501: DragCoefficientAbsGradient')
++		string="%s\n%s"%(string,'   502: RheologyBbarAbsGradient')
++		string="%s\n%s"%(string,'   503: ThicknessAbsGradient')
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/basalforcings.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/basalforcings.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/basalforcings.py	(revision 12038)
+@@ -0,0 +1,20 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class basalforcings:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		self.melting_rate             = float('NaN')
++		self.melting_rate_correction  = float('NaN')
++		self.geothermalflux           = float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string="   basal forcings parameters:"
++
++		string="%s\n\n%s"%(string,fielddisplay(obj,"melting_rate","basal melting rate (positive if melting)"))
++		string="%s\n%s"%(string,fielddisplay(obj,"melting_rate_correction","additional melting applied when the grounding line retreats"))
++		string="%s\n%s"%(string,fielddisplay(obj,"geothermalflux","geothermal heat flux [W/m^2]"))
++		return string
++		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/flowequation.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/flowequation.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/flowequation.py	(revision 12038)
+@@ -0,0 +1,31 @@
++#module imports
++from fielddisplay import fielddisplay
++
++class flowequation:
++	#properties
++	def __init__(self):
++		# {{{ Properties
++		
++		self.ismacayealpattyn     = 0;
++		self.ishutter             = 0;
++		self.isstokes             = 0;
++		self.vertex_equation      = float('NaN')
++		self.element_equation     = float('NaN')
++		self.bordermacayeal       = float('NaN')
++		self.borderpattyn         = float('NaN')
++		self.borderstokes         = float('NaN')
++		#}}}
++	def __repr__(obj):
++		# {{{ Display
++		string='   flow equation parameters:'
++
++		string="%s\n\n%s"%(string,fielddisplay(obj,'ismacayealpattyn','is the macayeal or pattyn approximation used ?'))
++		string="%s\n%s"%(string,fielddisplay(obj,'ishutter','is the shallow ice approximation used ?'))
++		string="%s\n%s"%(string,fielddisplay(obj,'isstokes','are the Full-Stokes equations used ?'))
++		string="%s\n%s"%(string,fielddisplay(obj,'vertex_equation','flow equation for each vertex'))
++		string="%s\n%s"%(string,fielddisplay(obj,'element_equation','flow equation for each element'))
++		string="%s\n%s"%(string,fielddisplay(obj,'bordermacayeal','vertices on MacAyeal''s border (for tiling)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'borderpattyn','vertices on Pattyn''s border (for tiling)'))
++		string="%s\n%s"%(string,fielddisplay(obj,'borderstokes','vertices on Stokes'' border (for tiling)'))
++		return string
++		#}}}
Index: /issm/oecreview/Archive/12010-12040/ISSM-12038-12039.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12038-12039.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12038-12039.diff	(revision 12325)
@@ -0,0 +1,44 @@
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters
+___________________________________________________________________
+Modified: svn:ignore
+   - Makefile.in
+Makefile
+
+   + __pycache__
+Makefile.in
+Makefile
+
+
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes
+___________________________________________________________________
+Modified: svn:ignore
+   - Makefile.in
+Makefile
+
+   + __pycache__
+Makefile.in
+Makefile
+
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py	(revision 12038)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py	(revision 12039)
+@@ -34,6 +34,15 @@
+ 				sys.path.append(root)
+ 				file=os.path.splitext(file)[0]
+ 				#__import__(file)
++
++for root,dirs,files in os.walk(ISSM_TIER+ '/src/m'):
++	for file in files:
++		if file.find(".py") != -1:
++			if file.find(".pyc") == -1:
++				#add to path 
++				sys.path.append(root)
++				file=os.path.splitext(file)[0]
++				#__import__(file)
+ 				
+ sys.path.append(ISSM_TIER + '/src/modules/python')
+ 
Index: /issm/oecreview/Archive/12010-12040/ISSM-12039-12040.diff
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-12039-12040.diff	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-12039-12040.diff	(revision 12325)
@@ -0,0 +1,124 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12039)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12040)
+@@ -62,7 +62,7 @@
+ 	
+ 	mxArray* dataref=NULL;
+ 	double*  vector_ptr=NULL;
+-	double*  vector_ptr2=NULL;
++	double*  vector_matlab=NULL;
+ 	int      rows;
+ 	
+ 	if(vector){
+@@ -75,13 +75,13 @@
+ 		#endif
+ 		
+ 		/*now create the matlab vector with Matlab's memory manager */
+-		vector_ptr2=(double*)mxMalloc(rows*sizeof(double));
+-		for(int i=0;i<rows;i++) vector_ptr2[i]=vector_ptr[i];
++		vector_matlab=(double*)mxMalloc(rows*sizeof(double));
++		for(int i=0;i<rows;i++) vector_matlab[i]=vector_ptr[i];
+ 
+ 		dataref = mxCreateDoubleMatrix(0,0,mxREAL);                         
+ 		mxSetM(dataref,rows);
+ 		mxSetN(dataref,1);                                                                                          
+-		mxSetPr(dataref,vector_ptr2);           
++		mxSetPr(dataref,vector_matlab);           
+ 	}
+ 	else{
+ 		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+@@ -94,20 +94,22 @@
+ /*}}}*/
+ /*FUNCTION WriteData(mxArray** pdataref,double* matrix, int M,int N){{{1*/
+ void WriteData(mxArray** pdataref,double* matrix, int M,int N){
+-	
+-	mxArray* dataref=NULL;
+-	mxArray* tdataref=NULL;
++
++	mxArray *dataref  = NULL;
++	double  *tmatrix  = NULL;
+ 		
+ 	if(matrix){
+-		
+-		/*data is a double* pointer. Copy into a matrix: */
+-		tdataref = mxCreateDoubleMatrix(0,0,mxREAL);
+-		mxSetM(tdataref,(mwSize)N);
+-		mxSetN(tdataref,(mwSize)M);
+-		mxSetPr(tdataref,(double*)matrix);
+-
+-		//transpose
+-		mexCallMATLAB(1,&dataref,1,&tdataref, "transpose");
++		/*create the matlab matrixwith Matlab's memory manager */   
++		tmatrix=(double*)mxMalloc(M*N*sizeof(double));
++		for(int i=0;i<M;i++){
++			for(int j=0;j<N;j++){
++				tmatrix[i*N+j]=matrix[j*M+i];
++			}
++		}
++		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
++		mxSetM(dataref,(mwSize)N);
++		mxSetN(dataref,(mwSize)M);
++		mxSetPr(dataref,(double*)tmatrix);
+ 	}
+ 	else{
+ 		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+@@ -118,23 +120,23 @@
+ /*FUNCTION WriteData(mxArray** pdataref,int* matrix, int M,int N){{{1*/
+ void WriteData(mxArray** pdataref,int* matrix, int M,int N){
+ 
+-	mxArray* dataref=NULL;
+-	mxArray* tdataref=NULL;
++	mxArray* dataref = NULL;
++	double*  tmatrix = NULL;
+ 
+ 	if(matrix){
+ 
+-		/*convert to double matrix*/
+-		double* doublematrix=(double*)mxMalloc(M*N*sizeof(double));
+-		for(int i=0;i<M*N;i++) doublematrix[i]=(double)matrix[i];
++		/*convert to double matrix using Matlab's memory manager*/
++		double* tmatrix=(double*)mxMalloc(M*N*sizeof(double));
++		for(int i=0;i<M;i++){
++			for(int j=0;j<N;j++){
++				tmatrix[i*N+j]=(double)matrix[j*M+i];
++			}
++		}
++		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
++		mxSetM(dataref,(mwSize)N);
++		mxSetN(dataref,(mwSize)M);
++		mxSetPr(dataref,(double*)tmatrix);
+ 
+-		/*data is a double* pointer. Copy into a matrix: */
+-		tdataref = mxCreateDoubleMatrix(0,0,mxREAL);
+-		mxSetM(tdataref,(mwSize)N);
+-		mxSetN(tdataref,(mwSize)M);
+-		mxSetPr(tdataref,(double*)doublematrix);
+-
+-		//transpose
+-		mexCallMATLAB(1,&dataref,1,&tdataref, "transpose");
+ 	}
+ 	else{
+ 		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+@@ -145,15 +147,18 @@
+ /*FUNCTION WriteData(mxArray** pdataref,double* vector, int M){{{1*/
+ void WriteData(mxArray** pdataref,double* vector, int M){
+ 	
+-	mxArray* dataref=NULL;
++	mxArray* dataref       = NULL;
++	double*  vector_matlab = NULL;
+ 
+ 	if(vector){
+ 
+-		/*data is a double* pointer. Copy into a vector: */
++		/*create the matlab vector with Matlab's memory manager */
++		vector_matlab=(double*)mxMalloc(M*sizeof(double));
++		for(int i=0;i<M;i++) vector_matlab[i]=vector[i];
+ 		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+ 		mxSetM(dataref,(mwSize)M);
+ 		mxSetN(dataref,(mwSize)1);
+-		mxSetPr(dataref,vector);
++		mxSetPr(dataref,vector_matlab);
+ 	}
+ 	else{
+ 		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
Index: /issm/oecreview/Archive/12010-12040/ISSM-DocReview-12010-12040.tex
===================================================================
--- /issm/oecreview/Archive/12010-12040/ISSM-DocReview-12010-12040.tex	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/ISSM-DocReview-12010-12040.tex	(revision 12325)
@@ -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/12010-12040/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12010-12040/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12010-12040
Index: /issm/oecreview/Archive/12010-12040/Makefile
===================================================================
--- /issm/oecreview/Archive/12010-12040/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12010-12040
+
+
+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/12010-12040/log.tex
===================================================================
--- /issm/oecreview/Archive/12010-12040/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/log.tex	(revision 12325)
@@ -0,0 +1,60 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12010-12011.diff: \\ Function name: \\D /issm/trunk-jpl/src/c/toolkits/petsc/patches/MatlabMatrixToPetscMatrix.cpp D /issm/trunk-jpl/src/c/toolkits/petsc/patches/MatlabVectorToPetscVector.cpp D /issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscMatrixToMatlabMatrix.cpp D /issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscVectorToMatlabVector.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/petscpatches.h \\ Export determination: 6. \\Rationale: Gone to src/matlab/io
+M /issm/trunk-jpl/externalpackages/boost/install.sh M /issm/trunk-jpl/src/c/Container/Options.h M /issm/trunk-jpl/src/c/Container/Results.cpp M /issm/trunk-jpl/src/c/Container/Results.h M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/include/macros.h M /issm/trunk-jpl/src/c/include/types.h A /issm/trunk-jpl/src/c/matlab A /issm/trunk-jpl/src/c/matlab/Container A /issm/trunk-jpl/src/c/matlab/Container/Options.cpp A /issm/trunk-jpl/src/c/matlab/include A /issm/trunk-jpl/src/c/matlab/include/matlab\_macros.h A /issm/trunk-jpl/src/c/matlab/io A /issm/trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp A /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToMatrix.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToPetscMatrix.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToSeqMat.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToPetscVector.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToSeqVec.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToVector.cpp A /issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp A /issm/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp A /issm/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp A /issm/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp A /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp A /issm/trunk-jpl/src/c/matlab/io/matlabio.h A /issm/trunk-jpl/src/c/matlab/io/mxGetAssignedField.cpp A /issm/trunk-jpl/src/c/matlab/objects A /issm/trunk-jpl/src/c/matlab/objects/Bamg A /issm/trunk-jpl/src/c/matlab/objects/Bamg/BamgGeom.cpp A /issm/trunk-jpl/src/c/matlab/objects/Bamg/BamgMesh.cpp A /issm/trunk-jpl/src/c/matlab/objects/Bamg/BamgOpts.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/Dakotax.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/Dakotax.h M /issm/trunk-jpl/src/c/modules/Dakotax/SpawnCore.cpp D /issm/trunk-jpl/src/c/modules/Dakotax/SpawnCoreSerial.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/Bamg/BamgGeom.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgGeom.h M /issm/trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgMesh.h M /issm/trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgOpts.h M /issm/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/ExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.h M /issm/trunk-jpl/src/c/objects/Numerics/Vector.cpp M /issm/trunk-jpl/src/c/objects/Numerics/Vector.h M /issm/trunk-jpl/src/c/objects/OptArgs.h M /issm/trunk-jpl/src/c/objects/Params/BoolParam.cpp M /issm/trunk-jpl/src/c/objects/Params/BoolParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.h M /issm/trunk-jpl/src/c/objects/Params/FileParam.cpp M /issm/trunk-jpl/src/c/objects/Params/FileParam.h M /issm/trunk-jpl/src/c/objects/Params/IntMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntMatParam.h M /issm/trunk-jpl/src/c/objects/Params/IntParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntParam.h M /issm/trunk-jpl/src/c/objects/Params/IntVecParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntVecParam.h M /issm/trunk-jpl/src/c/objects/Params/MatrixParam.cpp M /issm/trunk-jpl/src/c/objects/Params/MatrixParam.h M /issm/trunk-jpl/src/c/objects/Params/Param.h M /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp M /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.h M /issm/trunk-jpl/src/c/objects/Params/StringParam.cpp M /issm/trunk-jpl/src/c/objects/Params/StringParam.h M /issm/trunk-jpl/src/c/objects/Params/VectorParam.cpp M /issm/trunk-jpl/src/c/objects/Params/VectorParam.h A /issm/trunk-jpl/src/c/python A /issm/trunk-jpl/src/c/python/io A /issm/trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp A /issm/trunk-jpl/src/c/python/io/FetchPythonData.cpp A /issm/trunk-jpl/src/c/python/io/WritePythonData.cpp A /issm/trunk-jpl/src/c/python/io/pythonio.h A /issm/trunk-jpl/src/c/python/objects A /issm/trunk-jpl/src/c/python/objects/Bamg A /issm/trunk-jpl/src/c/python/objects/Bamg/BamgGeom.cpp A /issm/trunk-jpl/src/c/python/objects/Bamg/BamgMesh.cpp A /issm/trunk-jpl/src/c/python/objects/Bamg/BamgOpts.cpp M /issm/trunk-jpl/src/c/shared/Alloc/alloc.cpp A /issm/trunk-jpl/src/c/shared/Alloc/alloc\_module.cpp A /issm/trunk-jpl/src/c/shared/Alloc/alloc\_module.h D /issm/trunk-jpl/src/c/shared/Numerics/OptFunc.cpp M /issm/trunk-jpl/src/c/shared/Numerics/Verbosity.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqMat.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqMat.h M /issm/trunk-jpl/src/c/toolkits/issm/SeqVec.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqVec.h M /issm/trunk-jpl/startup.py M /issm/trunk-jpl/test/NightlyRun/test101.py Preliminary commit of new issm version, where serial code is starting to be stripped away. Will not run before some major debugging is done \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12011-12012.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/boost/install.sh M /issm/trunk-jpl/src/c/Container/Options.h M /issm/trunk-jpl/src/c/Container/Results.cpp M /issm/trunk-jpl/src/c/Container/Results.h M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/include/macros.h M /issm/trunk-jpl/src/c/include/types.h A /issm/trunk-jpl/src/c/matlab A /issm/trunk-jpl/src/c/matlab/Container A /issm/trunk-jpl/src/c/matlab/Container/Options.cpp A /issm/trunk-jpl/src/c/matlab/include A /issm/trunk-jpl/src/c/matlab/include/matlab\_macros.h A /issm/trunk-jpl/src/c/matlab/io A /issm/trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp A /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToDoubleMatrix.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToMatrix.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToPetscMatrix.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToSeqMat.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToDoubleVector.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToPetscVector.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToSeqVec.cpp A /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToVector.cpp A /issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp A /issm/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp A /issm/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp A /issm/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp A /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp A /issm/trunk-jpl/src/c/matlab/io/matlabio.h A /issm/trunk-jpl/src/c/matlab/io/mxGetAssignedField.cpp A /issm/trunk-jpl/src/c/matlab/objects A /issm/trunk-jpl/src/c/matlab/objects/Bamg A /issm/trunk-jpl/src/c/matlab/objects/Bamg/BamgGeom.cpp A /issm/trunk-jpl/src/c/matlab/objects/Bamg/BamgMesh.cpp A /issm/trunk-jpl/src/c/matlab/objects/Bamg/BamgOpts.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/Dakotax.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/Dakotax.h M /issm/trunk-jpl/src/c/modules/Dakotax/SpawnCore.cpp D /issm/trunk-jpl/src/c/modules/Dakotax/SpawnCoreSerial.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/Bamg/BamgGeom.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgGeom.h M /issm/trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgMesh.h M /issm/trunk-jpl/src/c/objects/Bamg/BamgOpts.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgOpts.h M /issm/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/ExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.h M /issm/trunk-jpl/src/c/objects/Numerics/Vector.cpp M /issm/trunk-jpl/src/c/objects/Numerics/Vector.h M /issm/trunk-jpl/src/c/objects/OptArgs.h M /issm/trunk-jpl/src/c/objects/Params/BoolParam.cpp M /issm/trunk-jpl/src/c/objects/Params/BoolParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.h M /issm/trunk-jpl/src/c/objects/Params/FileParam.cpp M /issm/trunk-jpl/src/c/objects/Params/FileParam.h M /issm/trunk-jpl/src/c/objects/Params/IntMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntMatParam.h M /issm/trunk-jpl/src/c/objects/Params/IntParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntParam.h M /issm/trunk-jpl/src/c/objects/Params/IntVecParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntVecParam.h M /issm/trunk-jpl/src/c/objects/Params/MatrixParam.cpp M /issm/trunk-jpl/src/c/objects/Params/MatrixParam.h M /issm/trunk-jpl/src/c/objects/Params/Param.h M /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp M /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.h M /issm/trunk-jpl/src/c/objects/Params/StringParam.cpp M /issm/trunk-jpl/src/c/objects/Params/StringParam.h M /issm/trunk-jpl/src/c/objects/Params/VectorParam.cpp M /issm/trunk-jpl/src/c/objects/Params/VectorParam.h A /issm/trunk-jpl/src/c/python A /issm/trunk-jpl/src/c/python/io A /issm/trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp A /issm/trunk-jpl/src/c/python/io/FetchPythonData.cpp A /issm/trunk-jpl/src/c/python/io/WritePythonData.cpp A /issm/trunk-jpl/src/c/python/io/pythonio.h A /issm/trunk-jpl/src/c/python/objects A /issm/trunk-jpl/src/c/python/objects/Bamg A /issm/trunk-jpl/src/c/python/objects/Bamg/BamgGeom.cpp A /issm/trunk-jpl/src/c/python/objects/Bamg/BamgMesh.cpp A /issm/trunk-jpl/src/c/python/objects/Bamg/BamgOpts.cpp M /issm/trunk-jpl/src/c/shared/Alloc/alloc.cpp A /issm/trunk-jpl/src/c/shared/Alloc/alloc\_module.cpp A /issm/trunk-jpl/src/c/shared/Alloc/alloc\_module.h D /issm/trunk-jpl/src/c/shared/Numerics/OptFunc.cpp M /issm/trunk-jpl/src/c/shared/Numerics/Verbosity.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqMat.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqMat.h M /issm/trunk-jpl/src/c/toolkits/issm/SeqVec.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqVec.h M /issm/trunk-jpl/startup.py M /issm/trunk-jpl/test/NightlyRun/test101.py \\ Export determination: 6. \\Rationale: Preliminary commit of new issm version, where serial code is starting to be stripped away. Will not run before some major debugging is done
+M /issm/trunk-jpl/src/c/shared/Alloc/alloc\_module.cpp M /issm/trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp Wrong header file locations \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12012-12013.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/shared/Alloc/alloc\_module.cpp M /issm/trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp \\ Export determination: 6. \\Rationale: Wrong header file locations
+M /issm/trunk-jpl/m4/issm\_options.m4 M /issm/trunk-jpl/src/c/Makefile.am A /issm/trunk-jpl/src/c/issm-binding.h M /issm/trunk-jpl/src/c/matlab/Container/Options.cpp M /issm/trunk-jpl/src/c/matlab/include/matlab\_macros.h M /issm/trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp M /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToMatrix.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToPetscMatrix.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToSeqMat.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToPetscVector.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToSeqVec.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToVector.cpp M /issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp M /issm/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp M /issm/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp M /issm/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/matlabio.h M /issm/trunk-jpl/src/c/matlab/io/mxGetAssignedField.cpp A /issm/trunk-jpl/src/c/matlab/matlab-binding.h M /issm/trunk-jpl/src/c/matlab/objects/Bamg/BamgGeom.cpp M /issm/trunk-jpl/src/c/matlab/objects/Bamg/BamgMesh.cpp M /issm/trunk-jpl/src/c/matlab/objects/Bamg/BamgOpts.cpp M /issm/trunk-jpl/src/c/modules/modules.h M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.h M /issm/trunk-jpl/src/c/shared/Wrapper/wrappershared.h M /issm/trunk-jpl/src/mex/AverageFilter/AverageFilter.h M /issm/trunk-jpl/src/mex/BamgConvertMesh/BamgConvertMesh.cpp M /issm/trunk-jpl/src/mex/BamgConvertMesh/BamgConvertMesh.h M /issm/trunk-jpl/src/mex/BamgMesher/BamgMesher.cpp M /issm/trunk-jpl/src/mex/BamgMesher/BamgMesher.h M /issm/trunk-jpl/src/mex/BamgTriangulate/BamgTriangulate.h M /issm/trunk-jpl/src/mex/Chaco/Chaco.h M /issm/trunk-jpl/src/mex/ContourToMesh/ContourToMesh.h M /issm/trunk-jpl/src/mex/ContourToNodes/ContourToNodes.h M /issm/trunk-jpl/src/mex/ElementConnectivity/ElementConnectivity.h M /issm/trunk-jpl/src/mex/EnumToString/EnumToString.h M /issm/trunk-jpl/src/mex/Exp2Kml/Exp2Kml.h M /issm/trunk-jpl/src/mex/HoleFiller/HoleFiller.h M /issm/trunk-jpl/src/mex/InternalFront/InternalFront.h M /issm/trunk-jpl/src/mex/InterpFromGridToMesh/InterpFromGridToMesh.h M /issm/trunk-jpl/src/mex/InterpFromMesh2d/InterpFromMesh2d.h M /issm/trunk-jpl/src/mex/InterpFromMeshToGrid/InterpFromMeshToGrid.h M /issm/trunk-jpl/src/mex/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h M /issm/trunk-jpl/src/mex/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h M /issm/trunk-jpl/src/mex/KMLFileRead/KMLFileRead.h M /issm/trunk-jpl/src/mex/KMLMeshWrite/KMLMeshWrite.h M /issm/trunk-jpl/src/mex/KMLOverlay/KMLOverlay.h M /issm/trunk-jpl/src/mex/Kml2Exp/Kml2Exp.h M /issm/trunk-jpl/src/mex/Ll2xy/Ll2xy.h M /issm/trunk-jpl/src/mex/Makefile.am M /issm/trunk-jpl/src/mex/MeshPartition/MeshPartition.h M /issm/trunk-jpl/src/mex/MeshProfileIntersection/MeshProfileIntersection.h M /issm/trunk-jpl/src/mex/PointCloudFindNeighbors/PointCloudFindNeighbors.h M /issm/trunk-jpl/src/mex/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h M /issm/trunk-jpl/src/mex/Scotch/Scotch.h M /issm/trunk-jpl/src/mex/Shp2Kml/Shp2Kml.h M /issm/trunk-jpl/src/mex/StringToEnum/StringToEnum.h M /issm/trunk-jpl/src/mex/TriMesh/TriMesh.h M /issm/trunk-jpl/src/mex/TriMeshNoDensity/TriMeshNoDensity.h M /issm/trunk-jpl/src/mex/TriMeshProcessRifts/TriMeshProcessRifts.h M /issm/trunk-jpl/src/mex/TriMeshRefine/TriMeshRefine.h M /issm/trunk-jpl/src/mex/TriMeshRifts/TriMeshRifts.h M /issm/trunk-jpl/src/mex/TriaSearch/TriaSearch.h M /issm/trunk-jpl/src/mex/Xy2ll/Xy2ll.h Some debugging of compilation \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12013-12014.diff: \\ Function name: \\M /issm/trunk-jpl/m4/issm\_options.m4 M /issm/trunk-jpl/src/c/Makefile.am A /issm/trunk-jpl/src/c/issm-binding.h M /issm/trunk-jpl/src/c/matlab/Container/Options.cpp M /issm/trunk-jpl/src/c/matlab/include/matlab\_macros.h M /issm/trunk-jpl/src/c/matlab/io/CheckNumMatlabArguments.cpp M /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToMatrix.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToPetscMatrix.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabMatrixToSeqMat.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabNArrayToNArray.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToPetscVector.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToSeqVec.cpp M /issm/trunk-jpl/src/c/matlab/io/MatlabVectorToVector.cpp M /issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp M /issm/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp M /issm/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp M /issm/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/matlabio.h M /issm/trunk-jpl/src/c/matlab/io/mxGetAssignedField.cpp A /issm/trunk-jpl/src/c/matlab/matlab-binding.h M /issm/trunk-jpl/src/c/matlab/objects/Bamg/BamgGeom.cpp M /issm/trunk-jpl/src/c/matlab/objects/Bamg/BamgMesh.cpp M /issm/trunk-jpl/src/c/matlab/objects/Bamg/BamgOpts.cpp M /issm/trunk-jpl/src/c/modules/modules.h M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.h M /issm/trunk-jpl/src/c/shared/Wrapper/wrappershared.h M /issm/trunk-jpl/src/mex/AverageFilter/AverageFilter.h M /issm/trunk-jpl/src/mex/BamgConvertMesh/BamgConvertMesh.cpp M /issm/trunk-jpl/src/mex/BamgConvertMesh/BamgConvertMesh.h M /issm/trunk-jpl/src/mex/BamgMesher/BamgMesher.cpp M /issm/trunk-jpl/src/mex/BamgMesher/BamgMesher.h M /issm/trunk-jpl/src/mex/BamgTriangulate/BamgTriangulate.h M /issm/trunk-jpl/src/mex/Chaco/Chaco.h M /issm/trunk-jpl/src/mex/ContourToMesh/ContourToMesh.h M /issm/trunk-jpl/src/mex/ContourToNodes/ContourToNodes.h M /issm/trunk-jpl/src/mex/ElementConnectivity/ElementConnectivity.h M /issm/trunk-jpl/src/mex/EnumToString/EnumToString.h M /issm/trunk-jpl/src/mex/Exp2Kml/Exp2Kml.h M /issm/trunk-jpl/src/mex/HoleFiller/HoleFiller.h M /issm/trunk-jpl/src/mex/InternalFront/InternalFront.h M /issm/trunk-jpl/src/mex/InterpFromGridToMesh/InterpFromGridToMesh.h M /issm/trunk-jpl/src/mex/InterpFromMesh2d/InterpFromMesh2d.h M /issm/trunk-jpl/src/mex/InterpFromMeshToGrid/InterpFromMeshToGrid.h M /issm/trunk-jpl/src/mex/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h M /issm/trunk-jpl/src/mex/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h M /issm/trunk-jpl/src/mex/KMLFileRead/KMLFileRead.h M /issm/trunk-jpl/src/mex/KMLMeshWrite/KMLMeshWrite.h M /issm/trunk-jpl/src/mex/KMLOverlay/KMLOverlay.h M /issm/trunk-jpl/src/mex/Kml2Exp/Kml2Exp.h M /issm/trunk-jpl/src/mex/Ll2xy/Ll2xy.h M /issm/trunk-jpl/src/mex/Makefile.am M /issm/trunk-jpl/src/mex/MeshPartition/MeshPartition.h M /issm/trunk-jpl/src/mex/MeshProfileIntersection/MeshProfileIntersection.h M /issm/trunk-jpl/src/mex/PointCloudFindNeighbors/PointCloudFindNeighbors.h M /issm/trunk-jpl/src/mex/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h M /issm/trunk-jpl/src/mex/Scotch/Scotch.h M /issm/trunk-jpl/src/mex/Shp2Kml/Shp2Kml.h M /issm/trunk-jpl/src/mex/StringToEnum/StringToEnum.h M /issm/trunk-jpl/src/mex/TriMesh/TriMesh.h M /issm/trunk-jpl/src/mex/TriMeshNoDensity/TriMeshNoDensity.h M /issm/trunk-jpl/src/mex/TriMeshProcessRifts/TriMeshProcessRifts.h M /issm/trunk-jpl/src/mex/TriMeshRefine/TriMeshRefine.h M /issm/trunk-jpl/src/mex/TriMeshRifts/TriMeshRifts.h M /issm/trunk-jpl/src/mex/TriaSearch/TriaSearch.h M /issm/trunk-jpl/src/mex/Xy2ll/Xy2ll.h \\ Export determination: 6. \\Rationale: Some debugging of compilation
+M /issm/trunk-jpl/src/c/objects/Bamg/QuadTree.h M /issm/trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp M /issm/trunk-jpl/src/c/objects/Constraints/SpcDynamic.h M /issm/trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp M /issm/trunk-jpl/src/c/objects/Constraints/SpcStatic.h M /issm/trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp M /issm/trunk-jpl/src/c/objects/Constraints/SpcTransient.h M /issm/trunk-jpl/src/c/objects/Contour.cpp M /issm/trunk-jpl/src/c/objects/Contour.h M /issm/trunk-jpl/src/c/objects/DofIndexing.cpp M /issm/trunk-jpl/src/c/objects/DofIndexing.h 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.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.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/BoolExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/ExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h M /issm/trunk-jpl/src/c/objects/Hook.cpp M /issm/trunk-jpl/src/c/objects/Hook.h M /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.h M /issm/trunk-jpl/src/c/objects/Inputs/ControlInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/ControlInput.h M /issm/trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/DatasetInput.h M /issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.h M /issm/trunk-jpl/src/c/objects/Inputs/IntInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/IntInput.h M /issm/trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp M /issm/trunk-jpl/src/c/objects/Inputs/PentaP1Input.h M /issm/trunk-jpl/src/c/objects/Inputs/TransientInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/TransientInput.h M /issm/trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp M /issm/trunk-jpl/src/c/objects/Inputs/TriaP1Input.h M /issm/trunk-jpl/src/c/objects/Loads/Icefront.cpp M /issm/trunk-jpl/src/c/objects/Loads/Icefront.h M /issm/trunk-jpl/src/c/objects/Loads/Numericalflux.cpp M /issm/trunk-jpl/src/c/objects/Loads/Numericalflux.h M /issm/trunk-jpl/src/c/objects/Loads/Pengrid.cpp M /issm/trunk-jpl/src/c/objects/Loads/Pengrid.h M /issm/trunk-jpl/src/c/objects/Loads/Penpair.cpp M /issm/trunk-jpl/src/c/objects/Loads/Penpair.h M /issm/trunk-jpl/src/c/objects/Loads/Riftfront.cpp M /issm/trunk-jpl/src/c/objects/Loads/Riftfront.h M /issm/trunk-jpl/src/c/objects/Materials/Matice.cpp M /issm/trunk-jpl/src/c/objects/Materials/Matice.h M /issm/trunk-jpl/src/c/objects/Materials/Matpar.cpp M /issm/trunk-jpl/src/c/objects/Materials/Matpar.h M /issm/trunk-jpl/src/c/objects/Node.cpp M /issm/trunk-jpl/src/c/objects/Node.h M /issm/trunk-jpl/src/c/objects/Numerics/Vector.h M /issm/trunk-jpl/src/c/objects/Object.h M /issm/trunk-jpl/src/c/objects/Options/Option.h M /issm/trunk-jpl/src/c/objects/Options/OptionCell.h M /issm/trunk-jpl/src/c/objects/Options/OptionChar.h M /issm/trunk-jpl/src/c/objects/Options/OptionDouble.h M /issm/trunk-jpl/src/c/objects/Options/OptionLogical.h M /issm/trunk-jpl/src/c/objects/Options/OptionStruct.h M /issm/trunk-jpl/src/c/objects/Params/BoolParam.cpp M /issm/trunk-jpl/src/c/objects/Params/BoolParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.h M /issm/trunk-jpl/src/c/objects/Params/FileParam.cpp M /issm/trunk-jpl/src/c/objects/Params/FileParam.h M /issm/trunk-jpl/src/c/objects/Params/IntMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntMatParam.h M /issm/trunk-jpl/src/c/objects/Params/IntParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntParam.h M /issm/trunk-jpl/src/c/objects/Params/IntVecParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntVecParam.h M /issm/trunk-jpl/src/c/objects/Params/MatrixParam.cpp M /issm/trunk-jpl/src/c/objects/Params/MatrixParam.h M /issm/trunk-jpl/src/c/objects/Params/Param.h M /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp M /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.h M /issm/trunk-jpl/src/c/objects/Params/StringParam.cpp M /issm/trunk-jpl/src/c/objects/Params/StringParam.h M /issm/trunk-jpl/src/c/objects/Params/VectorParam.cpp M /issm/trunk-jpl/src/c/objects/Params/VectorParam.h M /issm/trunk-jpl/src/c/objects/Patch.cpp M /issm/trunk-jpl/src/c/objects/Segment.cpp M /issm/trunk-jpl/src/c/objects/Segment.h M /issm/trunk-jpl/src/c/objects/Vertex.cpp M /issm/trunk-jpl/src/c/objects/Vertex.h Removing some unused SERIAL code \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12014-12015.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/objects/Bamg/QuadTree.h M /issm/trunk-jpl/src/c/objects/Constraints/SpcDynamic.cpp M /issm/trunk-jpl/src/c/objects/Constraints/SpcDynamic.h M /issm/trunk-jpl/src/c/objects/Constraints/SpcStatic.cpp M /issm/trunk-jpl/src/c/objects/Constraints/SpcStatic.h M /issm/trunk-jpl/src/c/objects/Constraints/SpcTransient.cpp M /issm/trunk-jpl/src/c/objects/Constraints/SpcTransient.h M /issm/trunk-jpl/src/c/objects/Contour.cpp M /issm/trunk-jpl/src/c/objects/Contour.h M /issm/trunk-jpl/src/c/objects/DofIndexing.cpp M /issm/trunk-jpl/src/c/objects/DofIndexing.h 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.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/DoubleElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/PentaP1ElementResult.h M /issm/trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.cpp M /issm/trunk-jpl/src/c/objects/ElementResults/TriaP1ElementResult.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/BoolExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/BoolExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleMatExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/DoubleVecExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/ExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/IntExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/PetscVecExternalResult.h M /issm/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.cpp M /issm/trunk-jpl/src/c/objects/ExternalResults/StringExternalResult.h M /issm/trunk-jpl/src/c/objects/Hook.cpp M /issm/trunk-jpl/src/c/objects/Hook.h M /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/BoolInput.h M /issm/trunk-jpl/src/c/objects/Inputs/ControlInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/ControlInput.h M /issm/trunk-jpl/src/c/objects/Inputs/DatasetInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/DatasetInput.h M /issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.h M /issm/trunk-jpl/src/c/objects/Inputs/IntInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/IntInput.h M /issm/trunk-jpl/src/c/objects/Inputs/PentaP1Input.cpp M /issm/trunk-jpl/src/c/objects/Inputs/PentaP1Input.h M /issm/trunk-jpl/src/c/objects/Inputs/TransientInput.cpp M /issm/trunk-jpl/src/c/objects/Inputs/TransientInput.h M /issm/trunk-jpl/src/c/objects/Inputs/TriaP1Input.cpp M /issm/trunk-jpl/src/c/objects/Inputs/TriaP1Input.h M /issm/trunk-jpl/src/c/objects/Loads/Icefront.cpp M /issm/trunk-jpl/src/c/objects/Loads/Icefront.h M /issm/trunk-jpl/src/c/objects/Loads/Numericalflux.cpp M /issm/trunk-jpl/src/c/objects/Loads/Numericalflux.h M /issm/trunk-jpl/src/c/objects/Loads/Pengrid.cpp M /issm/trunk-jpl/src/c/objects/Loads/Pengrid.h M /issm/trunk-jpl/src/c/objects/Loads/Penpair.cpp M /issm/trunk-jpl/src/c/objects/Loads/Penpair.h M /issm/trunk-jpl/src/c/objects/Loads/Riftfront.cpp M /issm/trunk-jpl/src/c/objects/Loads/Riftfront.h M /issm/trunk-jpl/src/c/objects/Materials/Matice.cpp M /issm/trunk-jpl/src/c/objects/Materials/Matice.h M /issm/trunk-jpl/src/c/objects/Materials/Matpar.cpp M /issm/trunk-jpl/src/c/objects/Materials/Matpar.h M /issm/trunk-jpl/src/c/objects/Node.cpp M /issm/trunk-jpl/src/c/objects/Node.h M /issm/trunk-jpl/src/c/objects/Numerics/Vector.h M /issm/trunk-jpl/src/c/objects/Object.h M /issm/trunk-jpl/src/c/objects/Options/Option.h M /issm/trunk-jpl/src/c/objects/Options/OptionCell.h M /issm/trunk-jpl/src/c/objects/Options/OptionChar.h M /issm/trunk-jpl/src/c/objects/Options/OptionDouble.h M /issm/trunk-jpl/src/c/objects/Options/OptionLogical.h M /issm/trunk-jpl/src/c/objects/Options/OptionStruct.h M /issm/trunk-jpl/src/c/objects/Params/BoolParam.cpp M /issm/trunk-jpl/src/c/objects/Params/BoolParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatArrayParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleTransientMatParam.h M /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.h M /issm/trunk-jpl/src/c/objects/Params/FileParam.cpp M /issm/trunk-jpl/src/c/objects/Params/FileParam.h M /issm/trunk-jpl/src/c/objects/Params/IntMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntMatParam.h M /issm/trunk-jpl/src/c/objects/Params/IntParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntParam.h M /issm/trunk-jpl/src/c/objects/Params/IntVecParam.cpp M /issm/trunk-jpl/src/c/objects/Params/IntVecParam.h M /issm/trunk-jpl/src/c/objects/Params/MatrixParam.cpp M /issm/trunk-jpl/src/c/objects/Params/MatrixParam.h M /issm/trunk-jpl/src/c/objects/Params/Param.h M /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.cpp M /issm/trunk-jpl/src/c/objects/Params/StringArrayParam.h M /issm/trunk-jpl/src/c/objects/Params/StringParam.cpp M /issm/trunk-jpl/src/c/objects/Params/StringParam.h M /issm/trunk-jpl/src/c/objects/Params/VectorParam.cpp M /issm/trunk-jpl/src/c/objects/Params/VectorParam.h M /issm/trunk-jpl/src/c/objects/Patch.cpp M /issm/trunk-jpl/src/c/objects/Segment.cpp M /issm/trunk-jpl/src/c/objects/Segment.h M /issm/trunk-jpl/src/c/objects/Vertex.cpp M /issm/trunk-jpl/src/c/objects/Vertex.h \\ Export determination: 6. \\Rationale: Removing some unused SERIAL code
+M /issm/trunk-jpl/src/c/Container/DataSet.cpp M /issm/trunk-jpl/src/c/Container/DataSet.h M /issm/trunk-jpl/src/c/Container/Options.cpp M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/include/macros.h M /issm/trunk-jpl/src/c/matlab/include/matlab\_macros.h A /issm/trunk-jpl/src/c/python/include A /issm/trunk-jpl/src/c/python/include/python\_macros.h A /issm/trunk-jpl/src/c/python/python-binding.h M /issm/trunk-jpl/src/c/shared/shared.h M /issm/trunk-jpl/src/mex/TriMesh/TriMesh.cpp Rearraning the code a little bit more. Taking out last remnants of SERIAL protected code. \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12015-12016.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/DataSet.cpp M /issm/trunk-jpl/src/c/Container/DataSet.h M /issm/trunk-jpl/src/c/Container/Options.cpp M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/include/macros.h M /issm/trunk-jpl/src/c/matlab/include/matlab\_macros.h A /issm/trunk-jpl/src/c/python/include A /issm/trunk-jpl/src/c/python/include/python\_macros.h A /issm/trunk-jpl/src/c/python/python-binding.h M /issm/trunk-jpl/src/c/shared/shared.h M /issm/trunk-jpl/src/mex/TriMesh/TriMesh.cpp \\ Export determination: 6. \\Rationale: Rearraning the code a little bit more. Taking out last remnants of SERIAL protected code.
+M /issm/trunk-jpl/src/c/Container/Constraints.cpp M /issm/trunk-jpl/src/c/Container/Elements.cpp M /issm/trunk-jpl/src/c/Container/Loads.cpp M /issm/trunk-jpl/src/c/Container/Nodes.cpp M /issm/trunk-jpl/src/c/Container/Vertices.cpp M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalConstraintsState.cpp M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalIsPresent.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/Dakotax.cpp M /issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp M /issm/trunk-jpl/src/c/modules/MassFluxx/MassFluxx.cpp M /issm/trunk-jpl/src/c/modules/MaxAbsVxx/MaxAbsVxx.cpp M /issm/trunk-jpl/src/c/modules/MaxAbsVyx/MaxAbsVyx.cpp M /issm/trunk-jpl/src/c/modules/MaxAbsVzx/MaxAbsVzx.cpp M /issm/trunk-jpl/src/c/modules/MaxVelx/MaxVelx.cpp M /issm/trunk-jpl/src/c/modules/MaxVxx/MaxVxx.cpp M /issm/trunk-jpl/src/c/modules/MaxVyx/MaxVyx.cpp M /issm/trunk-jpl/src/c/modules/MaxVzx/MaxVzx.cpp M /issm/trunk-jpl/src/c/modules/MinVelx/MinVelx.cpp M /issm/trunk-jpl/src/c/modules/MinVxx/MinVxx.cpp M /issm/trunk-jpl/src/c/modules/MinVyx/MinVyx.cpp M /issm/trunk-jpl/src/c/modules/MinVzx/MinVzx.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp M /issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp M /issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp M /issm/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp M /issm/trunk-jpl/src/c/objects/FemModel.cpp M /issm/trunk-jpl/src/c/solutions/issm.cpp Took out all specific parts of the code that were supposedly PARALLEL. \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12016-12017.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Constraints.cpp M /issm/trunk-jpl/src/c/Container/Elements.cpp M /issm/trunk-jpl/src/c/Container/Loads.cpp M /issm/trunk-jpl/src/c/Container/Nodes.cpp M /issm/trunk-jpl/src/c/Container/Vertices.cpp M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/matlab/io/PrintfFunction.cpp M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalConstraintsState.cpp M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalIsPresent.cpp M /issm/trunk-jpl/src/c/modules/Dakotax/Dakotax.cpp M /issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp M /issm/trunk-jpl/src/c/modules/MassFluxx/MassFluxx.cpp M /issm/trunk-jpl/src/c/modules/MaxAbsVxx/MaxAbsVxx.cpp M /issm/trunk-jpl/src/c/modules/MaxAbsVyx/MaxAbsVyx.cpp M /issm/trunk-jpl/src/c/modules/MaxAbsVzx/MaxAbsVzx.cpp M /issm/trunk-jpl/src/c/modules/MaxVelx/MaxVelx.cpp M /issm/trunk-jpl/src/c/modules/MaxVxx/MaxVxx.cpp M /issm/trunk-jpl/src/c/modules/MaxVyx/MaxVyx.cpp M /issm/trunk-jpl/src/c/modules/MaxVzx/MaxVzx.cpp M /issm/trunk-jpl/src/c/modules/MinVelx/MinVelx.cpp M /issm/trunk-jpl/src/c/modules/MinVxx/MinVxx.cpp M /issm/trunk-jpl/src/c/modules/MinVyx/MinVyx.cpp M /issm/trunk-jpl/src/c/modules/MinVzx/MinVzx.cpp M /issm/trunk-jpl/src/c/modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp M /issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp M /issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp M /issm/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp M /issm/trunk-jpl/src/c/objects/FemModel.cpp M /issm/trunk-jpl/src/c/solutions/issm.cpp \\ Export determination: 6. \\Rationale: Took out all specific parts of the code that were supposedly PARALLEL.
+M /issm/trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp M /issm/trunk-jpl/src/c/python/io/FetchPythonData.cpp M /issm/trunk-jpl/src/c/python/io/WritePythonData.cpp M /issm/trunk-jpl/src/c/python/objects/Bamg/BamgGeom.cpp M /issm/trunk-jpl/src/c/python/objects/Bamg/BamgMesh.cpp M /issm/trunk-jpl/src/c/python/objects/Bamg/BamgOpts.cpp M /issm/trunk-jpl/src/c/python/python-binding.h M /issm/trunk-jpl/src/c/toolkits/python/pythonincludes.h M /issm/trunk-jpl/src/c/toolkits/toolkits.h M /issm/trunk-jpl/test/NightlyRun/test101.py Debugging of Python capability. \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12017-12018.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/python/io/CheckNumPythonArguments.cpp M /issm/trunk-jpl/src/c/python/io/FetchPythonData.cpp M /issm/trunk-jpl/src/c/python/io/WritePythonData.cpp M /issm/trunk-jpl/src/c/python/objects/Bamg/BamgGeom.cpp M /issm/trunk-jpl/src/c/python/objects/Bamg/BamgMesh.cpp M /issm/trunk-jpl/src/c/python/objects/Bamg/BamgOpts.cpp M /issm/trunk-jpl/src/c/python/python-binding.h M /issm/trunk-jpl/src/c/toolkits/python/pythonincludes.h M /issm/trunk-jpl/src/c/toolkits/toolkits.h M /issm/trunk-jpl/test/NightlyRun/test101.py \\ Export determination: 6. \\Rationale: Debugging of Python capability.
+M /issm/trunk-jpl/src/c/io/PrintfFunction.cpp M /issm/trunk-jpl/src/c/modules/Solverx/Solverx.cpp M /issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp M /issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp M /issm/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp M /issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp M /issm/trunk-jpl/src/c/shared/Numerics/Synchronize.sh M /issm/trunk-jpl/src/c/shared/Numerics/Verbosity.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqMat.h M /issm/trunk-jpl/src/c/toolkits/issm/SeqVec.h M /issm/trunk-jpl/src/c/toolkits/petsc/patches/MatInvert.cpp M /issm/trunk-jpl/src/c/toolkits/triangle/triangleincludes.h Taking out more SERIAL protected code \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12018-12019.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/io/PrintfFunction.cpp M /issm/trunk-jpl/src/c/modules/Solverx/Solverx.cpp M /issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp M /issm/trunk-jpl/src/c/objects/Inputs/DoubleInput.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleMatParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleParam.cpp M /issm/trunk-jpl/src/c/objects/Params/DoubleVecParam.cpp M /issm/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp M /issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp M /issm/trunk-jpl/src/c/shared/Numerics/Synchronize.sh M /issm/trunk-jpl/src/c/shared/Numerics/Verbosity.cpp M /issm/trunk-jpl/src/c/toolkits/issm/SeqMat.h M /issm/trunk-jpl/src/c/toolkits/issm/SeqVec.h M /issm/trunk-jpl/src/c/toolkits/petsc/patches/MatInvert.cpp M /issm/trunk-jpl/src/c/toolkits/triangle/triangleincludes.h \\ Export determination: 6. \\Rationale: Taking out more SERIAL protected code
+M /issm/trunk-jpl/src/c/Makefile.am Took out the -D\_PARALLEL\_ symbol definition \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12019-12020.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Makefile.am \\ Export determination: 6. \\Rationale: Took out the -D\_PARALLEL\_ symbol definition
+M /issm/trunk-jpl/externalpackages/boost/install.sh removed exit \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12020-12021.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/boost/install.sh \\ Export determination: 6. \\Rationale: removed exit
+M /issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp minor, removed folds for easier debugging \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-12021-12022.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/Solverx/SolverxPetsc.cpp \\ Export determination: 6. \\Rationale: minor, removed folds for easier debugging
+M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/include/macros.h M /issm/trunk-jpl/src/c/matlab/include/matlab\_macros.h M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp M /issm/trunk-jpl/src/c/solutions/issm.cpp moved MODULEBOOT to ISSMBOOT to avoid conflict with mex \\\\
+\noindent \textbf{Change \#13} with diff file ISSM-12022-12023.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/include/macros.h M /issm/trunk-jpl/src/c/matlab/include/matlab\_macros.h M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp M /issm/trunk-jpl/src/c/solutions/issm.cpp \\ Export determination: 6. \\Rationale: moved MODULEBOOT to ISSMBOOT to avoid conflict with mex
+M /issm/trunk-jpl/src/mex/Makefile.am Fixed library conflict (order should be checked) \\\\
+\noindent \textbf{Change \#14} with diff file ISSM-12023-12024.diff: \\ Function name: \\M /issm/trunk-jpl/src/mex/Makefile.am \\ Export determination: 6. \\Rationale: Fixed library conflict (order should be checked)
+M /issm/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp Fixed conversion from PETSc vector to double vector \\\\
+\noindent \textbf{Change \#15} with diff file ISSM-12024-12025.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp \\ Export determination: 6. \\Rationale: Fixed conversion from PETSc vector to double vector
+M /issm/trunk-jpl/src/mex/TriMesh/TriMesh.cpp M /issm/trunk-jpl/src/mex/TriMesh/TriMesh.h cosmetics \\\\
+\noindent \textbf{Change \#16} with diff file ISSM-12025-12026.diff: \\ Function name: \\M /issm/trunk-jpl/src/mex/TriMesh/TriMesh.cpp M /issm/trunk-jpl/src/mex/TriMesh/TriMesh.h \\ Export determination: 6. \\Rationale: cosmetics
+A /issm/trunk-jpl/src/m/model/AnalysisConfiguration.m A /issm/trunk-jpl/src/m/model/MatlabProcessPatch.m Added missing files from previous version of ISSM \\\\
+\noindent \textbf{Change \#17} with diff file ISSM-12026-12027.diff: \\ Function name: \\A /issm/trunk-jpl/src/m/model/AnalysisConfiguration.m A /issm/trunk-jpl/src/m/model/MatlabProcessPatch.m \\ Export determination: 6. \\Rationale: Added missing files from previous version of ISSM
+D /issm/trunk-jpl/test/NightlyRun/test101.m D /issm/trunk-jpl/test/NightlyRun/test103.m D /issm/trunk-jpl/test/NightlyRun/test105.m D /issm/trunk-jpl/test/NightlyRun/test107.m D /issm/trunk-jpl/test/NightlyRun/test109.m D /issm/trunk-jpl/test/NightlyRun/test111.m D /issm/trunk-jpl/test/NightlyRun/test113.m D /issm/trunk-jpl/test/NightlyRun/test115.m D /issm/trunk-jpl/test/NightlyRun/test117.m D /issm/trunk-jpl/test/NightlyRun/test119.m D /issm/trunk-jpl/test/NightlyRun/test121.m D /issm/trunk-jpl/test/NightlyRun/test123.m D /issm/trunk-jpl/test/NightlyRun/test125.m D /issm/trunk-jpl/test/NightlyRun/test127.m D /issm/trunk-jpl/test/NightlyRun/test129.m D /issm/trunk-jpl/test/NightlyRun/test131.m D /issm/trunk-jpl/test/NightlyRun/test133.m D /issm/trunk-jpl/test/NightlyRun/test135.m D /issm/trunk-jpl/test/NightlyRun/test137.m D /issm/trunk-jpl/test/NightlyRun/test139.m D /issm/trunk-jpl/test/NightlyRun/test141.m D /issm/trunk-jpl/test/NightlyRun/test143.m D /issm/trunk-jpl/test/NightlyRun/test201.m D /issm/trunk-jpl/test/NightlyRun/test203.m D /issm/trunk-jpl/test/NightlyRun/test205.m D /issm/trunk-jpl/test/NightlyRun/test207.m D /issm/trunk-jpl/test/NightlyRun/test209.m D /issm/trunk-jpl/test/NightlyRun/test211.m D /issm/trunk-jpl/test/NightlyRun/test213.m D /issm/trunk-jpl/test/NightlyRun/test215.m D /issm/trunk-jpl/test/NightlyRun/test217.m D /issm/trunk-jpl/test/NightlyRun/test219.m D /issm/trunk-jpl/test/NightlyRun/test221.m D /issm/trunk-jpl/test/NightlyRun/test223.m D /issm/trunk-jpl/test/NightlyRun/test225.m D /issm/trunk-jpl/test/NightlyRun/test227.m D /issm/trunk-jpl/test/NightlyRun/test229.m D /issm/trunk-jpl/test/NightlyRun/test233.m D /issm/trunk-jpl/test/NightlyRun/test235.m D /issm/trunk-jpl/test/NightlyRun/test237.m D /issm/trunk-jpl/test/NightlyRun/test239.m D /issm/trunk-jpl/test/NightlyRun/test241.m D /issm/trunk-jpl/test/NightlyRun/test243.m D /issm/trunk-jpl/test/NightlyRun/test245.m D /issm/trunk-jpl/test/NightlyRun/test247.m D /issm/trunk-jpl/test/NightlyRun/test249.m D /issm/trunk-jpl/test/NightlyRun/test251.m D /issm/trunk-jpl/test/NightlyRun/test253.m D /issm/trunk-jpl/test/NightlyRun/test255.m D /issm/trunk-jpl/test/NightlyRun/test257.m D /issm/trunk-jpl/test/NightlyRun/test259.m D /issm/trunk-jpl/test/NightlyRun/test261.m D /issm/trunk-jpl/test/NightlyRun/test263.m D /issm/trunk-jpl/test/NightlyRun/test265.m D /issm/trunk-jpl/test/NightlyRun/test267.m D /issm/trunk-jpl/test/NightlyRun/test301.m D /issm/trunk-jpl/test/NightlyRun/test303.m D /issm/trunk-jpl/test/NightlyRun/test305.m D /issm/trunk-jpl/test/NightlyRun/test307.m D /issm/trunk-jpl/test/NightlyRun/test309.m D /issm/trunk-jpl/test/NightlyRun/test311.m D /issm/trunk-jpl/test/NightlyRun/test313.m D /issm/trunk-jpl/test/NightlyRun/test315.m D /issm/trunk-jpl/test/NightlyRun/test317.m D /issm/trunk-jpl/test/NightlyRun/test319.m D /issm/trunk-jpl/test/NightlyRun/test321.m D /issm/trunk-jpl/test/NightlyRun/test323.m D /issm/trunk-jpl/test/NightlyRun/test325.m D /issm/trunk-jpl/test/NightlyRun/test327.m D /issm/trunk-jpl/test/NightlyRun/test329.m D /issm/trunk-jpl/test/NightlyRun/test331.m D /issm/trunk-jpl/test/NightlyRun/test333.m D /issm/trunk-jpl/test/NightlyRun/test335.m D /issm/trunk-jpl/test/NightlyRun/test337.m D /issm/trunk-jpl/test/NightlyRun/test339.m D /issm/trunk-jpl/test/NightlyRun/test341.m D /issm/trunk-jpl/test/NightlyRun/test343.m D /issm/trunk-jpl/test/NightlyRun/test345.m D /issm/trunk-jpl/test/NightlyRun/test347.m D /issm/trunk-jpl/test/NightlyRun/test349.m D /issm/trunk-jpl/test/NightlyRun/test351.m D /issm/trunk-jpl/test/NightlyRun/test353.m D /issm/trunk-jpl/test/NightlyRun/test401.m D /issm/trunk-jpl/test/NightlyRun/test403.m D /issm/trunk-jpl/test/NightlyRun/test405.m D /issm/trunk-jpl/test/NightlyRun/test407.m D /issm/trunk-jpl/test/NightlyRun/test409.m D /issm/trunk-jpl/test/NightlyRun/test411.m D /issm/trunk-jpl/test/NightlyRun/test413.m D /issm/trunk-jpl/test/NightlyRun/test415.m D /issm/trunk-jpl/test/NightlyRun/test417.m D /issm/trunk-jpl/test/NightlyRun/test419.m D /issm/trunk-jpl/test/NightlyRun/test421.m D /issm/trunk-jpl/test/NightlyRun/test423.m D /issm/trunk-jpl/test/NightlyRun/test425.m D /issm/trunk-jpl/test/NightlyRun/test427.m D /issm/trunk-jpl/test/NightlyRun/test429.m D /issm/trunk-jpl/test/NightlyRun/test431.m D /issm/trunk-jpl/test/NightlyRun/test435.m D /issm/trunk-jpl/test/NightlyRun/test437.m D /issm/trunk-jpl/test/NightlyRun/test439.m D /issm/trunk-jpl/test/NightlyRun/test441.m D /issm/trunk-jpl/test/NightlyRun/test443.m D /issm/trunk-jpl/test/NightlyRun/test445.m D /issm/trunk-jpl/test/NightlyRun/test447.m D /issm/trunk-jpl/test/NightlyRun/test449.m D /issm/trunk-jpl/test/NightlyRun/test451.m D /issm/trunk-jpl/test/NightlyRun/test453.m D /issm/trunk-jpl/test/NightlyRun/test455.m D /issm/trunk-jpl/test/NightlyRun/test457.m D /issm/trunk-jpl/test/NightlyRun/test459.m D /issm/trunk-jpl/test/NightlyRun/test461.m D /issm/trunk-jpl/test/NightlyRun/test463.m D /issm/trunk-jpl/test/NightlyRun/test501.m D /issm/trunk-jpl/test/NightlyRun/test503.m D /issm/trunk-jpl/test/NightlyRun/test505.m D /issm/trunk-jpl/test/NightlyRun/test507.m D /issm/trunk-jpl/test/NightlyRun/test509.m D /issm/trunk-jpl/test/NightlyRun/test511.m D /issm/trunk-jpl/test/NightlyRun/test513.m D /issm/trunk-jpl/test/NightlyRun/test515.m D /issm/trunk-jpl/test/NightlyRun/test517.m D /issm/trunk-jpl/test/NightlyRun/test519.m D /issm/trunk-jpl/test/NightlyRun/test521.m D /issm/trunk-jpl/test/NightlyRun/test523.m D /issm/trunk-jpl/test/NightlyRun/test525.m D /issm/trunk-jpl/test/NightlyRun/test527.m D /issm/trunk-jpl/test/NightlyRun/test529.m D /issm/trunk-jpl/test/NightlyRun/test531.m D /issm/trunk-jpl/test/NightlyRun/test601.m D /issm/trunk-jpl/test/NightlyRun/test603.m D /issm/trunk-jpl/test/NightlyRun/test605.m D /issm/trunk-jpl/test/NightlyRun/test607.m D /issm/trunk-jpl/test/NightlyRun/test609.m D /issm/trunk-jpl/test/NightlyRun/test611.m D /issm/trunk-jpl/test/NightlyRun/test613.m D /issm/trunk-jpl/test/NightlyRun/test615.m D /issm/trunk-jpl/test/NightlyRun/test617.m D /issm/trunk-jpl/test/NightlyRun/test619.m D /issm/trunk-jpl/test/NightlyRun/test621.m D /issm/trunk-jpl/test/NightlyRun/test623.m D /issm/trunk-jpl/test/NightlyRun/test625.m removed all serial tests \\\\
+\noindent \textbf{Change \#18} with diff file ISSM-12027-12028.diff: \\ Function name: \\D /issm/trunk-jpl/test/NightlyRun/test101.m D /issm/trunk-jpl/test/NightlyRun/test103.m D /issm/trunk-jpl/test/NightlyRun/test105.m D /issm/trunk-jpl/test/NightlyRun/test107.m D /issm/trunk-jpl/test/NightlyRun/test109.m D /issm/trunk-jpl/test/NightlyRun/test111.m D /issm/trunk-jpl/test/NightlyRun/test113.m D /issm/trunk-jpl/test/NightlyRun/test115.m D /issm/trunk-jpl/test/NightlyRun/test117.m D /issm/trunk-jpl/test/NightlyRun/test119.m D /issm/trunk-jpl/test/NightlyRun/test121.m D /issm/trunk-jpl/test/NightlyRun/test123.m D /issm/trunk-jpl/test/NightlyRun/test125.m D /issm/trunk-jpl/test/NightlyRun/test127.m D /issm/trunk-jpl/test/NightlyRun/test129.m D /issm/trunk-jpl/test/NightlyRun/test131.m D /issm/trunk-jpl/test/NightlyRun/test133.m D /issm/trunk-jpl/test/NightlyRun/test135.m D /issm/trunk-jpl/test/NightlyRun/test137.m D /issm/trunk-jpl/test/NightlyRun/test139.m D /issm/trunk-jpl/test/NightlyRun/test141.m D /issm/trunk-jpl/test/NightlyRun/test143.m D /issm/trunk-jpl/test/NightlyRun/test201.m D /issm/trunk-jpl/test/NightlyRun/test203.m D /issm/trunk-jpl/test/NightlyRun/test205.m D /issm/trunk-jpl/test/NightlyRun/test207.m D /issm/trunk-jpl/test/NightlyRun/test209.m D /issm/trunk-jpl/test/NightlyRun/test211.m D /issm/trunk-jpl/test/NightlyRun/test213.m D /issm/trunk-jpl/test/NightlyRun/test215.m D /issm/trunk-jpl/test/NightlyRun/test217.m D /issm/trunk-jpl/test/NightlyRun/test219.m D /issm/trunk-jpl/test/NightlyRun/test221.m D /issm/trunk-jpl/test/NightlyRun/test223.m D /issm/trunk-jpl/test/NightlyRun/test225.m D /issm/trunk-jpl/test/NightlyRun/test227.m D /issm/trunk-jpl/test/NightlyRun/test229.m D /issm/trunk-jpl/test/NightlyRun/test233.m D /issm/trunk-jpl/test/NightlyRun/test235.m D /issm/trunk-jpl/test/NightlyRun/test237.m D /issm/trunk-jpl/test/NightlyRun/test239.m D /issm/trunk-jpl/test/NightlyRun/test241.m D /issm/trunk-jpl/test/NightlyRun/test243.m D /issm/trunk-jpl/test/NightlyRun/test245.m D /issm/trunk-jpl/test/NightlyRun/test247.m D /issm/trunk-jpl/test/NightlyRun/test249.m D /issm/trunk-jpl/test/NightlyRun/test251.m D /issm/trunk-jpl/test/NightlyRun/test253.m D /issm/trunk-jpl/test/NightlyRun/test255.m D /issm/trunk-jpl/test/NightlyRun/test257.m D /issm/trunk-jpl/test/NightlyRun/test259.m D /issm/trunk-jpl/test/NightlyRun/test261.m D /issm/trunk-jpl/test/NightlyRun/test263.m D /issm/trunk-jpl/test/NightlyRun/test265.m D /issm/trunk-jpl/test/NightlyRun/test267.m D /issm/trunk-jpl/test/NightlyRun/test301.m D /issm/trunk-jpl/test/NightlyRun/test303.m D /issm/trunk-jpl/test/NightlyRun/test305.m D /issm/trunk-jpl/test/NightlyRun/test307.m D /issm/trunk-jpl/test/NightlyRun/test309.m D /issm/trunk-jpl/test/NightlyRun/test311.m D /issm/trunk-jpl/test/NightlyRun/test313.m D /issm/trunk-jpl/test/NightlyRun/test315.m D /issm/trunk-jpl/test/NightlyRun/test317.m D /issm/trunk-jpl/test/NightlyRun/test319.m D /issm/trunk-jpl/test/NightlyRun/test321.m D /issm/trunk-jpl/test/NightlyRun/test323.m D /issm/trunk-jpl/test/NightlyRun/test325.m D /issm/trunk-jpl/test/NightlyRun/test327.m D /issm/trunk-jpl/test/NightlyRun/test329.m D /issm/trunk-jpl/test/NightlyRun/test331.m D /issm/trunk-jpl/test/NightlyRun/test333.m D /issm/trunk-jpl/test/NightlyRun/test335.m D /issm/trunk-jpl/test/NightlyRun/test337.m D /issm/trunk-jpl/test/NightlyRun/test339.m D /issm/trunk-jpl/test/NightlyRun/test341.m D /issm/trunk-jpl/test/NightlyRun/test343.m D /issm/trunk-jpl/test/NightlyRun/test345.m D /issm/trunk-jpl/test/NightlyRun/test347.m D /issm/trunk-jpl/test/NightlyRun/test349.m D /issm/trunk-jpl/test/NightlyRun/test351.m D /issm/trunk-jpl/test/NightlyRun/test353.m D /issm/trunk-jpl/test/NightlyRun/test401.m D /issm/trunk-jpl/test/NightlyRun/test403.m D /issm/trunk-jpl/test/NightlyRun/test405.m D /issm/trunk-jpl/test/NightlyRun/test407.m D /issm/trunk-jpl/test/NightlyRun/test409.m D /issm/trunk-jpl/test/NightlyRun/test411.m D /issm/trunk-jpl/test/NightlyRun/test413.m D /issm/trunk-jpl/test/NightlyRun/test415.m D /issm/trunk-jpl/test/NightlyRun/test417.m D /issm/trunk-jpl/test/NightlyRun/test419.m D /issm/trunk-jpl/test/NightlyRun/test421.m D /issm/trunk-jpl/test/NightlyRun/test423.m D /issm/trunk-jpl/test/NightlyRun/test425.m D /issm/trunk-jpl/test/NightlyRun/test427.m D /issm/trunk-jpl/test/NightlyRun/test429.m D /issm/trunk-jpl/test/NightlyRun/test431.m D /issm/trunk-jpl/test/NightlyRun/test435.m D /issm/trunk-jpl/test/NightlyRun/test437.m D /issm/trunk-jpl/test/NightlyRun/test439.m D /issm/trunk-jpl/test/NightlyRun/test441.m D /issm/trunk-jpl/test/NightlyRun/test443.m D /issm/trunk-jpl/test/NightlyRun/test445.m D /issm/trunk-jpl/test/NightlyRun/test447.m D /issm/trunk-jpl/test/NightlyRun/test449.m D /issm/trunk-jpl/test/NightlyRun/test451.m D /issm/trunk-jpl/test/NightlyRun/test453.m D /issm/trunk-jpl/test/NightlyRun/test455.m D /issm/trunk-jpl/test/NightlyRun/test457.m D /issm/trunk-jpl/test/NightlyRun/test459.m D /issm/trunk-jpl/test/NightlyRun/test461.m D /issm/trunk-jpl/test/NightlyRun/test463.m D /issm/trunk-jpl/test/NightlyRun/test501.m D /issm/trunk-jpl/test/NightlyRun/test503.m D /issm/trunk-jpl/test/NightlyRun/test505.m D /issm/trunk-jpl/test/NightlyRun/test507.m D /issm/trunk-jpl/test/NightlyRun/test509.m D /issm/trunk-jpl/test/NightlyRun/test511.m D /issm/trunk-jpl/test/NightlyRun/test513.m D /issm/trunk-jpl/test/NightlyRun/test515.m D /issm/trunk-jpl/test/NightlyRun/test517.m D /issm/trunk-jpl/test/NightlyRun/test519.m D /issm/trunk-jpl/test/NightlyRun/test521.m D /issm/trunk-jpl/test/NightlyRun/test523.m D /issm/trunk-jpl/test/NightlyRun/test525.m D /issm/trunk-jpl/test/NightlyRun/test527.m D /issm/trunk-jpl/test/NightlyRun/test529.m D /issm/trunk-jpl/test/NightlyRun/test531.m D /issm/trunk-jpl/test/NightlyRun/test601.m D /issm/trunk-jpl/test/NightlyRun/test603.m D /issm/trunk-jpl/test/NightlyRun/test605.m D /issm/trunk-jpl/test/NightlyRun/test607.m D /issm/trunk-jpl/test/NightlyRun/test609.m D /issm/trunk-jpl/test/NightlyRun/test611.m D /issm/trunk-jpl/test/NightlyRun/test613.m D /issm/trunk-jpl/test/NightlyRun/test615.m D /issm/trunk-jpl/test/NightlyRun/test617.m D /issm/trunk-jpl/test/NightlyRun/test619.m D /issm/trunk-jpl/test/NightlyRun/test621.m D /issm/trunk-jpl/test/NightlyRun/test623.m D /issm/trunk-jpl/test/NightlyRun/test625.m \\ Export determination: 6. \\Rationale: removed all serial tests
+M /issm/trunk-jpl/src/m/kml/README.txt M /issm/trunk-jpl/src/m/kml/kml\_part\_edges.m M /issm/trunk-jpl/src/m/kml/kml\_partitions.m M /issm/trunk-jpl/src/m/kml/kml\_unsh\_edges.m A /issm/trunk-jpl/src/m/kml/kmlnodeconnectivity.m (from /issm/trunk-jpl/src/m/kml/nodeconnectivity.m:12019) D /issm/trunk-jpl/src/m/kml/nodeconnectivity.m moved nodeconnectivity to kmlnodeconnectivity \\\\
+\noindent \textbf{Change \#19} with diff file ISSM-12028-12029.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/kml/README.txt M /issm/trunk-jpl/src/m/kml/kml\_part\_edges.m M /issm/trunk-jpl/src/m/kml/kml\_partitions.m M /issm/trunk-jpl/src/m/kml/kml\_unsh\_edges.m A /issm/trunk-jpl/src/m/kml/kmlnodeconnectivity.m (from /issm/trunk-jpl/src/m/kml/nodeconnectivity.m:12019) D /issm/trunk-jpl/src/m/kml/nodeconnectivity.m \\ Export determination: 6. \\Rationale: moved nodeconnectivity to kmlnodeconnectivity
+M /issm/trunk-jpl/src/mex/ElementConnectivity/ElementConnectivity.h M /issm/trunk-jpl/src/mex/Makefile.am A /issm/trunk-jpl/src/mex/NodeConnectivity A /issm/trunk-jpl/src/mex/NodeConnectivity/NodeConnectivity.cpp A /issm/trunk-jpl/src/mex/NodeConnectivity/NodeConnectivity.h Readded NodeConnectivity \\\\
+\noindent \textbf{Change \#20} with diff file ISSM-12029-12030.diff: \\ Function name: \\M /issm/trunk-jpl/src/mex/ElementConnectivity/ElementConnectivity.h M /issm/trunk-jpl/src/mex/Makefile.am A /issm/trunk-jpl/src/mex/NodeConnectivity A /issm/trunk-jpl/src/mex/NodeConnectivity/NodeConnectivity.cpp A /issm/trunk-jpl/src/mex/NodeConnectivity/NodeConnectivity.h \\ Export determination: 6. \\Rationale: Readded NodeConnectivity
+M /issm/trunk-jpl/src/m/classes/clusters/generic.m M /issm/trunk-jpl/src/m/classes/clusters/none.m M /issm/trunk-jpl/src/m/classes/model/model.m M /issm/trunk-jpl/src/m/classes/modellist.m added error message for md.cluster=none. Oshostname is now default for generic \\\\
+\noindent \textbf{Change \#21} with diff file ISSM-12030-12031.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/classes/clusters/generic.m M /issm/trunk-jpl/src/m/classes/clusters/none.m M /issm/trunk-jpl/src/m/classes/model/model.m M /issm/trunk-jpl/src/m/classes/modellist.m \\ Export determination: 6. \\Rationale: added error message for md.cluster=none. Oshostname is now default for generic
+A /issm/trunk-jpl/configs/config-macosx64-larour-bothapis.sh M /issm/trunk-jpl/configure.ac M /issm/trunk-jpl/etc/environment.sh M /issm/trunk-jpl/m4/issm\_options.m4 M /issm/trunk-jpl/src/c/issm-binding.h M /issm/trunk-jpl/src/c/matlab/include/matlab\_macros.h M /issm/trunk-jpl/src/c/matlab/matlab-binding.h M /issm/trunk-jpl/src/c/python/include/python\_macros.h M /issm/trunk-jpl/src/mex/Makefile.am M /issm/trunk-jpl/src/mex/TriMesh/TriMesh.h A /issm/trunk-jpl/src/mex/matlab A /issm/trunk-jpl/src/mex/matlab/Makefile.am A /issm/trunk-jpl/src/mex/python A /issm/trunk-jpl/src/mex/python/Makefile.am Capability to build both bindings to matlab and python \\\\
+\noindent \textbf{Change \#22} with diff file ISSM-12031-12032.diff: \\ Function name: \\A /issm/trunk-jpl/configs/config-macosx64-larour-bothapis.sh M /issm/trunk-jpl/configure.ac M /issm/trunk-jpl/etc/environment.sh M /issm/trunk-jpl/m4/issm\_options.m4 M /issm/trunk-jpl/src/c/issm-binding.h M /issm/trunk-jpl/src/c/matlab/include/matlab\_macros.h M /issm/trunk-jpl/src/c/matlab/matlab-binding.h M /issm/trunk-jpl/src/c/python/include/python\_macros.h M /issm/trunk-jpl/src/mex/Makefile.am M /issm/trunk-jpl/src/mex/TriMesh/TriMesh.h A /issm/trunk-jpl/src/mex/matlab A /issm/trunk-jpl/src/mex/matlab/Makefile.am A /issm/trunk-jpl/src/mex/python A /issm/trunk-jpl/src/mex/python/Makefile.am \\ Export determination: 6. \\Rationale: Capability to build both bindings to matlab and python
+M /issm/trunk-jpl/src/Makefile.am A /issm/trunk-jpl/src/modules (from /issm/trunk-jpl/src/mex:12030) R /issm/trunk-jpl/src/modules/Makefile.am (from /issm/trunk-jpl/src/mex/Makefile.am:12031) R /issm/trunk-jpl/src/modules/TriMesh/TriMesh.h (from /issm/trunk-jpl/src/mex/TriMesh/TriMesh.h:12031) A /issm/trunk-jpl/src/modules/matlab (from /issm/trunk-jpl/src/mex/matlab:12031) A /issm/trunk-jpl/src/modules/python (from /issm/trunk-jpl/src/mex/python:12031) Changing name of mex \\\\
+\noindent \textbf{Change \#23} with diff file ISSM-12032-12033.diff: \\ Function name: \\M /issm/trunk-jpl/src/Makefile.am A /issm/trunk-jpl/src/modules (from /issm/trunk-jpl/src/mex:12030) R /issm/trunk-jpl/src/modules/Makefile.am (from /issm/trunk-jpl/src/mex/Makefile.am:12031) R /issm/trunk-jpl/src/modules/TriMesh/TriMesh.h (from /issm/trunk-jpl/src/mex/TriMesh/TriMesh.h:12031) A /issm/trunk-jpl/src/modules/matlab (from /issm/trunk-jpl/src/mex/matlab:12031) A /issm/trunk-jpl/src/modules/python (from /issm/trunk-jpl/src/mex/python:12031) \\ Export determination: 6. \\Rationale: Changing name of mex
+M /issm/trunk-jpl/src/modules/matlab M /issm/trunk-jpl/src/modules/python Changing name from mex to modules \\\\
+\noindent \textbf{Change \#24} with diff file ISSM-12033-12034.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/matlab M /issm/trunk-jpl/src/modules/python \\ Export determination: 6. \\Rationale: Changing name from mex to modules
+D /issm/trunk-jpl/src/mex Not needed now \\\\
+\noindent \textbf{Change \#25} with diff file ISSM-12034-12035.diff: \\ Function name: \\D /issm/trunk-jpl/src/mex \\ Export determination: 6. \\Rationale: Not needed now
+M /issm/trunk-jpl/configure.ac M /issm/trunk-jpl/etc/environment.sh Changing from mex to modules \\\\
+\noindent \textbf{Change \#26} with diff file ISSM-12035-12036.diff: \\ Function name: \\M /issm/trunk-jpl/configure.ac M /issm/trunk-jpl/etc/environment.sh \\ Export determination: 6. \\Rationale: Changing from mex to modules
+M /issm/trunk-jpl/startup.py Last change from modules to mex \\\\
+\noindent \textbf{Change \#27} with diff file ISSM-12036-12037.diff: \\ Function name: \\M /issm/trunk-jpl/startup.py \\ Export determination: 6. \\Rationale: Last change from modules to mex
+M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp Allocating matlab's variable using Matlab's memory manager \\\\
+\noindent \textbf{Change \#28} with diff file ISSM-12037-12038.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp \\ Export determination: 6. \\Rationale: Allocating matlab's variable using Matlab's memory manager
+A /issm/trunk-jpl/src/m/classes/autodiff.py A /issm/trunk-jpl/src/m/classes/balancethickness.py A /issm/trunk-jpl/src/m/classes/basalforcings.py A /issm/trunk-jpl/src/m/classes/clusters/generic.py A /issm/trunk-jpl/src/m/classes/clusters/none.py A /issm/trunk-jpl/src/m/classes/constants.py A /issm/trunk-jpl/src/m/classes/debug.py A /issm/trunk-jpl/src/m/classes/diagnostic.py A /issm/trunk-jpl/src/m/classes/flaim.py A /issm/trunk-jpl/src/m/classes/flowequation.py A /issm/trunk-jpl/src/m/classes/friction.py A /issm/trunk-jpl/src/m/classes/geometry.py A /issm/trunk-jpl/src/m/classes/groundingline.py A /issm/trunk-jpl/src/m/classes/hydrology.py A /issm/trunk-jpl/src/m/classes/initialization.py A /issm/trunk-jpl/src/m/classes/inversion.py A /issm/trunk-jpl/src/m/classes/mask.py A /issm/trunk-jpl/src/m/classes/materials.py A /issm/trunk-jpl/src/m/classes/mesh.py A /issm/trunk-jpl/src/m/classes/miscellaneous.py A /issm/trunk-jpl/src/m/classes/model.py A /issm/trunk-jpl/src/m/classes/pairoptions.py A /issm/trunk-jpl/src/m/classes/private.py A /issm/trunk-jpl/src/m/classes/prognostic.py A /issm/trunk-jpl/src/m/classes/qmu.py A /issm/trunk-jpl/src/m/classes/radaroverlay.py A /issm/trunk-jpl/src/m/classes/rifts.py A /issm/trunk-jpl/src/m/classes/settings.py A /issm/trunk-jpl/src/m/classes/solver.py A /issm/trunk-jpl/src/m/classes/steadystate.py A /issm/trunk-jpl/src/m/classes/surfaceforcings.py A /issm/trunk-jpl/src/m/classes/thermal.py A /issm/trunk-jpl/src/m/classes/timestepping.py A /issm/trunk-jpl/src/m/classes/transient.py A /issm/trunk-jpl/src/m/classes/verbose.py D /issm/trunk-jpl/src/py/classes Moved python classes to matlab classes \\\\
+\noindent \textbf{Change \#29} with diff file ISSM-12038-12039.diff: \\ Function name: \\A /issm/trunk-jpl/src/m/classes/autodiff.py A /issm/trunk-jpl/src/m/classes/balancethickness.py A /issm/trunk-jpl/src/m/classes/basalforcings.py A /issm/trunk-jpl/src/m/classes/clusters/generic.py A /issm/trunk-jpl/src/m/classes/clusters/none.py A /issm/trunk-jpl/src/m/classes/constants.py A /issm/trunk-jpl/src/m/classes/debug.py A /issm/trunk-jpl/src/m/classes/diagnostic.py A /issm/trunk-jpl/src/m/classes/flaim.py A /issm/trunk-jpl/src/m/classes/flowequation.py A /issm/trunk-jpl/src/m/classes/friction.py A /issm/trunk-jpl/src/m/classes/geometry.py A /issm/trunk-jpl/src/m/classes/groundingline.py A /issm/trunk-jpl/src/m/classes/hydrology.py A /issm/trunk-jpl/src/m/classes/initialization.py A /issm/trunk-jpl/src/m/classes/inversion.py A /issm/trunk-jpl/src/m/classes/mask.py A /issm/trunk-jpl/src/m/classes/materials.py A /issm/trunk-jpl/src/m/classes/mesh.py A /issm/trunk-jpl/src/m/classes/miscellaneous.py A /issm/trunk-jpl/src/m/classes/model.py A /issm/trunk-jpl/src/m/classes/pairoptions.py A /issm/trunk-jpl/src/m/classes/private.py A /issm/trunk-jpl/src/m/classes/prognostic.py A /issm/trunk-jpl/src/m/classes/qmu.py A /issm/trunk-jpl/src/m/classes/radaroverlay.py A /issm/trunk-jpl/src/m/classes/rifts.py A /issm/trunk-jpl/src/m/classes/settings.py A /issm/trunk-jpl/src/m/classes/solver.py A /issm/trunk-jpl/src/m/classes/steadystate.py A /issm/trunk-jpl/src/m/classes/surfaceforcings.py A /issm/trunk-jpl/src/m/classes/thermal.py A /issm/trunk-jpl/src/m/classes/timestepping.py A /issm/trunk-jpl/src/m/classes/transient.py A /issm/trunk-jpl/src/m/classes/verbose.py D /issm/trunk-jpl/src/py/classes \\ Export determination: 6. \\Rationale: Moved python classes to matlab classes
+M /issm/trunk-jpl/src/m/classes M /issm/trunk-jpl/src/m/classes/clusters M /issm/trunk-jpl/startup.py Adjusting startup.py for new location of python scripts \\\\
+\noindent \textbf{Change \#30} with diff file ISSM-12039-12040.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/classes M /issm/trunk-jpl/src/m/classes/clusters M /issm/trunk-jpl/startup.py \\ Export determination: 6. \\Rationale: Adjusting startup.py for new location of python scripts
+M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp WriteMatlabData should always use Matlab's memory manager \\\\
Index: /issm/oecreview/Archive/12010-12040/r1.tex
===================================================================
--- /issm/oecreview/Archive/12010-12040/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12010
Index: /issm/oecreview/Archive/12010-12040/r2.tex
===================================================================
--- /issm/oecreview/Archive/12010-12040/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12010-12040/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12040
Index: /issm/oecreview/Archive/12041-12060/Date.tex
===================================================================
--- /issm/oecreview/Archive/12041-12060/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12041-12060/ISSM-12041-12042.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12041-12042.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12041-12042.diff	(revision 12325)
@@ -0,0 +1,159 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/display/fielddisplay.rest
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/display/fielddisplay.rest	(revision 12041)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/display/fielddisplay.rest	(revision 12042)
+@@ -1,154 +0,0 @@
+-def fielddisplay(md,name,comment):
+-#FIELDDISPLAY - display model field
+-#
+-#   Usage:
+-#      fielddisplay(md,offset,name,comment)
+-
+-	#get field
+-	field=getattr(md,name)
+-
+-	#disp corresponding line as a function of field type (offset set as 9 spaces)
+-	#parsedisplay('         ',name,field,comment);
+-
+-	return 
+-
+-function parsedisplay(offset,name,field,comment); %{{{
+-
+-	%string
+-	if ischar(field),
+-
+-		if length(field)>30;
+-			displayunit(offset,name,'not displayed',comment),
+-		else
+-			displayunit(offset,name,['''' field ''''],comment),
+-		end
+-
+-	%numeric
+-	elseif isnumeric(field)
+-
+-		%get size
+-		fieldsize=size(field);
+-
+-		%double
+-		if max(fieldsize)==1,
+-			displayunit(offset,name,num2str(field),comment),
+-		%matrix
+-		else
+-			displayunit(offset,name,['(' num2str(fieldsize(1)) 'x' num2str(fieldsize(2)) ')'],comment),
+-		end
+-
+-	%logical
+-	elseif islogical(field)
+-
+-		%get size
+-		fieldsize=size(field);
+-
+-		%single value
+-		if max(fieldsize)==1,
+-			if (field)
+-				displayunit(offset,name,'true',comment),
+-			else
+-				displayunit(offset,name,'false',comment),
+-			end
+-		%matrix
+-		else
+-			displayunit(offset,name,['(' num2str(fieldsize(1)) 'x' num2str(fieldsize(2)) ')'],comment),
+-		end
+-
+-		%structure
+-	elseif isstruct(field),
+-		if ~isempty(fields(field))
+-			displayunit(offset,name,'(structure)',comment),
+-			struct_display(field,[offset '   ']),
+-		else
+-			displayunit(offset,name,'N/A',comment),
+-		end
+-
+-	%cell
+-	elseif iscell(field),
+-		cell_display(offset,name,field,comment),
+-
+-	else
+-		displayunit(offset,name,'not displayed',comment),
+-
+-	end
+-end%}}}
+-
+-function struct_display(structure,offset) % {{{
+-
+-	structure_fields=fields(structure);
+-
+-	for i=1:length(structure_fields),
+-
+-		%get current field
+-		field=structure.(structure_fields{i});
+-
+-		%recursive call if necessary
+-		if isstruct(field),
+-			displayunit(offset,structure_fields{i},'(structure)',''),
+-			struct_display(field,[offset '   ']);
+-
+-		%display value
+-		else
+-			parsedisplay(offset,structure_fields{i},field,'');
+-		end
+-	end
+-end% }}}
+-function cell_display(offset,name,field,comment) % {{{
+-
+-	%initialization
+-	string='{';
+-
+-	%go through the cell and fill string
+-	if length(field)<5;
+-		for i=1:length(field),
+-			if ischar(field{i}),
+-				string=[string ''''  field{i} ''','];
+-			elseif (isnumeric(field{i}) & length(field{i})==1)
+-				string=[string num2str(field{i}) ',' ];
+-			else
+-				string='{';
+-				break
+-			end
+-		end
+-	end
+-	if strcmp(string,'{'),
+-		string=['(' num2str(size(field,1)) 'x' num2str(size(field,2)) ')'];
+-	else
+-		string=[string(1:end-1) '}'];
+-	end
+-
+-	%call displayunit
+-	displayunit(offset,name,string,comment);
+-end% }}}
+-function displayunit(offset,name,characterization,comment),% {{{
+-
+-	%take care of name
+-	if length(name)>23,
+-		name=[name(1:20) '...'];
+-	end
+-
+-	%take care of characterization
+-	if (strcmp(characterization,['''' '''']) | strcmp(characterization,'NaN')),
+-		characterization='N/A';
+-	end
+-	if length(characterization)>15,
+-		characterization=[characterization(1:12) '...'];
+-	end
+-
+-	%print
+-	if isempty(comment)
+-		disp(sprintf('%s%-23s: %-15s',offset,name,characterization));
+-	else
+-		if ischar(comment),
+-			disp(sprintf('%s%-23s: %-15s -- %s',offset,name,characterization,comment));
+-		elseif iscell(comment),
+-			disp(sprintf('%s%-23s: %-15s -- %s',offset,name,characterization,comment{1}));
+-			for i=2:length(comment),
+-				disp(sprintf('%s%-23s  %-15s    %s',offset,'','',comment{i}));
+-			end
+-		else
+-			error('fielddisplay error message: format for comment not supportet yet');
+-		end
+-	end
+-end% }}}
Index: /issm/oecreview/Archive/12041-12060/ISSM-12042-12043.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12042-12043.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12042-12043.diff	(revision 12325)
@@ -0,0 +1,642 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12042)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12043)
+@@ -13,6 +13,7 @@
+ #include "../../include/include.h"
+ #include "./matlabio.h"
+ 
++/*Primitive data types*/
+ /*FUNCTION FetchData(double** pmatrix,int* pM,int *pN,const mxArray* dataref){{{1*/
+ void FetchData(double** pmatrix,int* pM,int *pN,const mxArray* dataref){
+ 
+@@ -241,27 +242,6 @@
+ 
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(Matrix** pmatrix,const mxArray* dataref){{{1*/
+-void FetchData(Matrix** pmatrix,const mxArray* dataref){
+-	
+-	Matrix* outmatrix=NULL;
+-	int dummy=0;
+-
+-	if (mxIsClass(dataref,"double") ){
+-			
+-		/*Convert matlab matrix to matrix: */
+-		outmatrix=MatlabMatrixToMatrix(dataref);
+-
+-	}
+-	else{
+-		/*This is an error: we don't have the correct input!: */
+-		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
+-	}
+-
+-	/*Assign output pointers:*/
+-	*pmatrix=outmatrix;
+-}
+-/*}}}*/
+ /*FUNCTION FetchData(double** pvector,int* pM,const mxArray* dataref){{{1*/
+ void FetchData(double** pvector,int* pM,const mxArray* dataref){
+ 
+@@ -385,30 +365,6 @@
+ 	if (pM)*pM=outvector_rows;
+ }
+ /*}}}*/
+-/*FUNCTION FetchData(Vector** pvector,const mxArray* dataref){{{1*/
+-void FetchData(Vector** pvector,const mxArray* dataref){
+-	
+-	Vector* vector=NULL;
+-	int dummy;
+-
+-	if(mxIsEmpty(dataref)){
+-		/*Nothing to pick up. Just initialize matrix pointer to NULL: */
+-		vector=new Vector(0);
+-	}
+-	else if (mxIsClass(dataref,"double") ){
+-
+-		/*Convert matlab vector to petsc vector: */
+-		vector=MatlabVectorToVector(dataref);
+-	}
+-	else{
+-		/*This is an error: we don't have the correct input!: */
+-		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
+-	}
+-
+-	/*Assign output pointers:*/
+-	*pvector=vector;
+-}
+-/*}}}*/
+ /*FUNCTION FetchData(char** pstring,const mxArray* dataref){{{1*/
+ void FetchData(char** pstring,const mxArray* dataref){
+ 
+@@ -525,3 +481,133 @@
+ 	*pboolean=*mxbool_ptr;
+ }
+ /*}}}*/
++
++/*ISSM objects*/
++/*FUNCTION FetchData(Matrix** pmatrix,const mxArray* dataref){{{1*/
++void FetchData(Matrix** pmatrix,const mxArray* dataref){
++
++	Matrix* outmatrix=NULL;
++	int dummy=0;
++
++	if (mxIsClass(dataref,"double") ){
++
++		/*Convert matlab matrix to matrix: */
++		outmatrix=MatlabMatrixToMatrix(dataref);
++
++	}
++	else{
++		/*This is an error: we don't have the correct input!: */
++		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++	}
++
++	/*Assign output pointers:*/
++	*pmatrix=outmatrix;
++}
++/*}}}*/
++/*FUNCTION FetchData(Vector** pvector,const mxArray* dataref){{{1*/
++void FetchData(Vector** pvector,const mxArray* dataref){
++
++	Vector* vector=NULL;
++	int dummy;
++
++	if(mxIsEmpty(dataref)){
++		/*Nothing to pick up. Just initialize matrix pointer to NULL: */
++		vector=new Vector(0);
++	}
++	else if (mxIsClass(dataref,"double") ){
++
++		/*Convert matlab vector to petsc vector: */
++		vector=MatlabVectorToVector(dataref);
++	}
++	else{
++		/*This is an error: we don't have the correct input!: */
++		_error_("Input parameter of class %s not supported yet",mxGetClassName(dataref));
++	}
++
++	/*Assign output pointers:*/
++	*pvector=vector;
++}
++/*}}}*/
++/*FUNCTION FetchData(BamgGeom** pbamggeom,const mxArray* dataref){{{1*/
++void FetchData(BamgGeom** pbamggeom,const mxArray* dataref){
++
++	/*Initialize output*/
++	BamgGeom* bamggeom=new BamgGeom();
++
++	/*Fetch all fields*/
++	FetchData(&bamggeom->Vertices,&bamggeom->VerticesSize[0],&bamggeom->VerticesSize[1],mxGetAssignedField(dataref,0,"Vertices"));
++	FetchData(&bamggeom->Edges, &bamggeom->EdgesSize[0], &bamggeom->EdgesSize[1], mxGetAssignedField(dataref,0,"Edges"));
++	FetchData(&bamggeom->Corners, &bamggeom->CornersSize[0], &bamggeom->CornersSize[1], mxGetAssignedField(dataref,0,"Corners"));
++	FetchData(&bamggeom->RequiredVertices,&bamggeom->RequiredVerticesSize[0],&bamggeom->RequiredVerticesSize[1],mxGetAssignedField(dataref,0,"RequiredVertices"));
++	FetchData(&bamggeom->RequiredEdges, &bamggeom->RequiredEdgesSize[0], &bamggeom->RequiredEdgesSize[1], mxGetAssignedField(dataref,0,"RequiredEdges"));
++	FetchData(&bamggeom->CrackedEdges,&bamggeom->CrackedEdgesSize[0],&bamggeom->CrackedEdgesSize[1],mxGetAssignedField(dataref,0,"CrackedEdges"));
++	FetchData(&bamggeom->SubDomains,&bamggeom->SubDomainsSize[0],&bamggeom->SubDomainsSize[1],mxGetAssignedField(dataref,0,"SubDomains"));
++
++	/*Assign output pointers:*/
++	*pbamggeom=bamggeom;
++}
++/*}}}*/
++/*FUNCTION FetchData(BamgMesh** pbamgmesh,const mxArray* dataref){{{1*/
++void FetchData(BamgMesh** pbamgmesh,const mxArray* dataref){
++
++	/*Initialize output*/
++	BamgMesh* bamgmesh=new BamgMesh();
++
++	/*Fetch all fields*/
++	FetchData(&bamgmesh->Vertices,&bamgmesh->VerticesSize[0],&bamgmesh->VerticesSize[1],mxGetAssignedField(dataref,0,"Vertices"));
++	FetchData(&bamgmesh->Edges, &bamgmesh->EdgesSize[0], &bamgmesh->EdgesSize[1], mxGetAssignedField(dataref,0,"Edges"));
++	FetchData(&bamgmesh->Triangles, &bamgmesh->TrianglesSize[0], &bamgmesh->TrianglesSize[1], mxGetAssignedField(dataref,0,"Triangles"));
++	FetchData(&bamgmesh->CrackedEdges,&bamgmesh->CrackedEdgesSize[0],&bamgmesh->CrackedEdgesSize[1],mxGetAssignedField(dataref,0,"CrackedEdges"));
++	FetchData(&bamgmesh->VerticesOnGeomEdge,&bamgmesh->VerticesOnGeomEdgeSize[0],&bamgmesh->VerticesOnGeomEdgeSize[1],mxGetAssignedField(dataref,0,"VerticesOnGeomEdge"));
++	FetchData(&bamgmesh->VerticesOnGeomVertex,&bamgmesh->VerticesOnGeomVertexSize[0],&bamgmesh->VerticesOnGeomVertexSize[1],mxGetAssignedField(dataref,0,"VerticesOnGeomVertex"));
++	FetchData(&bamgmesh->EdgesOnGeomEdge, &bamgmesh->EdgesOnGeomEdgeSize[0], &bamgmesh->EdgesOnGeomEdgeSize[1], mxGetAssignedField(dataref,0,"EdgesOnGeomEdge"));
++	FetchData(&bamgmesh->IssmSegments,&bamgmesh->IssmSegmentsSize[0],&bamgmesh->IssmSegmentsSize[1],mxGetAssignedField(dataref,0,"IssmSegments"));
++
++	/*Assign output pointers:*/
++	*pbamgmesh=bamgmesh;
++}
++/*}}}*/
++/*FUNCTION FetchData(BamgOpts** pbamgopts,const mxArray* dataref){{{1*/
++void FetchData(BamgOpts** pbamgopts,const mxArray* dataref){
++
++	/*Initialize output*/
++	BamgOpts* bamgopts=new BamgOpts();
++
++	/*Fetch all fields*/
++	FetchData(&bamgopts->anisomax,mxGetField(dataref,0,"anisomax"));
++	FetchData(&bamgopts->cutoff,mxGetField(dataref,0,"cutoff"));
++	FetchData(&bamgopts->coeff,mxGetField(dataref,0,"coeff"));
++	FetchData(&bamgopts->errg,mxGetField(dataref,0,"errg"));
++	FetchData(&bamgopts->gradation,mxGetField(dataref,0,"gradation"));
++	FetchData(&bamgopts->Hessiantype,mxGetField(dataref,0,"Hessiantype"));
++	FetchData(&bamgopts->MaxCornerAngle,mxGetField(dataref,0,"MaxCornerAngle"));
++	FetchData(&bamgopts->maxnbv,mxGetField(dataref,0,"maxnbv"));
++	FetchData(&bamgopts->maxsubdiv,mxGetField(dataref,0,"maxsubdiv"));
++	FetchData(&bamgopts->Metrictype,mxGetField(dataref,0,"Metrictype"));
++	FetchData(&bamgopts->nbjacobi,mxGetField(dataref,0,"nbjacobi"));
++	FetchData(&bamgopts->nbsmooth,mxGetField(dataref,0,"nbsmooth"));
++	FetchData(&bamgopts->omega,mxGetField(dataref,0,"omega"));
++	FetchData(&bamgopts->power,mxGetField(dataref,0,"power"));
++	FetchData(&bamgopts->verbose,mxGetField(dataref,0,"verbose"));
++
++	FetchData(&bamgopts->Crack,mxGetField(dataref,0,"Crack"));
++	FetchData(&bamgopts->geometricalmetric,mxGetField(dataref,0,"geometricalmetric"));
++	FetchData(&bamgopts->KeepVertices,mxGetField(dataref,0,"KeepVertices"));
++	FetchData(&bamgopts->splitcorners,mxGetField(dataref,0,"splitcorners"));
++
++	FetchData(&bamgopts->hmin,mxGetField(dataref,0,"hmin"));
++	FetchData(&bamgopts->hmax,mxGetField(dataref,0,"hmax"));
++	FetchData(&bamgopts->hminVertices,&bamgopts->hminVerticesSize[0],&bamgopts->hminVerticesSize[1],mxGetField(dataref,0,"hminVertices"));
++	FetchData(&bamgopts->hmaxVertices,&bamgopts->hmaxVerticesSize[0],&bamgopts->hmaxVerticesSize[1],mxGetField(dataref,0,"hmaxVertices"));
++	FetchData(&bamgopts->hVertices,&bamgopts->hVerticesSize[0],&bamgopts->hVerticesSize[1],mxGetField(dataref,0,"hVertices"));
++	FetchData(&bamgopts->metric,&bamgopts->metricSize[0],&bamgopts->metricSize[1],mxGetField(dataref,0,"metric"));
++	FetchData(&bamgopts->field,&bamgopts->fieldSize[0],&bamgopts->fieldSize[1],mxGetField(dataref,0,"field"));
++	FetchData(&bamgopts->err,&bamgopts->errSize[0],&bamgopts->errSize[1],mxGetField(dataref,0,"err"));
++
++	/*Additional checks*/
++	bamgopts->Check();
++
++	/*Assign output pointers:*/
++	*pbamgopts=bamgopts;
++}
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12042)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12043)
+@@ -14,84 +14,8 @@
+ 
+ #include <mex.h>
+ 
+-/*FUNCTION WriteData(mxArray** pdataref,Matrix* matrix){{{1*/
+-void WriteData(mxArray** pdataref,Matrix* matrix){
+-		
+-	int i,j;
+-	mxArray* dataref=NULL;
+-	double*  matrix_ptr=NULL;
+-	int      rows,cols;
+-	double*  tmatrix_ptr=NULL;
+-	
+-	if(matrix){
+-		
+-		#ifdef _HAVE_PETSC_
+-		PetscMatrixToDoubleMatrix(&matrix_ptr,&rows,&cols,matrix->matrix);
+-		#else
+-		matrix_ptr=matrix->matrix->ToSerial();
+-		matrix->matrix->GetSize(&rows,cols);
+-		#endif
+ 
+-		/*Now transpose the matrix and allocate with Matlab's memory manager: */
+-		tmatrix_ptr=(double*)mxMalloc(rows*cols*sizeof(double));
+-		for(i=0;i<cols;i++){
+-			for(j=0;j<rows;j++){
+-				tmatrix_ptr[i*rows+j]=matrix_ptr[j*cols+i];
+-			}
+-		}
+-		
+-		/*create matlab matrix: */
+-		dataref=mxCreateDoubleMatrix(0,0,mxREAL);
+-		mxSetM(dataref,rows); 
+-		mxSetN(dataref,cols);
+-		mxSetPr(dataref,tmatrix_ptr);
+-
+-		/*Free ressources:*/
+-		xfree((void**)&matrix_ptr);
+-
+-	}
+-	else{
+-		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+-	}
+-
+-	*pdataref=dataref;
+-}
+-/*}}}*/
+-/*FUNCTION WriteData(mxArray** pdataref,Vector* vector){{{1*/
+-void WriteData(mxArray** pdataref,Vector* vector){
+-	
+-	mxArray* dataref=NULL;
+-	double*  vector_ptr=NULL;
+-	double*  vector_matlab=NULL;
+-	int      rows;
+-	
+-	if(vector){
+-		/*call toolkit routine: */
+-		#ifdef _HAVE_PETSC_
+-		PetscVectorToDoubleVector(&vector_ptr,&rows,vector->vector);
+-		#else
+-		vector_ptr=vector->vector->ToMPISerial();
+-		vector->vector->GetSize(&rows);
+-		#endif
+-		
+-		/*now create the matlab vector with Matlab's memory manager */
+-		vector_matlab=(double*)mxMalloc(rows*sizeof(double));
+-		for(int i=0;i<rows;i++) vector_matlab[i]=vector_ptr[i];
+-
+-		dataref = mxCreateDoubleMatrix(0,0,mxREAL);                         
+-		mxSetM(dataref,rows);
+-		mxSetN(dataref,1);                                                                                          
+-		mxSetPr(dataref,vector_matlab);           
+-	}
+-	else{
+-		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+-	}
+-
+-	/*Clean-up and return*/
+-	xfree((void**)&vector_ptr);
+-	*pdataref=dataref;
+-}
+-/*}}}*/
++/*Primitive data types*/
+ /*FUNCTION WriteData(mxArray** pdataref,double* matrix, int M,int N){{{1*/
+ void WriteData(mxArray** pdataref,double* matrix, int M,int N){
+ 
+@@ -193,3 +117,209 @@
+ 		*pdataref=mxCreateString(string);
+ }
+ /*}}}*/
++
++/*ISSM objects*/
++/*FUNCTION WriteData(mxArray** pdataref,BamgGeom* bamggeom){{{1*/
++void WriteData(mxArray** pdataref,BamgGeom* bamggeom){
++
++	/*Intermediary*/
++	int         i;
++	mxArray    *dataref           = NULL;
++	const int   numfields         = 7;
++	const char *fnames[numfields];
++	mwSize      ndim              = 2;
++	mwSize      dimensions[2]     = {1,1};
++
++	/*Initialize field names*/
++	i=0;
++	fnames[i++] = "Vertices";
++	fnames[i++] = "Edges";
++	fnames[i++] = "TangentAtEdges";
++	fnames[i++] = "RequiredVertices";
++	fnames[i++] = "RequiredEdges";
++	fnames[i++] = "CrackedEdges";
++	fnames[i++] = "SubDomains";
++	_assert_(i==numfields);
++
++	/*Initialize Matlab structure*/
++	dataref=mxCreateStructArray(ndim,dimensions,numfields,fnames);
++
++	/*set each matlab each field*/
++	i=0;
++	i++; SetStructureField(dataref,"Vertices",        bamggeom->VerticesSize[0],        bamggeom->VerticesSize[1],        bamggeom->Vertices);
++	i++; SetStructureField(dataref,"Edges",           bamggeom->EdgesSize[0],           bamggeom->EdgesSize[1],           bamggeom->Edges);
++	i++; SetStructureField(dataref,"TangentAtEdges",  bamggeom->TangentAtEdgesSize[0],  bamggeom->TangentAtEdgesSize[1],  bamggeom->TangentAtEdges);
++	i++; SetStructureField(dataref,"RequiredVertices",bamggeom->RequiredVerticesSize[0],bamggeom->RequiredVerticesSize[1],bamggeom->RequiredVertices);
++	i++; SetStructureField(dataref,"RequiredEdges",   bamggeom->RequiredEdgesSize[0],   bamggeom->RequiredEdgesSize[1],   bamggeom->RequiredEdges);
++	i++; SetStructureField(dataref,"CrackedEdges",    bamggeom->CrackedEdgesSize[0],    bamggeom->CrackedEdgesSize[1],    bamggeom->CrackedEdges);
++	i++; SetStructureField(dataref,"SubDomains",      bamggeom->SubDomainsSize[0],      bamggeom->SubDomainsSize[1],      bamggeom->SubDomains);
++	_assert_(i==numfields);
++
++	/*Assign output*/
++	*pdataref=dataref;
++}
++/*}}}*/
++/*FUNCTION WriteData(mxArray** pdataref,BamgMesh* bamgmesh){{{1*/
++void WriteData(mxArray** pdataref,BamgMesh* bamgmesh){
++
++	/*Intermediary*/
++	int         i;
++	mxArray    *dataref           = NULL;
++	const int   numfields         = 16;
++	const char *fnames[numfields];
++	mwSize      ndim              = 2;
++	mwSize      dimensions[2]     = {1,1};
++
++	/*Initialize field names*/
++	i=0;
++	fnames[i++] = "Triangles";
++	fnames[i++] = "Vertices";
++	fnames[i++] = "Edges";
++	fnames[i++] = "IssmSegments";
++	fnames[i++] = "IssmEdges";
++	fnames[i++] = "Quadrilaterals";
++	fnames[i++] = "VerticesOnGeomVertex";
++	fnames[i++] = "VerticesOnGeomEdge";
++	fnames[i++] = "EdgesOnGeomEdge";
++	fnames[i++] = "SubDomains";
++	fnames[i++] = "SubDomainsFromGeom";
++	fnames[i++] = "ElementConnectivity";
++	fnames[i++] = "NodalConnectivity";
++	fnames[i++] = "NodalElementConnectivity";
++	fnames[i++] = "CrackedVertices";
++	fnames[i++] = "CrackedEdges";
++	_assert_(i==numfields);
++
++	/*Initialize Matlab structure*/
++	dataref=mxCreateStructArray(ndim,dimensions,numfields,fnames);
++
++	/*set each matlab each field*/
++	i=0;
++	i++; SetStructureField(dataref,"Triangles", bamgmesh->TrianglesSize[0],bamgmesh->TrianglesSize[1], bamgmesh->Triangles);
++	i++; SetStructureField(dataref,"Vertices",bamgmesh->VerticesSize[0], bamgmesh->VerticesSize[1],bamgmesh->Vertices);
++	i++; SetStructureField(dataref,"Edges", bamgmesh->EdgesSize[0],bamgmesh->EdgesSize[1], bamgmesh->Edges);
++	i++; SetStructureField(dataref,"IssmSegments",bamgmesh->IssmSegmentsSize[0], bamgmesh->IssmSegmentsSize[1],bamgmesh->IssmSegments);
++	i++; SetStructureField(dataref,"IssmEdges", bamgmesh->IssmEdgesSize[0],bamgmesh->IssmEdgesSize[1], bamgmesh->IssmEdges);
++	i++; SetStructureField(dataref,"Quadrilaterals",bamgmesh->QuadrilateralsSize[0], bamgmesh->QuadrilateralsSize[1],bamgmesh->Quadrilaterals);
++	i++; SetStructureField(dataref,"VerticesOnGeomVertex",bamgmesh->VerticesOnGeomVertexSize[0],bamgmesh->VerticesOnGeomVertexSize[1], bamgmesh->VerticesOnGeomVertex);
++	i++; SetStructureField(dataref,"VerticesOnGeomEdge",bamgmesh->VerticesOnGeomEdgeSize[0],bamgmesh->VerticesOnGeomEdgeSize[1], bamgmesh->VerticesOnGeomEdge);
++	i++; SetStructureField(dataref,"EdgesOnGeomEdge", bamgmesh->EdgesOnGeomEdgeSize[0], bamgmesh->EdgesOnGeomEdgeSize[1],bamgmesh->EdgesOnGeomEdge);
++	i++; SetStructureField(dataref,"SubDomains",bamgmesh->SubDomainsSize[0], bamgmesh->SubDomainsSize[1],bamgmesh->SubDomains);
++	i++; SetStructureField(dataref,"SubDomainsFromGeom", bamgmesh->SubDomainsFromGeomSize[0], bamgmesh->SubDomainsFromGeomSize[1],bamgmesh->SubDomainsFromGeom);
++	i++; SetStructureField(dataref,"ElementConnectivity",bamgmesh->ElementConnectivitySize[0],bamgmesh->ElementConnectivitySize[1], bamgmesh->ElementConnectivity);
++	i++; SetStructureField(dataref,"NodalConnectivity",bamgmesh->NodalConnectivitySize[0],bamgmesh->NodalConnectivitySize[1], bamgmesh->NodalConnectivity);
++	i++; SetStructureField(dataref,"NodalElementConnectivity", bamgmesh->NodalElementConnectivitySize[0], bamgmesh->NodalElementConnectivitySize[1],bamgmesh->NodalElementConnectivity);
++	i++; SetStructureField(dataref,"CrackedVertices", bamgmesh->CrackedVerticesSize[0],bamgmesh->CrackedVerticesSize[1], bamgmesh->CrackedVertices);
++	i++; SetStructureField(dataref,"CrackedEdges",bamgmesh->CrackedEdgesSize[0], bamgmesh->CrackedEdgesSize[1],bamgmesh->CrackedEdges);
++	_assert_(i==numfields);
++
++	/*Assign output*/
++	*pdataref=dataref;
++}
++/*}}}*/
++/*FUNCTION WriteData(mxArray** pdataref,Matrix* matrix){{{1*/
++void WriteData(mxArray** pdataref,Matrix* matrix){
++		
++	int      i,j;
++	int      rows,cols;
++	mxArray *dataref     = NULL;
++	double  *matrix_ptr  = NULL;
++	double  *tmatrix_ptr = NULL;
++	
++	if(matrix){
++		
++		#ifdef _HAVE_PETSC_
++		PetscMatrixToDoubleMatrix(&matrix_ptr,&rows,&cols,matrix->matrix);
++		#else
++		matrix_ptr=matrix->matrix->ToSerial();
++		matrix->matrix->GetSize(&rows,cols);
++		#endif
++
++		/*Now transpose the matrix and allocate with Matlab's memory manager: */
++		tmatrix_ptr=(double*)mxMalloc(rows*cols*sizeof(double));
++		for(i=0;i<cols;i++){
++			for(j=0;j<rows;j++){
++				tmatrix_ptr[i*rows+j]=matrix_ptr[j*cols+i];
++			}
++		}
++		
++		/*create matlab matrix: */
++		dataref=mxCreateDoubleMatrix(0,0,mxREAL);
++		mxSetM(dataref,rows); 
++		mxSetN(dataref,cols);
++		mxSetPr(dataref,tmatrix_ptr);
++
++		/*Free ressources:*/
++		xfree((void**)&matrix_ptr);
++
++	}
++	else{
++		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
++	}
++
++	*pdataref=dataref;
++}
++/*}}}*/
++/*FUNCTION WriteData(mxArray** pdataref,Vector* vector){{{1*/
++void WriteData(mxArray** pdataref,Vector* vector){
++	
++	mxArray* dataref=NULL;
++	double*  vector_ptr=NULL;
++	double*  vector_matlab=NULL;
++	int      rows;
++	
++	if(vector){
++		/*call toolkit routine: */
++		#ifdef _HAVE_PETSC_
++		PetscVectorToDoubleVector(&vector_ptr,&rows,vector->vector);
++		#else
++		vector_ptr=vector->vector->ToMPISerial();
++		vector->vector->GetSize(&rows);
++		#endif
++		
++		/*now create the matlab vector with Matlab's memory manager */
++		vector_matlab=(double*)mxMalloc(rows*sizeof(double));
++		for(int i=0;i<rows;i++) vector_matlab[i]=vector_ptr[i];
++
++		dataref = mxCreateDoubleMatrix(0,0,mxREAL);                         
++		mxSetM(dataref,rows);
++		mxSetN(dataref,1);                                                                                          
++		mxSetPr(dataref,vector_matlab);           
++	}
++	else{
++		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
++	}
++
++	/*Clean-up and return*/
++	xfree((void**)&vector_ptr);
++	*pdataref=dataref;
++}
++/*}}}*/
++
++/*Toolkit*/
++/*FUNCTION SetStructureField{{{1*/
++void SetStructureField(mxArray* dataref,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer){
++
++	/*Intermediary*/
++	int      i1,i2;
++	mxArray *pfield  = NULL;
++
++	/*Copy field using Matlab's API and transpose*/
++	double*  fieldcopy=NULL;
++	if (fieldrows*fieldcols){
++		fieldcopy=(double*)mxMalloc(fieldrows*fieldcols*sizeof(double));
++		for(i1=0;i1<fieldrows;i1++){
++			for(i2=0;i2<fieldcols;i2++){
++				fieldcopy[fieldcols*i1+i2]=fieldpointer[fieldrows*i2+i1];
++			}
++		}
++	}
++
++	/*Set matlab field*/
++	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
++	mxSetM(pfield,fieldcols);
++	mxSetN(pfield,fieldrows);
++	mxSetPr(pfield,fieldcopy);
++	mxSetField(dataref,0,fieldname,pfield);
++}
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h	(revision 12042)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h	(revision 12043)
+@@ -26,6 +26,8 @@
+ void WriteData(mxArray** pdataref,bool boolean);
+ void WriteData(mxArray** pdataref,double scalar);
+ void WriteData(mxArray** pdataref,char* string);
++void WriteData(mxArray** pdataref,BamgGeom* bamggeom);
++void WriteData(mxArray** pdataref,BamgMesh* bamgmesh);
+ 
+ void FetchData(double** pmatrix,int* pM,int *pN,const mxArray* dataref);
+ void FetchData(double** pmatrix,int* pnumel,int* pndims,int** psize,const mxArray* dataref);
+@@ -43,6 +45,9 @@
+ void FetchData(double* pscalar,const mxArray* dataref);
+ void FetchData(int* pinteger,const mxArray* dataref);
+ void FetchData(bool* pbool,const mxArray* dataref);
++void FetchData(BamgGeom** bamggeom,const mxArray* dataref);
++void FetchData(BamgMesh** bamgmesh,const mxArray* dataref);
++void FetchData(BamgOpts** bamgopts,const mxArray* dataref);
+ 
+ Option* OptionParse(char* name, const mxArray* prhs[]);
+ OptionDouble*   OptionDoubleParse( char* name, const mxArray* prhs[]);
+@@ -52,6 +57,7 @@
+ OptionCell*     OptionCellParse( char* name, const mxArray* prhs[]);
+ 
+ mxArray* mxGetAssignedField(const mxArray* pmxa_array,int number, const char* field);
++void SetStructureField(mxArray* dataref,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer);
+ int CheckNumMatlabArguments(int nlhs,int NLHS, int nrhs,int NRHS, const char* THISFUNCTION, void (*function)( void ));
+ 
+ /*Matlab to Matrix routines: */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12042)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12043)
+@@ -747,21 +747,15 @@
+ 				    ./matlab/io/OptionParse.cpp\
+ 				    ./matlab/io/MatlabMatrixToMatrix.cpp\
+ 				    ./matlab/io/MatlabVectorToVector.cpp\
+-					./matlab/io/MatlabVectorToDoubleVector.cpp\
+-				    ./matlab/io/MatlabMatrixToDoubleMatrix.cpp\
+-					./matlab/Container/Options.cpp\
+-					./matlab/objects/Bamg/BamgGeom.h\
+-					./matlab/objects/Bamg/BamgGeom.cpp\
+-					./matlab/objects/Bamg/BamgMesh.h\
+-					./matlab/objects/Bamg/BamgMesh.cpp\
+-					./matlab/objects/Bamg/BamgOpts.h\
+-					./matlab/objects/Bamg/BamgOpts.cpp\
+-					./matlab/io/MatlabMatrixToPetscMatrix.cpp\
+-					./matlab/io/MatlabVectorToPetscVector.cpp\
+-					./matlab/io/PetscMatrixToDoubleMatrix.cpp\
+-					./matlab/io/PetscVectorToDoubleVector.cpp\
+-					./matlab/io/MatlabMatrixToSeqMat.cpp\
+-					./matlab/io/MatlabVectorToSeqVec.cpp
++					 ./matlab/io/MatlabVectorToDoubleVector.cpp\
++					 ./matlab/io/MatlabMatrixToDoubleMatrix.cpp\
++					 ./matlab/Container/Options.cpp\
++					 ./matlab/io/MatlabMatrixToPetscMatrix.cpp\
++					 ./matlab/io/MatlabVectorToPetscVector.cpp\
++					 ./matlab/io/PetscMatrixToDoubleMatrix.cpp\
++					 ./matlab/io/PetscVectorToDoubleVector.cpp\
++					 ./matlab/io/MatlabMatrixToSeqMat.cpp\
++					 ./matlab/io/MatlabVectorToSeqVec.cpp
+ #}}}
+ #Modules sources{{{1
+ module_sources= ./objects/Options/Option.cpp\
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp	(revision 12042)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp	(revision 12043)
+@@ -17,9 +17,9 @@
+ 	this->CrackedVerticesSize[0]=0,           this->CrackedVerticesSize[1]=0;          this->CrackedVertices=NULL;
+ 	this->CrackedEdgesSize[0]=0,              this->CrackedEdgesSize[1]=0;             this->CrackedEdges=NULL;
+ 
+-	this->VerticesOnGeomVertexSize[0]=0, this->VerticesOnGeomVertexSize[1]=0;this->VerticesOnGeomVertex=NULL;
+-	this->VerticesOnGeomEdgeSize[0]=0,   this->VerticesOnGeomEdgeSize[1]=0;  this->VerticesOnGeomEdge=NULL;
+-	this->EdgesOnGeomEdgeSize[0]=0,      this->EdgesOnGeomEdgeSize[1]=0;     this->EdgesOnGeomEdge=NULL;
++	this->VerticesOnGeomVertexSize[0]=0,      this->VerticesOnGeomVertexSize[1]=0;     this->VerticesOnGeomVertex=NULL;
++	this->VerticesOnGeomEdgeSize[0]=0,        this->VerticesOnGeomEdgeSize[1]=0;       this->VerticesOnGeomEdge=NULL;
++	this->EdgesOnGeomEdgeSize[0]=0,           this->EdgesOnGeomEdgeSize[1]=0;          this->EdgesOnGeomEdge=NULL;
+ 
+ 	this->IssmEdgesSize[0]=0,                 this->IssmEdgesSize[1]=0;                this->IssmEdges=NULL;
+ 	this->IssmSegmentsSize[0]=0,              this->IssmSegmentsSize[1]=0;             this->IssmSegments=NULL;
+@@ -27,8 +27,6 @@
+ 	this->ElementConnectivitySize[0]=0,       this->ElementConnectivitySize[1]=0;      this->ElementConnectivity=NULL;
+ 	this->NodalConnectivitySize[0]=0,         this->NodalConnectivitySize[1]=0;        this->NodalConnectivity=NULL;
+ 	this->NodalElementConnectivitySize[0]=0,  this->NodalElementConnectivitySize[1]=0; this->NodalElementConnectivity=NULL;
+-
+-
+ }
+ /*}}}*/
+ /*FUNCTION BamgMesh::~BamgMesh(){{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgOpts.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgOpts.h	(revision 12042)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgOpts.h	(revision 12043)
+@@ -49,7 +49,6 @@
+ 		double* err;
+ 
+ 		BamgOpts();
+-		BamgOpts(void* module_struct);
+ 		~BamgOpts();
+ 
+ 		void Check(void);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgGeom.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgGeom.h	(revision 12042)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgGeom.h	(revision 12043)
+@@ -25,11 +25,7 @@
+ 		double* SubDomains;
+ 
+ 		BamgGeom();
+-		BamgGeom(void* module_struct);
+ 		~BamgGeom();
+-
+-		void SetStructureFields(void* matlab_struct);
+-		void SetStructureField(void* matlab_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer);
+ };
+ 
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgMesh.h	(revision 12042)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgMesh.h	(revision 12043)
+@@ -46,12 +46,7 @@
+ 		double* NodalElementConnectivity;
+ 
+ 		BamgMesh();
+-		BamgMesh(void* module_struct);
+ 		~BamgMesh();
+-
+-		void SetStructureFields(void* module_struct);
+-		void SetStructureField(void* module_struct,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer);
+-
+ };
+ 
+ #endif
Index: /issm/oecreview/Archive/12041-12060/ISSM-12043-12044.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12043-12044.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12043-12044.diff	(revision 12325)
@@ -0,0 +1,48 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12043)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 12044)
+@@ -63,8 +63,8 @@
+ 	BamgConvertMeshx(bamgmesh,bamggeom,index,x,y,nods,nels);
+ 
+ 	/*Generate output Matlab Structures*/
+-	bamggeom->SetStructureFields((void*)BAMGGEOMOUT);
+-	bamgmesh->SetStructureFields((void*)BAMGMESHOUT);
++	WriteData(BAMGGEOMOUT,bamggeom);
++	WriteData(BAMGMESHOUT,bamgmesh);
+ 
+ 	/*Clean up*/
+ 	delete bamggeom;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12043)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12044)
+@@ -22,21 +22,21 @@
+ 	/*checks on arguments on the matlab side: */
+ 	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&BamgMesherUsage);
+ 
+-	/*Initialize variables*/
+-	bamgopts   = new BamgOpts(BAMGOPTIONS);
+-	bamggeom_in= new BamgGeom(BAMGGEOMIN);
+-	bamgmesh_in= new BamgMesh(BAMGMESHIN);
+-
+ 	/*Initialize outputs*/
+ 	bamggeom_out=new BamgGeom();
+ 	bamgmesh_out=new BamgMesh();
+ 
++	/*Fetch inputs: */
++	FetchData(&bamgopts,BAMGOPTIONS);
++	FetchData(&bamggeom_in,BAMGMESHIN);
++	FetchData(&bamgmesh_in,BAMGGEOMIN);
++
+ 	/*!Generate internal degree of freedom numbers: */
+ 	Bamgx(bamgmesh_out,bamggeom_out,bamgmesh_in,bamggeom_in,bamgopts);
+ 
+ 	/*Generate output Matlab Structures*/
+-	bamggeom_out->SetStructureFields((void*)BAMGGEOMOUT);
+-	bamgmesh_out->SetStructureFields((void*)BAMGMESHOUT);
++	WriteData(BAMGGEOMOUT,bamggeom);
++	WriteData(BAMGMESHOUT,bamgmesh);
+ 
+ 	/*Free ressources: */
+ 	delete bamgopts;
Index: /issm/oecreview/Archive/12041-12060/ISSM-12044-12045.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12044-12045.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12044-12045.diff	(revision 12325)
@@ -0,0 +1,15 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12044)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12045)
+@@ -35,8 +35,8 @@
+ 	Bamgx(bamgmesh_out,bamggeom_out,bamgmesh_in,bamggeom_in,bamgopts);
+ 
+ 	/*Generate output Matlab Structures*/
+-	WriteData(BAMGGEOMOUT,bamggeom);
+-	WriteData(BAMGMESHOUT,bamgmesh);
++	WriteData(BAMGGEOMOUT,bamggeom_out);
++	WriteData(BAMGMESHOUT,bamgmesh_out);
+ 
+ 	/*Free ressources: */
+ 	delete bamgopts;
Index: /issm/oecreview/Archive/12041-12060/ISSM-12045-12046.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12045-12046.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12045-12046.diff	(revision 12325)
@@ -0,0 +1,83 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12045)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12046)
+@@ -27,7 +27,7 @@
+ 		tmatrix=(double*)mxMalloc(M*N*sizeof(double));
+ 		for(int i=0;i<M;i++){
+ 			for(int j=0;j<N;j++){
+-				tmatrix[i*N+j]=matrix[j*M+i];
++				tmatrix[j*M+i]=matrix[i*N+j];
+ 			}
+ 		}
+ 		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+@@ -48,19 +48,17 @@
+ 	double*  tmatrix = NULL;
+ 
+ 	if(matrix){
+-
+ 		/*convert to double matrix using Matlab's memory manager*/
+ 		double* tmatrix=(double*)mxMalloc(M*N*sizeof(double));
+ 		for(int i=0;i<M;i++){
+ 			for(int j=0;j<N;j++){
+-				tmatrix[i*N+j]=(double)matrix[j*M+i];
++				tmatrix[j*M+i]=(double)matrix[i*N+j];
+ 			}
+ 		}
+ 		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+ 		mxSetM(dataref,(mwSize)M);
+ 		mxSetN(dataref,(mwSize)N);
+ 		mxSetPr(dataref,(double*)tmatrix);
+-
+ 	}
+ 	else{
+ 		dataref = mxCreateDoubleMatrix(0,0,mxREAL);
+@@ -237,9 +235,9 @@
+ 
+ 		/*Now transpose the matrix and allocate with Matlab's memory manager: */
+ 		tmatrix_ptr=(double*)mxMalloc(rows*cols*sizeof(double));
+-		for(i=0;i<cols;i++){
+-			for(j=0;j<rows;j++){
+-				tmatrix_ptr[i*rows+j]=matrix_ptr[j*cols+i];
++		for(i=0;i<rows;i++){
++			for(j=0;j<cols;j++){
++				tmatrix_ptr[j*rows+i]=matrix_ptr[i*cols+j];
+ 			}
+ 		}
+ 		
+@@ -298,28 +296,15 @@
+ 
+ /*Toolkit*/
+ /*FUNCTION SetStructureField{{{1*/
+-void SetStructureField(mxArray* dataref,const char* fieldname,int fieldrows,int fieldcols,double* fieldpointer){
++void SetStructureField(mxArray* dataref,const char* fieldname,int M,int N,double* fieldpointer){
+ 
+-	/*Intermediary*/
+-	int      i1,i2;
+-	mxArray *pfield  = NULL;
++	mxArray* field = NULL;
+ 
+-	/*Copy field using Matlab's API and transpose*/
+-	double*  fieldcopy=NULL;
+-	if (fieldrows*fieldcols){
+-		fieldcopy=(double*)mxMalloc(fieldrows*fieldcols*sizeof(double));
+-		for(i1=0;i1<fieldrows;i1++){
+-			for(i2=0;i2<fieldcols;i2++){
+-				fieldcopy[fieldcols*i1+i2]=fieldpointer[fieldrows*i2+i1];
+-			}
+-		}
+-	}
+ 
+-	/*Set matlab field*/
+-	pfield=mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pfield,fieldcols);
+-	mxSetN(pfield,fieldrows);
+-	mxSetPr(pfield,fieldcopy);
+-	mxSetField(dataref,0,fieldname,pfield);
++	/*Convert field*/
++	WriteData(&field,fieldpointer,M,N);
++
++	/*Assign to structure*/
++	mxSetField(dataref,0,fieldname,field);
+ }
+ /*}}}*/
Index: /issm/oecreview/Archive/12041-12060/ISSM-12046-12047.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12046-12047.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12046-12047.diff	(revision 12325)
@@ -0,0 +1,12 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py	(revision 12046)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py	(revision 12047)
+@@ -4,5 +4,5 @@
+ #md=model()
+ #md=triangle(md,'../Exp/Square.exp',150000);
+ 
+-[a,b,c,d,e]=TriMesh('../Exp/Square.exp',15000.0**2.0,True)
+-print(a,b,c,d,e)
++[index,x,y,segments,segmentmarkers]=TriMesh('../Exp/Square.exp',15000.0**2.0,True)
++print(index,x,y,segments,segmentmarkers)
Index: /issm/oecreview/Archive/12041-12060/ISSM-12047-12048.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12047-12048.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12047-12048.diff	(revision 12325)
@@ -0,0 +1,25 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/solver.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/solver.m	(revision 12047)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/solver.m	(revision 12048)
+@@ -17,7 +17,10 @@
+ 					 error('constructor not supported');
+ 				 end
+ 			 end % }}}
+-		 function obj = addoptions(obj,analysis,solveroptions) % {{{1
++		 function obj = addoptions(obj,analysis,varargin) % {{{1
++		 % Usage example:
++		 %    md.solver=addoptions(md.solver,DiagnosticHorizAnalysisEnum,stokesoptions());
++		 %    md.solver=addoptions(md.solver,DiagnosticHorizAnalysisEnum);
+ 
+ 			 %Convert analysis from enum to string
+ 			 analysis=EnumToString(analysis);
+@@ -28,7 +31,7 @@
+ 			 end
+ 
+ 			 %Add solver options to analysis
+-			 obj.(analysis) = solveroptions;
++			 if nargin==3, obj.(analysis) = varargin{1}; end
+ 		 end
+ 		 %}}}
+ 		 function obj = setdefaultparameters(obj) % {{{
Index: /issm/oecreview/Archive/12041-12060/ISSM-12048-12049.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12048-12049.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12048-12049.diff	(revision 12325)
@@ -0,0 +1,805 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12048)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 12049)
+@@ -29,65 +29,52 @@
+ 	MODULEBOOT();
+ 
+ 	/*checks on arguments on the matlab side: */
+-	if (nlhs > NLHS) {
+-		KMLOverlayUsage();
+-		_error_("KMLOverlay usage error");
++	if(nlhs>NLHS){
++		KMLOverlayUsage(); _error_("KMLOverlay usage error");
+ 	}
+-	if (nrhs < NRHS) {
+-		KMLOverlayUsage();
+-		_error_("KMLOverlay usage error");
++	if(nrhs<NRHS){
++		KMLOverlayUsage(); _error_("KMLOverlay usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+-	if (verbose) printf("Fetching inputs:\n");
+ 	FetchData(&filkml,FILENAME);
+-	if (verbose) printf("  filkml=\"%s\"\n",filkml);
++	FetchData(&options,NRHS,nrhs,prhs);
+ 
+-	if (verbose) printf("Parsing options:\n");
+-	options=new Options(NRHS,nrhs,prhs);
+-//	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
+ 	options->Get(&lataxis ,&nlat ,"lataxis" );
+ 	if (verbose && lataxis) for (i=0; i<nlat; i++) printf("  lataxis [%d]=%g\n",i,lataxis[i]);
+ 	options->Get(&longaxis,&nlong,"longaxis");
+ 	if (verbose && longaxis) for (i=0; i<nlong; i++) printf("  longaxis[%d]=%g\n",i,longaxis[i]);
+-//	((Option*)options->GetOption("images"))->DeepEcho();
+ 	options->Get(&pimages,&nimages,"images");
+ 	if (verbose && pimages) for (i=0; i<nimages; i++) printf("  pimages[%d]=\"%s\"\n",i,pimages[i]);
+ 	options->Get(&dzip,"zip",0.);
+ 	if (verbose) printf("  dzip=%g\n",dzip);
+ 
+ 	/*some checks*/
+-	if (verbose) printf("Checking inputs:\n");
+-
+-	if (nlat  != 2) _error_("Latitudinal axes \"lataxis\" require two double values, not %d.",nlat);
+-	if (nlong != 2) _error_("Longitudinal axes \"longaxis\" require two double values, not %d.",nlong);
++	if (nlat !=2) _error_("Latitudinal axes \"lataxis\" require two double values, not %d.",nlat);
++	if (nlong!=2) _error_("Longitudinal axes \"longaxis\" require two double values, not %d.",nlong);
+ 	if (!nimages) _error_("No image files provided.");
+ 
+-	if ((int)dzip) {
++	if ((int)dzip){
+ 		filkmz=filkml;
+-		filkml=(char *) xmalloc(8*sizeof(char));
++		filkml=(char*)mxMalloc(8*sizeof(char));
+ 		strcpy(filkml,"doc.kml");
+ 	}
+ 
+-	if (!strlen(filkml))
+-		strcpy(filkml,"stdout");
++	if(!strlen(filkml)) strcpy(filkml,"stdout");
+ 
+-	if (verbose) printf("Opening kml overlay file \"%s\".\n",filkml);
++	if(verbose) printf("Opening kml overlay file \"%s\".\n",filkml);
+ 	fid=fopen(filkml,"w");
+ 
+ 	/* Run core computations: */
+ 	if (verbose) printf("Calling core:\n");
+-	KMLOverlayx(&ierror,
+-				lataxis,longaxis,
+-				nimages,pimages,
+-				fid);
++	KMLOverlayx(&ierror,lataxis,longaxis,nimages,pimages,fid);
+ 
+ 	if (verbose) printf("Closing file \"%s\".\n",filkml);
+ 	fclose(fid);
+ 
+ 	/* Create kmz file, if specified: */
+ 	if ((int)dzip) {
+-		czip=(char *) xmalloc((5+strlen(filkmz)+1+strlen(filkml)+1)*sizeof(char));
++		czip=(char*)mxMalloc((5+strlen(filkmz)+1+strlen(filkml)+1)*sizeof(char));
+ 		czip[0]='\0';
+ 		strcat(czip,"!zip ");
+ 		strcat(czip,filkmz);
+@@ -95,7 +82,7 @@
+ 		strcat(czip,filkml);
+ 		for (i=0; i<nimages; i++)
+ 			if (strlen(pimages[i]) && strncmp(pimages[i],"http",4)) {
+-				czip=(char *) xrealloc(czip,(strlen(czip)+1+strlen(pimages[i])+1)*sizeof(char));
++				czip=(char*)mxRealloc(czip,(strlen(czip)+1+strlen(pimages[i])+1)*sizeof(char));
+ 				strcat(czip," ");
+ 				strcat(czip,pimages[i]);
+ 			}
+@@ -124,8 +111,7 @@
+ 	MODULEEND();
+ }
+ 
+-void KMLOverlayUsage(void)
+-{
++void KMLOverlayUsage(void){
+ 	_printf_(true,"KMLOverlay - KML file overlay module:\n");
+ 	_printf_(true,"\n");
+ 	_printf_(true,"   This module reads a list of image files and writes a KML or KMZ overlay file.\n");
+@@ -146,4 +132,3 @@
+ 	_printf_(true,"      KMLOverlay(kmlfile,'lataxis',[south north],'longaxis',[west east],'images',{'file1.png','http://issm/file2.png'},'zip',1);\n");
+ 	_printf_(true,"\n");
+ }
+-
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 12048)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 12049)
+@@ -24,34 +24,20 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nlhs > NLHS) {
+-		Ll2xyUsage();
+-		_error_("Ll2xy usage error");
++		Ll2xyUsage(); _error_("Ll2xy usage error");
+ 	}
+ 	if (nrhs < NRHS) {
+-		Ll2xyUsage();
+-		_error_("Ll2xy usage error");
++		Ll2xyUsage(); _error_("Ll2xy usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+-	if (verbose) printf("Fetching inputs:\n");
+ 	FetchData(&lat,&nlat,LAT_IN);
+-	if (verbose)
+-		if   (nlat == 1) printf("  lat=%g\n",lat[0]);
+-		else             printf("  lat=[%d values]\n",nlat);
+-//	for (i=0; i<nlat; i++) printf("  lat[%d]=%g\n",i,lat[i]);
+ 	FetchData(&lon,&nlon,LON_IN);
+-	if (verbose)
+-		if   (nlon == 1) printf("  lon=%g\n",lon[0]);
+-		else             printf("  lon=[%d values]\n",nlon);
+-//	for (i=0; i<nlon; i++) printf("  lon[%d]=%g\n",i,lon[i]);
+ 	FetchData(&sgn,SGN_IN);
+-	if (verbose) printf("  sgn=%d\n",sgn);
++	FetchData(&options,NRHS,nrhs,prhs);
+ 
+-	if (verbose) printf("Parsing options:\n");
+-	options=new Options(NRHS,nrhs,prhs);
+-	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
+ 	/*  defaults are in Ll2xydef, so don't duplicate them here, and only use user values if both have been specified  */
+-	if (options->GetOption("central_meridian") || options->GetOption("standard_parallel")) {
++	if(options->GetOption("central_meridian") || options->GetOption("standard_parallel")){
+ 		options->Get(&cm,"central_meridian");
+ 		if (verbose) printf("  cm=%g\n",cm);
+ 		options->Get(&sp,"standard_parallel");
+@@ -60,27 +46,20 @@
+ 
+ 	/*some checks*/
+ 	if (verbose) printf("Checking inputs:\n");
+-
+-	if   (nlat != nlon) _error_("Must have same number of lat[%d] and lon[%d] coordinates.",nlat,nlon);
++	if (nlat != nlon) _error_("Must have same number of lat[%d] and lon[%d] coordinates.",nlat,nlon);
+ 	else                ncoord=nlat;
+ 	if (sgn != +1 && sgn != -1) _error_("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);
+ 	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
+ 	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
+ 
+-	x=(double *)xmalloc(ncoord*sizeof(double));
+-	y=(double *)xmalloc(ncoord*sizeof(double));
++	x=(double*)mxMalloc(ncoord*sizeof(double));
++	y=(double*)mxMalloc(ncoord*sizeof(double));
+ 
+ 	/* Run core computations: */
+-	if (verbose) printf("Calling core:\n");
+ 	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
+-		iret=Ll2xyx(x,y,
+-					lat,lon,ncoord,
+-					sgn,cm,sp);
++		iret=Ll2xyx(x,y,lat,lon,ncoord,sgn,cm,sp);
+ 	else
+-		iret=Ll2xyx(x,y,
+-					lat,lon,ncoord,
+-					sgn);
+-	if (verbose) printf("  iret=%d\n",iret);
++		iret=Ll2xyx(x,y,lat,lon,ncoord,sgn);
+ 
+ 	/*Write data: */
+ 	WriteData(X_OUT,x,ncoord);
+@@ -93,8 +72,7 @@
+ 	MODULEEND();
+ }
+ 
+-void Ll2xyUsage(void)
+-{
++void Ll2xyUsage(void){
+ 	_printf_(true,"Ll2xy - lat/long to x/y coordinate transformation module:\n");
+ 	_printf_(true,"\n");
+ 	_printf_(true,"   This module transforms lat/long to x/y coordinates.\n");
+@@ -118,4 +96,3 @@
+ 	_printf_(true,"      [x,y]=Ll2xy(lat,lon,-1,'central_meridian', 0,'standard_parallel',71);\n");
+ 	_printf_(true,"\n");
+ }
+-
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12048)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12049)
+@@ -31,7 +31,7 @@
+ 	FetchData(&bamggeom_in,BAMGMESHIN);
+ 	FetchData(&bamgmesh_in,BAMGGEOMIN);
+ 
+-	/*!Generate internal degree of freedom numbers: */
++	/*Call x layer*/
+ 	Bamgx(bamgmesh_out,bamggeom_out,bamgmesh_in,bamggeom_in,bamgopts);
+ 
+ 	/*Generate output Matlab Structures*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 12048)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 12049)
+@@ -10,39 +10,27 @@
+ 
+ 	/*input: */
+ 	char*   name=NULL;
+-
+ 	char*   notes=NULL;
+ 	const mxArray* notesi;
+ 	mwIndex        nindex;
+-
+ 	int*    elem=NULL;
+ 	int     melem=0,nelem=0;
+-
+ 	int*    nodecon=NULL;
+ 	int     mncon=0,nncon=0;
+-
+ 	double* lat=NULL;
+ 	int     mlat=0,nlat=0,llat=0;
+-
+ 	double* lng=NULL;
+ 	int     mlng=0,nlng=0,llng=0;
+-
+ 	int     nparts=0;
+-
+ 	int*    part=NULL;
+ 	int     mprt=0,nprt=0,lprt=0;
+-
+ 	double* data=NULL;
+ 	int     mdata=0,ndata=0;
+-
+ 	double* cmap=NULL;
+ 	int     mcmap=0,ncmap=0;
+-
+ 	char*   filnam=NULL;
+-
+ 	FILE*   fidi=NULL;
+ 	FILE*   fido=NULL;
+-
+ 	Options* options=NULL;
+ 	char*    echo    =NULL;
+ 	char*    deepecho=NULL;
+@@ -56,32 +44,24 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nlhs > NLHS) {
+-		KMLFileReadUsage();
+-		_error_("KMLFileRead usage error");
++		KMLFileReadUsage(); _error_("KMLFileRead usage error");
+ 	}
+ 	if (nrhs < NRHS) {
+-		KMLFileReadUsage();
+-		_error_("KMLFileRead usage error");
++		KMLFileReadUsage(); _error_("KMLFileRead usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+-	if (verbose) printf("Fetching inputs:\n");
+ 	FetchData(&filnam,FILENAME);
+-	if (verbose) printf("  filnam =\"%s\"\n",filnam);
++	FetchData(&options,NRHS,nrhs,prhs);
++	FetchData(&options,NRHS,nrhs,prhs);
+ 
+-	if (verbose) printf("Parsing options:\n");
+-	options=new Options(NRHS,nrhs,prhs);
+-	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
+ 	options->Get(&echo    ,"echo"    ,"off");
+ 	options->Get(&deepecho,"deepecho","off");
+ 	options->Get(&write   ,"write"   ,"off");
+ 
+ 	/*some checks*/
+-	if (verbose) printf("Checking inputs:\n");
++	if (!strlen(filnam)) strcpy(filnam,"stdout");
+ 
+-	if (!strlen(filnam))
+-		strcpy(filnam,"stdout");
+-
+ 	if (verbose) printf("Opening file \"%s\".\n",filnam);
+ 	fidi=fopen(filnam,"r");
+ 
+@@ -92,7 +72,7 @@
+ 	if (verbose) printf("Closing file \"%s\".\n",filnam);
+ 	fclose(fidi);
+ 
+-	if (kobj) {
++	if (kobj){
+ 		if (!strncmp(echo    ,"on",2) || !strncmp(echo    ,"y",1))
+ 			kobj->Echo();
+ 		if (!strncmp(deepecho,"on",2) || !strncmp(deepecho,"y",1))
+@@ -109,7 +89,6 @@
+ 				ierror=fclose(fido);
+ 			}
+ 		}
+-
+ 		delete kobj;
+ 	}
+ 
+@@ -126,8 +105,7 @@
+ 	MODULEEND();
+ }
+ 
+-void KMLFileReadUsage(void)
+-{
++void KMLFileReadUsage(void){
+ 	_printf_(true,"KMLFileRead - KML file reader module:\n");
+ 	_printf_(true,"\n");
+ 	_printf_(true,"   This module reads a KML file.\n");
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12048)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 12049)
+@@ -17,7 +17,6 @@
+ 	/*input: */
+ 	char    *filshp=NULL,*filkml=NULL;
+ 	int     sgn;
+-
+ 	Options* options=NULL;
+ 	double   cm=0.,sp=0.;
+ 
+@@ -33,26 +32,18 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nlhs > NLHS) {
+-		Shp2KmlUsage();
+-		_error_("Shp2Kml usage error");
++		Shp2KmlUsage(); _error_("Shp2Kml usage error");
+ 	}
+ 	if (nrhs < NRHS) {
+-		Shp2KmlUsage();
+-		_error_("Shp2Kml usage error");
++		Shp2KmlUsage(); _error_("Shp2Kml usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+-	if (verbose) printf("Fetching inputs:\n");
+ 	FetchData(&filshp,SHP_IN);
+-	if (verbose) printf("  filshp=\"%s\"\n",filshp);
+ 	FetchData(&filkml,KML_IN);
+-	if (verbose) printf("  filkml=\"%s\"\n",filkml);
+ 	FetchData(&sgn,SGN_IN);
+-	if (verbose) printf("  sgn=%d\n",sgn);
++	FetchData(&options,NRHS,nrhs,prhs);
+ 
+-	if (verbose) printf("Parsing options:\n");
+-	options=new Options(NRHS,nrhs,prhs);
+-	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
+ 	/*  defaults are in Xy2lldef, so don't duplicate them here, and only use user values if both have been specified  */
+ 	if (options->GetOption("central_meridian") || options->GetOption("standard_parallel")) {
+ 		options->Get(&cm,"central_meridian");
+@@ -62,21 +53,15 @@
+ 	}
+ 
+ 	/*some checks*/
+-	if (verbose) printf("Checking inputs:\n");
+-
+ 	if (sgn < -1 || sgn > +1) _error_("Hemisphere sgn=%d must be +1 (north), -1 (south), or 0 (no translation).",sgn);
+ 	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
+ 	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
+ 
+ 	/* Run core computations: */
+-	if (verbose) printf("Calling core:\n");
+ 	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
+-		iret=Shp2Kmlx(filshp,filkml,
+-					  sgn,cm,sp);
++		iret=Shp2Kmlx(filshp,filkml,sgn,cm,sp);
+ 	else
+-		iret=Shp2Kmlx(filshp,filkml,
+-					  sgn);
+-	if (verbose) printf("  iret=%d\n",iret);
++		iret=Shp2Kmlx(filshp,filkml,sgn);
+ 
+ 	/*Write data: */
+ 	WriteData(RET_OUT,iret);
+@@ -90,8 +75,7 @@
+ 	MODULEEND();
+ }
+ 
+-void Shp2KmlUsage(void)
+-{
++void Shp2KmlUsage(void){
+ 	_printf_(true,"Shp2Kml - shp to kml file conversion module:\n");
+ 	_printf_(true,"\n");
+ 	_printf_(true,"   This module converts a file from shp to kml format.\n");
+@@ -114,4 +98,3 @@
+ 	_printf_(true,"      [ret]=Shp2Kml('file.shp','file.kml',-1,'central_meridian', 0,'standard_parallel',71);\n");
+ 	_printf_(true,"\n");
+ }
+-
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 12048)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 12049)
+@@ -24,29 +24,21 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nlhs > NLHS) {
+-		Exp2KmlUsage();
+-		_error_("Exp2Kml usage error");
++		Exp2KmlUsage(); _error_("Exp2Kml usage error");
+ 	}
+ 	if (nrhs < NRHS) {
+-		Exp2KmlUsage();
+-		_error_("Exp2Kml usage error");
++		Exp2KmlUsage(); _error_("Exp2Kml usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+-	if (verbose) printf("Fetching inputs:\n");
+ 	FetchData(&filexp,EXP_IN);
+-	if (verbose) printf("  filexp=\"%s\"\n",filexp);
+ 	FetchData(&filkml,KML_IN);
+-	if (verbose) printf("  filkml=\"%s\"\n",filkml);
+ 	FetchData(&sgn,SGN_IN);
+-	if (verbose) printf("  sgn=%d\n",sgn);
++	FetchData(&options,NRHS,nrhs,prhs);
+ 
+-	if (verbose) printf("Parsing options:\n");
+-	options=new Options(NRHS,nrhs,prhs);
+-	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
+ 	options->Get(&choles,"holes","no");
+-	if (!strncmp(choles,"y",1) || !strncmp(choles,"on",2))
+-		holes=true;
++	if (!strncmp(choles,"y",1) || !strncmp(choles,"on",2)) holes=true;
++
+ 	/*  defaults are in Xy2lldef, so don't duplicate them here, and only use user values if both have been specified  */
+ 	if (options->GetOption("central_meridian") || options->GetOption("standard_parallel")) {
+ 		options->Get(&cm,"central_meridian");
+@@ -56,23 +48,15 @@
+ 	}
+ 
+ 	/*some checks*/
+-	if (verbose) printf("Checking inputs:\n");
+-
+-	if (sgn != +1 && sgn != -1) _error_("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);
++	if (sgn !=+1 && sgn !=-1) _error_("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);
+ 	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
+ 	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
+ 
+ 	/* Run core computations: */
+-	if (verbose) printf("Calling core:\n");
+ 	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
+-		iret=Exp2Kmlx(filexp,filkml,
+-					  sgn,cm,sp,
+-					  holes);
++		iret=Exp2Kmlx(filexp,filkml,sgn,cm,sp,holes);
+ 	else
+-		iret=Exp2Kmlx(filexp,filkml,
+-					  sgn,
+-					  holes);
+-	if (verbose) printf("  iret=%d\n",iret);
++		iret=Exp2Kmlx(filexp,filkml,sgn,holes);
+ 
+ 	/*Write data: */
+ 	WriteData(RET_OUT,iret);
+@@ -87,8 +71,7 @@
+ 	MODULEEND();
+ }
+ 
+-void Exp2KmlUsage(void)
+-{
++void Exp2KmlUsage(void){
+ 	_printf_(true,"Exp2Kml - exp to kml file conversion module:\n");
+ 	_printf_(true,"\n");
+ 	_printf_(true,"   This module converts a file from exp to kml format.\n");
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 12048)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 12049)
+@@ -10,7 +10,6 @@
+ 	/*input: */
+ 	char    *filkml=NULL,*filexp=NULL;
+ 	int     sgn;
+-
+ 	Options* options=NULL;
+ 	double   cm=0.,sp=0.;
+ 
+@@ -22,26 +21,18 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nlhs > NLHS) {
+-		Kml2ExpUsage();
+-		_error_("Kml2Exp usage error");
++		Kml2ExpUsage(); _error_("Kml2Exp usage error");
+ 	}
+ 	if (nrhs < NRHS) {
+-		Kml2ExpUsage();
+-		_error_("Kml2Exp usage error");
++		Kml2ExpUsage(); _error_("Kml2Exp usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+-	if (verbose) printf("Fetching inputs:\n");
+ 	FetchData(&filkml,KML_IN);
+-	if (verbose) printf("  filkml=\"%s\"\n",filkml);
+ 	FetchData(&filexp,EXP_IN);
+-	if (verbose) printf("  filexp=\"%s\"\n",filexp);
+ 	FetchData(&sgn,SGN_IN);
+-	if (verbose) printf("  sgn=%d\n",sgn);
++	FetchData(&options,NRHS,nrhs,prhs);
+ 
+-	if (verbose) printf("Parsing options:\n");
+-	options=new Options(NRHS,nrhs,prhs);
+-	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
+ 	/*  defaults are in Ll2xydef, so don't duplicate them here, and only use user values if both have been specified  */
+ 	if (options->GetOption("central_meridian") || options->GetOption("standard_parallel")) {
+ 		options->Get(&cm,"central_meridian");
+@@ -51,21 +42,15 @@
+ 	}
+ 
+ 	/*some checks*/
+-	if (verbose) printf("Checking inputs:\n");
+-
+-	if (sgn != +1 && sgn != -1) _error_("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);
++	if (sgn !=+1 && sgn!= -1) _error_("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);
+ 	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
+ 	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
+ 
+ 	/* Run core computations: */
+-	if (verbose) printf("Calling core:\n");
+ 	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
+-		iret=Kml2Expx(filkml,filexp,
+-					  sgn,cm,sp);
++		iret=Kml2Expx(filkml,filexp,sgn,cm,sp);
+ 	else
+-		iret=Kml2Expx(filkml,filexp,
+-					  sgn);
+-	if (verbose) printf("  iret=%d\n",iret);
++		iret=Kml2Expx(filkml,filexp,sgn);
+ 
+ 	/*Write data: */
+ 	WriteData(RET_OUT,iret);
+@@ -79,8 +64,7 @@
+ 	MODULEEND();
+ }
+ 
+-void Kml2ExpUsage(void)
+-{
++void Kml2ExpUsage(void){
+ 	_printf_(true,"Kml2Exp - kml to exp file conversion module:\n");
+ 	_printf_(true,"\n");
+ 	_printf_(true,"   This module converts a file from kml to exp format.\n");
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 12048)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 12049)
+@@ -11,7 +11,6 @@
+ 	double  *x=NULL,*y=NULL;
+ 	int     nx,ny,ncoord;
+ 	int     sgn;
+-
+ 	Options* options=NULL;
+ 	double   cm=0.,sp=0.;
+ 
+@@ -24,32 +23,18 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nlhs > NLHS) {
+-		Xy2llUsage();
+-		_error_("Xy2ll usage error");
++		Xy2llUsage(); _error_("Xy2ll usage error");
+ 	}
+ 	if (nrhs < NRHS) {
+-		Xy2llUsage();
+-		_error_("Xy2ll usage error");
++		Xy2llUsage(); _error_("Xy2ll usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+-	if (verbose) printf("Fetching inputs:\n");
+ 	FetchData(&x,&nx,X_IN);
+-	if (verbose)
+-		if   (nx == 1) printf("  x=%g\n",x[0]);
+-		else           printf("  x=[%d values]\n",nx);
+-//	for (i=0; i<nx; i++) printf("  x[%d]=%g\n",i,x[i]);
+ 	FetchData(&y,&ny,Y_IN);
+-	if (verbose)
+-		if   (ny == 1) printf("  y=%g\n",y[0]);
+-		else           printf("  y=[%d values]\n",ny);
+-//	for (i=0; i<ny; i++) printf("  y[%d]=%g\n",i,y[i]);
+ 	FetchData(&sgn,SGN_IN);
+-	if (verbose) printf("  sgn=%d\n",sgn);
++	FetchData(&options,NRHS,nrhs,prhs);
+ 
+-	if (verbose) printf("Parsing options:\n");
+-	options=new Options(NRHS,nrhs,prhs);
+-	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
+ 	/*  defaults are in Xy2lldef, so don't duplicate them here, and only use user values if both have been specified  */
+ 	if (options->GetOption("central_meridian") || options->GetOption("standard_parallel")) {
+ 		options->Get(&cm,"central_meridian");
+@@ -59,28 +44,21 @@
+ 	}
+ 
+ 	/*some checks*/
+-	if (verbose) printf("Checking inputs:\n");
+-
+ 	if   (nx != ny) _error_("Must have same number of x[%d] and y[%d] coordinates.",nx,ny);
+ 	else            ncoord=nx;
+ 	if (sgn != +1 && sgn != -1) _error_("Hemisphere sgn=%d must be +1 (north) or -1 (south).",sgn);
+ 	if (fabs(cm)      > 180.) _error_("Central meridian cm=%g must be between -180 (west) and +180 (east) degrees.",cm);
+ 	if (sp < 0. || sp >  90.) _error_("Standard parallel sp=%g must be between 0 and 90 degrees (in specified hemisphere).",sp);
+ 
+-	lat=(double *)xmalloc(ncoord*sizeof(double));
+-	lon=(double *)xmalloc(ncoord*sizeof(double));
++	lat=(double*)mxMalloc(ncoord*sizeof(double));
++	lon=(double*)mxMalloc(ncoord*sizeof(double));
+ 
+ 	/* Run core computations: */
+ 	if (verbose) printf("Calling core:\n");
+ 	if (options->GetOption("central_meridian") && options->GetOption("standard_parallel"))
+-		iret=Xy2llx(lat,lon,
+-					x,y,ncoord,
+-					sgn,cm,sp);
++		iret=Xy2llx(lat,lon,x,y,ncoord,sgn,cm,sp);
+ 	else
+-		iret=Xy2llx(lat,lon,
+-					x,y,ncoord,
+-					sgn);
+-	if (verbose) printf("  iret=%d\n",iret);
++		iret=Xy2llx(lat,lon,x,y,ncoord,sgn);
+ 
+ 	/*Write data: */
+ 	WriteData(LAT_OUT,lat,ncoord);
+@@ -93,8 +71,7 @@
+ 	MODULEEND();
+ }
+ 
+-void Xy2llUsage(void)
+-{
++void Xy2llUsage(void){
+ 	_printf_(true,"Xy2ll - x/y to lat/long coordinate transformation module:\n");
+ 	_printf_(true,"\n");
+ 	_printf_(true,"   This module transforms x/y to lat/long coordinates.\n");
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12048)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12049)
+@@ -9,38 +9,26 @@
+ 
+ 	/*input: */
+ 	char*   name=NULL;
+-
+ 	char*   notes=NULL;
+ 	const mxArray* notesi;
+ 	mwIndex        nindex;
+-
+ 	int*    elem=NULL;
+ 	int     melem=0,nelem=0;
+-
+ 	int*    nodecon=NULL;
+ 	int     mncon=0,nncon=0;
+-
+ 	double* lat=NULL;
+ 	int     mlat=0,nlat=0,llat=0;
+-
+ 	double* lng=NULL;
+ 	int     mlng=0,nlng=0,llng=0;
+-
+ 	int     nparts=0;
+-
+ 	int*    part=NULL;
+ 	int     mprt=0,nprt=0,lprt=0;
+-
+ 	double* data=NULL;
+ 	int     mdata=0,ndata=0;
+-
+ 	double* cmap=NULL;
+ 	int     mcmap=0,ncmap=0;
+-
+ 	char*   filnam=NULL;
+-
+ 	FILE*   fid=NULL;
+-
+ 	Options* options=NULL;
+ 
+ 	/* output: */
+@@ -51,18 +39,14 @@
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	if (nlhs > NLHS) {
+-		KMLMeshWriteUsage();
+-		_error_("KMLMeshWrite usage error");
++		KMLMeshWriteUsage(); _error_("KMLMeshWrite usage error");
+ 	}
+ 	if (nrhs < NRHS) {
+-		KMLMeshWriteUsage();
+-		_error_("KMLMeshWrite usage error");
++		KMLMeshWriteUsage(); _error_("KMLMeshWrite usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+-	if (verbose) printf("Fetching inputs:\n");
+ 	FetchData(&name,NAME);
+-	if (verbose) printf("  name   =\"%s\"\n",name);
+ 
+ /*  notes is typically a cell array of character strings  */
+ 	if (mxIsCell(NOTES)) {
+@@ -84,46 +68,24 @@
+ 	}
+ 	else
+ 		FetchData(&notes,NOTES);
+-	if (verbose) printf("  notes  =\"%s\"\n",notes);
+-
+ 	FetchData(&elem,&melem,&nelem,ELEMHANDLE);
+-	if (verbose) printf("  elem   =size [%d x %d]\n",melem,nelem);
+ 	FetchData(&nodecon,&mncon,&nncon,NODECONHANDLE);
+-	if (verbose) printf("  nodecon=size [%d x %d]\n",mncon,nncon);
+ 	FetchData(&lat,&mlat,&nlat,LATHANDLE);
+ 	llat=mlat*nlat;
+-	if (verbose) printf("  lat    =length [%d]\n",llat);
+ 	FetchData(&lng,&mlng,&nlng,LNGHANDLE);
+ 	llng=mlng*nlng;
+-	if (verbose) printf("  lng    =length [%d]\n",llng);
+ 	FetchData(&part,&mprt,&nprt,PARTHANDLE);
+ 	lprt=mprt*nprt;
+-	if (verbose) printf("  part   =length [%d]\n",lprt);
+ 	FetchData(&data,&mdata,&ndata,DATAHANDLE);
+-	if (verbose) printf("  data   =size [%d x %d]\n",mdata,ndata);
+ 	FetchData(&cmap,&mcmap,&ncmap,CMAPHANDLE);
+-	if (verbose) printf("  cmap   =size [%d x %d]\n",mcmap,ncmap);
+ 	FetchData(&filnam,FILENAME);
+-	if (verbose) printf("  filnam =\"%s\"\n",filnam);
++	FetchData(&options,NRHS,nrhs,prhs);
+ 
+-	if (verbose) printf("Parsing options:\n");
+-	options=new Options(NRHS,nrhs,prhs);
+-//	if (options->Size()) for(i=0;i<options->Size();i++) ((Option*)options->GetObjectByOffset(i))->DeepEcho();
+-
+ 	/*some checks*/
+-	if (verbose) printf("Checking inputs:\n");
++	for (i=0; i<melem*nelem; i++) if(elem[i]>nnodes) nnodes=elem[i];
++	if(part) for (i=0; i<lprt; i++) if (part[i]+1 > nparts) nparts=part[i]+1;
+ 
+-	for (i=0; i<melem*nelem; i++)
+-		if (elem[i] > nnodes)
+-			nnodes=elem[i];
+-	if (verbose) printf("  nnodes =%d\n",nnodes);
+-	if (part)
+-		for (i=0; i<lprt; i++)
+-			if (part[i]+1 > nparts)
+-				nparts=part[i]+1;
+-	if (verbose) printf("  nparts =%d\n",nparts);
+-
+-	if      (nodecon && (mncon != nnodes))
++	if (nodecon && (mncon != nnodes))
+ 		_error_("Nodal connectivity table, if supplied, must be supplied for all nodes.");
+ 	else if (!nodecon)
+ 		mncon=nnodes;
+@@ -135,27 +97,12 @@
+ 		_error_("Data matrix, if supplied, must be supplied for all nodes or all elements.");
+ 	if (cmap && (ncmap != 3))
+ 		_error_("Colormap matrix, if supplied, must have three columns for rgb.");
+-
+ 	if (!strlen(filnam))
+ 		strcpy(filnam,"stdout");
+ 
+-	if (verbose) printf("Opening file \"%s\".\n",filnam);
+-	fid=fopen(filnam,"w");
+-
+ 	/* Run core computations: */
+-	if (verbose) printf("Calling core:\n");
+-	KMLMeshWritex(&ierror,
+-				  name,
+-				  notes,
+-				  elem,melem,nelem,
+-				  nodecon,mncon,nncon,
+-				  lat,lng,
+-				  part,
+-				  data,mdata,ndata,
+-				  cmap,mcmap,ncmap,
+-				  fid);
+-
+-	if (verbose) printf("Closing file \"%s\".\n",filnam);
++	fid=fopen(filnam,"w");
++	KMLMeshWritex(&ierror,name,notes,elem,melem,nelem,nodecon,mncon,nncon,lat,lng,part,data,mdata,ndata,cmap,mcmap,ncmap,fid);
+ 	fclose(fid);
+ 
+ 	/*Write data: */
+@@ -169,8 +116,7 @@
+ 	MODULEEND();
+ }
+ 
+-void KMLMeshWriteUsage(void)
+-{
++void KMLMeshWriteUsage(void){
+ 	_printf_(true,"KMLMeshWrite - KML mesh writer module:\n");
+ 	_printf_(true,"\n");
+ 	_printf_(true,"   This module writes the mesh of a model as KML polygons into the specified KML file.\n");
+@@ -195,4 +141,3 @@
+ 	_printf_(true,"      KMLMeshWrite(md.name,md.notes,md.elements,md.nodeconnectivity,md.lat,md.long,md.part,md.fm_criterion,options.cmap,filekml);\n");
+ 	_printf_(true,"\n");
+ }
+-
Index: /issm/oecreview/Archive/12041-12060/ISSM-12049-12050.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12049-12050.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12049-12050.diff	(revision 12325)
@@ -0,0 +1,396 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp	(revision 12049)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp	(revision 12050)
+@@ -67,10 +67,10 @@
+ 	}
+ 
+ 	numcontours=mxGetNumberOfElements(matlabstructure);
+-	contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
++	contours=(Contour**)mxMalloc(numcontours*sizeof(Contour*));
+ 	for(i=0;i<numcontours;i++){
+ 		//allocate
+-		contouri=(Contour*)xmalloc(sizeof(Contour));
++		contouri=(Contour*)mxMalloc(sizeof(Contour));
+ 		//retrieve dimension of this contour.
+ 		contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
+ 		//set pointers.
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 12049)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 12050)
+@@ -54,7 +54,7 @@
+ 	//index
+ 	FetchData(&double_index,&nel,&dummy,INDEX);
+ 	if(dummy!=3 && dummy!=6)_error_(" element triangulation should be of 3 or 6 column width!");
+-	index=(int*)xmalloc(nel*3*sizeof(int));
++	index=(int*)mxMalloc(nel*3*sizeof(int));
+ 	for(i=0;i<nel;i++){
+ 		for(j=0;j<3;j++){
+ 			*(index+3*i+j)=(int)*(double_index+dummy*i+j)-1; //"C" style indexing
+@@ -66,10 +66,10 @@
+ 
+ 	//contours
+ 	numcontours=mxGetNumberOfElements(matlabstructure);
+-	contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
++	contours=(Contour**)mxMalloc(numcontours*sizeof(Contour*));
+ 	for(i=0;i<numcontours;i++){
+ 		//allocate
+-		contouri=(Contour*)xmalloc(sizeof(Contour));
++		contouri=(Contour*)mxMalloc(sizeof(Contour));
+ 		//retrieve dimension of this contour.
+ 		contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
+ 		//set pointers.
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.cpp	(revision 12049)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.cpp	(revision 12050)
+@@ -64,7 +64,7 @@
+ 	if(mxIsDouble(prhs[0])){
+ 		nel=mxGetM(prhs[0]);
+ 		tindex_in=mxGetPr(prhs[0]);
+-		index_in=(double*)xmalloc(nel*3*sizeof(double));
++		index_in=(double*)mxMalloc(nel*3*sizeof(double));
+ 		for (i=0;i<nel;i++){
+ 			for (j=0;j<3;j++){
+ 				*(index_in+3*i+j)=*(tindex_in+nel*j+i)-1;
+@@ -80,7 +80,7 @@
+ 	if(mxIsDouble(prhs[1])){
+ 		nods=mxGetM(prhs[1]);
+ 		x_inm=mxGetPr(prhs[1]);
+-		x_in=(double*)xmalloc(nods*sizeof(double));
++		x_in=(double*)mxMalloc(nods*sizeof(double));
+ 		for (i=0;i<nods;i++){
+ 			x_in[i]=x_inm[i];
+ 		}
+@@ -93,7 +93,7 @@
+ 	/*Fetch y_in: */
+ 	if(mxIsDouble(prhs[2])){
+ 		y_inm=mxGetPr(prhs[2]);
+-		y_in=(double*)xmalloc(nods*sizeof(double));
++		y_in=(double*)mxMalloc(nods*sizeof(double));
+ 		for (i=0;i<nods;i++){
+ 			y_in[i]=y_inm[i];
+ 		}
+@@ -107,7 +107,7 @@
+ 	if(mxIsDouble(prhs[3])){
+ 		num_seg=mxGetM(prhs[3]);
+ 		tsegments_in=mxGetPr(prhs[3]);
+-		segments_in=(double*)xmalloc(num_seg*3*sizeof(double));
++		segments_in=(double*)mxMalloc(num_seg*3*sizeof(double));
+ 		for (i=0;i<num_seg;i++){
+ 			for (j=0;j<3;j++){
+ 				*(segments_in+3*i+j)=*(tsegments_in+num_seg*j+i)-1;
+@@ -122,7 +122,7 @@
+ 	/*Fetch segment markers: */
+ 	if(mxIsDouble(prhs[4])){
+ 		tsegmentmarkers_in=mxGetPr(prhs[4]);
+-		segmentmarkers_in=(double*)xmalloc(num_seg*sizeof(double));
++		segmentmarkers_in=(double*)mxMalloc(num_seg*sizeof(double));
+ 		for (i=0;i<num_seg;i++){
+ 			segmentmarkers_in[i]=tsegmentmarkers_in[i];
+ 		}
+@@ -151,7 +151,7 @@
+ 			mexPrintf("%s%s\n",__FUNCT__," error message; sixth argument should be a string ('yes' or 'no')!");
+ 			mexErrMsgTxt(" ");
+ 		}
+-		order = (char *) xmalloc((mxGetN(prhs[6])+1)*sizeof(char));
++		order = (char *) mxMalloc((mxGetN(prhs[6])+1)*sizeof(char));
+ 		mxGetString(prhs[6],order,mxGetN(prhs[6])+1);
+ 	}
+ 
+@@ -185,35 +185,35 @@
+ 	in.numberoftriangleattributes=1;
+ 	in.numberofcorners=3;
+ 	
+-	in.trianglelist = (int *) xmalloc(3*in.numberoftriangles * sizeof(int));
++	in.trianglelist = (int *) mxMalloc(3*in.numberoftriangles * sizeof(int));
+ 	for(i=0;i<in.numberoftriangles;i++){
+ 		for(j=0;j<3;j++){
+ 			in.trianglelist[3*i+j]=(int)index_in[3*i+j];
+ 		}
+ 	}
+-	in.triangleattributelist = (REAL *) xmalloc(in.numberoftriangles * in.numberoftriangleattributes * sizeof(REAL));
++	in.triangleattributelist = (REAL *) mxMalloc(in.numberoftriangles * in.numberoftriangleattributes * sizeof(REAL));
+ 	for(i=0;i<in.numberoftriangles;i++){
+ 		in.triangleattributelist[i]=0.0;
+ 	}
+-	in.trianglearealist = (REAL *) xmalloc(in.numberoftriangles * sizeof(REAL));
++	in.trianglearealist = (REAL *) mxMalloc(in.numberoftriangles * sizeof(REAL));
+ 	for(i=0;i<in.numberoftriangles;i++){
+ 		in.trianglearealist[i]=area[i];
+ 	}
+ 
+ 	in.numberofpoints=nods;
+ 	in.numberofpointattributes=1;
+-	in.pointlist = (REAL *) xmalloc(in.numberofpoints * 2 * sizeof(REAL));
++	in.pointlist = (REAL *) mxMalloc(in.numberofpoints * 2 * sizeof(REAL));
+ 	for (i=0;i<nods;i++){
+ 		in.pointlist[2*i+0]=x_in[i];
+ 		in.pointlist[2*i+1]=y_in[i];
+ 	}
+-	in.pointattributelist = (REAL *) xmalloc(in.numberofpoints * in.numberofpointattributes * sizeof(REAL));
++	in.pointattributelist = (REAL *) mxMalloc(in.numberofpoints * in.numberofpointattributes * sizeof(REAL));
+ 	for (i=0;i<nods;i++){
+ 		in.pointattributelist[i] = 0.0;
+ 	}	
+ 
+ 	in.numberofsegments = num_seg;
+-	in.segmentlist = (int *) xmalloc(in.numberofsegments * 2 * sizeof(REAL));
++	in.segmentlist = (int *) mxMalloc(in.numberofsegments * 2 * sizeof(REAL));
+ 	in.segmentmarkerlist = (int *) mxCalloc(in.numberofsegments,sizeof(int));
+ 	for (i=0;i<num_seg;i++){
+ 		in.segmentlist[2*i+0]=(int)segments_in[3*i+0];
+@@ -249,11 +249,11 @@
+ 	triangulate(options, &in, &out, NULL);
+ 	
+ 	/*Allocate index, x and y: */
+-	index=(double*)xmalloc(3*out.numberoftriangles*sizeof(double));
+-	x=(double*)xmalloc(out.numberofpoints*sizeof(double));
+-	y=(double*)xmalloc(out.numberofpoints*sizeof(double));
+-	segments=(double*)xmalloc(3*out.numberofsegments*sizeof(double));
+-	segmentmarkerlist=(double*)xmalloc(out.numberofsegments*sizeof(double));
++	index=(double*)mxMalloc(3*out.numberoftriangles*sizeof(double));
++	x=(double*)mxMalloc(out.numberofpoints*sizeof(double));
++	y=(double*)mxMalloc(out.numberofpoints*sizeof(double));
++	segments=(double*)mxMalloc(3*out.numberofsegments*sizeof(double));
++	segmentmarkerlist=(double*)mxMalloc(out.numberofsegments*sizeof(double));
+ 
+ 	for (i = 0; i < out.numberoftriangles; i++) {
+ 		for (j = 0; j < out.numberofcorners; j++) {
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 12049)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 12050)
+@@ -73,7 +73,7 @@
+ 	if(mxIsDouble(prhs[0])){
+ 		nel=mxGetM(prhs[0]);
+ 		tindex_in=mxGetPr(prhs[0]);
+-		index_in=(double*)xmalloc(nel*3*sizeof(double));
++		index_in=(double*)mxMalloc(nel*3*sizeof(double));
+ 		for (i=0;i<nel;i++){
+ 			for (j=0;j<3;j++){
+ 				*(index_in+3*i+j)=*(tindex_in+nel*j+i);
+@@ -89,7 +89,7 @@
+ 	if(mxIsDouble(prhs[1])){
+ 		nods=mxGetM(prhs[1]);
+ 		x_inm=mxGetPr(prhs[1]);
+-		x_in=(double*)xmalloc(nods*sizeof(double));
++		x_in=(double*)mxMalloc(nods*sizeof(double));
+ 		for (i=0;i<nods;i++){
+ 			x_in[i]=x_inm[i];
+ 		}
+@@ -102,7 +102,7 @@
+ 	/*Fetch y_in: */
+ 	if(mxIsDouble(prhs[2])){
+ 		y_inm=mxGetPr(prhs[2]);
+-		y_in=(double*)xmalloc(nods*sizeof(double));
++		y_in=(double*)mxMalloc(nods*sizeof(double));
+ 		for (i=0;i<nods;i++){
+ 			y_in[i]=y_inm[i];
+ 		}
+@@ -116,7 +116,7 @@
+ 	if(mxIsDouble(prhs[3])){
+ 		num_seg=mxGetM(prhs[3]);
+ 		tsegments_in=mxGetPr(prhs[3]);
+-		segments_in=(double*)xmalloc(num_seg*3*sizeof(double));
++		segments_in=(double*)mxMalloc(num_seg*3*sizeof(double));
+ 		for (i=0;i<num_seg;i++){
+ 			for (j=0;j<3;j++){
+ 				*(segments_in+3*i+j)=*(tsegments_in+num_seg*j+i);
+@@ -131,7 +131,7 @@
+ 	/*Fetch segment markers: */
+ 	if(mxIsDouble(prhs[4])){
+ 		tsegmentmarkers_in=mxGetPr(prhs[4]);
+-		segmentmarkers_in=(double*)xmalloc(num_seg*sizeof(double));
++		segmentmarkers_in=(double*)mxMalloc(num_seg*sizeof(double));
+ 		for (i=0;i<num_seg;i++){
+ 			segmentmarkers_in[i]=tsegmentmarkers_in[i];
+ 		}
+@@ -269,7 +269,7 @@
+ 			/*Tips: */
+ 			pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
+ 			mxSetM(pmxa_array2,1);
+-			pair=(double*)xmalloc(2*sizeof(double));
++			pair=(double*)mxMalloc(2*sizeof(double));
+ 			pair[0]=*(out_riftstips+2*i+0);
+ 			pair[1]=*(out_riftstips+2*i+1);
+ 			mxSetN(pmxa_array2,2);
+@@ -292,7 +292,7 @@
+ 			mxSetField(pmxa_array,i,"fractionincrement",mxCreateDoubleScalar(0.1)); 
+ 
+ 			/*State: */
+-			state=(double*)xmalloc(out_riftsnumpenaltypairs[i]*sizeof(double));
++			state=(double*)mxMalloc(out_riftsnumpenaltypairs[i]*sizeof(double));
+ 			for(j=0;j<out_riftsnumpenaltypairs[i];j++)state[j]=FreeEnum;
+ 			pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
+ 			mxSetM(pmxa_array2,1);
+@@ -305,7 +305,7 @@
+ 	}
+ 	else{
+ 		/*output NaN :*/
+-		pNaN=(double*)xmalloc(sizeof(double));
++		pNaN=(double*)mxMalloc(sizeof(double));
+ 		*pNaN=NAN;
+ 		pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
+ 		mxSetM(pmxa_array,1);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InternalFront/InternalFront.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 12049)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 12050)
+@@ -35,7 +35,7 @@
+ 
+ 	/*Allocate and initialize all variables*/
+ 	numberofsegments=0;
+-	front=(int*)xmalloc(3*numberofelements*4*sizeof(int));
++	front=(int*)mxMalloc(3*numberofelements*4*sizeof(int));
+ 
+ 	/*Loop over all elements on water*/
+ 	for(i=0;i<numberofelements;i++){
+@@ -80,7 +80,7 @@
+ 
+ 	/*Now that we know how many segments there is we can allocate the final matrix*/
+ 	if(numberofsegments){
+-		front2=(double*)xmalloc(4*numberofsegments*sizeof(double));
++		front2=(double*)mxMalloc(4*numberofsegments*sizeof(double));
+ 		for(i=0;i<4*numberofsegments;i++) front2[i]=(double)front[i];
+ 	}
+ 	xfree((void**)&front);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp	(revision 12049)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp	(revision 12050)
+@@ -73,12 +73,12 @@
+ 		numberofelements2d,numberofvertices2d,elements2d,numberoflayers,elements_width,dim,numareas);
+ 
+ 	/*Post process node_partitioning and element_partitioning to be in double format. Metis needed them in int* format: */
+-	element_partitioning=(double*)xmalloc(numberofelements*sizeof(double));
++	element_partitioning=(double*)mxMalloc(numberofelements*sizeof(double));
+ 	for (i=0;i<numberofelements;i++){
+ 		element_partitioning[i]=(double)int_element_partitioning[i]+1; //Metis indexing from 0, matlab from 1.
+ 	}
+ 	
+-	node_partitioning=(double*)xmalloc(numberofvertices*sizeof(double));
++	node_partitioning=(double*)mxMalloc(numberofvertices*sizeof(double));
+ 	for (i=0;i<numberofvertices;i++){
+ 		node_partitioning[i]=(double)int_node_partitioning[i]+1; //Metis indexing from 0, matlab from 1.
+ 	}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12049)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12050)
+@@ -99,10 +99,10 @@
+ 
+ 		/*contours: */
+ 		numcontours=mxGetNumberOfElements(matlabstructure);
+-		contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
++		contours=(Contour**)mxMalloc(numcontours*sizeof(Contour*));
+ 		for(i=0;i<numcontours;i++){
+ 			//allocate
+-			contouri=(Contour*)xmalloc(sizeof(Contour));
++			contouri=(Contour*)mxMalloc(sizeof(Contour));
+ 			//retrieve dimension of this contour.
+ 			contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
+ 			//set pointers.
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12049)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12050)
+@@ -77,10 +77,10 @@
+ 
+ 		/*contours: */
+ 		numcontours=mxGetNumberOfElements(matlabstructure);
+-		contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
++		contours=(Contour**)mxMalloc(numcontours*sizeof(Contour*));
+ 		for(i=0;i<numcontours;i++){
+ 			//allocate
+-			contouri=(Contour*)xmalloc(sizeof(Contour));
++			contouri=(Contour*)mxMalloc(sizeof(Contour));
+ 			//retrieve dimension of this contour.
+ 			contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
+ 			//set pointers.
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12049)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12050)
+@@ -64,10 +64,10 @@
+ 
+ 	//Fetch contours
+ 	numcontours=mxGetNumberOfElements(matlabstructure);
+-	contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
++	contours=(Contour**)mxMalloc(numcontours*sizeof(Contour*));
+ 	for(i=0;i<numcontours;i++){
+ 		//allocate
+-		contouri=(Contour*)xmalloc(sizeof(Contour));
++		contouri=(Contour*)mxMalloc(sizeof(Contour));
+ 		//retrieve dimension of this contour.
+ 		contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
+ 		//set pointers.
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12049)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12050)
+@@ -54,12 +54,12 @@
+ 			notesi=mxGetCell(NOTES,nindex);
+ 			if (notesi && mxIsChar(notesi) && mxGetNumberOfElements(notesi)) {
+ 				if (!notes) {
+-					notes=(char *) xmalloc((mxGetNumberOfElements(notesi)+1)*sizeof(char));
++					notes=(char *) mxMalloc((mxGetNumberOfElements(notesi)+1)*sizeof(char));
+ 					mxGetString(notesi,notes,mxGetNumberOfElements(notesi)+1);
+ 				}
+ 				else {
+ /*  note that strlen does not include trailing null  */
+-					notes=(char *) xrealloc(notes,(strlen(notes)+1+mxGetNumberOfElements(notesi)+1)*sizeof(char));
++					notes=(char *) mxRealloc(notes,(strlen(notes)+1+mxGetNumberOfElements(notesi)+1)*sizeof(char));
+ 					strcat(notes,"\n");
+ 					mxGetString(notesi,&notes[strlen(notes)],mxGetNumberOfElements(notesi)+1);
+ 				}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12049)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12050)
+@@ -57,16 +57,16 @@
+ 	nvtxs = mxGetN(A_IN);
+ 
+ 	mwstart = mxGetJc(A_IN);
+-	start=(int*)xmalloc(nvtxs*sizeof(int));
++	start=(int*)mxMalloc(nvtxs*sizeof(int));
+ 	for (i=0; i<nvtxs+1;i++)start[i]=(int)mwstart[i];
+ 
+ 	mwadjacency = mxGetIr(A_IN);
+-	adjacency = (int*)xmalloc(mxGetNzmax(A_IN)*sizeof(int));
++	adjacency = (int*)mxMalloc(mxGetNzmax(A_IN)*sizeof(int));
+ 	for (i=0; i<mxGetNzmax(A_IN); i++) adjacency[i]= (int)mwadjacency[i];
+ 
+ 	nedges = start[nvtxs];
+ 	if(!mxIsEmpty(EWGTS_IN)){
+-		ewgts = (float *) xcalloc(nedges, sizeof(float));
++		ewgts = (float *) mxCalloc(nedges, sizeof(float));
+ 		doublepointer=mxGetPr(A_IN);
+ 		for (i = 0; i < nedges; i++)ewgts[i] = (float)doublepointer[i];
+ 	}
+@@ -83,7 +83,7 @@
+ 	for (i=0;i<(nterms<10?nterms:10);i++) options[i]=in_options[i]; //copy in_options into default options
+ 	
+ 	FetchData(&npart,NPARTS_IN); 
+-	nparts=(int*)xmalloc(sizeof(int)); nparts[0]=npart; //weird Chacox interface ain't it?
++	nparts=(int*)mxMalloc(sizeof(int)); nparts[0]=npart; //weird Chacox interface ain't it?
+ 
+ 	FetchData(&goal,&nterms,GOAL_IN); 
+ 	
+@@ -111,13 +111,13 @@
+ 	/*}}}*/
+ 	
+ 	/*Allocate output: */
+-	assignment = (short *) xcalloc(nvtxs, sizeof(short));
++	assignment = (short *) mxCalloc(nvtxs, sizeof(short));
+ 	
+     /*Call core: */
+ 	Chacox(nvtxs, start, adjacency, vwgts, ewgts, x, y, z, assignment, options, nparts, goal);
+ 
+     /*Output data: */
+-	doubleassignment=(double*)xmalloc(nvtxs*sizeof(double));
++	doubleassignment=(double*)mxMalloc(nvtxs*sizeof(double));
+ 	for (i=0;i<nvtxs;i++) doubleassignment[i]=(double)assignment[i];
+ 	WriteData(ASSGN_OUT,doubleassignment,nvtxs);
+ 
Index: /issm/oecreview/Archive/12041-12060/ISSM-12050-12051.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12050-12051.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12050-12051.diff	(revision 12325)
@@ -0,0 +1,69 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12050)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12051)
+@@ -611,3 +611,28 @@
+ 	*pbamgopts=bamgopts;
+ }
+ /*}}}*/
++/*FUNCTION FetchData(Options** poptions,const mxArray* dataref){{{1*/
++void FetchData(Options** poptions,int istart, int nrhs,const mxArray** pdataref){
++
++	char   *name   = NULL;
++	Option *option = NULL;
++
++	/*Initialize output*/
++	Options* options=new Options();
++
++	/*Fetch all options*/
++	for (i=istart; i<nrhs; i=i+2){
++		if (!mxIsClass(pdataref[i],"char")) _error_("Argument %d must be name of option",i+1);
++
++		FetchData(&name,pdataref[i]);
++		if(i+1 == nrhs) _error_("Argument %d must exist and be value of option \"%s\".",i+2,name);
++
++		option=(Option*)OptionParse(name,&pdataref[i+1]);
++		options->AddOption(option);
++		option=NULL;
++	}
++
++	/*Assign output pointers:*/
++	*poptions=options;
++}
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h	(revision 12050)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h	(revision 12051)
+@@ -48,6 +48,7 @@
+ void FetchData(BamgGeom** bamggeom,const mxArray* dataref);
+ void FetchData(BamgMesh** bamgmesh,const mxArray* dataref);
+ void FetchData(BamgOpts** bamgopts,const mxArray* dataref);
++void FetchData(Options** poptions,int istart, int nrhs,const mxArray** pdataref);
+ 
+ Option* OptionParse(char* name, const mxArray* prhs[]);
+ OptionDouble*   OptionDoubleParse( char* name, const mxArray* prhs[]);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.h	(revision 12050)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.h	(revision 12051)
+@@ -14,7 +14,6 @@
+ 
+ 		/*constructors, destructors*/
+ 		Options();
+-		Options(int istart, int nrhs, void* module_references);
+ 		~Options();
+ 
+ 		/*numerics*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12050)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12051)
+@@ -749,7 +749,6 @@
+ 				    ./matlab/io/MatlabVectorToVector.cpp\
+ 					 ./matlab/io/MatlabVectorToDoubleVector.cpp\
+ 					 ./matlab/io/MatlabMatrixToDoubleMatrix.cpp\
+-					 ./matlab/Container/Options.cpp\
+ 					 ./matlab/io/MatlabMatrixToPetscMatrix.cpp\
+ 					 ./matlab/io/MatlabVectorToPetscVector.cpp\
+ 					 ./matlab/io/PetscMatrixToDoubleMatrix.cpp\
Index: /issm/oecreview/Archive/12041-12060/ISSM-12051-12052.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12051-12052.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12051-12052.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12051)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12052)
+@@ -621,7 +621,7 @@
+ 	Options* options=new Options();
+ 
+ 	/*Fetch all options*/
+-	for (i=istart; i<nrhs; i=i+2){
++	for (int i=istart; i<nrhs; i=i+2){
+ 		if (!mxIsClass(pdataref[i],"char")) _error_("Argument %d must be name of option",i+1);
+ 
+ 		FetchData(&name,pdataref[i]);
Index: /issm/oecreview/Archive/12041-12060/ISSM-12052-12053.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12052-12053.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12052-12053.diff	(revision 12325)
@@ -0,0 +1,15 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12052)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12053)
+@@ -28,8 +28,8 @@
+ 
+ 	/*Fetch inputs: */
+ 	FetchData(&bamgopts,BAMGOPTIONS);
+-	FetchData(&bamggeom_in,BAMGMESHIN);
+-	FetchData(&bamgmesh_in,BAMGGEOMIN);
++	FetchData(&bamggeom_in,BAMGGEOMIN);
++	FetchData(&bamgmesh_in,BAMGMESHOUT);
+ 
+ 	/*Call x layer*/
+ 	Bamgx(bamgmesh_out,bamggeom_out,bamgmesh_in,bamggeom_in,bamgopts);
Index: /issm/oecreview/Archive/12041-12060/ISSM-12053-12054.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12053-12054.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12053-12054.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12053)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 12054)
+@@ -29,7 +29,7 @@
+ 	/*Fetch inputs: */
+ 	FetchData(&bamgopts,BAMGOPTIONS);
+ 	FetchData(&bamggeom_in,BAMGGEOMIN);
+-	FetchData(&bamgmesh_in,BAMGMESHOUT);
++	FetchData(&bamgmesh_in,BAMGMESHIN);
+ 
+ 	/*Call x layer*/
+ 	Bamgx(bamgmesh_out,bamggeom_out,bamgmesh_in,bamggeom_in,bamgopts);
Index: /issm/oecreview/Archive/12041-12060/ISSM-12054-12055.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12054-12055.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12054-12055.diff	(revision 12325)
@@ -0,0 +1,18 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.csh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.csh	(revision 12054)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.csh	(revision 12055)
+@@ -109,11 +109,11 @@
+ 
+ #AUTOCONF
+ setenv AUTOCONF_DIR {$AUTOCONF_DIR}
+-setenv PATH {$PATH}:{$AUTOCONF_DIR}/bin
++setenv PATH {$AUTOCONF_DIR}/bin:{$PATH}
+ 
+ #AUTOMAKE
+ setenv AUTOMAKE_DIR {$AUTOMAKE_DIR}
+-setenv PATH {$PATH}:{$AUTOMAKE_DIR}/bin
++setenv PATH {$AUTOMAKE_DIR}/bin:{$PATH}
+ 
+ #BORLAND
+ setenv BORLAND_DIR {$BORLAND_DIR}
Index: /issm/oecreview/Archive/12041-12060/ISSM-12055-12056.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12055-12056.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12055-12056.diff	(revision 12325)
@@ -0,0 +1,58 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp	(revision 12055)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp	(revision 12056)
+@@ -9,6 +9,14 @@
+ #include "../../io/io.h"
+ #include "../../toolkits/toolkits.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
++/*ANSI_DECLARATORS needed to call triangle library: */
++#ifndef ANSI_DECLARATORS
++#define ANSI_DECLARATORS
++#include "triangle.h"
++#undef ANSI_DECLARATORS
++#else
++#include "triangle.h"
++#endif
+ /*}}}*/
+ 
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h	(revision 12055)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h	(revision 12056)
+@@ -5,17 +5,6 @@
+ #ifndef _TRIMESHX_H_
+ #define _TRIMESHX_H_
+ 
+-
+-
+-/*ANSI_DECLARATORS needed to call triangle library: */
+-#ifndef ANSI_DECLARATORS
+-#define ANSI_DECLARATORS
+-#include "triangle.h"
+-#undef ANSI_DECLARATORS
+-#else
+-#include "triangle.h"
+-#endif
+-
+ #include "string.h"
+ 
+ #include "../../Container/Container.h"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12055)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12056)
+@@ -923,10 +923,12 @@
+ libISSMCore_a_SOURCES  = $(issm_sources)
+ libISSMCore_a_CXXFLAGS = $(ALLCXXFLAGS)
+ 
++if MODULES
+ libISSMModules_a_SOURCES = $(module_sources)
+ libISSMModules_a_SOURCES += $(bamg_sources)
+ libISSMModules_a_SOURCES += $(kml_sources)
+ libISSMModules_a_CXXFLAGS = $(ALLCXXFLAGS)
++endif
+ 
+ if PYTHON
+ libISSMPython_a_SOURCES = $(python_sources)
Index: /issm/oecreview/Archive/12041-12060/ISSM-12056-12057.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12056-12057.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12056-12057.diff	(revision 12325)
@@ -0,0 +1,43 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-greenplanet.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-greenplanet.sh	(revision 12056)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-greenplanet.sh	(revision 12057)
+@@ -5,7 +5,7 @@
+ 
+ ./configure \
+  --prefix=$ISSM_TIER \
+- --with-serial=no \
++ --with-modules=no \
+  --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+  --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+  --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-pleiades-petsc2.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-pleiades-petsc2.sh	(revision 12056)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-pleiades-petsc2.sh	(revision 12057)
+@@ -2,7 +2,7 @@
+ 
+ ./configure \
+  --prefix=$ISSM_TIER \
+- --with-serial=no \
++ --with-modules=no \
+  --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+  --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+  --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-pleiades.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-pleiades.sh	(revision 12056)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-pleiades.sh	(revision 12057)
+@@ -2,10 +2,11 @@
+ 
+ ./configure \
+  --prefix=$ISSM_TIER \
+- --with-serial=no \
++ --with-modules=no \
+  --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+  --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+  --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
++ --with-tao-dir=$ISSM_TIER/externalpackages/tao/install \
+  --with-mpi-include=/nasa/sgi/mpt/1.25/include \
+  --with-mpi-lib="-L/nasa/sgi/mpt/1.25/lib/ -lmpi -lpthread -lgfortran" \
+  --with-petsc-arch=$ISSM_ARCH \
Index: /issm/oecreview/Archive/12041-12060/ISSM-12057-12058.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12057-12058.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12057-12058.diff	(revision 12325)
@@ -0,0 +1,21 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12057)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12058)
+@@ -17,7 +17,6 @@
+ 		AS_HELP_STRING([--with-modules = value],[modules compilation. ]),
+ 		[MODULES_VALUE=$withval],[MODULES_VALUE="yes"])
+ 	AC_MSG_CHECKING(for modules compilation)
+-	AM_CONDITIONAL([NOMODULES], [test $MODULES_VALUE = no])
+ 	AM_CONDITIONAL([MODULES], [test $MODULES_VALUE = yes])
+ 	AC_MSG_RESULT($MODULES_VALUE) 
+ 	dnl }}}
+@@ -1199,7 +1198,7 @@
+ 
+ 	dnl check that we have either python or matlab support if we compile the modules
+ 	if test "$MODULES_VALUE" = "yes"  && test "$HAVE_MATLAB" = "no" && test "$HAVE_PYTHON" = "no"; then
+-		AC_MSG_ERROR([need at least python or matlab support to compile only in serial mode!]);
++		AC_MSG_ERROR([need at least python or matlab support to compile modules (or use --with-modules=no)]);
+ 	fi
+ 
+ 	AC_MSG_RESULT(done)
Index: /issm/oecreview/Archive/12041-12060/ISSM-12058-12059.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12058-12059.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12058-12059.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac	(revision 12058)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac	(revision 12059)
+@@ -1,7 +1,7 @@
+ # Process this file with autoconf to produce a configure script.
+ 
+ #AUTOCONF
+-AC_INIT([ISSM],[4.0],[issm@jpl.nasa.gov],[issm],[http://issm.jpl.nasa.gov]) #Initializing configure
++AC_INIT([ISSM],[4.1],[issm@jpl.nasa.gov],[issm],[http://issm.jpl.nasa.gov]) #Initializing configure
+ AC_CONFIG_AUX_DIR([./aux-config])         #Put config files in aux-config
+ AC_CONFIG_MACRO_DIR([m4])                 #m4 macros are located in m4
+ AC_CANONICAL_TARGET                       #Determine the system type
Index: /issm/oecreview/Archive/12041-12060/ISSM-12059-12060.diff
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-12059-12060.diff	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-12059-12060.diff	(revision 12325)
@@ -0,0 +1,518 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp	(revision 12059)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp	(revision 12060)
+@@ -67,10 +67,10 @@
+ 	}
+ 
+ 	numcontours=mxGetNumberOfElements(matlabstructure);
+-	contours=(Contour**)mxMalloc(numcontours*sizeof(Contour*));
++	contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
+ 	for(i=0;i<numcontours;i++){
+ 		//allocate
+-		contouri=(Contour*)mxMalloc(sizeof(Contour));
++		contouri=(Contour*)xmalloc(sizeof(Contour));
+ 		//retrieve dimension of this contour.
+ 		contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
+ 		//set pointers.
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 12059)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 12060)
+@@ -54,7 +54,7 @@
+ 	//index
+ 	FetchData(&double_index,&nel,&dummy,INDEX);
+ 	if(dummy!=3 && dummy!=6)_error_(" element triangulation should be of 3 or 6 column width!");
+-	index=(int*)mxMalloc(nel*3*sizeof(int));
++	index=(int*)xmalloc(nel*3*sizeof(int));
+ 	for(i=0;i<nel;i++){
+ 		for(j=0;j<3;j++){
+ 			*(index+3*i+j)=(int)*(double_index+dummy*i+j)-1; //"C" style indexing
+@@ -66,10 +66,10 @@
+ 
+ 	//contours
+ 	numcontours=mxGetNumberOfElements(matlabstructure);
+-	contours=(Contour**)mxMalloc(numcontours*sizeof(Contour*));
++	contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
+ 	for(i=0;i<numcontours;i++){
+ 		//allocate
+-		contouri=(Contour*)mxMalloc(sizeof(Contour));
++		contouri=(Contour*)xmalloc(sizeof(Contour));
+ 		//retrieve dimension of this contour.
+ 		contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
+ 		//set pointers.
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.cpp	(revision 12059)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.cpp	(revision 12060)
+@@ -64,7 +64,7 @@
+ 	if(mxIsDouble(prhs[0])){
+ 		nel=mxGetM(prhs[0]);
+ 		tindex_in=mxGetPr(prhs[0]);
+-		index_in=(double*)mxMalloc(nel*3*sizeof(double));
++		index_in=(double*)xmalloc(nel*3*sizeof(double));
+ 		for (i=0;i<nel;i++){
+ 			for (j=0;j<3;j++){
+ 				*(index_in+3*i+j)=*(tindex_in+nel*j+i)-1;
+@@ -80,7 +80,7 @@
+ 	if(mxIsDouble(prhs[1])){
+ 		nods=mxGetM(prhs[1]);
+ 		x_inm=mxGetPr(prhs[1]);
+-		x_in=(double*)mxMalloc(nods*sizeof(double));
++		x_in=(double*)xmalloc(nods*sizeof(double));
+ 		for (i=0;i<nods;i++){
+ 			x_in[i]=x_inm[i];
+ 		}
+@@ -93,7 +93,7 @@
+ 	/*Fetch y_in: */
+ 	if(mxIsDouble(prhs[2])){
+ 		y_inm=mxGetPr(prhs[2]);
+-		y_in=(double*)mxMalloc(nods*sizeof(double));
++		y_in=(double*)xmalloc(nods*sizeof(double));
+ 		for (i=0;i<nods;i++){
+ 			y_in[i]=y_inm[i];
+ 		}
+@@ -107,7 +107,7 @@
+ 	if(mxIsDouble(prhs[3])){
+ 		num_seg=mxGetM(prhs[3]);
+ 		tsegments_in=mxGetPr(prhs[3]);
+-		segments_in=(double*)mxMalloc(num_seg*3*sizeof(double));
++		segments_in=(double*)xmalloc(num_seg*3*sizeof(double));
+ 		for (i=0;i<num_seg;i++){
+ 			for (j=0;j<3;j++){
+ 				*(segments_in+3*i+j)=*(tsegments_in+num_seg*j+i)-1;
+@@ -122,7 +122,7 @@
+ 	/*Fetch segment markers: */
+ 	if(mxIsDouble(prhs[4])){
+ 		tsegmentmarkers_in=mxGetPr(prhs[4]);
+-		segmentmarkers_in=(double*)mxMalloc(num_seg*sizeof(double));
++		segmentmarkers_in=(double*)xmalloc(num_seg*sizeof(double));
+ 		for (i=0;i<num_seg;i++){
+ 			segmentmarkers_in[i]=tsegmentmarkers_in[i];
+ 		}
+@@ -151,7 +151,7 @@
+ 			mexPrintf("%s%s\n",__FUNCT__," error message; sixth argument should be a string ('yes' or 'no')!");
+ 			mexErrMsgTxt(" ");
+ 		}
+-		order = (char *) mxMalloc((mxGetN(prhs[6])+1)*sizeof(char));
++		order = (char *) xmalloc((mxGetN(prhs[6])+1)*sizeof(char));
+ 		mxGetString(prhs[6],order,mxGetN(prhs[6])+1);
+ 	}
+ 
+@@ -185,35 +185,35 @@
+ 	in.numberoftriangleattributes=1;
+ 	in.numberofcorners=3;
+ 	
+-	in.trianglelist = (int *) mxMalloc(3*in.numberoftriangles * sizeof(int));
++	in.trianglelist = (int *) xmalloc(3*in.numberoftriangles * sizeof(int));
+ 	for(i=0;i<in.numberoftriangles;i++){
+ 		for(j=0;j<3;j++){
+ 			in.trianglelist[3*i+j]=(int)index_in[3*i+j];
+ 		}
+ 	}
+-	in.triangleattributelist = (REAL *) mxMalloc(in.numberoftriangles * in.numberoftriangleattributes * sizeof(REAL));
++	in.triangleattributelist = (REAL *) xmalloc(in.numberoftriangles * in.numberoftriangleattributes * sizeof(REAL));
+ 	for(i=0;i<in.numberoftriangles;i++){
+ 		in.triangleattributelist[i]=0.0;
+ 	}
+-	in.trianglearealist = (REAL *) mxMalloc(in.numberoftriangles * sizeof(REAL));
++	in.trianglearealist = (REAL *) xmalloc(in.numberoftriangles * sizeof(REAL));
+ 	for(i=0;i<in.numberoftriangles;i++){
+ 		in.trianglearealist[i]=area[i];
+ 	}
+ 
+ 	in.numberofpoints=nods;
+ 	in.numberofpointattributes=1;
+-	in.pointlist = (REAL *) mxMalloc(in.numberofpoints * 2 * sizeof(REAL));
++	in.pointlist = (REAL *) xmalloc(in.numberofpoints * 2 * sizeof(REAL));
+ 	for (i=0;i<nods;i++){
+ 		in.pointlist[2*i+0]=x_in[i];
+ 		in.pointlist[2*i+1]=y_in[i];
+ 	}
+-	in.pointattributelist = (REAL *) mxMalloc(in.numberofpoints * in.numberofpointattributes * sizeof(REAL));
++	in.pointattributelist = (REAL *) xmalloc(in.numberofpoints * in.numberofpointattributes * sizeof(REAL));
+ 	for (i=0;i<nods;i++){
+ 		in.pointattributelist[i] = 0.0;
+ 	}	
+ 
+ 	in.numberofsegments = num_seg;
+-	in.segmentlist = (int *) mxMalloc(in.numberofsegments * 2 * sizeof(REAL));
++	in.segmentlist = (int *) xmalloc(in.numberofsegments * 2 * sizeof(REAL));
+ 	in.segmentmarkerlist = (int *) mxCalloc(in.numberofsegments,sizeof(int));
+ 	for (i=0;i<num_seg;i++){
+ 		in.segmentlist[2*i+0]=(int)segments_in[3*i+0];
+@@ -249,11 +249,11 @@
+ 	triangulate(options, &in, &out, NULL);
+ 	
+ 	/*Allocate index, x and y: */
+-	index=(double*)mxMalloc(3*out.numberoftriangles*sizeof(double));
+-	x=(double*)mxMalloc(out.numberofpoints*sizeof(double));
+-	y=(double*)mxMalloc(out.numberofpoints*sizeof(double));
+-	segments=(double*)mxMalloc(3*out.numberofsegments*sizeof(double));
+-	segmentmarkerlist=(double*)mxMalloc(out.numberofsegments*sizeof(double));
++	index=(double*)xmalloc(3*out.numberoftriangles*sizeof(double));
++	x=(double*)xmalloc(out.numberofpoints*sizeof(double));
++	y=(double*)xmalloc(out.numberofpoints*sizeof(double));
++	segments=(double*)xmalloc(3*out.numberofsegments*sizeof(double));
++	segmentmarkerlist=(double*)xmalloc(out.numberofsegments*sizeof(double));
+ 
+ 	for (i = 0; i < out.numberoftriangles; i++) {
+ 		for (j = 0; j < out.numberofcorners; j++) {
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 12059)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 12060)
+@@ -73,7 +73,7 @@
+ 	if(mxIsDouble(prhs[0])){
+ 		nel=mxGetM(prhs[0]);
+ 		tindex_in=mxGetPr(prhs[0]);
+-		index_in=(double*)mxMalloc(nel*3*sizeof(double));
++		index_in=(double*)xmalloc(nel*3*sizeof(double));
+ 		for (i=0;i<nel;i++){
+ 			for (j=0;j<3;j++){
+ 				*(index_in+3*i+j)=*(tindex_in+nel*j+i);
+@@ -89,7 +89,7 @@
+ 	if(mxIsDouble(prhs[1])){
+ 		nods=mxGetM(prhs[1]);
+ 		x_inm=mxGetPr(prhs[1]);
+-		x_in=(double*)mxMalloc(nods*sizeof(double));
++		x_in=(double*)xmalloc(nods*sizeof(double));
+ 		for (i=0;i<nods;i++){
+ 			x_in[i]=x_inm[i];
+ 		}
+@@ -102,7 +102,7 @@
+ 	/*Fetch y_in: */
+ 	if(mxIsDouble(prhs[2])){
+ 		y_inm=mxGetPr(prhs[2]);
+-		y_in=(double*)mxMalloc(nods*sizeof(double));
++		y_in=(double*)xmalloc(nods*sizeof(double));
+ 		for (i=0;i<nods;i++){
+ 			y_in[i]=y_inm[i];
+ 		}
+@@ -116,7 +116,7 @@
+ 	if(mxIsDouble(prhs[3])){
+ 		num_seg=mxGetM(prhs[3]);
+ 		tsegments_in=mxGetPr(prhs[3]);
+-		segments_in=(double*)mxMalloc(num_seg*3*sizeof(double));
++		segments_in=(double*)xmalloc(num_seg*3*sizeof(double));
+ 		for (i=0;i<num_seg;i++){
+ 			for (j=0;j<3;j++){
+ 				*(segments_in+3*i+j)=*(tsegments_in+num_seg*j+i);
+@@ -131,7 +131,7 @@
+ 	/*Fetch segment markers: */
+ 	if(mxIsDouble(prhs[4])){
+ 		tsegmentmarkers_in=mxGetPr(prhs[4]);
+-		segmentmarkers_in=(double*)mxMalloc(num_seg*sizeof(double));
++		segmentmarkers_in=(double*)xmalloc(num_seg*sizeof(double));
+ 		for (i=0;i<num_seg;i++){
+ 			segmentmarkers_in[i]=tsegmentmarkers_in[i];
+ 		}
+@@ -269,7 +269,7 @@
+ 			/*Tips: */
+ 			pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
+ 			mxSetM(pmxa_array2,1);
+-			pair=(double*)mxMalloc(2*sizeof(double));
++			pair=(double*)xmalloc(2*sizeof(double));
+ 			pair[0]=*(out_riftstips+2*i+0);
+ 			pair[1]=*(out_riftstips+2*i+1);
+ 			mxSetN(pmxa_array2,2);
+@@ -292,7 +292,7 @@
+ 			mxSetField(pmxa_array,i,"fractionincrement",mxCreateDoubleScalar(0.1)); 
+ 
+ 			/*State: */
+-			state=(double*)mxMalloc(out_riftsnumpenaltypairs[i]*sizeof(double));
++			state=(double*)xmalloc(out_riftsnumpenaltypairs[i]*sizeof(double));
+ 			for(j=0;j<out_riftsnumpenaltypairs[i];j++)state[j]=FreeEnum;
+ 			pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
+ 			mxSetM(pmxa_array2,1);
+@@ -305,7 +305,7 @@
+ 	}
+ 	else{
+ 		/*output NaN :*/
+-		pNaN=(double*)mxMalloc(sizeof(double));
++		pNaN=(double*)xmalloc(sizeof(double));
+ 		*pNaN=NAN;
+ 		pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
+ 		mxSetM(pmxa_array,1);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InternalFront/InternalFront.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 12059)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 12060)
+@@ -35,7 +35,7 @@
+ 
+ 	/*Allocate and initialize all variables*/
+ 	numberofsegments=0;
+-	front=(int*)mxMalloc(3*numberofelements*4*sizeof(int));
++	front=(int*)xmalloc(3*numberofelements*4*sizeof(int));
+ 
+ 	/*Loop over all elements on water*/
+ 	for(i=0;i<numberofelements;i++){
+@@ -80,7 +80,7 @@
+ 
+ 	/*Now that we know how many segments there is we can allocate the final matrix*/
+ 	if(numberofsegments){
+-		front2=(double*)mxMalloc(4*numberofsegments*sizeof(double));
++		front2=(double*)xmalloc(4*numberofsegments*sizeof(double));
+ 		for(i=0;i<4*numberofsegments;i++) front2[i]=(double)front[i];
+ 	}
+ 	xfree((void**)&front);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp	(revision 12059)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp	(revision 12060)
+@@ -73,12 +73,12 @@
+ 		numberofelements2d,numberofvertices2d,elements2d,numberoflayers,elements_width,dim,numareas);
+ 
+ 	/*Post process node_partitioning and element_partitioning to be in double format. Metis needed them in int* format: */
+-	element_partitioning=(double*)mxMalloc(numberofelements*sizeof(double));
++	element_partitioning=(double*)xmalloc(numberofelements*sizeof(double));
+ 	for (i=0;i<numberofelements;i++){
+ 		element_partitioning[i]=(double)int_element_partitioning[i]+1; //Metis indexing from 0, matlab from 1.
+ 	}
+ 	
+-	node_partitioning=(double*)mxMalloc(numberofvertices*sizeof(double));
++	node_partitioning=(double*)xmalloc(numberofvertices*sizeof(double));
+ 	for (i=0;i<numberofvertices;i++){
+ 		node_partitioning[i]=(double)int_node_partitioning[i]+1; //Metis indexing from 0, matlab from 1.
+ 	}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12059)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 12060)
+@@ -99,10 +99,10 @@
+ 
+ 		/*contours: */
+ 		numcontours=mxGetNumberOfElements(matlabstructure);
+-		contours=(Contour**)mxMalloc(numcontours*sizeof(Contour*));
++		contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
+ 		for(i=0;i<numcontours;i++){
+ 			//allocate
+-			contouri=(Contour*)mxMalloc(sizeof(Contour));
++			contouri=(Contour*)xmalloc(sizeof(Contour));
+ 			//retrieve dimension of this contour.
+ 			contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
+ 			//set pointers.
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12059)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12060)
+@@ -77,10 +77,10 @@
+ 
+ 		/*contours: */
+ 		numcontours=mxGetNumberOfElements(matlabstructure);
+-		contours=(Contour**)mxMalloc(numcontours*sizeof(Contour*));
++		contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
+ 		for(i=0;i<numcontours;i++){
+ 			//allocate
+-			contouri=(Contour*)mxMalloc(sizeof(Contour));
++			contouri=(Contour*)xmalloc(sizeof(Contour));
+ 			//retrieve dimension of this contour.
+ 			contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
+ 			//set pointers.
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12059)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12060)
+@@ -25,23 +25,23 @@
+ 	int i,j;
+ 
+ 	/* required input: */
+-	double* index=NULL;
+-	double* x=NULL;
+-	double* y=NULL;
+ 	int     edgevalue;
+-	char*   interptype=NULL;
++	double *index      = NULL;
++	double *x          = NULL;
++	double *y          = NULL;
++	char   *interptype = NULL;
+ 
+ 	/* output: */
+-	Vector*  in_nod=NULL;
+-	int  nods;
+-	Vector*  in_elem=NULL;
+-	int  nel;
++	Vector *in_nod  = NULL;
++	int     nods;
++	Vector *in_elem = NULL;
++	int     nel;
+ 
+ 	//contours
+-	mxArray*  matlabstructure=NULL;
+-	int numcontours;
+-	Contour** contours=NULL;
+-	Contour*  contouri=NULL;
++	mxArray  *matlabstructure = NULL;
++	int       numcontours;
++	Contour **contours        = NULL;
++	Contour  *contouri        = NULL;
+ 
+ 	/*Boot module: */
+ 	MODULEBOOT();
+@@ -64,10 +64,10 @@
+ 
+ 	//Fetch contours
+ 	numcontours=mxGetNumberOfElements(matlabstructure);
+-	contours=(Contour**)mxMalloc(numcontours*sizeof(Contour*));
++	contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
+ 	for(i=0;i<numcontours;i++){
+ 		//allocate
+-		contouri=(Contour*)mxMalloc(sizeof(Contour));
++		contouri=(Contour*)xmalloc(sizeof(Contour));
+ 		//retrieve dimension of this contour.
+ 		contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
+ 		//set pointers.
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12059)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 12060)
+@@ -54,12 +54,12 @@
+ 			notesi=mxGetCell(NOTES,nindex);
+ 			if (notesi && mxIsChar(notesi) && mxGetNumberOfElements(notesi)) {
+ 				if (!notes) {
+-					notes=(char *) mxMalloc((mxGetNumberOfElements(notesi)+1)*sizeof(char));
++					notes=(char *) xmalloc((mxGetNumberOfElements(notesi)+1)*sizeof(char));
+ 					mxGetString(notesi,notes,mxGetNumberOfElements(notesi)+1);
+ 				}
+ 				else {
+ /*  note that strlen does not include trailing null  */
+-					notes=(char *) mxRealloc(notes,(strlen(notes)+1+mxGetNumberOfElements(notesi)+1)*sizeof(char));
++					notes=(char*)xrealloc(notes,(strlen(notes)+1+mxGetNumberOfElements(notesi)+1)*sizeof(char));
+ 					strcat(notes,"\n");
+ 					mxGetString(notesi,&notes[strlen(notes)],mxGetNumberOfElements(notesi)+1);
+ 				}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12059)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12060)
+@@ -17,56 +17,52 @@
+ 	int nterms;
+ 
+ 	/*Inputs: */
+-	int       nvtxs;		/* number of vertices in graph */
+-    int      *start;		/* start of edge list for each vertex */
+-    int      *adjacency;	/* edge list data */
+-    int      *vwgts=NULL;	/* weights for all vertices */
+-	int       nedges;
+-    float    *ewgts=NULL;	/* weights for all edges */
+-    float    *x=NULL;
+-    float    *y=NULL;
+-    float    *z=NULL;		/* coordinates for inertial method */
+-    double    options[10]={1,1,0,0,1,1,50,0,.001,7654321}; /* architecture and partitioning options */
+-    double*   in_options=NULL;
+-    int      *nparts=NULL;	/* number of parts options */
+-	int       npart;
+-    double   *goal=NULL;	/* desired set sizes */
++	int     nvtxs;               /* number of vertices in graph           */
++	int    *start;               /* start of edge list for each vertex    */
++	int    *adjacency;           /* edge list data                        */
++	int    *vwgts       = NULL;  /* weights for all vertices              */
++	int     nedges;
++	float  *ewgts       = NULL;  /* weights for all edges                 */
++	float  *x           = NULL;
++	float  *y           = NULL;
++	float  *z           = NULL;  /* coordinates for inertial method       */
++	double  options[10] = {1,1,0,0,1,1,50,0,.001,7654321}; /* architecture and partitioning options */
++	double *in_options  = NULL;
++	int    *nparts      = NULL;   /* number of parts options               */
++	int     npart;
++	double *goal        = NULL;   /* desired set sizes                     */
+ 
+ 	/*intermediary pointers: */
+ 	mwIndex *mwstart, *mwadjacency;
+ 	double  *doublepointer;
+ 
+ 	/*output: */
+-    short    *assignment=NULL;	/* set number of each vtx (length nvtxs+1) */
+-	double   *doubleassignment=NULL;	/*holds assignment, in double format, to return to matlab*/
++   short  *assignment       = NULL; /* set number of each vtx (length nvtxs+1)                */
++   double *doubleassignment = NULL; /*holds assignment, in double format, to return to matlab */
+ 
+-
+ 	#ifndef _HAVE_CHACO_ //only works if dakota library has been compiled in.
+ 	_error_(" Chaco not available! Cannot carry out Chaco partitioning!");
+ 	#endif
+ 
+-
+ 	/*Boot module: */
+ 	MODULEBOOT();
+ 
+ 	/*checks on arguments on the matlab side: */
+ 	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ChacoUsage);
+ 
+-
+ 	/*Fetch adjacency matrix: */
+ 	nvtxs = mxGetN(A_IN);
+-
+ 	mwstart = mxGetJc(A_IN);
+-	start=(int*)mxMalloc(nvtxs*sizeof(int));
++	start=(int*)xmalloc(nvtxs*sizeof(int));
+ 	for (i=0; i<nvtxs+1;i++)start[i]=(int)mwstart[i];
+ 
+ 	mwadjacency = mxGetIr(A_IN);
+-	adjacency = (int*)mxMalloc(mxGetNzmax(A_IN)*sizeof(int));
++	adjacency = (int*)xmalloc(mxGetNzmax(A_IN)*sizeof(int));
+ 	for (i=0; i<mxGetNzmax(A_IN); i++) adjacency[i]= (int)mwadjacency[i];
+ 
+ 	nedges = start[nvtxs];
+ 	if(!mxIsEmpty(EWGTS_IN)){
+-		ewgts = (float *) mxCalloc(nedges, sizeof(float));
++		ewgts = (float*)xcalloc(nedges, sizeof(float));
+ 		doublepointer=mxGetPr(A_IN);
+ 		for (i = 0; i < nedges; i++)ewgts[i] = (float)doublepointer[i];
+ 	}
+@@ -74,17 +70,13 @@
+ 
+ 	/*Fetch rest of data: */
+ 	FetchData(&vwgts,&nterms,VWGTS_IN); 
+-
+ 	FetchData(&x,&nterms,X_IN); 
+ 	FetchData(&y,&nterms,Y_IN); 
+ 	FetchData(&z,&nterms,Z_IN); 
+-	
+ 	FetchData(&in_options,&nterms,OPTNS_IN); 
+ 	for (i=0;i<(nterms<10?nterms:10);i++) options[i]=in_options[i]; //copy in_options into default options
+-	
+ 	FetchData(&npart,NPARTS_IN); 
+-	nparts=(int*)mxMalloc(sizeof(int)); nparts[0]=npart; //weird Chacox interface ain't it?
+-
++	nparts=(int*)xmalloc(sizeof(int)); nparts[0]=npart; //weird Chacox interface ain't it?
+ 	FetchData(&goal,&nterms,GOAL_IN); 
+ 	
+ 	/*Some debugging print: {{{*/
+@@ -111,14 +103,14 @@
+ 	/*}}}*/
+ 	
+ 	/*Allocate output: */
+-	assignment = (short *) mxCalloc(nvtxs, sizeof(short));
++	assignment = (short*)xcalloc(nvtxs, sizeof(short));
+ 	
+     /*Call core: */
+ 	Chacox(nvtxs, start, adjacency, vwgts, ewgts, x, y, z, assignment, options, nparts, goal);
+ 
+     /*Output data: */
+-	doubleassignment=(double*)mxMalloc(nvtxs*sizeof(double));
+-	for (i=0;i<nvtxs;i++) doubleassignment[i]=(double)assignment[i];
++	doubleassignment=(double*)xmalloc(nvtxs*sizeof(double));
++	for(i=0;i<nvtxs;i++) doubleassignment[i]=(double)assignment[i];
+ 	WriteData(ASSGN_OUT,doubleassignment,nvtxs);
+ 
+ 	/*Free ressources:*/
+@@ -132,15 +124,14 @@
+ 	xfree((void**)&vwgts);
+ 	xfree((void**)&adjacency);
+ 	xfree((void**)&start);
++	xfree((void**)&doubleassignment);
+ 
+ 	/*end module: */
+ 	MODULEEND();
+ }
+ 
+-void ChacoUsage( void )
+-{
++void ChacoUsage(void){
+ 	_printf_(true,"\n");
+ 	_printf_(true,"Usage: [assgn] = Chaco(A,vwgts,ewgts,x,y,z,options,nparts,goal);\n");
+ 	_printf_(true,"\n");
+ }
+-
Index: /issm/oecreview/Archive/12041-12060/ISSM-DocReview-12041-12060.tex
===================================================================
--- /issm/oecreview/Archive/12041-12060/ISSM-DocReview-12041-12060.tex	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/ISSM-DocReview-12041-12060.tex	(revision 12325)
@@ -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/12041-12060/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12041-12060/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12041-12060
Index: /issm/oecreview/Archive/12041-12060/Makefile
===================================================================
--- /issm/oecreview/Archive/12041-12060/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12041-12060
+
+
+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/12041-12060/log.tex
===================================================================
--- /issm/oecreview/Archive/12041-12060/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/log.tex	(revision 12325)
@@ -0,0 +1,38 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12041-12042.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp \\ Export determination: 6. \\Rationale: minor fix
+D /issm/trunk-jpl/src/py/model/display/fielddisplay.rest cleaning up \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12042-12043.diff: \\ Function name: \\D /issm/trunk-jpl/src/py/model/display/fielddisplay.rest \\ Export determination: 6. \\Rationale: cleaning up
+M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/matlabio.h D /issm/trunk-jpl/src/c/matlab/objects M /issm/trunk-jpl/src/c/objects/Bamg/BamgGeom.h M /issm/trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgMesh.h M /issm/trunk-jpl/src/c/objects/Bamg/BamgOpts.h Fixed Fetch and Write for Bamg objects \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12043-12044.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/matlabio.h D /issm/trunk-jpl/src/c/matlab/objects M /issm/trunk-jpl/src/c/objects/Bamg/BamgGeom.h M /issm/trunk-jpl/src/c/objects/Bamg/BamgMesh.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgMesh.h M /issm/trunk-jpl/src/c/objects/Bamg/BamgOpts.h \\ Export determination: 6. \\Rationale: Fixed Fetch and Write for Bamg objects
+M /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp M /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp Fixed Fetch and Write for Bamg objects \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12044-12045.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp M /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp \\ Export determination: 6. \\Rationale: Fixed Fetch and Write for Bamg objects
+M /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp minor \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12045-12046.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp \\ Export determination: 6. \\Rationale: minor
+M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp Fixed matrix transpose \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12046-12047.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp \\ Export determination: 6. \\Rationale: Fixed matrix transpose
+M /issm/trunk-jpl/test/NightlyRun/test101.py Better syntax \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12047-12048.diff: \\ Function name: \\M /issm/trunk-jpl/test/NightlyRun/test101.py \\ Export determination: 6. \\Rationale: Better syntax
+M /issm/trunk-jpl/src/m/classes/solver.m Updated solver option struct to allow setting blank solutionTypeEnum that can be filled in \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12048-12049.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/classes/solver.m \\ Export determination: 6. \\Rationale: Updated solver option struct to allow setting blank solutionTypeEnum that can be filled in
+M /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp M /issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp M /issm/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp M /issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp M /issm/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp M /issm/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp M /issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp M /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp M /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp Using FetchData to recover Options \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12049-12050.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp M /issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp M /issm/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp M /issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp M /issm/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp M /issm/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp M /issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp M /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp M /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp \\ Export determination: 6. \\Rationale: Using FetchData to recover Options
+M /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp M /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp M /issm/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp M /issm/trunk-jpl/src/modules/InternalFront/InternalFront.cpp M /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp M /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp M /issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp M /issm/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp M /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp M /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp M /issm/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.cpp ALWAYS use Matlab's memory manager in mex modules \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12050-12051.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp M /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp M /issm/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp M /issm/trunk-jpl/src/modules/InternalFront/InternalFront.cpp M /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp M /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp M /issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp M /issm/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp M /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp M /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp M /issm/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.cpp \\ Export determination: 6. \\Rationale: ALWAYS use Matlab's memory manager in mex modules
+M /issm/trunk-jpl/src/c/Container/Options.h M /issm/trunk-jpl/src/c/Makefile.am D /issm/trunk-jpl/src/c/matlab/Container M /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/matlabio.h no more weird constructor for Options, use FetchData \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12051-12052.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Options.h M /issm/trunk-jpl/src/c/Makefile.am D /issm/trunk-jpl/src/c/matlab/Container M /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/matlabio.h \\ Export determination: 6. \\Rationale: no more weird constructor for Options, use FetchData
+M /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp minor \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-12052-12053.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp \\ Export determination: 6. \\Rationale: minor
+M /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp reverted bamgmesh and bamggeom \\\\
+\noindent \textbf{Change \#13} with diff file ISSM-12053-12054.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp \\ Export determination: 6. \\Rationale: reverted bamgmesh and bamggeom
+M /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp reverted bamgmesh and bamggeom \\\\
+\noindent \textbf{Change \#14} with diff file ISSM-12054-12055.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp \\ Export determination: 6. \\Rationale: reverted bamgmesh and bamggeom
+M /issm/trunk-jpl/etc/environment.csh use ISSM's autotools by default \\\\
+\noindent \textbf{Change \#15} with diff file ISSM-12055-12056.diff: \\ Function name: \\M /issm/trunk-jpl/etc/environment.csh \\ Export determination: 6. \\Rationale: use ISSM's autotools by default
+M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp M /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h fixed compilation on pleiades \\\\
+\noindent \textbf{Change \#16} with diff file ISSM-12056-12057.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp M /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h \\ Export determination: 6. \\Rationale: fixed compilation on pleiades
+M /issm/trunk-jpl/configs/config-greenplanet.sh M /issm/trunk-jpl/configs/config-pleiades-petsc2.sh M /issm/trunk-jpl/configs/config-pleiades.sh option with-serial not used anymore, changed to with-modules \\\\
+\noindent \textbf{Change \#17} with diff file ISSM-12057-12058.diff: \\ Function name: \\M /issm/trunk-jpl/configs/config-greenplanet.sh M /issm/trunk-jpl/configs/config-pleiades-petsc2.sh M /issm/trunk-jpl/configs/config-pleiades.sh \\ Export determination: 6. \\Rationale: option with-serial not used anymore, changed to with-modules
+M /issm/trunk-jpl/m4/issm\_options.m4 Better error message \\\\
+\noindent \textbf{Change \#18} with diff file ISSM-12058-12059.diff: \\ Function name: \\M /issm/trunk-jpl/m4/issm\_options.m4 \\ Export determination: 6. \\Rationale: Better error message
+M /issm/trunk/configure.ac M /issm/trunk-jpl/configure.ac Changing ISSM version number \\\\
+\noindent \textbf{Change \#19} with diff file ISSM-12059-12060.diff: \\ Function name: \\M /issm/trunk/configure.ac M /issm/trunk-jpl/configure.ac \\ Export determination: 6. \\Rationale: Changing ISSM version number
+M /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp M /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp M /issm/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp M /issm/trunk-jpl/src/modules/InternalFront/InternalFront.cpp M /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp M /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp M /issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp M /issm/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp M /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp M /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp M /issm/trunk-jpl/src/modules/TriMeshRefine/TriMeshRefine.cpp do not use Matlab's memory management for internal variable (big mistake) \\\\
Index: /issm/oecreview/Archive/12041-12060/r1.tex
===================================================================
--- /issm/oecreview/Archive/12041-12060/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12041
Index: /issm/oecreview/Archive/12041-12060/r2.tex
===================================================================
--- /issm/oecreview/Archive/12041-12060/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12041-12060/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12060
Index: /issm/oecreview/Archive/12061-12080/Date.tex
===================================================================
--- /issm/oecreview/Archive/12061-12080/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12061-12080/ISSM-12061-12062.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12061-12062.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12061-12062.diff	(revision 12325)
@@ -0,0 +1,12 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/northarrow.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/northarrow.m	(revision 12061)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/northarrow.m	(revision 12062)
+@@ -71,6 +71,6 @@
+ p2=patch([E(1) F(1) G(1) H(1)],[E(2) F(2) G(2) H(2)],'Black');
+ 
+ %Text North
+-xN=max([A(1) D(1) E(1) F(1) G(1)])+ratio/3*lengtharrow;
++xN=max([A(1) D(1) E(1) F(1) G(1)])+ratio/3*abs(lengtharrow);
+ yN=mean([A(2) F(2) H(2)]);
+ text(xN,yN,'North','FontSize',fontsize,'FontWeight','b');
Index: /issm/oecreview/Archive/12061-12080/ISSM-12062-12063.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12062-12063.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12062-12063.diff	(revision 12325)
@@ -0,0 +1,115 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h	(revision 12062)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h	(revision 12063)
+@@ -111,6 +111,7 @@
+ #include "./TimeAdaptx/TimeAdaptx.h"
+ #include "./TriaSearchx/TriaSearchx.h"
+ #include "./TriMeshx/TriMeshx.h"
++#include "./TriMeshRiftsx/TriMeshRiftsx.h"
+ #include "./ThicknessAbsMisfitx/ThicknessAbsMisfitx.h"
+ #include "./ThicknessAbsGradientx/ThicknessAbsGradientx.h"
+ #include "./UpdateVertexPositionsx/UpdateVertexPositionsx.h"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.h	(revision 12062)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.h	(revision 12063)
+@@ -10,6 +10,6 @@
+ #include "../../objects/objects.h"
+ 
+ /* local prototypes: */
+-void TriMeshRiftsx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,double area,bool order);
++void TriMeshRiftsx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area,bool order);
+ 
+ #endif  /* _TRIMESHX_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.cpp	(revision 12062)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.cpp	(revision 12063)
+@@ -19,7 +19,7 @@
+ #endif
+ /*}}}*/
+ 
+-void TriMeshRiftsx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,double area,bool order){
++void TriMeshRiftsx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area,bool order){
+ 
+ 	/*indexing: */
+ 	int i,j;
+@@ -34,7 +34,7 @@
+ 	double* segmentmarkerlist=NULL;
+ 
+ 	/*intermediary: */
+-	int      counter,backcounter;
++	int      counter,counter2,backcounter;
+ 	Contour* contour=NULL;
+ 
+ 	/* Triangle structures needed to call Triangle library routines: */
+@@ -47,6 +47,12 @@
+ 		contour=(Contour*)domain->GetObjectByOffset(i);
+ 		in.numberofpoints+=contour->nods;
+ 	}
++	if (rifts){
++		for (i=0;i<rifts->Size();i++){
++			contour=(Contour*)rifts->GetObjectByOffset(i);
++			in.numberofpoints+=contour->nods;
++		}
++	}
+ 	/*number of point attributes: */
+ 	in.numberofpointattributes=1;
+ 
+@@ -62,9 +68,19 @@
+ 			counter++;
+ 		}
+ 	}
++	if(rifts){
++		for (i=0;i<rifts->Size();i++){
++			contour=(Contour*)rifts->GetObjectByOffset(i);
++			for (j=0;j<contour->nods;j++){
++				in.pointlist[2*counter+0]=contour->x[j];
++				in.pointlist[2*counter+1]=contour->y[j];
++				counter++;
++			}
++		}
++	}
+ 	
+ 	/*fill in the point attribute list: */
+-	in.pointattributelist = (REAL *) xmalloc(in.numberofpoints * in.numberofpointattributes * sizeof(REAL));
++	in.pointattributelist = (REAL*)xmalloc(in.numberofpoints*in.numberofpointattributes*sizeof(REAL));
+ 	for (i=0;i<in.numberofpoints;i++) in.pointattributelist[i] = 0.0;
+ 	
+ 	/*fill in the point marker list: */
+@@ -77,6 +93,13 @@
+ 		contour=(Contour*)domain->GetObjectByOffset(i);
+ 		in.numberofsegments+=contour->nods;
+ 	}
++	if(rifts){
++		for(i=0;i<rifts->Size();i++){
++			contour=(Contour*)rifts->GetObjectByOffset(i);
++			/*for rifts, we have one less segment as we have vertices*/
++			in.numberofsegments+=contour->nods-1;
++		}
++	}
+ 	
+ 	in.segmentlist = (int *) xmalloc(in.numberofsegments * 2 * sizeof(int));
+ 	in.segmentmarkerlist = (int *) xcalloc(in.numberofsegments,sizeof(int));
+@@ -97,6 +120,20 @@
+ 		 counter++;
+ 		 backcounter=counter;
+ 	}
++	counter2=counter;
++	if(rifts){
++		for (i=0;i<rifts->Size();i++){
++			contour=(Contour*)rifts->GetObjectByOffset(i);
++			for (j=0;j<(contour->nods-1);j++){
++				in.segmentlist[2*counter2+0]=counter;
++				in.segmentlist[2*counter2+1]=counter+1;
++				in.segmentmarkerlist[counter2]=2+i;
++				counter2++;
++				counter++;
++			}
++			counter++;
++		}
++	}
+ 	
+ 	/*Build regions: */
+ 	in.numberofregions = 0;
Index: /issm/oecreview/Archive/12061-12080/ISSM-12063-12064.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12063-12064.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12063-12064.diff	(revision 12325)
@@ -0,0 +1,427 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12063)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12064)
+@@ -75,10 +75,10 @@
+ 
+ 	dnl 1. See if matlab has been provided
+ 	AC_ARG_WITH([matlab-dir],
+-		AS_HELP_STRING([--with-matlab-dir = DIR], [matlab root directory. necessary for serial build.]),
++		AS_HELP_STRING([--with-matlab-dir=DIR], [matlab root directory. necessary for serial build.]),
+ 		[MATLAB_ROOT=$withval],[MATLAB_ROOT=""]) 
+ 
+-	AC_MSG_CHECKING([wether Matlab is enabled])
++	AC_MSG_CHECKING([whether matlab is enabled])
+ 	if test -d "$MATLAB_ROOT"; then
+ 		HAVE_MATLAB=yes
+ 	else
+@@ -92,7 +92,7 @@
+ 
+ 	dnl 2. if matlab is provided, get version number
+ 	if test x$HAVE_MATLAB = xyes; then
+-		AC_MSG_CHECKING([for Matlab version])
++		AC_MSG_CHECKING([for matlab version])
+ 		MATLAB_VERSION=""
+ 
+ 		dnl For Matlab R2008a and more, the version number is stored in .VERSION
+@@ -155,7 +155,7 @@
+ 		AC_MSG_RESULT($MATLAB_VERSION ($MATLAB_MAJOR.$MATLAB_MINOR))
+ 
+ 		dnl 3. Get Matlab libraries
+-		AC_MSG_CHECKING(for Matlab headers and libraries in $MATLAB_ROOT)
++		AC_MSG_CHECKING(for matlab headers and libraries in $MATLAB_ROOT)
+ 		MATLABINCL=-I"$MATLAB_ROOT/extern/include";
+ 		
+ 		dnl OS-dependent variables and checks
+@@ -208,9 +208,9 @@
+ 	dnl }}}
+ 	dnl triangle {{{
+ 	AC_ARG_WITH([triangle-dir],
+-			  AS_HELP_STRING([--with-triangle-dir = DIR], [triangle root directory. necessary for serial build]),
++			  AS_HELP_STRING([--with-triangle-dir=DIR], [triangle root directory. necessary for serial build]),
+ 			 [TRIANGLE_ROOT=$withval],[TRIANGLE_ROOT=""]) 
+-	AC_MSG_CHECKING(for Triangle headers and libraries)
++	AC_MSG_CHECKING(for triangle headers and libraries)
+ 
+ 	if test -d "$TRIANGLE_ROOT"; then
+ 
+@@ -249,9 +249,9 @@
+ 	dnl }}}
+ 	dnl dakota{{{
+ 	AC_ARG_WITH([dakota-dir],
+-	  AS_HELP_STRING([--with-dakota-dir = DIR], [dakota root directory. necessary for serial build]),
++	  AS_HELP_STRING([--with-dakota-dir=DIR], [dakota root directory. necessary for serial build]),
+ 	  [DAKOTA_ROOT=$withval],[DAKOTA_ROOT=""]) 
+-	AC_MSG_CHECKING(for Dakota)
++	AC_MSG_CHECKING(for dakota)
+ 	
+ 	if test -d "$DAKOTA_ROOT"; then
+ 
+@@ -282,9 +282,9 @@
+ 	dnl }}}
+ 	dnl boost{{{
+ 	AC_ARG_WITH([boost-dir],
+-	  AS_HELP_STRING([--with-boost-dir = DIR], [boost root directory.]),
++	  AS_HELP_STRING([--with-boost-dir=DIR], [boost root directory.]),
+ 	  [BOOST_ROOT=$withval],[BOOST_ROOT=""]) 
+-	AC_MSG_CHECKING(for Boost)
++	AC_MSG_CHECKING(for boost)
+ 	
+ 	if test -d "$BOOST_ROOT"; then
+ 		dnl defaults
+@@ -303,9 +303,9 @@
+ 	dnl }}}
+ 	dnl python{{{
+ 	AC_ARG_WITH([python-dir],
+-	  AS_HELP_STRING([--with-python-dir = DIR], [python root directory.]),
++	  AS_HELP_STRING([--with-python-dir=DIR], [python root directory.]),
+ 	  [PYTHON_ROOT=$withval],[PYTHON_ROOT=""]) 
+-	AC_MSG_CHECKING(for Python)
++	AC_MSG_CHECKING(for python)
+ 	
+ 	if test -d "$PYTHON_ROOT"; then
+ 		dnl defaults
+@@ -327,11 +327,30 @@
+ 	AM_CONDITIONAL([PYTHON], [test x$HAVE_PYTHON = xyes])
+ 	AC_MSG_RESULT($HAVE_PYTHON)
+ 	dnl }}}
++	dnl python-version{{{
++	AC_ARG_WITH([python-version],
++	  AS_HELP_STRING([--with-python-version = PYTHONVERSION],[python version.]),
++	  [PYTHONVERSION=$withval],[PYTHONVERSION=""])
++	AC_MSG_CHECKING(for python version)
++
++	HAVE_PYTHON3="no"
++
++	dnl recover major: 
++	PYTHON_MAJOR=${PYTHONVERSION%.*}
++
++	if test x$PYTHON_MAJOR = x3; then
++		dnl are we running python 3?
++		HAVE_PYTHON3="yes"
++	fi
++
++	AM_CONDITIONAL([PYTHON3], [test x$HAVE_PYTHON3 = xyes])
++	AC_MSG_RESULT($PYTHON_MAJOR)
++	dnl }}}
+ 	dnl python-numpy{{{
+ 	AC_ARG_WITH([python-numpy-dir],
+-	  AS_HELP_STRING([--with-python-numpy-dir = DIR], [python-numpy root directory.]),
++	  AS_HELP_STRING([--with-python-numpy-dir=DIR], [python-numpy root directory.]),
+ 	  [PYTHON_NUMPY_ROOT=$withval],[PYTHON_NUMPY_ROOT=""]) 
+-	AC_MSG_CHECKING(for Python-Numpy)
++	AC_MSG_CHECKING(for python-numpy)
+ 	
+ 	if test -d "$PYTHON_NUMPY_ROOT"; then
+ 		dnl defaults
+@@ -347,9 +366,9 @@
+ 	dnl }}}
+ 	dnl chaco{{{
+ 	AC_ARG_WITH([chaco-dir],
+-	  AS_HELP_STRING([--with-chaco-dir = DIR], [chaco root directory.]),
++	  AS_HELP_STRING([--with-chaco-dir=DIR], [chaco root directory.]),
+ 	  [CHACO_ROOT=$withval],[CHACO_ROOT=""]) 
+-	AC_MSG_CHECKING(for Chaco)
++	AC_MSG_CHECKING(for chaco)
+ 	
+ 	if test -d "$CHACO_ROOT"; then
+ 
+@@ -369,9 +388,9 @@
+ 	dnl }}}
+ 	dnl scotch{{{
+ 	AC_ARG_WITH([scotch-dir],
+-	  AS_HELP_STRING([--with-scotch-dir = DIR], [scotch root directory.]),
++	  AS_HELP_STRING([--with-scotch-dir=DIR], [scotch root directory.]),
+ 	  [SCOTCH_ROOT=$withval],[SCOTCH_ROOT=""]) 
+-	AC_MSG_CHECKING(for Scotch)
++	AC_MSG_CHECKING(for scotch)
+ 	
+ 	if test -d "$SCOTCH_ROOT"; then
+ 
+@@ -391,9 +410,9 @@
+ 	dnl }}}
+ 	dnl adolc{{{
+ 	AC_ARG_WITH([adolc-dir],
+-		AS_HELP_STRING([--with-adolc-dir = DIR], [adolc root directory.]),
++		AS_HELP_STRING([--with-adolc-dir=DIR], [adolc root directory.]),
+ 		[ADOLC_ROOT=$withval],[ADOLC_ROOT="no"]) 
+-	AC_MSG_CHECKING(for ADOLC)
++	AC_MSG_CHECKING(for adolc)
+ 
+ 	if test "x$ADOLC_ROOT" = "xno"; then
+ 		HAVE_ADOLC=no
+@@ -419,9 +438,9 @@
+ 	dnl }}}
+ 	dnl adic2{{{
+ 	AC_ARG_WITH([adic2-dir],
+-	  AS_HELP_STRING([--with-adic2-dir = DIR], [adic2 root directory.]),
++	  AS_HELP_STRING([--with-adic2-dir=DIR], [adic2 root directory.]),
+ 	  [ADIC2_ROOT=$withval],[ADIC2_ROOT="no"]) 
+-	AC_MSG_CHECKING(for ADIC2)
++	AC_MSG_CHECKING(for adic2)
+ 
+ 	if test "x$ADIC2_ROOT" = "xno"; then
+ 		HAVE_ADIC2=no
+@@ -447,9 +466,9 @@
+ 	dnl }}}
+ 	dnl gsl{{{
+ 	AC_ARG_WITH([gsl-dir],
+-	  AS_HELP_STRING([--with-gsl-dir = DIR], [gsl root directory.]),
++	  AS_HELP_STRING([--with-gsl-dir=DIR], [gsl root directory.]),
+ 	  [GSL_ROOT=$withval],[GSL_ROOT=""]) 
+-	AC_MSG_CHECKING(for Gsl)
++	AC_MSG_CHECKING(for gsl)
+ 	
+ 	if test -d "$GSL_ROOT"; then
+ 
+@@ -470,9 +489,9 @@
+ 	dnl }}}
+ 	dnl rose{{{
+ 	AC_ARG_WITH([rose-dir],
+-	  AS_HELP_STRING([--with-rose-dir = DIR], [rose root directory.]),
++	  AS_HELP_STRING([--with-rose-dir=DIR], [rose root directory.]),
+ 	  [ROSE_ROOT=$withval],[ROSE_ROOT=""]) 
+-	AC_MSG_CHECKING(for Rose)
++	AC_MSG_CHECKING(for rose)
+ 	
+ 	if test -d "$ROSE_ROOT"; then
+ 
+@@ -493,12 +512,12 @@
+ 	dnl }}}
+ 	dnl metis{{{
+ 	AC_ARG_WITH([metis-dir],
+-	  AS_HELP_STRING([--with-metis-dir = DIR],[metis root directory. necessary for serial build]),
++	  AS_HELP_STRING([--with-metis-dir=DIR],[metis root directory. necessary for serial build]),
+ 	  [METIS_ROOT=$withval],[METIS_ROOT=""])
+ 
+ 	if test -d "$METIS_ROOT"; then
+ 
+-		AC_MSG_CHECKING(for Metis headers and libraries in $METIS_ROOT)
++		AC_MSG_CHECKING(for metis headers and libraries in $METIS_ROOT)
+ 
+ 		dnl first figure out version of metis: does the VERSION file exist?
+ 		if test -e "$METIS_ROOT/VERSION"; then
+@@ -565,7 +584,7 @@
+ 		[MPILIB=$withval],[MPILIB=""])
+ 	
+ 	AC_ARG_WITH([mpi-include],
+-	  AS_HELP_STRING([--with-mpi-include = DIR],[mpi include directory, necessary for parallel build]),
++	  AS_HELP_STRING([--with-mpi-include=DIR],[mpi include directory, necessary for parallel build]),
+ 	  [MPI_INCLUDE=$withval],[MPI_INCLUDE=""])
+ 	
+ 	if test -z "$MPILIB" ; then
+@@ -574,6 +593,7 @@
+ 		if test -z "$MPI_INCLUDE" ; then
+ 			HAVE_MPI=no
+ 		else
++			HAVE_MPI=yes
+ 			MPIINCL=-I"$MPI_INCLUDE/"
+ 			AC_DEFINE([_HAVE_MPI_],[1],[with Mpi in ISSM src])
+ 			AC_DEFINE([HAVE_MPI],[1],[Mpi Flag for Dakota (DO NOT REMOVE)])
+@@ -581,15 +601,15 @@
+ 			AC_SUBST([MPILIB])
+ 		fi
+ 	fi
+-	AC_MSG_RESULT(done)
++	AC_MSG_RESULT($HAVE_MPI)
+ 	dnl }}}
+ 	dnl petsc{{{
+ 	AC_ARG_WITH([petsc-dir],
+-	  AS_HELP_STRING([--with-petsc-dir = DIR],[PETSc root directory, necessary for parallel build]),
++	  AS_HELP_STRING([--with-petsc-dir=DIR],[PETSc root directory, necessary for parallel build]),
+ 	  [PETSC_ROOT=$withval],[PETSC_ROOT=""])
+ 		
+ 	if test -d "$PETSC_ROOT"; then
+-		AC_MSG_CHECKING(for PETSc version)
++		AC_MSG_CHECKING(for petsc version)
+ 		PETSC_MAJOR=`cat $PETSC_ROOT/include/petscversion.h | grep "#define PETSC_VERSION_MAJOR" | sed 's/#define PETSC_VERSION_MAJOR//' | sed 's/ //g'`
+ 		PETSC_MINOR=`cat $PETSC_ROOT/include/petscversion.h | grep "#define PETSC_VERSION_MINOR" | sed 's/#define PETSC_VERSION_MINOR//' | sed 's/ //g'`
+ 		AC_DEFINE_UNQUOTED([_PETSC_MAJOR_],$PETSC_MAJOR,[PETSc version major])
+@@ -597,7 +617,7 @@
+ 		AC_MSG_RESULT($PETSC_MAJOR.$PETSC_MINOR)
+ 
+ 		PETSC_VERSION_DATE_HG=`cat $PETSC_ROOT/include/petscversion.h | grep "#define PETSC_VERSION_DATE_HG" | sed 's/#define PETSC_VERSION_DATE_HG//' | sed 's/ //g' | sed -e 's/\"//g' `
+-		AC_MSG_CHECKING(wether PETSc is the development version)
++		AC_MSG_CHECKING(whether petsc is the development version)
+ 		if test x$PETSC_VERSION_DATE_HG = xunknown; then
+ 			AC_DEFINE([_HAVE_PETSCDEV_],[1],[with PETSc-dev])
+ 			AC_MSG_RESULT(yes)
+@@ -607,10 +627,10 @@
+ 	fi
+ 	
+ 	AC_ARG_WITH([petsc-arch],
+-	  AS_HELP_STRING([--with-petsc-arch = DIR],[PETSc arch , necessary for parallel build]),
++	  AS_HELP_STRING([--with-petsc-arch=DIR],[PETSc arch , necessary for parallel build]),
+ 	  [PETSC_ARCH=$withval],[PETSC_ARCH=""])
+ 
+-	AC_MSG_CHECKING(for PETSc headers and libraries in $PETSC_ROOT for architecture $PETSC_ARCH)
++	AC_MSG_CHECKING(for petsc headers and libraries in $PETSC_ROOT for architecture $PETSC_ARCH)
+ 	
+ 	if test -d "$PETSC_ROOT"; then
+ 
+@@ -654,9 +674,9 @@
+ 	dnl }}}
+ 	dnl tao{{{
+ 	AC_ARG_WITH([tao-dir],
+-		AS_HELP_STRING([--with-tao-dir = DIR], [tao root directory.]),
++		AS_HELP_STRING([--with-tao-dir=DIR], [tao root directory.]),
+ 		[TAO_ROOT=$withval],[TAO_ROOT=""]) 
+-	AC_MSG_CHECKING(for Tao)
++	AC_MSG_CHECKING(for tao)
+ 
+ 	if test -d "$TAO_ROOT"; then
+ 
+@@ -674,10 +694,10 @@
+ 	dnl }}}
+ 	dnl slepc{{{
+ 	AC_ARG_WITH([slepc-dir],
+-	  AS_HELP_STRING([--with-slepc-dir = DIR],[slepc root directory]),
++	  AS_HELP_STRING([--with-slepc-dir=DIR],[slepc root directory]),
+ 	  [SLEPC_ROOT=$withval],[SLEPC_ROOT=""])
+ 			  
+-	AC_MSG_CHECKING(for Slepc headers and libraries in $SLEPC_ROOT)
++	AC_MSG_CHECKING(for slepc headers and libraries in $SLEPC_ROOT)
+ 	if test -d "$SLEPC_ROOT"; then
+ 		HAVE_SLEPC=yes
+ 		SLEPCINCL=-I"$SLEPC_ROOT/include"
+@@ -693,10 +713,10 @@
+ 	dnl }}}
+ 	dnl shapelib{{{
+ 	AC_ARG_WITH([shapelib-dir],
+-	  AS_HELP_STRING([--with-shapelib-dir = DIR], [shapelib root directory]),
++	  AS_HELP_STRING([--with-shapelib-dir=DIR], [shapelib root directory]),
+ 	  [SHAPELIB_ROOT=$withval],[SHAPELIB_ROOT=""])
+ 			  
+-	AC_MSG_CHECKING(for Shapelib headers and libraries in $SHAPELIB_ROOT)
++	AC_MSG_CHECKING(for shapelib headers and libraries in $SHAPELIB_ROOT)
+ 	if test -d "$SHAPELIB_ROOT"; then
+ 
+ 		dnl defaults
+@@ -714,10 +734,10 @@
+ 	dnl }}}
+ 	dnl scalapack{{{
+ 	AC_ARG_WITH([scalapack-dir],
+-	  AS_HELP_STRING([--with-scalapack-dir = DIR],[scalapack root directory]),
++	  AS_HELP_STRING([--with-scalapack-dir=DIR],[scalapack root directory]),
+ 	  [SCALAPACK_ROOT=$withval],[SCALAPACK_ROOT=""])
+ 			  
+-	AC_MSG_CHECKING(for Scalapack headers and libraries in $SCALAPACK_ROOT)
++	AC_MSG_CHECKING(for scalapack headers and libraries in $SCALAPACK_ROOT)
+ 	if test -d "$SCALAPACK_ROOT"; then
+ 
+ 		dnl defaults
+@@ -733,10 +753,10 @@
+ 	dnl }}}
+ 	dnl blas{{{
+ 	AC_ARG_WITH([blas-lapack-dir],
+-	  AS_HELP_STRING([--with-blas-lapack-dir = DIR],[blas-lapack root directory]),
++	  AS_HELP_STRING([--with-blas-lapack-dir=DIR],[blas-lapack root directory]),
+ 	  [BLASLAPACK_ROOT=$withval],[BLASLAPACK_ROOT=""])
+ 			  
+-	AC_MSG_CHECKING(for Blas and Lapack headers and libraries in $BLASLAPACK_ROOT)
++	AC_MSG_CHECKING(for blas and lapack headers and libraries in $BLASLAPACK_ROOT)
+ 	if test -d "$BLASLAPACK_ROOT"; then
+ 
+ 		dnl defaults
+@@ -766,7 +786,7 @@
+ 	dnl }}}
+ 	dnl mkl{{{
+ 	AC_ARG_WITH([mkl-dir],
+-	  AS_HELP_STRING([--with-mkl-dir = DIR],[mkl root directory]),
++	  AS_HELP_STRING([--with-mkl-dir=DIR],[mkl root directory]),
+ 	  [MKL_ROOT=$withval],[MKL_ROOT=""])
+ 			  
+ 	AC_MSG_CHECKING(for mkl headers and libraries in $MKL_ROOT)
+@@ -785,16 +805,16 @@
+ 	AC_MSG_RESULT($HAVE_MKL)
+ 	dnl }}}
+ 	dnl plapack{{{
++	AC_MSG_CHECKING(for plapack)
++	
+ 	AC_ARG_WITH([plapack-lib],
+ 	  AS_HELP_STRING([--with-plapack-lib = lib],[plapack library]),
+ 	  [PLAPACK_LIB=$withval],[PLAPACK_LIB=""])
+-	AC_MSG_CHECKING(for Plapack libraries)
+ 	
+ 	AC_ARG_WITH([plapack-include],
+ 			  AS_HELP_STRING([--with-plapack-include = include],
+ 							 [plapack include ]),
+ 			  [PLAPACK_INCLUDE=$withval],[PLAPACK_INCLUDE=""])
+-	AC_MSG_CHECKING(for Plapack headers)
+ 	  
+ 	if test -n "$PLAPACK_LIB"; then
+ 		if test -n "$PLAPACK_INCLUDE"; then
+@@ -817,10 +837,10 @@
+ 	dnl }}}
+ 	dnl mumps{{{
+ 	AC_ARG_WITH([mumps-dir],
+-	  AS_HELP_STRING([--with-mumps-dir = DIR],[mumps root directory]),
++	  AS_HELP_STRING([--with-mumps-dir=DIR],[mumps root directory]),
+ 	  [MUMPS_ROOT=$withval],[MUMPS_ROOT=""])
+ 			  
+-	AC_MSG_CHECKING(for Mumps headers and libraries in $MUMPS_ROOT)
++	AC_MSG_CHECKING(for mumps headers and libraries in $MUMPS_ROOT)
+ 	if test -d "$MUMPS_ROOT"; then
+ 
+ 		dnl defaults
+@@ -842,10 +862,10 @@
+ 	dnl }}}
+ 	dnl blacs{{{
+ 	AC_ARG_WITH([blacs-dir],
+-		AS_HELP_STRING([--with-blacs-dir = DIR],[blacs root directory]),
++		AS_HELP_STRING([--with-blacs-dir=DIR],[blacs root directory]),
+ 			  [BLACS_ROOT=$withval],[BLACS_ROOT=""])
+ 			  
+-	AC_MSG_CHECKING(for Blacs headers and libraries in $BLACS_ROOT)
++	AC_MSG_CHECKING(for blacs headers and libraries in $BLACS_ROOT)
+ 	if test -d "$BLACS_ROOT"; then
+ 
+ 		dnl defaults
+@@ -863,10 +883,10 @@
+ 	dnl }}}
+ 	dnl hypre{{{
+ 	AC_ARG_WITH([hypre-dir],
+-	  AS_HELP_STRING([--with-hypre-dir = DIR],[hypre root directory]),
++	  AS_HELP_STRING([--with-hypre-dir=DIR],[hypre root directory]),
+ 			  [HYPRE_ROOT=$withval],[HYPRE_ROOT=""])
+ 			  
+-	AC_MSG_CHECKING(for Hypre headers and libraries in $HYPRE_ROOT)
++	AC_MSG_CHECKING(for hypre headers and libraries in $HYPRE_ROOT)
+ 	if test -d "$HYPRE_ROOT"; then
+ 
+ 		dnl defaults
+@@ -884,10 +904,10 @@
+ 	dnl }}}
+ 	dnl ml{{{
+ 	AC_ARG_WITH([ml-dir],
+-	  AS_HELP_STRING([--with-ml-dir = DIR],[ml root directory]),
++	  AS_HELP_STRING([--with-ml-dir=DIR],[ml root directory]),
+ 			  [ML_ROOT=$withval],[ML_ROOT=""])
+ 			  
+-	AC_MSG_CHECKING(for Ml headers and libraries in $ML_ROOT)
++	AC_MSG_CHECKING(for ml headers and libraries in $ML_ROOT)
+ 	if test -d "$ML_ROOT"; then
+ 
+ 		dnl defaults
+@@ -1201,6 +1221,12 @@
+ 		AC_MSG_ERROR([need at least python or matlab support to compile modules (or use --with-modules=no)]);
+ 	fi
+ 
++	dnl check that we python version if python compile is specified
++	dnl if test "$HAVE_PYTHON" = "yes"  && test "$HAVE_PYTHONVERSION" = "no" ; then
++	dnl	AC_MSG_ERROR([need python-version if python compile is required!]);
++	dnl fi
++
++
+ 	AC_MSG_RESULT(done)
+ 	dnl }}}
+ 
+@@ -1210,7 +1236,7 @@
+ 	AC_ARG_WITH([cxxoptflags],
+ 	  AS_HELP_STRING([--with-cxxoptflags = CXXOPTFLAGS], [optimization using CXX flags, ex: --with-cxxoptflags=-march=opteron -O3]),
+ 	  [CXXOPTFLAGS=$withval],[CXXOPTFLAGS="-g -O2"]) 
+-	AC_MSG_CHECKING(for C++ optimization flags)
++	AC_MSG_CHECKING(for c++ optimization flags)
+ 	AC_SUBST([CXXOPTFLAGS])
+ 	AC_MSG_RESULT(done)
+ 
Index: /issm/oecreview/Archive/12061-12080/ISSM-12064-12065.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12064-12065.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12064-12065.diff	(revision 12325)
@@ -0,0 +1,32 @@
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/bin
+___________________________________________________________________
+Modified: svn:ignore
+   - *.mexa64
+*.mexw64
+*.mexw32
+Makefile
+Makefile.in
+issm.exe
+*.m
+*.h
+@pairoptions
+@modellist
+*.bat
+*.rtf
+
+   + *.mexa64
+*.mexw64
+*.mexw32
+Makefile
+Makefile.in
+issm.exe
+*.m
+*.h
+@pairoptions
+@modellist
+*.bat
+*.rtf
+*.py
+
+
Index: /issm/oecreview/Archive/12061-12080/ISSM-12065-12066.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12065-12066.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12065-12066.diff	(revision 12325)
@@ -0,0 +1,17 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py	(revision 12065)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py	(revision 12066)
+@@ -9,12 +9,6 @@
+ 
+ import os,sys
+ 
+- 
+-#First check we are running python 3 at least 
+-if sys.version_info[0] < 3:
+-	print("ISSM can only work in Python 3. Exiting python")
+-	sys.exit(1)
+-
+ #Recover ISSM_TIER, ISSM_DIR  and USERNAME
+ ISSM_TIER=os.getenv('ISSM_TIER')
+ USERNAME =os.getenv('USER')
Index: /issm/oecreview/Archive/12061-12080/ISSM-12066-12067.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12066-12067.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12066-12067.diff	(revision 12325)
@@ -0,0 +1,21 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-bothapis.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-bothapis.sh	(revision 12066)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-bothapis.sh	(revision 12067)
+@@ -3,12 +3,15 @@
+ #petsc 3.2
+ #mpich 1.4
+ 
++pythonversion=2.7
++
+ ./configure \
+ 	--prefix=$ISSM_TIER \
+ 	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+ 	--with-matlab-dir=$MATLAB_DIR \
+ 	--with-python-dir=$ISSM_TIER/externalpackages/python/install\
+-	--with-python-numpy-dir=$ISSM_TIER/externalpackages/python/install/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy\
++	--with-python-version=$pythonversion \
++	--with-python-numpy-dir=$ISSM_TIER/externalpackages/python/install/Python.framework/Versions/$pythonversion/lib/python$pythonversion/site-packages/numpy/core/include/numpy\
+ 	--with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+ 	--with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+ 	--with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \
Index: /issm/oecreview/Archive/12061-12080/ISSM-12067-12068.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12067-12068.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12067-12068.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12067)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 12068)
+@@ -53,7 +53,7 @@
+ 	/*Fetch adjacency matrix: */
+ 	nvtxs = mxGetN(A_IN);
+ 	mwstart = mxGetJc(A_IN);
+-	start=(int*)xmalloc(nvtxs*sizeof(int));
++	start=(int*)xmalloc((nvtxs+1)*sizeof(int));
+ 	for (i=0; i<nvtxs+1;i++)start[i]=(int)mwstart[i];
+ 
+ 	mwadjacency = mxGetIr(A_IN);
Index: /issm/oecreview/Archive/12061-12080/ISSM-12069-12070.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12069-12070.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12069-12070.diff	(revision 12325)
@@ -0,0 +1,34 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/trimesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/trimesh.h	(revision 12069)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/trimesh.h	(revision 12070)
+@@ -33,7 +33,7 @@
+ int RemoveRifts(double** pindex,double** px,double** py,int* pnods,double** psegments,int* pnumsegs,int numrifts1,int* rifts1numsegs,double** rifts1segments,double** rifts1pairs,int nel);
+ int IsRiftPresent(int* priftflag,int* pnumrifts, double* segmentmarkerlist,int nsegs);
+ int SplitRiftSegments(double** psegments,double** psegmentmarkerlist, int* pnumsegs, int* pnumrifts,int** priftsnumsegs,double*** priftssegments,int numrifts);
+-int OrderRifts(double** priftstips, double** riftssegments,double** riftspairs,int numrifts,int* riftsnumsegments,double* x,double* y);
++int OrderRifts(double** priftstips, double** riftssegments,double** riftspairs,int numrifts,int* riftsnumsegments,double* x,double* y,int nods,int nels);
+ int PenaltyPairs(double*** priftspenaltypairs,int** priftsnumpenaltypairs,int numrifts,double**  riftssegments,
+ 		int* riftsnumsegments,double** riftspairs,double* riftstips,double* x,double* y);
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12069)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12070)
+@@ -788,7 +788,7 @@
+                                    OrderRifts
+ ******************************************************************************************************************************/
+ 
+-int OrderRifts(double** priftstips, double** riftssegments,double** riftspairs,int numrifts,int* riftsnumsegments,double* x,double* y){
++int OrderRifts(double** priftstips, double** riftssegments,double** riftspairs,int numrifts,int* riftsnumsegments,double* x,double* y,int nods,int nels){
+ 	
+ 	int noerr=1;
+ 	int i,j,k,counter;
+@@ -846,6 +846,7 @@
+ 				}
+ 			}
+ 			/* Make sure node3 faces node1 and node4 faces node2: */
++			_assert_(node1<nods && node4<nods);
+ 			if ((x[node1]==x[node4]) && (y[node1]==y[node4])){
+ 				/*Swap node3 and node4:*/
+ 				temp_node=node3;
Index: /issm/oecreview/Archive/12061-12080/ISSM-12070-12071.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12070-12071.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12070-12071.diff	(revision 12325)
@@ -0,0 +1,468 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 12070)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 12071)
+@@ -188,7 +188,7 @@
+ 		PairRiftElements(&out_riftsnumpairs,&out_riftspairs,out_numrifts,out_riftsnumsegments,out_riftssegments,x_in,y_in);
+ 		
+ 		/*Order rifts so that they start from one tip, go to the other tip, and back: */
+-		OrderRifts(&out_riftstips, out_riftssegments,out_riftspairs,numrifts,out_riftsnumsegments,x_in,y_in);
++		OrderRifts(&out_riftstips, out_riftssegments,out_riftspairs,numrifts,out_riftsnumsegments,x_in,y_in,nods,nel);
+ 
+ 		/*Create penalty pairs, used by Imp: */
+ 		PenaltyPairs(&out_riftspenaltypairs,&out_riftsnumpenaltypairs,numrifts,out_riftssegments,out_riftsnumsegments,out_riftspairs,out_riftstips,x_in,y_in);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.cpp	(revision 12070)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.cpp	(revision 12071)
+@@ -1,322 +1,77 @@
+ /*
+- * TriMeshRifts: out of a domain outline file ( Argus format ), 
+- * use the Triangle package to create a triangular mesh 
+- *
++ * TriMeshRifts: mesh a domain using an .exp file
+  */
+ 
+ #include "./TriMeshRifts.h"
+ 
+-void mexFunction(	int nlhs, mxArray* plhs[],
+-					int nrhs, const mxArray* prhs[] )
+-{
+-
+-
+-	/*Matlab arrays: */
+-	mxArray* pmxa_array=NULL;
+-	int i,j;
+-	int counter,counter2,backcounter;
+-	int prhs_counter;
++WRAPPER(TriMeshRifts){
+ 	
+-	/* returned quantities: */
+-
+-	double* index=NULL;
+-	double* x=NULL;
+-	double* y=NULL;
+-	double* segments=NULL;
+-	double*    segmentmarkerlist=NULL;
+-
+ 	/* input: */
+-	char*  domainname=NULL;
+-	char*  riftname=NULL;
+-	double area;
+-	char*  order=NULL;
+-	
+-	/*Domain outline variables: */
+-	int      nprof;
+-	int*     profnvertices=NULL;
+-	double** pprofx=NULL;
+-	double** pprofy=NULL;
+-	double*  xprof=NULL;
+-	double*  yprof=NULL;
+-	int      numberofpoints;
++	char   *domainname = NULL;
++	char   *riftsname  = NULL;
++	double  area;
++	bool    order;
+ 
+-	/*Rift outline variables: */
+-	int      numrifts;
+-	int*     riftsnumvertices=NULL;
+-	double** riftsverticesx=NULL;
+-	double** riftsverticesy=NULL;
++	/*intermediary: */
++	DataSet *domain = NULL;
++	DataSet *rifts  = NULL;
+ 
+-	/* Triangle structures: */
+-	struct triangulateio in,out;
+-	char   options[256];
++	/* output: */
++	Matrix *index             = NULL;
++	Vector *x                 = NULL;
++	Vector *y                 = NULL;
++	Matrix *segments          = NULL;
++	Vector *segmentmarkerlist = NULL;
+ 
+-	/* verify correct usage: */
+-	if (nlhs==0 && nrhs==0) {
+-		/* special case: */
+-		TriMeshRiftsUsage();
+-		return;
+-	}
++	/*Boot module: */
++	MODULEBOOT();
+ 
+-	if (!(  (nlhs==5) ||(nrhs==2) || (nrhs==3)  || (nrhs==4) )){
+-		mexPrintf("   %s format error.\n", __FUNCT__);
+-		TriMeshRiftsUsage();
+-		printf("   ");
+-		mexErrMsgTxt(" ");
+-	}
+-
+-	/*Fetch data needed by Triangle: */
+-
+-	prhs_counter=0;
+-	/*First recover the domain outline file name: */
+-	if (!mxIsChar(prhs[prhs_counter])){
+-		mexPrintf("%s%s\n",__FUNCT__," error message; first argument should be the domain outline file name!");
+-		mexErrMsgTxt(" ");
+-	}
+-	domainname = (char *) mxMalloc((mxGetN(prhs[prhs_counter])+1)*sizeof(char));
+-	mxGetString(prhs[prhs_counter],domainname,mxGetN(prhs[prhs_counter])+1);
+-
+-	/*Look for optional rifts file name: */
+-	prhs_counter++;
+-	if (mxIsChar(prhs[prhs_counter])){
+-		riftname = (char *) mxMalloc((mxGetN(prhs[prhs_counter])+1)*sizeof(char));
+-		mxGetString(prhs[prhs_counter],riftname,mxGetN(prhs[prhs_counter])+1);
+-		prhs_counter++;
+-	}
+-
+-	/*Recover the mesh density desired:*/
+-	area=mxGetScalar(prhs[prhs_counter]);
+-
+-	/*Optionaly, recover desired order: */
+-	prhs_counter++;
+-	if (mxIsChar(prhs[prhs_counter])){
+-		order = (char *) mxMalloc((mxGetN(prhs[prhs_counter])+1)*sizeof(char));
+-		mxGetString(prhs[prhs_counter],order,mxGetN(prhs[prhs_counter])+1);
+-	}
++	/*checks on arguments on the matlab side: */
++	CHECKARGUMENTS(NLHS,NRHS,&TriMeshRiftsUsage);
+ 	
+-	/*Start reading the domain outline file: */
+-	if(!DomainOutlineRead(&nprof,&profnvertices,&pprofx,&pprofy,NULL,domainname,false)){
+-		printf("%s%s%s\n",__FUNCT__," error message reading domain outline ",domainname);
+-		mexErrMsgTxt(" ");
+-	}
++	/*Fetch data needed for meshing: */
++	FetchData(&domainname,DOMAINOUTLINE);
++	FetchData(&riftsname,RIFTSOUTLINE);
++	FetchData(&area,AREA);
++	FetchData(&order,ORDER);
+ 
+-	/*Read rifts file if present: */
+-	if(riftname){
+-		if(!DomainOutlineRead(&numrifts,&riftsnumvertices,&riftsverticesx,&riftsverticesy,NULL,riftname,false)){
+-			printf("%s%s%s\n",__FUNCT__," error message reading rifts outline ",riftname);
+-			mexErrMsgTxt(" ");
+-		}
+-	}
++	/*Read domain outline: */
++	domain = DomainOutlineRead(domainname,false);
++	rifts  = DomainOutlineRead(riftsname,false);
+ 
+-	/*Create initial triangulation to call triangulate():*/
+-	numberofpoints=0;
+-	for (i=0;i<nprof;i++){
+-		numberofpoints+=profnvertices[i];
+-	}
+-	if (riftname){
+-		for (i=0;i<numrifts;i++){
+-			numberofpoints+=riftsnumvertices[i];
+-		}
+-	}
+-	in.numberofpoints=numberofpoints;
+-
+-	in.numberofpointattributes=1;
+-	in.pointlist = (REAL *) mxMalloc(in.numberofpoints * 2 * sizeof(REAL));
+-
+-	counter=0;
+-	for (i=0;i<nprof;i++){
+-		xprof=pprofx[i];
+-		yprof=pprofy[i];
+-		for (j=0;j<profnvertices[i];j++){
+-			in.pointlist[2*counter+0]=xprof[j];
+-			in.pointlist[2*counter+1]=yprof[j];
+-			counter++;
+-		}
+-	}
+-	if(riftname){
+-		for (i=0;i<numrifts;i++){
+-			xprof=riftsverticesx[i];
+-			yprof=riftsverticesy[i];
+-			for (j=0;j<riftsnumvertices[i];j++){
+-				in.pointlist[2*counter+0]=xprof[j];
+-				in.pointlist[2*counter+1]=yprof[j];
+-				counter++;
+-			}
+-		}
+-	}
++	/*call x core: */
++	TriMeshRiftsx(&index,&x,&y,&segments,&segmentmarkerlist,domain,rifts,area,order);
+ 	
+-	in.pointattributelist = (REAL *) mxMalloc(in.numberofpoints *
+-										  in.numberofpointattributes *
+-										  sizeof(REAL));
+-	for (i=0;i<in.numberofpoints;i++){
+-		in.pointattributelist[i] = 0.0;
+-	}
+-	in.pointmarkerlist = (int *) mxMalloc(in.numberofpoints * sizeof(int));
+-	for(i=0;i<in.numberofpoints;i++){
+-		in.pointmarkerlist[i] = 0;
+-	}
++	/*write outputs: */
++	WriteData(INDEX,index);
++	WriteData(X,x);
++	WriteData(Y,y);
++	WriteData(SEGMENTS,segments);
++	WriteData(SEGMENTMARKERLIST,segmentmarkerlist);
+ 
+-	/*Build segments: */
+-	/*Figure out number of segments: holes and closed outlines have as many segments as vertices, 
+-	 *for rifts, we have one less segment as we have vertices*/
+-	in.numberofsegments=0;
+-	for (i=0;i<nprof;i++){
+-		in.numberofsegments+=profnvertices[i];
+-	}
+-	if (riftname){
+-		for (i=0;i<numrifts;i++){
+-			in.numberofsegments+=riftsnumvertices[i]-1;
+-		}
+-	}
+-	
+-	in.segmentlist = (int *) mxMalloc(in.numberofsegments * 2 * sizeof(int));
+-	in.segmentmarkerlist = (int *) mxCalloc(in.numberofsegments,sizeof(int));
+-	counter=0;
+-	backcounter=0;
+-	for (i=0;i<nprof;i++){
+-		for (j=0;j<(profnvertices[i]-1);j++){
+-			in.segmentlist[2*counter+0]=counter;
+-			in.segmentlist[2*counter+1]=counter+1;
+-			in.segmentmarkerlist[counter]=0;
+-			counter++;
+-		}
+-		/*Close this profile: */
+-		 in.segmentlist[2*counter+0]=counter;
+-		 in.segmentlist[2*counter+1]=backcounter;
+-		 in.segmentmarkerlist[counter]=0;
+-		 counter++;
+-		 backcounter=counter;
+-	}
+-	counter2=counter;
+-	if(riftname){
+-		for (i=0;i<numrifts;i++){
+-			for (j=0;j<(riftsnumvertices[i]-1);j++){
+-				in.segmentlist[2*counter2+0]=counter;
+-				in.segmentlist[2*counter2+1]=counter+1;
+-				in.segmentmarkerlist[counter2]=2+i;
+-				counter2++;
+-				counter++;
+-			}
+-			counter++;
+-		}
+-	}
++	/*free ressources: */
++	delete domain;
++	delete rifts;
++	xdelete_module(&index);
++	xdelete_module(&x);
++	xdelete_module(&y);
++	xdelete_module(&segments);
++	xdelete_module(&segmentmarkerlist);
+ 
+-	
+-	/*Build regions: */
+-	in.numberofregions = 0;
+-
+-	/*Build holes: */
+-	in.numberofholes = nprof-1; /*everything is a hole, but for the first profile.*/
+-	in.holelist = (REAL *) mxMalloc(in.numberofholes * 2 * sizeof(REAL));
+-	for (i=0;i<nprof-1;i++){
+-		/*We are looking for a vertex that lies inside the hole: */
+-		GridInsideHole(&in.holelist[2*i+0],&in.holelist[2*i+1],profnvertices[i+1],pprofx[i+1],pprofy[i+1]);
+-	}
+-
+-	/* Make necessary initializations so that Triangle can return a */
+-	/*   triangulation in `out': */
+-
+-	out.pointlist = (REAL *) NULL;            
+-	out.pointattributelist = (REAL *) NULL;
+-	out.pointmarkerlist = (int *) NULL; 
+-	out.trianglelist = (int *) NULL;          
+-	out.triangleattributelist = (REAL *) NULL;
+-	out.neighborlist = (int *) NULL;         
+-	out.segmentlist = (int *) NULL;
+-	out.segmentmarkerlist = (int *) NULL;
+-	out.edgelist = (int *) NULL;             
+-	out.edgemarkerlist = (int *) NULL;   
+-
+-	/* Triangulate the points:.  Switches are chosen to read and write a  */
+-	/*   PSLG (p), preserve the convex hull (c), number everything from  */
+-	/*   zero (z), assign a regional attribute to each element (A), and  */
+-	/*   produce an edge list (e), a Voronoi diagram (v), and a triangle */
+-	/*   neighbor list (n).                                              */
+-
+-	sprintf(options,"%s%lf","pQzDq30ia",area); /*replace V by Q to quiet down the logging*/
+-  
+-	triangulate(options, &in, &out, NULL);
+-	/*report(&out, 0, 1, 1, 1, 1, 0);*/
+-
+-	/*Allocate index, x and y: */
+-	index=(double*)mxMalloc(3*out.numberoftriangles*sizeof(double));
+-	x=(double*)mxMalloc(out.numberofpoints*sizeof(double));
+-	y=(double*)mxMalloc(out.numberofpoints*sizeof(double));
+-	segments=(double*)mxMalloc(3*out.numberofsegments*sizeof(double));
+-	segmentmarkerlist=(double*)mxMalloc(out.numberofsegments*sizeof(double));
+-
+-	for (i = 0; i < out.numberoftriangles; i++) {
+-		for (j = 0; j < out.numberofcorners; j++) {
+-			*(index+3*i+j)=(double)out.trianglelist[i * out.numberofcorners + j]+1;
+-		}
+-	}
+-	for (i = 0; i < out.numberofpoints; i++) {
+-		x[i]=out.pointlist[i * 2 + 0];
+-		y[i]=out.pointlist[i * 2 + 1];
+-	}
+-	
+-	for (i = 0; i < out.numberofsegments; i++) {
+-		segments[3*i+0]=(double)out.segmentlist[i*2+0]+1;
+-		segments[3*i+1]=(double)out.segmentlist[i*2+1]+1;
+-		segmentmarkerlist[i]=(double)out.segmentmarkerlist[i];
+-	}
+-
+-	/*Associate elements with segments: */
+-	AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles);
+-
+-	/*Order segments so that their normals point outside the domain: */
+-	if(!strcmp(order,"yes")){
+-		OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
+-	}
+-
+-	/*Output : */
+-	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pmxa_array,3);
+-	mxSetN(pmxa_array,out.numberoftriangles);
+-	mxSetPr(pmxa_array,index);
+-	mexCallMATLAB( 1, &plhs[0], 1, &pmxa_array, "transpose");
+-
+-	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pmxa_array,1);
+-	mxSetN(pmxa_array,out.numberofpoints);
+-	mxSetPr(pmxa_array,x);
+-	mexCallMATLAB( 1, &plhs[1], 1, &pmxa_array, "transpose");
+-
+-	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pmxa_array,1);
+-	mxSetN(pmxa_array,out.numberofpoints);
+-	mxSetPr(pmxa_array,y);
+-	mexCallMATLAB( 1, &plhs[2], 1, &pmxa_array, "transpose");
+-
+-	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pmxa_array,3);
+-	mxSetN(pmxa_array,out.numberofsegments);
+-	mxSetPr(pmxa_array,segments);
+-	mexCallMATLAB( 1, &plhs[3], 1, &pmxa_array, "transpose");
+-
+-	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pmxa_array,1);
+-	mxSetN(pmxa_array,out.numberofsegments);
+-	mxSetPr(pmxa_array,segmentmarkerlist);
+-	mexCallMATLAB( 1, &plhs[4], 1, &pmxa_array, "transpose");
+-	
+-	return;
++	/*end module: */
++	MODULEEND();
+ }
+ 
+-void TriMeshRiftsUsage(void)
++void TriMeshRiftsUsage(void) //{{{1
+ {
+ 	printf("\n");
+-	printf("   usage: [index,x,y,segments,segmentmarkers]=TriMeshRifts(domainoutlinefilename,riftsoutlinename,area,ordered) \n");
++	printf("   usage: [index,x,y,segments,segmentmarkers]=TriMeshRifts(domainoutlinefilename,area,ordered) \n");
+ 	printf("      where: index,x,y defines a triangulation, segments is an array made \n");
+-	printf("      of exterior segments to the mesh domain outline, segmentmarkers is an array flagging each segment \n");
+-	printf("      (if rifts are present, markers >=2 flag them ), outlinefilename an Argus domain outline file.\n");
+-	printf("      riftsoutlinename is an Argus domain file, defining rifts (ie: open profiles), \n");
+-	printf("      area is the maximum area desired for any element of the resulting mesh. \n");
+-	printf("      and ordered is a string ('yes' or 'no') that determines whether segments are output in the \n");
++	printf("      of exterior segments to the mesh domain outline, segmentmarkers is an array flagging each segment, \n");
++	printf("      outlinefilename an Argus domain outline file, \n");
++	printf("      area is the maximum area desired for any element of the resulting mesh, \n");
++	printf("      and ordered is a bool that determines whether segments are output in the \n");
+ 	printf("      order they are made by Triangle (ie none), or ordered counter clockwise around the domain outline.\n");
+-	printf("      riftsoutlinename and ordered are optional arguments.\n");
+ 	printf("\n");
+ }
+-
+-
+-
+-
++//}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.h	(revision 12070)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.h	(revision 12071)
+@@ -5,19 +5,66 @@
+ #ifndef _TRIMESHRIFTS_H_
+ #define _TRIMESHRIFTS_H_
+ 
+-#include "mex.h"
+-#include "triangle.h"
+-#include "string.h"
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
+ 
++/*Very important definition in case we are compiling a python module!: needs to come before header files inclusion*/
++#ifdef _HAVE_PYTHON_
++#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
++#endif
++
++/*Header files: */
+ #include "../../c/include/globals.h"
++#include "../../c/toolkits/toolkits.h"
++#include "../../c/include/include.h"
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
+ #include "../../c/issm-binding.h"
++#include "../../c/io/io.h"
++#include "../../c/EnumDefinitions/EnumDefinitions.h"
+ 
+-void TriMeshRiftsUsage(void);
++#ifdef _HAVE_MATLAB_MODULES_
++/* serial input macros: */
++#define DOMAINOUTLINE  (mxArray *)prhs[0]
++#define RIFTSOUTLINE   (mxArray *)prhs[1]
++#define AREA           (mxArray *)prhs[2]
++#define ORDER          (mxArray *)prhs[3]
++/* serial output macros: */
++#define INDEX             (mxArray**)&plhs[0]
++#define X                 (mxArray**)&plhs[1]
++#define Y                 (mxArray**)&plhs[2]
++#define SEGMENTS          (mxArray**)&plhs[3]
++#define SEGMENTMARKERLIST (mxArray**)&plhs[4]
++#endif
+ 
++#ifdef _HAVE_PYTHON_MODULES_
++/* serial input macros: */
++#define DOMAINOUTLINE PyTuple_GetItem(args,0)
++#define RIFTSOUTLINE  PyTuple_GetItem(args,1)
++#define AREA          PyTuple_GetItem(args,2)
++#define ORDER         PyTuple_GetItem(args,3)
++/* serial output macros: */
++#define INDEX             output,0
++#define X                 output,1
++#define Y                 output,2
++#define SEGMENTS          output,3
++#define SEGMENTMARKERLIST output,4
++#endif
++
+ #undef __FUNCT__ 
+ #define __FUNCT__ "TriMeshRifts"
+ 
+-#endif
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  5
++#undef NRHS
++#define NRHS  4
++
++/* local prototypes: */
++void TriMeshRiftsUsage(void);
++
++#endif  /* _TRIMESHRIFTS_H_*/
Index: /issm/oecreview/Archive/12061-12080/ISSM-12071-12072.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12071-12072.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12071-12072.diff	(revision 12325)
@@ -0,0 +1,83 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12071)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12072)
+@@ -301,6 +301,26 @@
+ 	AM_CONDITIONAL([BOOST], [test x$HAVE_BOOST = xyes])
+ 	AC_MSG_RESULT($HAVE_BOOST)
+ 	dnl }}}
++	dnl python-version{{{
++	AC_ARG_WITH([python-version],
++	  AS_HELP_STRING([--with-python-version = PYTHONVERSION],[python version.]),
++	  [PYTHONVERSION=$withval],[PYTHONVERSION=""])
++	AC_MSG_CHECKING(for python version)
++
++	HAVE_PYTHON3="no"
++
++	dnl recover major: 
++	PYTHON_MAJOR=${PYTHONVERSION%.*}
++
++	if test x$PYTHON_MAJOR = x3; then
++		dnl are we running python 3?
++		HAVE_PYTHON3="yes"
++	fi
++	AC_DEFINE_UNQUOTED([_PYTHON_MAJOR_],$PYTHON_MAJOR,[python version major])
++
++	AM_CONDITIONAL([PYTHON3], [test x$HAVE_PYTHON3 = xyes])
++	AC_MSG_RESULT($PYTHON_MAJOR)
++	dnl }}}
+ 	dnl python{{{
+ 	AC_ARG_WITH([python-dir],
+ 	  AS_HELP_STRING([--with-python-dir=DIR], [python root directory.]),
+@@ -311,7 +331,7 @@
+ 		dnl defaults
+ 		HAVE_PYTHON=yes
+ 		PYTHONINCL=-I$PYTHON_ROOT/include
+-		PYTHONLIB="-L$PYTHON_ROOT/lib -lpython3.2"
++		PYTHONLIB="-L$PYTHON_ROOT/lib -lpython$PYTHONVERSION"
+ 		PYTHONEXT=.so
+ 		PYTHONLINK="-dynamiclib"
+ 
+@@ -327,25 +347,6 @@
+ 	AM_CONDITIONAL([PYTHON], [test x$HAVE_PYTHON = xyes])
+ 	AC_MSG_RESULT($HAVE_PYTHON)
+ 	dnl }}}
+-	dnl python-version{{{
+-	AC_ARG_WITH([python-version],
+-	  AS_HELP_STRING([--with-python-version = PYTHONVERSION],[python version.]),
+-	  [PYTHONVERSION=$withval],[PYTHONVERSION=""])
+-	AC_MSG_CHECKING(for python version)
+-
+-	HAVE_PYTHON3="no"
+-
+-	dnl recover major: 
+-	PYTHON_MAJOR=${PYTHONVERSION%.*}
+-
+-	if test x$PYTHON_MAJOR = x3; then
+-		dnl are we running python 3?
+-		HAVE_PYTHON3="yes"
+-	fi
+-
+-	AM_CONDITIONAL([PYTHON3], [test x$HAVE_PYTHON3 = xyes])
+-	AC_MSG_RESULT($PYTHON_MAJOR)
+-	dnl }}}
+ 	dnl python-numpy{{{
+ 	AC_ARG_WITH([python-numpy-dir],
+ 	  AS_HELP_STRING([--with-python-numpy-dir=DIR], [python-numpy root directory.]),
+@@ -1221,12 +1222,11 @@
+ 		AC_MSG_ERROR([need at least python or matlab support to compile modules (or use --with-modules=no)]);
+ 	fi
+ 
+-	dnl check that we python version if python compile is specified
+-	dnl if test "$HAVE_PYTHON" = "yes"  && test "$HAVE_PYTHONVERSION" = "no" ; then
+-	dnl	AC_MSG_ERROR([need python-version if python compile is required!]);
+-	dnl fi
++	check that we python version if python compile is specified
++	if test "$HAVE_PYTHON" = "yes"  && test "$PYTHONVERSION" = "" ; then
++	AC_MSG_ERROR([need python-version if python compile is required!]);
++	fi
+ 
+-
+ 	AC_MSG_RESULT(done)
+ 	dnl }}}
+ 
Index: /issm/oecreview/Archive/12061-12080/ISSM-12072-12073.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12072-12073.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12072-12073.diff	(revision 12325)
@@ -0,0 +1,103 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/include/python_macros.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/include/python_macros.h	(revision 12072)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/include/python_macros.h	(revision 12073)
+@@ -27,7 +27,8 @@
+ #define MODULEEND();  ModuleEnd(); \
+ 						 return output;
+ //}}}
+-/* WRAPPER {{{1*/
++#if _PYTHON_MAJOR_ >=3
++/* WRAPPER 3.2 {{{1*/
+ #define WRAPPER(modulename,...)  \
+ \
+ static PyObject* modulename(PyObject* self,PyObject* args);\
+@@ -53,6 +54,25 @@
+ \
+ static PyObject* modulename(PyObject* self,PyObject* args)
+ /*}}}*/
++#else
++/* WRAPPER 2.7 {{{1*/
++#define WRAPPER(modulename,...)  \
++\
++static PyObject* modulename(PyObject* self,PyObject* args);\
++static PyMethodDef modulename##_funcs[] = {\
++	{#modulename, (PyCFunction)modulename, METH_VARARGS, ""},\
++	{NULL,NULL,0,NULL}\
++};\
++\
++PyMODINIT_FUNC init##modulename(void){\
++\
++	import_array();\
++	(void) Py_InitModule(#modulename, modulename##_funcs);\
++}\
++\
++static PyObject* modulename(PyObject* self,PyObject* args)
++/*}}}*/
++#endif
+ /* CHECKARGUMENTS {{{1*/
+ #define CHECKARGUMENTS(NLHS,NRHS,functionpointer) CheckNumPythonArguments(args, NRHS,functionpointer)
+ /*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp	(revision 12072)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp	(revision 12073)
+@@ -15,21 +15,7 @@
+ #include "../../include/include.h"
+ #include "../../shared/shared.h"
+ 
+-/*FUNCTION FetchData(char** pstring,PyObject* py_unicode){{{1*/
+-void FetchData(char** pstring,PyObject* py_unicode){
+-
+-	PyObject* py_bytes;
+-	char* string=NULL;
+-
+-	
+-	/*convert to bytes format: */
+-	PyUnicode_FSConverter(py_unicode,&py_bytes);
+-
+-	/*convert from bytes to string: */
+-	string=PyBytes_AS_STRING(py_bytes);
+-	
+-	*pstring=string;
+-}
++/*Primitive data types*/
+ /*FUNCTION FetchData(double* pscalar,PyObject* py_float){{{1*/
+ void FetchData(double* pscalar,PyObject* py_float){
+ 
+@@ -70,3 +56,35 @@
+ 	
+ }
+ /*}}}*/
++
++/*Python version dependent: */
++#if _PYTHON_MAJOR_ >= 3 
++/*FUNCTION FetchData(char** pstring,PyObject* py_unicode){{{1*/
++void FetchData(char** pstring,PyObject* py_unicode){
++
++	PyObject* py_bytes;
++	char* string=NULL;
++
++	
++	/*convert to bytes format: */
++	PyUnicode_FSConverter(py_unicode,&py_bytes);
++
++	/*convert from bytes to string: */
++	string=PyBytes_AS_STRING(py_bytes);
++	
++	*pstring=string;
++}
++/*}}}*/
++#else
++/*FUNCTION FetchData(char** pstring,PyObject* py_string){{{1*/
++void FetchData(char** pstring,PyObject* py_string){
++
++	char* string=NULL;
++
++	/*extract internal string: */
++	string=PyString_AsString(py_string);
++	
++	*pstring=string;
++}
++/*}}}*/
++#endif
Index: /issm/oecreview/Archive/12061-12080/ISSM-12073-12074.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12073-12074.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12073-12074.diff	(revision 12325)
@@ -0,0 +1,30 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12073)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12074)
+@@ -726,13 +726,7 @@
+ 					./python/python-binding.h\
+ 				    ./python/io/WritePythonData.cpp\
+ 				    ./python/io/CheckNumPythonArguments.cpp\
+-				    ./python/io/FetchPythonData.cpp\
+-					./python/objects/Bamg/BamgGeom.h\
+-					./python/objects/Bamg/BamgGeom.cpp\
+-					./python/objects/Bamg/BamgMesh.h\
+-					./python/objects/Bamg/BamgMesh.cpp\
+-					./python/objects/Bamg/BamgOpts.h\
+-					./python/objects/Bamg/BamgOpts.cpp
++				    ./python/io/FetchPythonData.cpp
+ 
+ #}}}
+ #Matlab sources  {{{1
+@@ -934,8 +928,10 @@
+ if PYTHON
+ libISSMPython_a_SOURCES = $(python_sources)
+ libISSMPython_a_CXXFLAGS= $(ALLCXXFLAGS)
++if PYTHON3
+ libISSMPython_a_CXXFLAGS+=  -DNPY_NO_DEPRECATED_API 
+ endif
++endif
+ 
+ if MATLAB
+ libISSMMatlab_a_SOURCES = $(matlab_sources)
Index: /issm/oecreview/Archive/12061-12080/ISSM-12074-12075.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12074-12075.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12074-12075.diff	(revision 12325)
@@ -0,0 +1,108 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/python/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/python/Makefile.am	(revision 12074)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/python/Makefile.am	(revision 12075)
+@@ -13,7 +13,10 @@
+ 
+ #Python part
+ AM_LDFLAGS   = $(PYTHONLINK)
+-AM_CXXFLAGS +=  -D_HAVE_PYTHON_MODULES_ -DNPY_NO_DEPRECATED_API 
++AM_CXXFLAGS +=  -D_HAVE_PYTHON_MODULES_ 
++if PYTHON3
++AM_CXXFLAGS +=  -DNPY_NO_DEPRECATED_API 
++endif
+ LDADD       += $(BOOSTLIB) $(PYTHONLIB) ../../c/libISSMPython.a
+ 
+ LDADD       += ../../c/libISSMCore.a ../../c/libISSMModules.a 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/Makefile.am	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/Makefile.am	(revision 12075)
+@@ -0,0 +1,11 @@
++bin_SCRIPTS = petscversion.py
++CLEANFILES = $(bin_SCRIPTS)
++
++if PYTHON3
++%.py : %.2.py
++	cp -f $< $@
++	2to3 -n -w  $@
++else
++%.py : %.2.py
++	ln -s -f $< $@
++endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/petscversion.2.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/petscversion.2.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/petscversion.2.py	(revision 12075)
+@@ -0,0 +1,39 @@
++#PETSCVERSION - recover petsc version number, inside config.h file
++#
++#   Usage:
++#       PETSC_VERSION=petscversion();
++
++#Module imports {{{
++import os
++import sys
++from issmtier import *
++#}}}
++
++def petscversion():
++
++	#default
++	PETSC_VERSION=3;
++	
++	configfile=issmtier() + "/bin/config.h" #should find it in the install target
++	
++	if not os.path.isfile(configfile):
++		raise RuntimeError("%s%s%s"%("File ",configfile," not found. ISSM has not been configured yet!"))
++
++	#go through the file, and recover the line we want
++	fid=open(configfile,'r');
++
++	tline=fid.readline()
++	while tline:
++
++		if tline=='': 
++			break
++		
++		if tline[0:21]=="#define _PETSC_MAJOR_":
++			PETSC_VERSION=int(tline[22])
++			break
++		
++		tline=fid.readline()
++	
++	fid.close();
++
++	return PETSC_VERSION
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model
+___________________________________________________________________
+Modified: svn:ignore
+   - __pycache__
+
+   + Makefile
+__pycache__
+
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/Makefile.am	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/Makefile.am	(revision 12075)
+@@ -0,0 +1 @@
++SUBDIRS = model
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py
+___________________________________________________________________
+Added: svn:ignore
+   + Makefile
+
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/Makefile.am	(revision 12074)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/Makefile.am	(revision 12075)
+@@ -1,2 +1,2 @@
+-EXTRA_DIST =  perl  pro
+-SUBDIRS = c modules m
++EXTRA_DIST =  perl  pro py
++SUBDIRS = c modules m 
Index: /issm/oecreview/Archive/12061-12080/ISSM-12075-12076.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12075-12076.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12075-12076.diff	(revision 12325)
@@ -0,0 +1,15 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac	(revision 12075)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac	(revision 12076)
+@@ -35,7 +35,9 @@
+ #List all Makefiles
+ AC_CONFIG_FILES([Makefile
+ 			src/Makefile
+-			src/c/Makefile
++			src/c/Makefile 
++			src/py/Makefile
++			src/py/model/Makefile
+ 			src/modules/Makefile
+ 			src/modules/python/Makefile
+ 			src/modules/matlab/Makefile
Index: /issm/oecreview/Archive/12061-12080/ISSM-12076-12077.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12076-12077.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12076-12077.diff	(revision 12325)
@@ -0,0 +1,44 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/petscversion.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/petscversion.py	(revision 12076)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/py/model/petscversion.py	(revision 12077)
+@@ -1,39 +0,0 @@
+-#PETSCVERSION - recover petsc version number, inside config.h file
+-#
+-#   Usage:
+-#       PETSC_VERSION=petscversion();
+-
+-#Module imports {{{
+-import os
+-import sys
+-from issmtier import *
+-#}}}
+-
+-def petscversion():
+-
+-	#default
+-	PETSC_VERSION=3;
+-	
+-	configfile=issmtier() + "/bin/config.h" #should find it in the install target
+-	
+-	if not os.path.isfile(configfile):
+-		raise RuntimeError("%s%s%s"%("File ",configfile," not found. ISSM has not been configured yet!"))
+-
+-	#go through the file, and recover the line we want
+-	fid=open(configfile,'r');
+-
+-	tline=fid.readline()
+-	while tline:
+-
+-		if tline=='': 
+-			break
+-		
+-		if tline[0:21]=="#define _PETSC_MAJOR_":
+-			PETSC_VERSION=int(tline[22])
+-			break
+-		
+-		tline=fid.readline()
+-	
+-	fid.close();
+-
+-	return PETSC_VERSION
Index: /issm/oecreview/Archive/12061-12080/ISSM-12077-12078.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12077-12078.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12077-12078.diff	(revision 12325)
@@ -0,0 +1,108 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12077)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/include/matlab_macros.h	(revision 12078)
+@@ -19,18 +19,20 @@
+ /*The following macros hide the error exception handling in a matlab module. Just put 
+  * MODULEBOOT(); and MODULEEND(); at the beginning and end of a module, and c++ exceptions 
+  * will be trapped. Really nifty!*/
++//exception.Report(); 
+ 
+ #define MODULEBOOT(); ModuleBoot(); \
+ 	try{
+ 
+ #define MODULEEND(); ModuleEnd(); }\
+ 	catch(ErrorException &exception){\
+-		exception.Report(); \
+-		mexErrMsgTxt(""); \
++		mexErrMsgTxt("ISSM Error"); \
+ 	}\
+-	catch (exception& e) {\
+-		_printf_(true,"Standard exception: %s\n",e.what());\
+-		mexErrMsgTxt(" ");\
++	catch (exception &e){\
++		mexErrMsgTxt(exprintf("Standard exception: %s\n",e.what()));\
++	}\
++	catch(...){\
++		mexErrMsgTxt("An unexpected error occurred");\
+ 	}
+ //}}}
+ /* WRAPPER {{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/macros.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/macros.h	(revision 12077)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/include/macros.h	(revision 12078)
+@@ -56,6 +56,9 @@
+ 	catch (exception& e) {\
+ 		_printf_(true,"Standard exception: %s\n",e.what());\
+ 		return 1;\
++	}\
++	catch(...){\
++		_printf_(true,"An unexpected error occurred");\
+ 	}
+ /*}}}*/
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp	(revision 12077)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp	(revision 12078)
+@@ -28,6 +28,10 @@
+ }
+ 
+ ErrorException::~ErrorException() throw(){
++	extern int num_procs;
++	/*We want the report only for matlab modules, otherwise we get twice the report
++	 * We assume that if num_procs==1, it is a module (FIXME)*/
++	if(num_procs==1) this->Report();
+ }
+ 
+ const char* ErrorException::what() const throw(){
+@@ -36,13 +40,20 @@
+ 
+ void ErrorException::Report(){
+ 	extern int my_rank;
++	extern int num_procs;
+ 
+ 	if (function_name=="" || file_line==0){ //WINDOWS
+ 		printf("%s%s","Error message: ",what());
+ 	}
+ 	else{
+-		printf("\n[%i] ??? Error using ==> %s:%i\n",my_rank,file_name.c_str(),file_line);
+-		printf("[%i] %s error message: %s\n\n",my_rank,function_name.c_str(),what());
++		if(num_procs==1){
++			printf("\n??? Error using ==> %s:%i\n",file_name.c_str(),file_line);
++			printf("%s error message: %s\n\n",function_name.c_str(),what());
++		}
++		else{
++			printf("\n[%i] ??? Error using ==> %s:%i\n",my_rank,file_name.c_str(),file_line);
++			printf("[%i] %s error message: %s\n\n",my_rank,function_name.c_str(),what());
++		}
+ 	}
+ 	return;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exceptions/exceptions.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exceptions/exceptions.h	(revision 12077)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exceptions/exceptions.h	(revision 12078)
+@@ -16,19 +16,18 @@
+ /*We derive our classes from the c++ exception class: */
+ class ErrorException: public exception {
+ 	
++	public:
++
+ 	string   what_str;
+ 	string   function_name;
+ 	string   file_name;
+ 	int      file_line;
+ 
+-	public:
+ 
+ 	ErrorException(const string &what_arg); //for windows
+ 	ErrorException(string what_file,string what_function,int what_line,string what_arg);//UNIX
+ 	~ErrorException() throw();
+-
+ 	virtual const char *what() const throw();
+-
+ 	void Report();
+ 
+ };
Index: /issm/oecreview/Archive/12061-12080/ISSM-12078-12079.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12078-12079.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12078-12079.diff	(revision 12325)
@@ -0,0 +1,20 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exceptions/exceptions.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exceptions/exceptions.h	(revision 12078)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exceptions/exceptions.h	(revision 12079)
+@@ -16,14 +16,12 @@
+ /*We derive our classes from the c++ exception class: */
+ class ErrorException: public exception {
+ 	
+-	public:
+-
+ 	string   what_str;
+ 	string   function_name;
+ 	string   file_name;
+ 	int      file_line;
+ 
+-
++	public:
+ 	ErrorException(const string &what_arg); //for windows
+ 	ErrorException(string what_file,string what_function,int what_line,string what_arg);//UNIX
+ 	~ErrorException() throw();
Index: /issm/oecreview/Archive/12061-12080/ISSM-12079-12080.diff
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-12079-12080.diff	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-12079-12080.diff	(revision 12325)
@@ -0,0 +1,428 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/trimesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/trimesh.h	(revision 12079)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/trimesh.h	(revision 12080)
+@@ -5,40 +5,31 @@
+ #ifndef _SHARED_TRIMESH_H
+ #define _SHARED_TRIMESH_H
+ 
+-
+ #include <stdio.h>
+ #include <math.h>
+ 
+-
+-
+ //#define REAL double //took  it out because it may conflict with stdlib.h defines. put back if necessary
+-
+ int AssociateSegmentToElement(double** psegments,int nseg, double* index,int nel);
+ int OrderSegments(double** psegments,int nseg, double* index,int nel);
+-		
+ int GridInsideHole(double* px0,double* py0,int n,double* x,double* y);
+ int FindElement(double A,double B,double* index,int nel);
+-
+ int SplitMeshForRifts(int* pnel,double** pindex,int* pnods,double** px,double** py,int* pnsegs,double** psegments,double** psegmentmarkerlist);
+-
+ int IsGridOnRift(int* riftsegments, int nriftsegs, int node);
+ int GridElementsList(int** pGridElements, int* pNumGridElements,int node,double * index,int nel);
+ int IsNeighbor(int el1,int el2,double* index);
+ int IsOnRift(int el,int nriftsegs,int* riftsegments);
+ void RiftSegmentsFromSegments(int* pnriftsegs, int** priftsegments, int nel, double* index, int nsegs,double* segments);
+ int DetermineGridElementListOnOneSideOfRift(int* pNumGridElementListOnOneSideOfRift, int** pGridElementListOnOneSideOfRift, int segmentnumber, int nriftsegs, int* riftsegments, int node,double* index,int nel);
+-int UpdateSegments(double** psegments,double** psegmentmarkerlist, int* pnsegs, double* index, double* x,double* y,int* riftsegments,int nriftsegs);
++int UpdateSegments(double** psegments,double** psegmentmarkerlist, int* pnsegs, double* index, double* x,double* y,int* riftsegments,int nriftsegs,int nods,int nel);
+ int pnpoly(int npol, double *xp, double *yp, double x, double y);
+ int FindElement(double A,double B,double* index,int nel);
+ int RemoveRifts(double** pindex,double** px,double** py,int* pnods,double** psegments,int* pnumsegs,int numrifts1,int* rifts1numsegs,double** rifts1segments,double** rifts1pairs,int nel);
+ int IsRiftPresent(int* priftflag,int* pnumrifts, double* segmentmarkerlist,int nsegs);
+-int SplitRiftSegments(double** psegments,double** psegmentmarkerlist, int* pnumsegs, int* pnumrifts,int** priftsnumsegs,double*** priftssegments,int numrifts);
++int SplitRiftSegments(double** psegments,double** psegmentmarkerlist, int* pnumsegs, int* pnumrifts,int** priftsnumsegs,double*** priftssegments,int numrifts,int nods,int nels);
+ int OrderRifts(double** priftstips, double** riftssegments,double** riftspairs,int numrifts,int* riftsnumsegments,double* x,double* y,int nods,int nels);
+ int PenaltyPairs(double*** priftspenaltypairs,int** priftsnumpenaltypairs,int numrifts,double**  riftssegments,
+ 		int* riftsnumsegments,double** riftspairs,double* riftstips,double* x,double* y);
+-
+ int RemoveCornersFromRifts(double** pindex,int* pnel,double** px,double** py,int* pnods, double* segments,double* segmentmarkers,int num_seg);
+ int PairRiftElements(int** priftsnumpairs, double*** priftspairs,int numrifts,int* riftsnumsegments, double** riftssegments,double* x,double* y);
+ 
+-
+ #endif  /* _SHARED_TRIMESH_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp	(revision 12079)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp	(revision 12080)
+@@ -56,7 +56,7 @@
+ 	for (i=0;i<nriftsegs;i++){
+ 		for (j=0;j<2;j++){
+ 	
+-			node=*(riftsegments+4*i+j+2);
++			node=riftsegments[4*i+j+2];
+ 			if(flags[node-1]){
+ 				/*This node was already split, skip:*/
+ 				continue;
+@@ -93,7 +93,7 @@
+ 	} //for (i=0;i<nriftsegs;i++)
+ 
+ 	/*update segments: they got modified completely by adding new nodes.*/
+-	UpdateSegments(&segments,&segmentmarkerlist, &nsegs,index,x,y,riftsegments,nriftsegs);
++	UpdateSegments(&segments,&segmentmarkerlist, &nsegs,index,x,y,riftsegments,nriftsegs,nods,nel);
+ 
+ 	/*Assign output pointers: */
+ 	*pnel=nel;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12079)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12080)
+@@ -10,6 +10,7 @@
+ #include "../../include/include.h"
+ 
+ #define RIFTPENALTYPAIRSWIDTH 8
++/*FUNCTION IsGridOnRift{{{*/
+ int IsGridOnRift(int* riftsegments, int nriftsegs, int node){
+ 
+ 	/*Does this node belong to 4 elements, or just 2? If it belongs to 4 elements, it is inside a rift, 
+@@ -31,9 +32,8 @@
+ 	else{
+ 		return 0;
+ 	}
+-}
+-				
+-
++}/*}}}*/
++/*FUNCTION GridElementsList{{{*/
+ int GridElementsList(int** pGridElements, int* pNumGridElements,int node,double * index,int nel){
+ 
+ 	/*From a node, recover all the elements that are connected to it: */
+@@ -86,9 +86,8 @@
+ 	*pGridElements=GridElements;
+ 	*pNumGridElements=NumGridElements;
+ 	return noerr;
+-}
+-
+-
++}/*}}}*/
++/*FUNCTION IsNeighbor{{{*/
+ int IsNeighbor(int el1,int el2,double* index){
+ 	/*From a triangulation held in index, figure out if elements 1 and 2 have two nodes in common: */
+ 	int i,j;
+@@ -104,9 +103,8 @@
+ 	else{
+ 		return 0;
+ 	}
+-}
+-							
+-
++}/*}}}*/
++/*FUNCTION IsOnRift{{{*/
+ int IsOnRift(int el,int nriftsegs,int* riftsegments){
+ 	/*From a list of elements segments, figure out if el belongs to it: */
+ 	int i;
+@@ -116,13 +114,8 @@
+ 		}
+ 	}
+ 	return 0;
+-}
+-
+-
+-/******************************************************************************************************************************
+-                                   RiftSegmentsFromSegments
+-******************************************************************************************************************************/
+-
++}/*}}}*/
++/*FUNCTION RiftSegmentsFromSegments{{{*/
+ void RiftSegmentsFromSegments(int* pnriftsegs, int** priftsegments, int nel, double* index, int nsegs,double* segments){
+ 	
+ 	int i,counter;
+@@ -188,12 +181,8 @@
+ 	/*Assign output pointers: */
+ 	*priftsegments=riftsegments;
+ 	*pnriftsegs=nriftsegs;
+-}
+-
+-/******************************************************************************************************************************
+-                                   DetermineGridElementListOnOneSideOfRift
+-******************************************************************************************************************************/
+-
++}/*}}}*/
++/*FUNCTION DetermineGridElementListOnOneSideOfRift{{{*/
+ int DetermineGridElementListOnOneSideOfRift(int* pNumGridElementListOnOneSideOfRift, int** pGridElementListOnOneSideOfRift, int segmentnumber, int nriftsegs, int* riftsegments, int node,double* index,int nel){
+ 
+ 	int noerr=1;
+@@ -256,14 +245,10 @@
+ 	*pNumGridElementListOnOneSideOfRift=NumGridElementListOnOneSideOfRift;
+ 	*pGridElementListOnOneSideOfRift=GridElementListOnOneSideOfRift;
+ 	return noerr;
+-}
++}/*}}}*/
++/*FUNCTION UpdateSegments{{{*/
++int UpdateSegments(double** psegments,double** psegmentmarkerlist, int* pnsegs, double* index, double* x,double* y,int* riftsegments,int nriftsegs,int nods,int nel){
+ 
+-/******************************************************************************************************************************
+-                                   UpdateSegments
+-******************************************************************************************************************************/
+-
+-int UpdateSegments(double** psegments,double** psegmentmarkerlist, int* pnsegs, double* index, double* x,double* y,int* riftsegments,int nriftsegs){
+-
+ 	int noerr=1;
+ 	int i,j,k;
+ 	int el1,el2;
+@@ -283,22 +268,22 @@
+ 
+ 	/*First, update the existing segments to the new nodes :*/
+ 	for (i=0;i<nriftsegs;i++){
+-		el1=*(riftsegments+4*i+0);
+-		el2=*(riftsegments+4*i+1);
++		el1=riftsegments[4*i+0];
++		el2=riftsegments[4*i+1];
+ 		for (j=0;j<nsegs;j++){
+-			if (*(segments+3*j+2)==(el1+1)){
++			if (segments[3*j+2]==(el1+1)){
+ 				/*segment j is the same as rift segment i.Let's update segments[j][:] using  element el1 and the corresponding rift segment.
+ 				 *Because riftsegments does not represent a list of rift segments anymore (it got heavily modified in SplitElementsForRifts, 
+ 				 *we can only rely on the position (x,y) of the rift nodes to create a segment:*/
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el1*3+k)-1]==x[(int)*(segments+3*j+0)-1]) && (y[(int)*(index+el1*3+k)-1]==y[(int)*(segments+3*j+0)-1])){
+-						*(segments+3*j+0)=*(index+el1*3+k);
++						*(segments+3*j+0)=*(index+el1*3+k); _assert_(segments[3*j+0]<nods);
+ 						break;
+ 					}
+ 				}
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el1*3+k)-1]==x[(int)*(segments+3*j+1)-1])  && (y[(int)*(index+el1*3+k)-1]==y[(int)*(segments+3*j+1)-1])){
+-						*(segments+3*j+1)=*(index+el1*3+k);
++						*(segments+3*j+1)=*(index+el1*3+k); _assert_(segments[3*j+1]<nods);
+ 						break;
+ 					}
+ 				}
+@@ -307,13 +292,13 @@
+ 				*(segmentmarkerlist+(nsegs+i))=*(segmentmarkerlist+j);
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el2*3+k)-1]==x[(int)*(segments+3*j+0)-1]) && (y[(int)*(index+el2*3+k)-1]==y[(int)*(segments+3*j+0)-1])){
+-						*(segments+3*(nsegs+i)+0)=*(index+el2*3+k);
++						*(segments+3*(nsegs+i)+0)=*(index+el2*3+k); _assert_(segments[3*(nsegs+i)+0]<nods);
+ 						break;
+ 					}
+ 				}
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el2*3+k)-1]==x[(int)*(segments+3*j+1)-1]) && (y[(int)*(index+el2*3+k)-1]==y[(int)*(segments+3*j+1)-1])){
+-						*(segments+3*(nsegs+i)+1)=*(index+el2*3+k);
++						*(segments+3*(nsegs+i)+1)=*(index+el2*3+k); _assert_(segments[3*(nsegs+i)+1]<nods);
+ 						break;
+ 					}
+ 				}
+@@ -323,13 +308,13 @@
+ 				/*Let's update segments[j][:] using  element el2 and the corresponding rift segment: */
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el2*3+k)-1]==x[(int)*(segments+3*j+0)-1]) && (y[(int)*(index+el2*3+k)-1]==y[(int)*(segments+3*j+0)-1])){
+-						*(segments+3*j+0)=*(index+el2*3+k);
++						*(segments+3*j+0)=*(index+el2*3+k); _assert_(segments[3*j+0]<nods);
+ 						break;
+ 					}
+ 				}
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el2*3+k)-1]==x[(int)*(segments+3*j+1)-1]) && (y[(int)*(index+el2*3+k)-1]==y[(int)*(segments+3*j+1)-1])){
+-						*(segments+3*j+1)=*(index+el2*3+k);
++						*(segments+3*j+1)=*(index+el2*3+k);_assert_(segments[3*j+1]<nods);
+ 						break;
+ 					}
+ 				}
+@@ -338,13 +323,13 @@
+ 				*(segmentmarkerlist+(nsegs+i))=*(segmentmarkerlist+j);
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el1*3+k)-1]==x[(int)*(segments+3*j+0)-1]) && (y[(int)*(index+el1*3+k)-1]==y[(int)*(segments+3*j+0)-1])){
+-						*(segments+3*(nsegs+i)+0)=*(index+el1*3+k);
++						*(segments+3*(nsegs+i)+0)=*(index+el1*3+k);_assert_(segments[3*(nsegs+i)+0]<nods);
+ 						break;
+ 					}
+ 				}
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el1*3+k)-1]==x[(int)*(segments+3*j+1)-1]) && (y[(int)*(index+el1*3+k)-1]==y[(int)*(segments+3*j+1)-1])){
+-						*(segments+3*(nsegs+i)+1)=*(index+el1*3+k);
++						*(segments+3*(nsegs+i)+1)=*(index+el1*3+k);_assert_(segments[3*(nsegs+i)+1]<nods);
+ 						break;
+ 					}
+ 				}
+@@ -359,11 +344,8 @@
+ 	*pnsegs=nsegs;
+ 	
+ 	return noerr;
+-}
+-
+-/******************************************************************************************************************************
+-                                   pnpoly
+-******************************************************************************************************************************/
++}/*}}}*/
++/*FUNCTION pnpoly{{{*/
+ int pnpoly(int npol, double *xp, double *yp, double x, double y) {
+ 	int i, j, c = 0;
+ 	for (i = 0, j = npol-1; i < npol; j = i++) {
+@@ -373,35 +355,8 @@
+ 			c = !c;
+ 	}
+ 	return c;
+-}
+-
+-/******************************************************************************************************************************
+-                                   IsInPoly
+-******************************************************************************************************************************/
+-//void IsInPoly(double* in,double* xc,double* yc,int numnodes,double* x,double* y,int nods){
+-//
+-//	int i;
+-//	double x0,y0;
+-//
+-//	/*Go through all nodes of the mesh:*/
+-//	for (i=0;i<nods;i++){
+-//		if (in[i]){
+-//			/*this node already is inside one of the contours, continue*/
+-//			continue;
+-//		}
+-//		/*pick up node: */
+-//		x0=x[i];
+-//		y0=y[i];
+-//		if (pnpoly(numnodes,xc,yc,x0,y0)){
+-//			in[i]=1;
+-//		}
+-//	}
+-//}
+-
+-/******************************************************************************************************************************
+-                                   FindElement
+-******************************************************************************************************************************/
+-
++}/*}}}*/
++/*FUNCTION FindElement{{{*/
+ int FindElement(double A,double B,double* index,int nel){
+ 
+ 	int n;
+@@ -413,13 +368,10 @@
+ 		}
+ 	}
+ 	return el;
+-}
+-/******************************************************************************************************************************
+-                                   SplitRiftSegments
+-******************************************************************************************************************************/
++}/*}}}*/
++/*FUNCTION SplitRiftSegments{{{*/
++int SplitRiftSegments(double** psegments,double** psegmentmarkerlist, int* pnumsegs, int* pnumrifts,int** priftsnumsegs,double*** priftssegments,int numrifts,int nods,int nel){
+ 
+-int SplitRiftSegments(double** psegments,double** psegmentmarkerlist, int* pnumsegs, int* pnumrifts,int** priftsnumsegs,double*** priftssegments,int numrifts){
+-
+ 	/*Using segment markers, wring out the rift segments from the segments. Rift markers are 
+ 	 *of the form 2+i where i=0 to number of rifts */
+ 
+@@ -460,9 +412,9 @@
+ 	counter=0;
+ 	for (i=0;i<numsegs;i++){
+ 		if (segmentmarkerlist[i]==1){
+-			*(new_segments+3*counter+0)=*(segments+3*i+0);
+-			*(new_segments+3*counter+1)=*(segments+3*i+1);
+-			*(new_segments+3*counter+2)=*(segments+3*i+2);
++			new_segments[3*counter+0]=segments[3*i+0];
++			new_segments[3*counter+1]=segments[3*i+1];
++			new_segments[3*counter+2]=segments[3*i+2];
+ 			new_segmentmarkers[counter]=segmentmarkerlist[i];
+ 			counter++;
+ 		}
+@@ -483,9 +435,9 @@
+ 		counter=0;
+ 		for (j=0;j<numsegs;j++){
+ 			if (segmentmarkerlist[j]==(2+i)){
+-				*(riftsegment+3*counter+0)=*(segments+3*j+0);
+-				*(riftsegment+3*counter+1)=*(segments+3*j+1);
+-				*(riftsegment+3*counter+2)=*(segments+3*j+2);
++				riftsegment[3*counter+0]=segments[3*j+0];_assert_(riftsegment[3*counter+0]<nods);
++				riftsegment[3*counter+1]=segments[3*j+1];_assert_(riftsegment[3*counter+1]<nods);
++				riftsegment[3*counter+2]=segments[3*j+2];_assert_(riftsegment[3*counter+2]<nel);
+ 				counter++;
+ 			}
+ 		}
+@@ -503,12 +455,8 @@
+ 	*priftssegments=riftssegments;
+ 	*priftsnumsegs=riftsnumsegs;
+ 	return noerr;
+-}
+-
+-/******************************************************************************************************************************
+-                                   PairRiftElements
+-******************************************************************************************************************************/
+-
++}/*}}}*/
++/*FUNCTION PairRiftElements{{{*/
+ int PairRiftElements(int** priftsnumpairs, double*** priftspairs,int numrifts,int* riftsnumsegments, double** riftssegments,double* x,double* y){
+ 
+ 
+@@ -557,17 +505,8 @@
+ 	*priftspairs=riftspairs;
+ 
+ 	return noerr;
+-}
+-
+-
+-/******************************************************************************************************************************
+-                                   RemoveRifts
+-******************************************************************************************************************************/
+-
+-double dabs(double x){
+-	if (x<0)x=-x;
+-	return x;
+-}
++}/*}}}*/
++/*FUNCTION RemoveRifts{{{*/
+ int RemoveRifts(double** pindex,double** px,double** py,int* pnods,double** psegments,int* pnumsegs,int numrifts1,int* rifts1numsegs,double** rifts1segments,double** rifts1pairs,int nel){
+ 
+ 	int noerr=1;
+@@ -614,8 +553,8 @@
+ 		if (x[i]<xmin)xmin=x[i];
+ 		if (y[i]<ymin)ymin=y[i];
+ 	}
+-	xmin=xmin-dabs(xmin); 
+-	ymin=ymin-dabs(ymin);
++	xmin=xmin-fabs(xmin); 
++	ymin=ymin-fabs(ymin);
+ 
+ 	/*Initialize two arrays, one for nodes that are going to be merged, the other with corresponding nodes being merge into: */
+ 	max_size=0;
+@@ -750,12 +689,8 @@
+ 	*pnumsegs=numsegs;
+ 
+ 	return noerr;
+-}
+-
+-/******************************************************************************************************************************
+-                                   IsRiftPresent
+-******************************************************************************************************************************/
+-
++}/*}}}*/
++/*FUNCTION IsRiftPresent{{{*/
+ int IsRiftPresent(int* priftflag,int* pnumrifts, double* segmentmarkerlist,int nsegs){
+ 
+ 	int i;
+@@ -782,12 +717,8 @@
+ 	*pnumrifts=numrifts;
+ 
+ 	return noerr;
+-}
+-
+-/******************************************************************************************************************************
+-                                   OrderRifts
+-******************************************************************************************************************************/
+-
++}/*}}}*/
++/*FUNCTION OrderRifts{{{*/
+ int OrderRifts(double** priftstips, double** riftssegments,double** riftspairs,int numrifts,int* riftsnumsegments,double* x,double* y,int nods,int nels){
+ 	
+ 	int noerr=1;
+@@ -943,12 +874,8 @@
+ 	/*Assign output pointer:*/
+ 	*priftstips=riftstips;
+ 	return noerr;
+-}
+-
+-/******************************************************************************************************************************
+-                                   PenaltyPairs
+-******************************************************************************************************************************/
+-
++}/*}}}*/
++/*FUNCTION PenaltyPairs{{{*/
+ int PenaltyPairs(double*** priftspenaltypairs,int** priftsnumpenaltypairs,int numrifts,double** riftssegments,
+ 		int* riftsnumsegs,double** riftspairs,double* riftstips,double* x,double* y){
+ 		
Index: /issm/oecreview/Archive/12061-12080/ISSM-DocReview-12061-12080.tex
===================================================================
--- /issm/oecreview/Archive/12061-12080/ISSM-DocReview-12061-12080.tex	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/ISSM-DocReview-12061-12080.tex	(revision 12325)
@@ -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/12061-12080/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12061-12080/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12061-12080
Index: /issm/oecreview/Archive/12061-12080/Makefile
===================================================================
--- /issm/oecreview/Archive/12061-12080/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12061-12080
+
+
+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/12061-12080/log.tex
===================================================================
--- /issm/oecreview/Archive/12061-12080/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/log.tex	(revision 12325)
@@ -0,0 +1,38 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12061-12062.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Makefile.am A /issm/trunk-jpl/src/c/modules/TriMeshRiftsx (from /issm/trunk-jpl/src/c/modules/TriMeshx:12060) A /issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.cpp (from /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp:12060) A /issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.h (from /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h:12060) D /issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshx.cpp D /issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshx.h M /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp \\ Export determination: 6. \\Rationale: Added TriMeshRifts (not working yet)
+M /issm/trunk-jpl/src/m/model/plot/northarrow.m allow negative lengths for n. hem \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12062-12063.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/plot/northarrow.m \\ Export determination: 6. \\Rationale: allow negative lengths for n. hem
+M /issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.cpp M /issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.h M /issm/trunk-jpl/src/c/modules/modules.h Fixed TriMeshRiftsx \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12063-12064.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.cpp M /issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.h M /issm/trunk-jpl/src/c/modules/modules.h \\ Export determination: 6. \\Rationale: Fixed TriMeshRiftsx
+M /issm/trunk-jpl/m4/issm\_options.m4 Added python version + better formatting of configure help \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12064-12065.diff: \\ Function name: \\M /issm/trunk-jpl/m4/issm\_options.m4 \\ Export determination: 6. \\Rationale: Added python version + better formatting of configure help
+M /issm/trunk-jpl/bin Ignore python files \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12065-12066.diff: \\ Function name: \\M /issm/trunk-jpl/bin \\ Export determination: 6. \\Rationale: Ignore python files
+M /issm/trunk-jpl/startup.py Allow python 2 as wrapper \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12066-12067.diff: \\ Function name: \\M /issm/trunk-jpl/startup.py \\ Export determination: 6. \\Rationale: Allow python 2 as wrapper
+M /issm/trunk-jpl/configs/config-macosx64-larour-bothapis.sh Better configuration file, with python version dependency \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12067-12068.diff: \\ Function name: \\M /issm/trunk-jpl/configs/config-macosx64-larour-bothapis.sh \\ Export determination: 6. \\Rationale: Better configuration file, with python version dependency
+M /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp Fixed OLD segfault in Chaco \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12068-12069.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp \\ Export determination: 6. \\Rationale: Fixed OLD segfault in Chaco
+D /issm/trunk-jpl/src/c/python/objects not needed anymore \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12069-12070.diff: \\ Function name: \\D /issm/trunk-jpl/src/c/python/objects \\ Export determination: 6. \\Rationale: not needed anymore
+M /issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp M /issm/trunk-jpl/src/c/shared/TriMesh/trimesh.h Added assertion in meshprocessrifts for safety \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12070-12071.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp M /issm/trunk-jpl/src/c/shared/TriMesh/trimesh.h \\ Export determination: 6. \\Rationale: Added assertion in meshprocessrifts for safety
+M /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp M /issm/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.cpp M /issm/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.h Improved TriMeshRifts, to be merged to TriMesh \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12071-12072.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp M /issm/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.cpp M /issm/trunk-jpl/src/modules/TriMeshRifts/TriMeshRifts.h \\ Export determination: 6. \\Rationale: Improved TriMeshRifts, to be merged to TriMesh
+M /issm/trunk-jpl/m4/issm\_options.m4 Better handling of python versions \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-12072-12073.diff: \\ Function name: \\M /issm/trunk-jpl/m4/issm\_options.m4 \\ Export determination: 6. \\Rationale: Better handling of python versions
+M /issm/trunk-jpl/src/c/python/include/python\_macros.h M /issm/trunk-jpl/src/c/python/io/FetchPythonData.cpp Adapted PYTHON 3.2 API to PYTHON 2.7 API. \\\\
+\noindent \textbf{Change \#13} with diff file ISSM-12073-12074.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/python/include/python\_macros.h M /issm/trunk-jpl/src/c/python/io/FetchPythonData.cpp \\ Export determination: 6. \\Rationale: Adapted PYTHON 3.2 API to PYTHON 2.7 API.
+M /issm/trunk-jpl/src/c/Makefile.am Need to better handle NPY\_DEPREACATED\_APY between 2.7 and 3.2 PYTHON APIs. \\\\
+\noindent \textbf{Change \#14} with diff file ISSM-12074-12075.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Makefile.am \\ Export determination: 6. \\Rationale: Need to better handle NPY\_DEPREACATED\_APY between 2.7 and 3.2 PYTHON APIs.
+M /issm/trunk-jpl/src/Makefile.am M /issm/trunk-jpl/src/modules/python/Makefile.am M /issm/trunk-jpl/src/py A /issm/trunk-jpl/src/py/Makefile.am M /issm/trunk-jpl/src/py/model A /issm/trunk-jpl/src/py/model/Makefile.am A /issm/trunk-jpl/src/py/model/petscversion.2.py Handle version 2 vs 3 for python scripts. Prototype. \\\\
+\noindent \textbf{Change \#15} with diff file ISSM-12075-12076.diff: \\ Function name: \\M /issm/trunk-jpl/src/Makefile.am M /issm/trunk-jpl/src/modules/python/Makefile.am M /issm/trunk-jpl/src/py A /issm/trunk-jpl/src/py/Makefile.am M /issm/trunk-jpl/src/py/model A /issm/trunk-jpl/src/py/model/Makefile.am A /issm/trunk-jpl/src/py/model/petscversion.2.py \\ Export determination: 6. \\Rationale: Handle version 2 vs 3 for python scripts. Prototype.
+M /issm/trunk-jpl/configure.ac Prototype handling of 2.7 vs 3.2 versions of PYTHON scripts \\\\
+\noindent \textbf{Change \#16} with diff file ISSM-12076-12077.diff: \\ Function name: \\M /issm/trunk-jpl/configure.ac \\ Export determination: 6. \\Rationale: Prototype handling of 2.7 vs 3.2 versions of PYTHON scripts
+D /issm/trunk-jpl/src/py/model/petscversion.py Superseded by petscversion.2.py \\\\
+\noindent \textbf{Change \#17} with diff file ISSM-12077-12078.diff: \\ Function name: \\D /issm/trunk-jpl/src/py/model/petscversion.py \\ Export determination: 6. \\Rationale: Superseded by petscversion.2.py
+M /issm/trunk-jpl/src/c/include/macros.h M /issm/trunk-jpl/src/c/matlab/include/matlab\_macros.h M /issm/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp M /issm/trunk-jpl/src/c/shared/Exceptions/exceptions.h Better error handling for matlab modules \\\\
+\noindent \textbf{Change \#18} with diff file ISSM-12078-12079.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/include/macros.h M /issm/trunk-jpl/src/c/matlab/include/matlab\_macros.h M /issm/trunk-jpl/src/c/shared/Exceptions/Exceptions.cpp M /issm/trunk-jpl/src/c/shared/Exceptions/exceptions.h \\ Export determination: 6. \\Rationale: Better error handling for matlab modules
+M /issm/trunk-jpl/src/c/shared/Exceptions/exceptions.h revert to private properties \\\\
+\noindent \textbf{Change \#19} with diff file ISSM-12079-12080.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/shared/Exceptions/exceptions.h \\ Export determination: 6. \\Rationale: revert to private properties
+M /issm/trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp M /issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp M /issm/trunk-jpl/src/c/shared/TriMesh/trimesh.h Reorganizing and adding assertion for safety \\\\
Index: /issm/oecreview/Archive/12061-12080/r1.tex
===================================================================
--- /issm/oecreview/Archive/12061-12080/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12061
Index: /issm/oecreview/Archive/12061-12080/r2.tex
===================================================================
--- /issm/oecreview/Archive/12061-12080/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12061-12080/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12080
Index: /issm/oecreview/Archive/12081-12100/Date.tex
===================================================================
--- /issm/oecreview/Archive/12081-12100/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12081-12100/ISSM-12081-12082.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12081-12082.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12081-12082.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.m	(revision 12081)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.m	(revision 12082)
+@@ -40,7 +40,7 @@
+ if strcmp(riftname,''),
+ 	[md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMesh(domainname,area,true);
+ else
+-	[elements,x,y,segments,segmentmarkers]=TriMeshRifts(domainname,riftname,area,'yes');
++	[elements,x,y,segments,segmentmarkers]=TriMeshRifts(domainname,riftname,area,true);
+ 
+ 	%check that all the created nodes belong to at least one element
+ 	orphan=find(~ismember([1:length(x)],sort(unique(elements(:)))));
Index: /issm/oecreview/Archive/12081-12100/ISSM-12082-12083.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12082-12083.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12082-12083.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android-sdk/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android-sdk/install.sh	(revision 12082)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android-sdk/install.sh	(revision 12083)
+@@ -57,7 +57,7 @@
+ 	#Android will prompt the user to specify hardware emulation options. For now, default
+ 	#default settings will suffice. Press 'enter' to take default settings or enter 'no'.
+ 
+-	./android create avd -f -n $default_droid -t 2 -p $ANDROID_DEV_DIR/android-emulators/$default_droid --abi armeabi-v7a
++	./android create avd -f -n $default_droid -t 1 -p $ANDROID_DEV_DIR/android-emulators/$default_droid --abi armeabi-v7a
+ fi
+ 
+ if [[ $step == "3" ]]; then
Index: /issm/oecreview/Archive/12081-12100/ISSM-12083-12084.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12083-12084.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12083-12084.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android-ndk/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android-ndk/install.sh	(revision 12083)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android-ndk/install.sh	(revision 12084)
+@@ -7,7 +7,7 @@
+ 
+ #Cleanup the install
+ rm -rf install
+-rm -rf $ANROID_DEV_DIR/tmp
++rm -rf $ANDROID_DEV_DIR/tmp
+ 
+ # Install Android SDK and NDK.
+ cp android-ndk-r7b-darwin-x86.tar.bz2 dummy.tar.bz2
Index: /issm/oecreview/Archive/12081-12100/ISSM-12084-12085.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12084-12085.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12084-12085.diff	(revision 12325)
@@ -0,0 +1,153 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 12084)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 12085)
+@@ -195,37 +195,40 @@
+ 
+ 
+ 	/*Output : */
+-	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pmxa_array,3);
+-	mxSetN(pmxa_array,nel);
+-	mxSetPr(pmxa_array,index_in);
+-	mexCallMATLAB( 1, &plhs[0], 1, &pmxa_array, "transpose");
++	WriteData(&plhs[0],index_in,nel,3);
++	//pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	//mxSetM(pmxa_array,3);
++	//mxSetN(pmxa_array,nel);
++	//mxSetPr(pmxa_array,index_in);
++	//mexCallMATLAB( 1, &plhs[0], 1, &pmxa_array, "transpose");
+ 
+-	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pmxa_array,1);
+-	mxSetN(pmxa_array,nods);
+-	mxSetPr(pmxa_array,x_in);
+-	mexCallMATLAB( 1, &plhs[1], 1, &pmxa_array, "transpose");
++	WriteData(&plhs[1],x_in,nods,1);
++	//pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	//mxSetM(pmxa_array,1);
++	//mxSetN(pmxa_array,nods);
++	//mxSetPr(pmxa_array,x_in);
++	//mexCallMATLAB( 1, &plhs[1], 1, &pmxa_array, "transpose");
+ 
+-	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pmxa_array,1);
+-	mxSetN(pmxa_array,nods);
+-	mxSetPr(pmxa_array,y_in);
+-	mexCallMATLAB( 1, &plhs[2], 1, &pmxa_array, "transpose");
++	WriteData(&plhs[2],y_in,nods,1);
++	//pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	//mxSetM(pmxa_array,1);
++	//mxSetN(pmxa_array,nods);
++	//mxSetPr(pmxa_array,y_in);
++	//mexCallMATLAB( 1, &plhs[2], 1, &pmxa_array, "transpose");
+ 
+-	
+-	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pmxa_array,3);
+-	mxSetN(pmxa_array,num_seg);
+-	mxSetPr(pmxa_array,segments_in);
+-	mexCallMATLAB( 1, &plhs[3], 1, &pmxa_array, "transpose");
+-	
++	WriteData(&plhs[3],segments_in,num_seg,3);
++//pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++//mxSetM(pmxa_array,3);
++//mxSetN(pmxa_array,num_seg);
++//mxSetPr(pmxa_array,segments_in);
++//mexCallMATLAB( 1, &plhs[3], 1, &pmxa_array, "transpose");
+ 
+-	pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
+-	mxSetM(pmxa_array,1);
+-	mxSetN(pmxa_array,num_seg);
+-	mxSetPr(pmxa_array,segmentmarkers_in);
+-	mexCallMATLAB( 1, &plhs[4], 1, &pmxa_array, "transpose");
++	WriteData(&plhs[4],segmentmarkers_in,num_seg,1);
++	//pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
++	//mxSetM(pmxa_array,1);
++	//mxSetN(pmxa_array,num_seg);
++	//mxSetPr(pmxa_array,segmentmarkers_in);
++	//mexCallMATLAB( 1, &plhs[4], 1, &pmxa_array, "transpose");
+ 
+ 	if(riftflag){
+ 		/*Create a structure rifts where if i is a rift number, we have the following fields rifts(i).segments and rifts(i).numsegs: */
+@@ -246,29 +249,30 @@
+ 		pmxa_array=mxCreateStructArray( ndim,dimensions,10,fnames);
+ 		
+ 		for (i=0;i<out_numrifts;i++){
++
+ 			/*Segments: */
+-			pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
+-			mxSetM(pmxa_array2,3);
+-			mxSetN(pmxa_array2,out_riftsnumsegments[i]);
+-			mxSetPr(pmxa_array2,out_riftssegments[i]);
+-			mexCallMATLAB( 1, &pmxa_array3, 1, &pmxa_array2, "transpose");
+-			
++			WriteData(&pmxa_array3,out_riftssegments[i],out_riftsnumsegments[i],3);
++			//pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
++			//mxSetM(pmxa_array2,3);
++			//mxSetN(pmxa_array2,out_riftsnumsegments[i]);
++			//mxSetPr(pmxa_array2,out_riftssegments[i]);
++			//mexCallMATLAB( 1, &pmxa_array3, 1, &pmxa_array2, "transpose");
+ 			mxSetField(pmxa_array,i,"segments",pmxa_array3);
+ 			mxSetField(pmxa_array,i,"numsegs",mxCreateDoubleScalar((double)out_riftsnumsegments[i]));
+ 
+ 			/*Element pairs: */
+-			pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
+-			mxSetM(pmxa_array2,2);
+-			mxSetN(pmxa_array2,out_riftsnumpairs[i]);
+-			mxSetPr(pmxa_array2,out_riftspairs[i]);
+-			mexCallMATLAB( 1, &pmxa_array3, 1, &pmxa_array2, "transpose");
+-			
++			WriteData(&pmxa_array3,out_riftspairs[i],out_riftsnumpairs[i],2);
++			//pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
++			//mxSetM(pmxa_array2,2);
++			//mxSetN(pmxa_array2,out_riftsnumpairs[i]);
++			//mxSetPr(pmxa_array2,out_riftspairs[i]);
++			//mexCallMATLAB( 1, &pmxa_array3, 1, &pmxa_array2, "transpose");
+ 			mxSetField(pmxa_array,i,"pairs",pmxa_array3);
+ 
+ 			/*Tips: */
+ 			pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
+ 			mxSetM(pmxa_array2,1);
+-			pair=(double*)xmalloc(2*sizeof(double));
++			pair=(double*)mxMalloc(2*sizeof(double));
+ 			pair[0]=*(out_riftstips+2*i+0);
+ 			pair[1]=*(out_riftstips+2*i+1);
+ 			mxSetN(pmxa_array2,2);
+@@ -276,12 +280,12 @@
+ 			mxSetField(pmxa_array,i,"tips",pmxa_array2);
+ 
+ 			/*Penalty pairs: */
+-			pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
+-			mxSetM(pmxa_array2,7);
+-			mxSetN(pmxa_array2,out_riftsnumpenaltypairs[i]);
+-			mxSetPr(pmxa_array2,out_riftspenaltypairs[i]);
+-			mexCallMATLAB( 1, &pmxa_array3, 1, &pmxa_array2, "transpose");
+-			
++			WriteData(&pmxa_array3,out_riftspenaltypairs[i],out_riftsnumpenaltypairs[i],7);
++			//pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
++			//mxSetM(pmxa_array2,7);
++			//mxSetN(pmxa_array2,out_riftsnumpenaltypairs[i]);
++			//mxSetPr(pmxa_array2,out_riftspenaltypairs[i]);
++			//mexCallMATLAB( 1, &pmxa_array3, 1, &pmxa_array2, "transpose");
+ 			mxSetField(pmxa_array,i,"penaltypairs",pmxa_array3);
+ 
+ 			/*Friction fraction, fractionincrement  and fill: */
+@@ -291,7 +295,7 @@
+ 			mxSetField(pmxa_array,i,"fractionincrement",mxCreateDoubleScalar(0.1)); 
+ 
+ 			/*State: */
+-			state=(double*)xmalloc(out_riftsnumpenaltypairs[i]*sizeof(double));
++			state=(double*)mxMalloc(out_riftsnumpenaltypairs[i]*sizeof(double));
+ 			for(j=0;j<out_riftsnumpenaltypairs[i];j++)state[j]=FreeEnum;
+ 			pmxa_array2= mxCreateDoubleMatrix(0,0,mxREAL);
+ 			mxSetM(pmxa_array2,1);
+@@ -304,7 +308,7 @@
+ 	}
+ 	else{
+ 		/*output NaN :*/
+-		pNaN=(double*)xmalloc(sizeof(double));
++		pNaN=(double*)mxMalloc(sizeof(double));
+ 		*pNaN=NAN;
+ 		pmxa_array= mxCreateDoubleMatrix(0,0,mxREAL);
+ 		mxSetM(pmxa_array,1);
Index: /issm/oecreview/Archive/12081-12100/ISSM-12085-12086.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12085-12086.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12085-12086.diff	(revision 12325)
@@ -0,0 +1,143 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp	(revision 12085)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp	(revision 12086)
+@@ -46,10 +46,9 @@
+ 	segments=*psegments;
+ 	segmentmarkerlist=*psegmentmarkerlist;
+ 
+-
+ 	/*Establish list of segments that belong to a rift: */
+-	RiftSegmentsFromSegments(&nriftsegs,&riftsegments,nel,index,nsegs,segments); /*riftsegments of size nriftsegsx4 (4 for first element on segment,second element, 
+-																				   first node and second snode)*/
++	/*riftsegments of size nriftsegsx4 (4 for first element on segment,second element,first node and second snode)*/
++	RiftSegmentsFromSegments(&nriftsegs,&riftsegments,nel,index,nsegs,segments);
+ 
+ 	/*Go through all nodes of the rift segments, and start splitting the mesh: */
+ 	flags=(int*)xcalloc(nods,sizeof(int)); //to make sure we don't split the same nodes twice!
+@@ -69,9 +68,13 @@
+ 			
+ 				DetermineGridElementListOnOneSideOfRift(&NumGridElementListOnOneSideOfRift,&GridElementListOnOneSideOfRift,i,nriftsegs,riftsegments,node,index,nel);
+ 			
+-				/*Summary: we have for node, a list of elements (GridElementListOnOneSideOfRift, of size NumGridElementListOnOneSideOfRift) that all contain node 
+-				 *and that are on the same side of the rift. For all these elements, we clone node into another node, and we swap all instances of node in the triangulation 
+-				 *for those elements, to the new node.*/
++				/*Summary: we have for node, a list of elements
++				 * (GridElementListOnOneSideOfRift, of size
++				 * NumGridElementListOnOneSideOfRift) that all contain node 
++				 *and that are on the same side of the rift. For all these
++				 elements, we clone node into another node, and we swap all
++				 instances of node in the triangulation *for those elements, to the
++				 new node.*/
+ 				
+ 				//augment number of nodes 
+ 				nods=nods+1;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12085)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp	(revision 12086)
+@@ -277,13 +277,13 @@
+ 				 *we can only rely on the position (x,y) of the rift nodes to create a segment:*/
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el1*3+k)-1]==x[(int)*(segments+3*j+0)-1]) && (y[(int)*(index+el1*3+k)-1]==y[(int)*(segments+3*j+0)-1])){
+-						*(segments+3*j+0)=*(index+el1*3+k); _assert_(segments[3*j+0]<nods);
++						*(segments+3*j+0)=*(index+el1*3+k); _assert_(segments[3*j+0]<nods+1);
+ 						break;
+ 					}
+ 				}
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el1*3+k)-1]==x[(int)*(segments+3*j+1)-1])  && (y[(int)*(index+el1*3+k)-1]==y[(int)*(segments+3*j+1)-1])){
+-						*(segments+3*j+1)=*(index+el1*3+k); _assert_(segments[3*j+1]<nods);
++						*(segments+3*j+1)=*(index+el1*3+k); _assert_(segments[3*j+1]<nods+1);
+ 						break;
+ 					}
+ 				}
+@@ -292,13 +292,13 @@
+ 				*(segmentmarkerlist+(nsegs+i))=*(segmentmarkerlist+j);
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el2*3+k)-1]==x[(int)*(segments+3*j+0)-1]) && (y[(int)*(index+el2*3+k)-1]==y[(int)*(segments+3*j+0)-1])){
+-						*(segments+3*(nsegs+i)+0)=*(index+el2*3+k); _assert_(segments[3*(nsegs+i)+0]<nods);
++						*(segments+3*(nsegs+i)+0)=*(index+el2*3+k); _assert_(segments[3*(nsegs+i)+0]<nods+1);
+ 						break;
+ 					}
+ 				}
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el2*3+k)-1]==x[(int)*(segments+3*j+1)-1]) && (y[(int)*(index+el2*3+k)-1]==y[(int)*(segments+3*j+1)-1])){
+-						*(segments+3*(nsegs+i)+1)=*(index+el2*3+k); _assert_(segments[3*(nsegs+i)+1]<nods);
++						*(segments+3*(nsegs+i)+1)=*(index+el2*3+k); _assert_(segments[3*(nsegs+i)+1]<nods+1);
+ 						break;
+ 					}
+ 				}
+@@ -308,13 +308,13 @@
+ 				/*Let's update segments[j][:] using  element el2 and the corresponding rift segment: */
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el2*3+k)-1]==x[(int)*(segments+3*j+0)-1]) && (y[(int)*(index+el2*3+k)-1]==y[(int)*(segments+3*j+0)-1])){
+-						*(segments+3*j+0)=*(index+el2*3+k); _assert_(segments[3*j+0]<nods);
++						*(segments+3*j+0)=*(index+el2*3+k); _assert_(segments[3*j+0]<nods+1);
+ 						break;
+ 					}
+ 				}
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el2*3+k)-1]==x[(int)*(segments+3*j+1)-1]) && (y[(int)*(index+el2*3+k)-1]==y[(int)*(segments+3*j+1)-1])){
+-						*(segments+3*j+1)=*(index+el2*3+k);_assert_(segments[3*j+1]<nods);
++						*(segments+3*j+1)=*(index+el2*3+k);_assert_(segments[3*j+1]<nods+1);
+ 						break;
+ 					}
+ 				}
+@@ -323,13 +323,13 @@
+ 				*(segmentmarkerlist+(nsegs+i))=*(segmentmarkerlist+j);
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el1*3+k)-1]==x[(int)*(segments+3*j+0)-1]) && (y[(int)*(index+el1*3+k)-1]==y[(int)*(segments+3*j+0)-1])){
+-						*(segments+3*(nsegs+i)+0)=*(index+el1*3+k);_assert_(segments[3*(nsegs+i)+0]<nods);
++						*(segments+3*(nsegs+i)+0)=*(index+el1*3+k);_assert_(segments[3*(nsegs+i)+0]<nods+1);
+ 						break;
+ 					}
+ 				}
+ 				for (k=0;k<3;k++){
+ 					if ((x[(int)*(index+el1*3+k)-1]==x[(int)*(segments+3*j+1)-1]) && (y[(int)*(index+el1*3+k)-1]==y[(int)*(segments+3*j+1)-1])){
+-						*(segments+3*(nsegs+i)+1)=*(index+el1*3+k);_assert_(segments[3*(nsegs+i)+1]<nods);
++						*(segments+3*(nsegs+i)+1)=*(index+el1*3+k);_assert_(segments[3*(nsegs+i)+1]<nods+1);
+ 						break;
+ 					}
+ 				}
+@@ -435,9 +435,9 @@
+ 		counter=0;
+ 		for (j=0;j<numsegs;j++){
+ 			if (segmentmarkerlist[j]==(2+i)){
+-				riftsegment[3*counter+0]=segments[3*j+0];_assert_(riftsegment[3*counter+0]<nods);
+-				riftsegment[3*counter+1]=segments[3*j+1];_assert_(riftsegment[3*counter+1]<nods);
+-				riftsegment[3*counter+2]=segments[3*j+2];_assert_(riftsegment[3*counter+2]<nel);
++				riftsegment[3*counter+0]=segments[3*j+0];_assert_(riftsegment[3*counter+0]<nods+1);
++				riftsegment[3*counter+1]=segments[3*j+1];_assert_(riftsegment[3*counter+1]<nods+1);
++				riftsegment[3*counter+2]=segments[3*j+2];_assert_(riftsegment[3*counter+2]<nel+1);
+ 				counter++;
+ 			}
+ 		}
+@@ -742,7 +742,6 @@
+ 	/*output: */
+ 	double* riftstips=NULL;
+ 
+-
+ 	/*Allocate byproduct of this routine, riftstips: */
+ 	riftstips=(double*)xmalloc(numrifts*2*sizeof(double));
+ 
+@@ -752,7 +751,6 @@
+ 		riftpairs=riftspairs[i];
+ 		numsegs=riftsnumsegments[i];
+ 	
+-			
+ 		/*Allocate copy of riftsegments and riftpairs, 
+ 		 *as well as ordering vector: */
+ 		riftsegments_copy=(double*)xmalloc(numsegs*3*sizeof(double));
+@@ -777,8 +775,9 @@
+ 				}
+ 			}
+ 			/* Make sure node3 faces node1 and node4 faces node2: */
+-			_assert_(node1<nods && node4<nods);
+-			if ((x[node1]==x[node4]) && (y[node1]==y[node4])){
++			_assert_(node1<nods+1 && node4<nods+1);
++			_assert_(node1>0 && node4>0);
++			if ((x[node1-1]==x[node4-1]) && (y[node1-1]==y[node4-1])){
+ 				/*Swap node3 and node4:*/
+ 				temp_node=node3;
+ 				node3=node4;
Index: /issm/oecreview/Archive/12081-12100/ISSM-12086-12087.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12086-12087.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12086-12087.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_overlay.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12086)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_overlay.m	(revision 12087)
+@@ -95,7 +95,7 @@
+ 	%h_data=0.7*ones(size(data_grid));
+ 	%h_data(find(data_grid>data_mean))=1;
+ 	h_data=1*ones(size(data_grid));
+-	h_data(find(data_grid>data_mean))=0.7;
++	h_data(find(data_grid<data_mean))=0.7;
+ 	%saturation (S)
+ 	s_data=max(min(abs(data_grid-data_mean)/(data_max-data_mean) ,1),0);
+ else
Index: /issm/oecreview/Archive/12081-12100/ISSM-12087-12088.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12087-12088.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12087-12088.diff	(revision 12325)
@@ -0,0 +1,186 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/collapse.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/collapse.m	(revision 12087)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/collapse.m	(revision 12088)
+@@ -29,8 +29,8 @@
+ if ~isnan(md.inversion.vy_obs), md.inversion.vy_obs=project2d(md,md.inversion.vy_obs,md.mesh.numberoflayers); end;
+ if ~isnan(md.inversion.vel_obs), md.inversion.vel_obs=project2d(md,md.inversion.vel_obs,md.mesh.numberoflayers); end;
+ if ~isnan(md.inversion.cost_functions_coefficients), md.inversion.cost_functions_coefficients=project2d(md,md.inversion.cost_functions_coefficients,md.mesh.numberoflayers); end;
+-if ~isnan(md.inversion.min_parameters), md.inversion.min_parameters=project2d(md,md.inversion.min_parameters,md.mesh.numberoflayers); end;
+-if ~isnan(md.inversion.max_parameters), md.inversion.max_parameters=project2d(md,md.inversion.max_parameters,md.mesh.numberoflayers); end;
++if numel(md.inversion.min_parameters)>1, md.inversion.min_parameters=project2d(md,md.inversion.min_parameters,md.mesh.numberoflayers); end;
++if numel(md.inversion.max_parameters)>1, md.inversion.max_parameters=project2d(md,md.inversion.max_parameters,md.mesh.numberoflayers); end;
+ if ~isnan(md.surfaceforcings.mass_balance),
+ 	md.surfaceforcings.mass_balance=project2d(md,md.surfaceforcings.mass_balance,md.mesh.numberoflayers); 
+ end;
+@@ -100,8 +100,8 @@
+ md.mask.vertexonwater=project2d(md,md.mask.vertexonwater,1);
+ 
+ %lat long
+-md.mesh.lat=project2d(md,md.mesh.lat,1);
+-md.mesh.long=project2d(md,md.mesh.long,1);
++if numel(md.mesh.lat)>1,  md.mesh.lat=project2d(md,md.mesh.lat,1); end
++if numel(md.mesh.long)>1, md.mesh.long=project2d(md,md.mesh.long,1); end
+ 
+ %Initialize with the 2d mesh
+ md.mesh.x=md.mesh.x2d;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_gridded.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_gridded.m	(revision 12087)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_gridded.m	(revision 12088)
+@@ -39,6 +39,7 @@
+ 	data_min=min(data_grid(:));
+ 	data_max=max(data_grid(:));
+ end
++options=changefieldvalue(options,'cbYLim',[data_min data_max]);
+ if whitepos==1,
+ 	white  =data_max + (data_max-data_min)/55;
+ 	options=changefieldvalue(options,'caxis',[data_min white]);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/applyoptions.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12087)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12088)
+@@ -219,6 +219,9 @@
+ 		warning on MATLAB:log:logOfZero;
+ 		set(c,'YTickLabel',labels);
+ 	end
++	if exist(options,'cbYLim');
++		set(c,'YLim',getfieldvalue(options,'cbYLim'));
++	end
+ 	if exist(options,'colorbartitle'),
+ 		set(get(c,'title'),'FontSize',getfieldvalue(options,'colorbarfontsize',fontsize),'String',getfieldvalue(options,'colorbartitle'),...
+ 			'Color',getfieldvalue(options,'FontColor','k'));
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/meshrefine.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/meshrefine.m	(revision 12087)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/meshrefine.m	(revision 12088)
+@@ -1,40 +0,0 @@
+-function md=meshrefine(md,areas)
+-%MESHREFINE:  refined the mesh from a model, according to an area metric.
+-%
+-%   Usage:
+-%      md=meshrefine(md,metric)
+-
+-%some checks on list of arguments
+-if ((nargin~=2) | (nargout~=1)),
+-	meshrefineusage();
+-	error('meshrefine error message');
+-end
+-if ( (isempty(areas)) |  (length(areas)~=md.mesh.numberofelements) | (length(find(isnan(areas))))),
+-	meshrefineusage();
+-	error('meshrefine error message');
+-end
+-
+-%Refine using TriMeshRefine
+-[md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMeshRefine(md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers,areas,'yes');
+-
+-%Fill in rest of fields:
+-md.mesh.numberofelements=length(md.mesh.elements);
+-md.mesh.numberofvertices=length(md.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;
+-end
+-
+-function meshrefineusage(),
+-disp('usage: md=meshrefine(md,areas)');
+-end
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/meshnodensity.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/meshnodensity.m	(revision 12087)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/meshnodensity.m	(revision 12088)
+@@ -1,71 +0,0 @@
+-function md=meshnodensity(md,domainname,varargin)
+-%MESH - create model mesh
+-%
+-%   This routine creates a model mesh using TriMeshNoDensity and a domain outline
+-%   where md is a @model object, domainname is the name of an Argus domain outline file, 
+-%   Riftname is an optional argument (Argus domain outline) describing rifts.
+-%   The  difference with mesh.m is that the resolution of the mesh follows that of the domain 
+-%   outline and the riftoutline
+-%
+-%   Usage:
+-%      md=meshnodensity(md,domainname)
+-%   or md=meshnodensity(md,domainname,riftname);
+-%
+-%   Examples:
+-%      md=meshnodensity(md,'DomainOutline.exp');
+-%      md=meshnodensity(md,'DomainOutline.exp','Rifts.exp');
+-
+-if (nargin==2),
+-	riftname='';
+-end
+-if (nargin==3),
+-	riftname=varargin{1};
+-end
+-
+-%Mesh using TriMeshNoDensity
+-if strcmp(riftname,''),
+-	[md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMeshNoDensity(domainname);
+-else
+-	[elements,x,y,segments,segmentmarkers]=TriMeshNoDensity(domainname,riftname);
+-
+-	%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-clean/trunk-jpl/src/m/utils/Exp/exptool.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Exp/exptool.m	(revision 12087)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Exp/exptool.m	(revision 12088)
+@@ -70,7 +70,7 @@
+ 			error(['exptool error message:, ' filename ' does not exist. Exiting...']);
+ 		else
+ 			%read file
+-			B=expread(filename,1);
++			B=expread(filename);
+ 			%go through all profiles of B
+ 			for i=1:size(B,2)
+ 				%plug profile in A
Index: /issm/oecreview/Archive/12081-12100/ISSM-12088-12089.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12088-12089.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12088-12089.diff	(revision 12325)
@@ -0,0 +1,26 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_gridded.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_gridded.m	(revision 12088)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_gridded.m	(revision 12089)
+@@ -39,7 +39,6 @@
+ 	data_min=min(data_grid(:));
+ 	data_max=max(data_grid(:));
+ end
+-options=changefieldvalue(options,'cbYLim',[data_min data_max]);
+ if whitepos==1,
+ 	white  =data_max + (data_max-data_min)/55;
+ 	options=changefieldvalue(options,'caxis',[data_min white]);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/applyoptions.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12088)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12089)
+@@ -219,9 +219,6 @@
+ 		warning on MATLAB:log:logOfZero;
+ 		set(c,'YTickLabel',labels);
+ 	end
+-	if exist(options,'cbYLim');
+-		set(c,'YLim',getfieldvalue(options,'cbYLim'));
+-	end
+ 	if exist(options,'colorbartitle'),
+ 		set(get(c,'title'),'FontSize',getfieldvalue(options,'colorbarfontsize',fontsize),'String',getfieldvalue(options,'colorbartitle'),...
+ 			'Color',getfieldvalue(options,'FontColor','k'));
Index: /issm/oecreview/Archive/12081-12100/ISSM-12089-12090.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12089-12090.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12089-12090.diff	(revision 12325)
@@ -0,0 +1,27 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/matlab/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/matlab/Makefile.am	(revision 12089)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/matlab/Makefile.am	(revision 12090)
+@@ -35,9 +35,7 @@
+ 				TriaSearch\
+ 				TriMesh\
+ 				TriMeshRifts\
+-				TriMeshNoDensity\
+ 				TriMeshProcessRifts\
+-				TriMeshRefine\
+ 				Xy2ll
+ endif 
+ #}}}
+@@ -160,12 +158,6 @@
+ TriMeshRifts_SOURCES = ../TriMeshRifts/TriMeshRifts.cpp\
+ 			  ../TriMeshRifts/TriMeshRifts.h
+ 
+-TriMeshNoDensity_SOURCES = ../TriMeshNoDensity/TriMeshNoDensity.cpp\
+-			  ../TriMeshNoDensity/TriMeshNoDensity.h
+-
+ TriMeshProcessRifts_SOURCES = ../TriMeshProcessRifts/TriMeshProcessRifts.cpp\
+ 			  ../TriMeshProcessRifts/TriMeshProcessRifts.h
+-
+-TriMeshRefine_SOURCES = ../TriMeshRefine/TriMeshRefine.cpp\
+-			  ../TriMeshRefine/TriMeshRefine.h
+ #}}}
Index: /issm/oecreview/Archive/12081-12100/ISSM-12090-12091.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12090-12091.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12090-12091.diff	(revision 12325)
@@ -0,0 +1,21 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm.sh	(revision 12091)
+@@ -0,0 +1,10 @@
++#!/bin/sh
++
++./configure \
++	--prefix=$ISSM_TIER \
++	--without-mpi \
++	--without-matlab \
++	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
++	--without-metis \
++	--with-vendor=arm
++	--with-gsl-dir=$ISSM_TIER/externalpackages/gsl/install
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12081-12100/ISSM-12091-12092.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12091-12092.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12091-12092.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12091)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12092)
+@@ -1222,7 +1222,7 @@
+ 		AC_MSG_ERROR([need at least python or matlab support to compile modules (or use --with-modules=no)]);
+ 	fi
+ 
+-	check that we python version if python compile is specified
++	dnl check that we have python version if python compile is specified
+ 	if test "$HAVE_PYTHON" = "yes"  && test "$PYTHONVERSION" = "" ; then
+ 	AC_MSG_ERROR([need python-version if python compile is required!]);
+ 	fi
Index: /issm/oecreview/Archive/12081-12100/ISSM-12092-12093.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12092-12093.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12092-12093.diff	(revision 12325)
@@ -0,0 +1,424 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp	(revision 12092)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp	(revision 12093)
+@@ -13,7 +13,6 @@
+ #include "../../Container/DataSet.h"
+ 
+ int DomainOutlineRead(int* pnprof,int** pprofnvertices,double*** ppprofx,double*** ppprofy,bool** pclosed,char* domainname,bool whole=true){
+-
+ 	
+ 	/*indexing: */
+ 	int i,counter;
+@@ -127,29 +126,29 @@
+ 
+ DataSet* DomainOutlineRead(char* domainname,bool whole=true){
+ 
+-	/*indexing: */
+-	int i;
+-
+ 	/*intermediary: */
+-	int nprof;
+-	int* profnvertices=NULL;
+-	double** pprofx=NULL;
+-	double** pprofy=NULL;
++	int       nprof;
++	int      *profnvertices = NULL;
++	double  **pprofx        = NULL;
++	double  **pprofy        = NULL;
++	Contour  *contour       = NULL;
+ 
+-	Contour* contour=NULL;
+-
+ 	/*output: */
+ 	DataSet* domain=NULL;
+ 
+-	/*get domain outline from intermediary function:*/
+-	DomainOutlineRead(&nprof,&profnvertices,&pprofx, &pprofy, NULL,domainname,whole);
++	/*If domainname is an empty string, return empty dataset*/
++	if (strcmp(domainname,"")==0){
++		nprof=0;
++	}
++	else{
++		DomainOutlineRead(&nprof,&profnvertices,&pprofx, &pprofy, NULL,domainname,whole);
++	}
+ 
+ 	/*now create dataset of contours: */
+ 	domain=new DataSet(0);
+ 
+-	for(i=0;i<nprof;i++){
++	for(int i=0;i<nprof;i++){
+ 		domain->AddObject(new Contour(i,profnvertices[i],pprofx[i],pprofy[i],1));
+ 	}
+-
+ 	return domain;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.h	(revision 12092)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.h	(revision 12093)
+@@ -10,6 +10,6 @@
+ #include "../../objects/objects.h"
+ 
+ /* local prototypes: */
+-void TriMeshRiftsx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area,bool order);
++void TriMeshRiftsx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area);
+ 
+ #endif  /* _TRIMESHX_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.cpp	(revision 12092)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.cpp	(revision 12093)
+@@ -19,7 +19,7 @@
+ #endif
+ /*}}}*/
+ 
+-void TriMeshRiftsx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area,bool order){
++void TriMeshRiftsx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area){
+ 
+ 	/*indexing: */
+ 	int i,j;
+@@ -47,12 +47,11 @@
+ 		contour=(Contour*)domain->GetObjectByOffset(i);
+ 		in.numberofpoints+=contour->nods;
+ 	}
+-	if (rifts){
+-		for (i=0;i<rifts->Size();i++){
+-			contour=(Contour*)rifts->GetObjectByOffset(i);
+-			in.numberofpoints+=contour->nods;
+-		}
++	for (i=0;i<rifts->Size();i++){
++		contour=(Contour*)rifts->GetObjectByOffset(i);
++		in.numberofpoints+=contour->nods;
+ 	}
++
+ 	/*number of point attributes: */
+ 	in.numberofpointattributes=1;
+ 
+@@ -68,14 +67,12 @@
+ 			counter++;
+ 		}
+ 	}
+-	if(rifts){
+-		for (i=0;i<rifts->Size();i++){
+-			contour=(Contour*)rifts->GetObjectByOffset(i);
+-			for (j=0;j<contour->nods;j++){
+-				in.pointlist[2*counter+0]=contour->x[j];
+-				in.pointlist[2*counter+1]=contour->y[j];
+-				counter++;
+-			}
++	for (i=0;i<rifts->Size();i++){
++		contour=(Contour*)rifts->GetObjectByOffset(i);
++		for (j=0;j<contour->nods;j++){
++			in.pointlist[2*counter+0]=contour->x[j];
++			in.pointlist[2*counter+1]=contour->y[j];
++			counter++;
+ 		}
+ 	}
+ 	
+@@ -93,12 +90,10 @@
+ 		contour=(Contour*)domain->GetObjectByOffset(i);
+ 		in.numberofsegments+=contour->nods;
+ 	}
+-	if(rifts){
+-		for(i=0;i<rifts->Size();i++){
+-			contour=(Contour*)rifts->GetObjectByOffset(i);
+-			/*for rifts, we have one less segment as we have vertices*/
+-			in.numberofsegments+=contour->nods-1;
+-		}
++	for(i=0;i<rifts->Size();i++){
++		contour=(Contour*)rifts->GetObjectByOffset(i);
++		/*for rifts, we have one less segment as we have vertices*/
++		in.numberofsegments+=contour->nods-1;
+ 	}
+ 	
+ 	in.segmentlist = (int *) xmalloc(in.numberofsegments * 2 * sizeof(int));
+@@ -121,18 +116,16 @@
+ 		 backcounter=counter;
+ 	}
+ 	counter2=counter;
+-	if(rifts){
+-		for (i=0;i<rifts->Size();i++){
+-			contour=(Contour*)rifts->GetObjectByOffset(i);
+-			for (j=0;j<(contour->nods-1);j++){
+-				in.segmentlist[2*counter2+0]=counter;
+-				in.segmentlist[2*counter2+1]=counter+1;
+-				in.segmentmarkerlist[counter2]=2+i;
+-				counter2++;
+-				counter++;
+-			}
++	for (i=0;i<rifts->Size();i++){
++		contour=(Contour*)rifts->GetObjectByOffset(i);
++		for (j=0;j<(contour->nods-1);j++){
++			in.segmentlist[2*counter2+0]=counter;
++			in.segmentlist[2*counter2+1]=counter+1;
++			in.segmentmarkerlist[counter2]=2+i;
++			counter2++;
+ 			counter++;
+ 		}
++		counter++;
+ 	}
+ 	
+ 	/*Build regions: */
+@@ -195,9 +188,7 @@
+ 	AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles);
+ 
+ 	/*Order segments so that their normals point outside the domain: */
+-	if(order){
+-		OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
+-	}
++	OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
+ 
+ 	/*Output : */
+ 	index_matrix=new Matrix(index,out.numberoftriangles,3,1); 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp	(revision 12092)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp	(revision 12093)
+@@ -19,7 +19,7 @@
+ #endif
+ /*}}}*/
+ 
+-void TriMeshx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,double area,bool order){
++void TriMeshx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area){
+ 
+ 	/*indexing: */
+ 	int i,j;
+@@ -34,7 +34,7 @@
+ 	double* segmentmarkerlist=NULL;
+ 
+ 	/*intermediary: */
+-	int      counter,backcounter;
++	int      counter,counter2,backcounter;
+ 	Contour* contour=NULL;
+ 
+ 	/* Triangle structures needed to call Triangle library routines: */
+@@ -47,6 +47,11 @@
+ 		contour=(Contour*)domain->GetObjectByOffset(i);
+ 		in.numberofpoints+=contour->nods;
+ 	}
++	for (i=0;i<rifts->Size();i++){
++		contour=(Contour*)rifts->GetObjectByOffset(i);
++		in.numberofpoints+=contour->nods;
++	}
++
+ 	/*number of point attributes: */
+ 	in.numberofpointattributes=1;
+ 
+@@ -62,9 +67,17 @@
+ 			counter++;
+ 		}
+ 	}
++	for (i=0;i<rifts->Size();i++){
++		contour=(Contour*)rifts->GetObjectByOffset(i);
++		for (j=0;j<contour->nods;j++){
++			in.pointlist[2*counter+0]=contour->x[j];
++			in.pointlist[2*counter+1]=contour->y[j];
++			counter++;
++		}
++	}
+ 	
+ 	/*fill in the point attribute list: */
+-	in.pointattributelist = (REAL *) xmalloc(in.numberofpoints * in.numberofpointattributes * sizeof(REAL));
++	in.pointattributelist = (REAL*)xmalloc(in.numberofpoints*in.numberofpointattributes*sizeof(REAL));
+ 	for (i=0;i<in.numberofpoints;i++) in.pointattributelist[i] = 0.0;
+ 	
+ 	/*fill in the point marker list: */
+@@ -77,6 +90,11 @@
+ 		contour=(Contour*)domain->GetObjectByOffset(i);
+ 		in.numberofsegments+=contour->nods;
+ 	}
++	for(i=0;i<rifts->Size();i++){
++		contour=(Contour*)rifts->GetObjectByOffset(i);
++		/*for rifts, we have one less segment as we have vertices*/
++		in.numberofsegments+=contour->nods-1;
++	}
+ 	
+ 	in.segmentlist = (int *) xmalloc(in.numberofsegments * 2 * sizeof(int));
+ 	in.segmentmarkerlist = (int *) xcalloc(in.numberofsegments,sizeof(int));
+@@ -97,6 +115,18 @@
+ 		 counter++;
+ 		 backcounter=counter;
+ 	}
++	counter2=counter;
++	for (i=0;i<rifts->Size();i++){
++		contour=(Contour*)rifts->GetObjectByOffset(i);
++		for (j=0;j<(contour->nods-1);j++){
++			in.segmentlist[2*counter2+0]=counter;
++			in.segmentlist[2*counter2+1]=counter+1;
++			in.segmentmarkerlist[counter2]=2+i;
++			counter2++;
++			counter++;
++		}
++		counter++;
++	}
+ 	
+ 	/*Build regions: */
+ 	in.numberofregions = 0;
+@@ -158,9 +188,7 @@
+ 	AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles);
+ 
+ 	/*Order segments so that their normals point outside the domain: */
+-	if(order){
+-		OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
+-	}
++	OrderSegments(&segments,out.numberofsegments, index,out.numberoftriangles);
+ 
+ 	/*Output : */
+ 	index_matrix=new Matrix(index,out.numberoftriangles,3,1); 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h	(revision 12092)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h	(revision 12093)
+@@ -6,11 +6,10 @@
+ #define _TRIMESHX_H_
+ 
+ #include "string.h"
+-
+ #include "../../Container/Container.h"
+ #include "../../objects/objects.h"
+ 
+ /* local prototypes: */
+-void TriMeshx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,double area,bool order);
++void TriMeshx(Matrix** pindex,Vector** px,Vector** py,Matrix** psegments,Vector** psegmentmarkerlist,DataSet* domain,DataSet* rifts,double area);
+ 
+ #endif  /* _TRIMESHX_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12092)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12093)
+@@ -792,8 +792,6 @@
+ 			./modules/TriaSearchx/TriaSearchx.cpp\
+ 			./modules/TriMeshx/TriMeshx.h\
+ 			./modules/TriMeshx/TriMeshx.cpp\
+-			./modules/TriMeshRiftsx/TriMeshRiftsx.h\
+-			./modules/TriMeshRiftsx/TriMeshRiftsx.cpp\
+ 			./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.h\
+ 			./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsx.cpp\
+ 			./modules/PointCloudFindNeighborsx/PointCloudFindNeighborsxt.cpp\
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/matlab/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/matlab/Makefile.am	(revision 12092)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/matlab/Makefile.am	(revision 12093)
+@@ -34,7 +34,6 @@
+ 				StringToEnum\
+ 				TriaSearch\
+ 				TriMesh\
+-				TriMeshRifts\
+ 				TriMeshProcessRifts\
+ 				Xy2ll
+ endif 
+@@ -155,9 +154,6 @@
+ TriMesh_SOURCES = ../TriMesh/TriMesh.cpp\
+ 			  ../TriMesh/TriMesh.h
+ 
+-TriMeshRifts_SOURCES = ../TriMeshRifts/TriMeshRifts.cpp\
+-			  ../TriMeshRifts/TriMeshRifts.h
+-
+ TriMeshProcessRifts_SOURCES = ../TriMeshProcessRifts/TriMeshProcessRifts.cpp\
+ 			  ../TriMeshProcessRifts/TriMeshProcessRifts.h
+ #}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.h	(revision 12092)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.h	(revision 12093)
+@@ -30,8 +30,8 @@
+ #ifdef _HAVE_MATLAB_MODULES_
+ /* serial input macros: */
+ #define DOMAINOUTLINE  (mxArray *)prhs[0]
+-#define AREA           (mxArray *)prhs[1]
+-#define ORDER          (mxArray *)prhs[2]
++#define RIFTSOUTLINE   (mxArray *)prhs[1]
++#define AREA           (mxArray *)prhs[2]
+ /* serial output macros: */
+ #define INDEX             (mxArray**)&plhs[0]
+ #define X                 (mxArray**)&plhs[1]
+@@ -43,8 +43,8 @@
+ #ifdef _HAVE_PYTHON_MODULES_
+ /* serial input macros: */
+ #define DOMAINOUTLINE PyTuple_GetItem(args,0)
+-#define AREA          PyTuple_GetItem(args,1)
+-#define ORDER         PyTuple_GetItem(args,2)
++#define RIFTSOUTLINE  PyTuple_GetItem(args,1)
++#define AREA          PyTuple_GetItem(args,2)
+ /* serial output macros: */
+ #define INDEX             output,0
+ #define X                 output,1
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.cpp	(revision 12092)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.cpp	(revision 12093)
+@@ -7,19 +7,20 @@
+ WRAPPER(TriMesh){
+ 	
+ 	/* input: */
+-	char*  domainname=NULL;
+-	double area;
+-	bool   order;
++	char   *domainname = NULL;
++	char   *riftsname  = NULL;
++	double  area;
+ 
+ 	/*intermediary: */
+-	DataSet* domain=NULL;
++	DataSet *domain = NULL;
++	DataSet *rifts  = NULL;
+ 
+ 	/* output: */
+-	Matrix* index=NULL;
+-	Vector* x=NULL;
+-	Vector* y=NULL;
+-	Matrix* segments=NULL;
+-	Vector* segmentmarkerlist=NULL;
++	Matrix *index             = NULL;
++	Vector *x                 = NULL;
++	Vector *y                 = NULL;
++	Matrix *segments          = NULL;
++	Vector *segmentmarkerlist = NULL;
+ 
+ 	/*Boot module: */
+ 	MODULEBOOT();
+@@ -29,15 +30,16 @@
+ 	
+ 	/*Fetch data needed for meshing: */
+ 	FetchData(&domainname,DOMAINOUTLINE);
++	FetchData(&riftsname,RIFTSOUTLINE);
+ 	FetchData(&area,AREA);
+-	FetchData(&order,ORDER);
+ 
+ 	/*Read domain outline: */
+-	domain=DomainOutlineRead(domainname,false);
++	domain = DomainOutlineRead(domainname,false);
++	rifts  = DomainOutlineRead(riftsname,false);
+ 
+ 	/*call x core: */
+-	TriMeshx(&index,&x,&y,&segments,&segmentmarkerlist,domain,area,order);
+-	
++	TriMeshx(&index,&x,&y,&segments,&segmentmarkerlist,domain,rifts,area);
++
+ 	/*write outputs: */
+ 	WriteData(INDEX,index);
+ 	WriteData(X,x);
+@@ -47,6 +49,7 @@
+ 
+ 	/*free ressources: */
+ 	delete domain;
++	delete rifts;
+ 	xdelete_module(&index);
+ 	xdelete_module(&x);
+ 	xdelete_module(&y);
+@@ -60,13 +63,11 @@
+ void TriMeshUsage(void) //{{{1
+ {
+ 	printf("\n");
+-	printf("   usage: [index,x,y,segments,segmentmarkers]=TriMesh(domainoutlinefilename,area,ordered) \n");
++	printf("   usage: [index,x,y,segments,segmentmarkers]=TriMesh(domainoutlinefilename,rifts,area) \n");
+ 	printf("      where: index,x,y defines a triangulation, segments is an array made \n");
+ 	printf("      of exterior segments to the mesh domain outline, segmentmarkers is an array flagging each segment, \n");
+ 	printf("      outlinefilename an Argus domain outline file, \n");
+ 	printf("      area is the maximum area desired for any element of the resulting mesh, \n");
+-	printf("      and ordered is a bool that determines whether segments are output in the \n");
+-	printf("      order they are made by Triangle (ie none), or ordered counter clockwise around the domain outline.\n");
+ 	printf("\n");
+ }
+ //}}}
Index: /issm/oecreview/Archive/12081-12100/ISSM-12093-12094.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12093-12094.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12093-12094.diff	(revision 12325)
@@ -0,0 +1,65 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.m	(revision 12093)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.m	(revision 12094)
+@@ -37,36 +37,33 @@
+ 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,true);
+-else
+-	[elements,x,y,segments,segmentmarkers]=TriMeshRifts(domainname,riftname,area,true);
++[elements,x,y,segments,segmentmarkers]=TriMesh(domainname,riftname,area);
+ 
+-	%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;
++%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),
++	disp('WARNING: removing orphans');
++	%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;
++
+ %Fill in rest of fields:
+ md.mesh.numberofelements=length(md.mesh.elements);
+ md.mesh.numberofvertices=length(md.mesh.x);
Index: /issm/oecreview/Archive/12081-12100/ISSM-12095-12096.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12095-12096.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12095-12096.diff	(revision 12325)
@@ -0,0 +1,12 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h	(revision 12095)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h	(revision 12096)
+@@ -111,7 +111,6 @@
+ #include "./TimeAdaptx/TimeAdaptx.h"
+ #include "./TriaSearchx/TriaSearchx.h"
+ #include "./TriMeshx/TriMeshx.h"
+-#include "./TriMeshRiftsx/TriMeshRiftsx.h"
+ #include "./ThicknessAbsMisfitx/ThicknessAbsMisfitx.h"
+ #include "./ThicknessAbsGradientx/ThicknessAbsGradientx.h"
+ #include "./UpdateVertexPositionsx/UpdateVertexPositionsx.h"
Index: /issm/oecreview/Archive/12081-12100/ISSM-12096-12097.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12096-12097.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12096-12097.diff	(revision 12325)
@@ -0,0 +1,203 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12097)
+@@ -0,0 +1,78 @@
++#This installs the Android SDK (Software Development Kit)
++#which is needed for the compilation of the Java project. 
++
++step=3;
++
++#Different steps here. 
++#1: install sdk, ant and sdk tools
++#2: install an emulator.
++#3: test the emulator
++#4: cleanup
++
++present_dir=`pwd`;
++default_droid="Android-4.0"
++
++if [[ $step == "1" ]]; then
++
++	#Cleanup the install
++	rm -rf install-sdk install-ant
++
++	# Install Android SDK and NDK.
++	unzip -o android-sdk-r16-macosx.zip
++	unzip -o apache-ant-1.8.2-bin.zip
++
++	#Move to install
++	mv android-sdk-macosx install-sdk
++	mv apache-ant-1.8.2 install-ant
++
++	#Post_install configuration: 
++	#We need specific settings for specific platforms, for the SDK to 
++	#function properly
++
++	#For now, we need to install:  
++	#android sdk platform tools  
++	#and a specific android api: API 15
++	#Note: API 15 corresponds to Android 4.0.3
++
++	cd install-sdk/tools/ && source ./android update sdk -t platform-tools,android-15,android-14,system-image --no-ui
++
++fi
++
++if [[ $step == "2" ]]; then
++
++	#Once this is done, we need to install an emulator. Location will default to ~/.android/avd, 
++	#which we will move to $ISSM_TIER/externalpackages/android-emulators.  
++	#For now, it's called: Android-4.0.3
++
++
++	#Here we delete the Android-4.0.3 device if it already exists.
++	cd $present_dir/install-sdk/tools
++
++    if [ -e $ANDROID_DIR/android-emulators/$default_droid ] 
++    then
++        echo "Deleting previously created device: $default_droid"
++	    ./android delete avd -n $default_droid
++    fi
++
++	#Android will prompt the user to specify hardware emulation options. For now, default
++	#default settings will suffice. Press 'enter' to take default settings or enter 'no'.
++
++	./android create avd -f -n $default_droid -t 1 -p $ANDROID_DIR/android-emulators/$default_droid --abi armeabi-v7a
++fi
++
++if [[ $step == "3" ]]; then
++    #Here we will start up our default emulator to test that it is working properly.
++    #Once the device has booted we will use the Android Debug Bridge tool to gain
++    #a terminal in our device.
++
++	cd $present_dir/install-sdk/tools
++	./emulator -avd $default_droid -sdcard $ANDROID_DIR/android-emulators/test &
++
++    cd ../platform-tools
++    ./adb wait-for-device shell
++
++fi
++
++if [[ $step == "4" ]]; then
++	rm -rf install-sdk install-ant
++fi
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/apache-ant-1.8.2-bin.zip
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/apache-ant-1.8.2-bin.zip
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/android-sdk-r16-macosx.zip
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/android-sdk-r16-macosx.zip
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk
+___________________________________________________________________
+Added: svn:ignore
+   + install-sdk
+install-ant
+
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/install.sh	(revision 12097)
+@@ -0,0 +1,22 @@
++#This installs the Android NDK (Native Development Kit)
++#which is needed for the compilation of C/C++ code into the 
++#native architecture of the Android device.
++
++#The android-ndk-r7b-darwin-x86.tar.bz2 dummy.tar.bz2 file was downloaded 
++#from the android developer website: 
++
++#Cleanup the install
++rm -rf install
++rm -rf $ANDROID_DIR/arm-linux-android-4.0
++
++# Install Android SDK and NDK.
++cp android-ndk-r7b-darwin-x86.tar.bz2 dummy.tar.bz2
++bunzip2 dummy.tar.bz2
++tar -xvf dummy.tar
++rm -rf dummy.tar dummy.tar.bz2
++
++#Move to install
++mv android-ndk-r7b install
++
++#Create Standalone Development Directory
++$ANDROID_NDK_DIR/build/tools/make-standalone-toolchain.sh --platform=android-5 --install-dir=$ANDROID_DIR/arm-linux-android-4.0
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/android-ndk-r7b-darwin-x86.tar.bz2
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/android-ndk-r7b-darwin-x86.tar.bz2
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment_variables.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment_variables.sh	(revision 12096)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment_variables.sh	(revision 12097)
+@@ -172,17 +172,17 @@
+ #packagemaker
+ PACKAGEMAKER_DIR="$ISSM_TIER/externalpackages/packagemaker/install"
+ 
++#android-dev-dir
++ANDROID_DIR="$ISSM_TIER/externalpackages/android"
++
+ #android-ndk
+-ANDROID_NDK_DIR="$ISSM_TIER/externalpackages/android-ndk/install"
++ANDROID_NDK_DIR="$ANDROID_DIR/android-ndk/install"
+ 
+-#android-dev-dir
+-ANDROID_DEV_DIR="$ISSM_TIER/externalpackages/android-dev-dir"
+-
+ #android-sdk
+-ANDROID_SDK_DIR="$ISSM_TIER/externalpackages/android-sdk/install-sdk"
++ANDROID_SDK_DIR="$ANDROID_DIR/android-sdk/install-sdk"
+ 
+ #android-ant
+-ANDROID_ANT_DIR="$ISSM_TIER/externalpackages/android-sdk/install-ant"
++ANDROID_ANT_DIR="$ANDROID_DIR/android-sdk/install-ant"
+ 
+ #gsl
+ GSL_DIR="$ISSM_TIER/externalpackages/gsl/install"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh	(revision 12096)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh	(revision 12097)
+@@ -241,8 +241,8 @@
+ export ANDROID_NDK_DIR
+ export PATH="$PATH:$ANDROID_NDK_DIR/"
+ 
+-#ANDROID_DEV_DIR
+-export ANDROID_DEV_DIR
++#ANDROID_DIR
++export ANDROID_DIR
+ 
+ #ANDROID_SDK
+ export PATH="$PATH:$ANDROID_SDK_DIR/"
Index: /issm/oecreview/Archive/12081-12100/ISSM-12097-12098.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12097-12098.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12097-12098.diff	(revision 12325)
@@ -0,0 +1,187 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exp/exp.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exp/exp.h	(revision 12097)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exp/exp.h	(revision 12098)
+@@ -12,11 +12,11 @@
+ int IsInPoly(Vector* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue);
+ int IsOutsidePoly(Vector* in,double* xc,double* yc,int numvertices,double* x,double* y,int i0,int i1, int edgevalue);
+ int IsInPolySerial(double* in,double* xc,double* yc,int numvertices,double* x,double* y,int nods, int edgevalue);
+-int DomainOutlineWrite(int nprof,int* profnvertices,double** pprofx,double** pprofy,bool* closed,char* domainname,bool whole);
++int DomainOutlineWrite(int nprof,int* profnvertices,double** pprofx,double** pprofy,bool* closed,char* domainname);
+ int pnpoly(int npol, double *xp, double *yp, double x, double y, int edgevalue);
+ 
+-int      DomainOutlineRead(int* pnprof,int** pprofnvertices,double*** ppprofx,double*** ppprofy,bool** pclosed,char* domainname,bool whole);
+-DataSet* DomainOutlineRead(char* domainname,bool whole);
++int      DomainOutlineRead(int* pnprof,int** pprofnvertices,double*** ppprofx,double*** ppprofy,bool** pclosed,char* domainname);
++DataSet* DomainOutlineRead(char* domainname);
+ 
+ 
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exp/DomainOutlineWrite.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exp/DomainOutlineWrite.cpp	(revision 12097)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exp/DomainOutlineWrite.cpp	(revision 12098)
+@@ -10,7 +10,7 @@
+ #include "../../include/include.h"
+ #include "../Exceptions/exceptions.h"
+ 
+-int DomainOutlineWrite(int nprof,int* profnvertices,double** pprofx,double** pprofy,bool* closed,char* domainname,bool whole=true){
++int DomainOutlineWrite(int nprof,int* profnvertices,double** pprofx,double** pprofy,bool* closed,char* domainname){
+ 
+ 	
+ 	/*Error management: */
+@@ -20,13 +20,6 @@
+ 	/*I/O: */
+ 	FILE* fid=NULL;
+ 
+-	/*input: */
+-//	int nprof; //number of profiles in the domainname file
+-//	int* profnvertices=NULL; //array holding the number of vertices for the nprof profiles
+-//	double** pprofx=NULL; //array of profiles x coordinates
+-//	double** pprofy=NULL; //array of profiles y coordinates
+-//	bool* closed=NULL; //array holding closed flags for the nprof profiles
+-
+ 	/*open domain outline file for writing: */
+ 	if ((fid=fopen(domainname,"w"))==NULL){
+ 		_error_("%s%s","could not open domain file ",domainname); 
+@@ -42,10 +35,7 @@
+ 		fprintf(fid,"%s %s %s %s\n","#","Points","Count","Value");
+ 		
+ 		/*Write number of profile vertices: */
+-		if(closed[counter] && !whole)
+-			fprintf(fid,"%u %s\n",profnvertices[counter]+1,"1.");
+-		else
+-			fprintf(fid,"%u %s\n",profnvertices[counter]  ,"1.");
++		fprintf(fid,"%u %s\n",profnvertices[counter]  ,"1.");
+ 	
+ 		/*Write next line: */
+ 		fprintf(fid,"%s %s %s %s %s\n","#","X","pos","Y","pos");
+@@ -55,10 +45,6 @@
+ 			fprintf(fid,"%lf\t%lf\n",pprofx[counter][i],pprofy[counter][i]);
+ 		}
+ 
+-		/*Now check that we are dealing with open contours: */
+-		if(closed[counter] && !whole)
+-			fprintf(fid,"%lf\t%lf\n",pprofx[counter][0],pprofy[counter][0]);
+-
+ 		/*Write blank line: */
+ 		if(counter < nprof-1) fprintf(fid,"\n");
+ 	}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp	(revision 12097)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp	(revision 12098)
+@@ -12,7 +12,7 @@
+ #include "../Exceptions/exceptions.h"
+ #include "../../Container/DataSet.h"
+ 
+-int DomainOutlineRead(int* pnprof,int** pprofnvertices,double*** ppprofx,double*** ppprofy,bool** pclosed,char* domainname,bool whole=true){
++int DomainOutlineRead(int* pnprof,int** pprofnvertices,double*** ppprofx,double*** ppprofy,bool** pclosed,char* domainname){
+ 	
+ 	/*indexing: */
+ 	int i,counter;
+@@ -100,9 +100,6 @@
+ 		cl=false;
+ 		if((x[0]==x[n-1]) && (y[0]==y[n-1])){
+ 			cl=true;
+-			if (!whole) {
+-				n=n-1;
+-			}
+ 		}
+ 
+ 		/*Assign pointers: */
+@@ -124,7 +121,7 @@
+ 	else       xfree((void**)&closed);
+ }
+ 
+-DataSet* DomainOutlineRead(char* domainname,bool whole=true){
++DataSet* DomainOutlineRead(char* domainname){
+ 
+ 	/*intermediary: */
+ 	int       nprof;
+@@ -141,7 +138,7 @@
+ 		nprof=0;
+ 	}
+ 	else{
+-		DomainOutlineRead(&nprof,&profnvertices,&pprofx, &pprofy, NULL,domainname,whole);
++		DomainOutlineRead(&nprof,&profnvertices,&pprofx, &pprofy, NULL,domainname);
+ 	}
+ 
+ 	/*now create dataset of contours: */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12097)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp	(revision 12098)
+@@ -60,7 +60,7 @@
+ 
+ /*  read exp file  */
+ 
+-	if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp,true))
++	if (!DomainOutlineRead(&nprof,&pnvert,&pprofx,&pprofy,&closed,filexp))
+ 		_error_("Error reading exp file.");
+ 	_printf_(true,"Exp2Kmlx -- Reading %d exp profiles from file \"%s\".\n",nprof,filexp);
+ //	for (i=0; i<nprof; i++)
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp	(revision 12097)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp	(revision 12098)
+@@ -45,7 +45,7 @@
+ 	in.numberofpoints=0;
+ 	for (i=0;i<domain->Size();i++){
+ 		contour=(Contour*)domain->GetObjectByOffset(i);
+-		in.numberofpoints+=contour->nods;
++		in.numberofpoints+=contour->nods-1;
+ 	}
+ 	for (i=0;i<rifts->Size();i++){
+ 		contour=(Contour*)rifts->GetObjectByOffset(i);
+@@ -61,7 +61,7 @@
+ 	counter=0;
+ 	for (i=0;i<domain->Size();i++){
+ 		contour=(Contour*)domain->GetObjectByOffset(i);
+-		for (j=0;j<contour->nods;j++){
++		for (j=0;j<contour->nods-1;j++){
+ 			in.pointlist[2*counter+0]=contour->x[j];
+ 			in.pointlist[2*counter+1]=contour->y[j];
+ 			counter++;
+@@ -88,7 +88,7 @@
+ 	in.numberofsegments=0;
+ 	for (i=0;i<domain->Size();i++){
+ 		contour=(Contour*)domain->GetObjectByOffset(i);
+-		in.numberofsegments+=contour->nods;
++		in.numberofsegments+=contour->nods-1;
+ 	}
+ 	for(i=0;i<rifts->Size();i++){
+ 		contour=(Contour*)rifts->GetObjectByOffset(i);
+@@ -102,7 +102,7 @@
+ 	backcounter=0;
+ 	for (i=0;i<domain->Size();i++){
+ 		contour=(Contour*)domain->GetObjectByOffset(i);
+-		for (j=0;j<contour->nods-1;j++){
++		for (j=0;j<contour->nods-2;j++){
+ 			in.segmentlist[2*counter+0]=counter;
+ 			in.segmentlist[2*counter+1]=counter+1;
+ 			in.segmentmarkerlist[counter]=0;
+@@ -137,7 +137,7 @@
+ 		in.holelist = (REAL *) xmalloc(in.numberofholes * 2 * sizeof(REAL));
+ 		for (i=0;i<domain->Size()-1;i++){
+ 			contour=(Contour*)domain->GetObjectByOffset(i+1);
+-			GridInsideHole(&in.holelist[2*i+0],&in.holelist[2*i+1],contour->nods,contour->x,contour->y);
++			GridInsideHole(&in.holelist[2*i+0],&in.holelist[2*i+1],contour->nods-1,contour->x,contour->y);
+ 		}
+ 	}
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.cpp	(revision 12097)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.cpp	(revision 12098)
+@@ -34,8 +34,8 @@
+ 	FetchData(&area,AREA);
+ 
+ 	/*Read domain outline: */
+-	domain = DomainOutlineRead(domainname,false);
+-	rifts  = DomainOutlineRead(riftsname,false);
++	domain = DomainOutlineRead(domainname);
++	rifts  = DomainOutlineRead(riftsname);
+ 
+ 	/*call x core: */
+ 	TriMeshx(&index,&x,&y,&segments,&segmentmarkerlist,domain,rifts,area);
Index: /issm/oecreview/Archive/12081-12100/ISSM-12098-12099.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12098-12099.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12098-12099.diff	(revision 12325)
@@ -0,0 +1,52 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/dox/issm.dox
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/dox/issm.dox	(revision 12098)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/dox/issm.dox	(revision 12099)
+@@ -45,37 +45,37 @@
+ <th  bgcolor=#7AA9DD style="text-align:left;">Language</th><th  bgcolor=#7AA9DD style="text-align:right;">files</th><th  bgcolor=#7AA9DD style="text-align:right;">blank</th><th  bgcolor=#7AA9DD style="text-align:right;">comment</th><th  bgcolor=#7AA9DD style="text-align:right;">code</th><th  bgcolor=#7AA9DD style="text-align:right;">Total</th>
+ </th>
+ <tr>
+-<th  bgcolor=#FFFFFF style="text-align:left;"> C++ </th><td  bgcolor=#FFFFFF style="text-align:right;">533</td><td  bgcolor=#FFFFFF style="text-align:right;">15491</td><td  bgcolor=#FFFFFF style="text-align:right;">17275</td><td  bgcolor=#FFFFFF style="text-align:right;">58005</td><td  bgcolor=#FFFFFF style="text-align:right;">90771</td>
++<th  bgcolor=#FFFFFF style="text-align:left;"> C++ </th><td  bgcolor=#FFFFFF style="text-align:right;">499</td><td  bgcolor=#FFFFFF style="text-align:right;">14338</td><td  bgcolor=#FFFFFF style="text-align:right;">16340</td><td  bgcolor=#FFFFFF style="text-align:right;">54651</td><td  bgcolor=#FFFFFF style="text-align:right;">85329</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#C6E2FF style="text-align:left;"> MATLAB </th><td  bgcolor=#C6E2FF style="text-align:right;">977</td><td  bgcolor=#C6E2FF style="text-align:right;">7199</td><td  bgcolor=#C6E2FF style="text-align:right;">13702</td><td  bgcolor=#C6E2FF style="text-align:right;">31690</td><td  bgcolor=#C6E2FF style="text-align:right;">52591</td>
++<th  bgcolor=#C6E2FF style="text-align:left;"> MATLAB </th><td  bgcolor=#C6E2FF style="text-align:right;">919</td><td  bgcolor=#C6E2FF style="text-align:right;">6875</td><td  bgcolor=#C6E2FF style="text-align:right;">13184</td><td  bgcolor=#C6E2FF style="text-align:right;">30350</td><td  bgcolor=#C6E2FF style="text-align:right;">50409</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#FFFFFF style="text-align:left;"> C/C++  Header </th><td  bgcolor=#FFFFFF style="text-align:right;">399</td><td  bgcolor=#FFFFFF style="text-align:right;">3069</td><td  bgcolor=#FFFFFF style="text-align:right;">2727</td><td  bgcolor=#FFFFFF style="text-align:right;">10358</td><td  bgcolor=#FFFFFF style="text-align:right;">16154</td>
++<th  bgcolor=#FFFFFF style="text-align:left;"> C/C++  Header </th><td  bgcolor=#FFFFFF style="text-align:right;">366</td><td  bgcolor=#FFFFFF style="text-align:right;">2665</td><td  bgcolor=#FFFFFF style="text-align:right;">2529</td><td  bgcolor=#FFFFFF style="text-align:right;">9400</td><td  bgcolor=#FFFFFF style="text-align:right;">14594</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#C6E2FF style="text-align:left;"> m4 </th><td  bgcolor=#C6E2FF style="text-align:right;">7</td><td  bgcolor=#C6E2FF style="text-align:right;">1061</td><td  bgcolor=#C6E2FF style="text-align:right;">242</td><td  bgcolor=#C6E2FF style="text-align:right;">8941</td><td  bgcolor=#C6E2FF style="text-align:right;">10244</td>
++<th  bgcolor=#C6E2FF style="text-align:left;"> m4 </th><td  bgcolor=#C6E2FF style="text-align:right;">7</td><td  bgcolor=#C6E2FF style="text-align:right;">993</td><td  bgcolor=#C6E2FF style="text-align:right;">80</td><td  bgcolor=#C6E2FF style="text-align:right;">8237</td><td  bgcolor=#C6E2FF style="text-align:right;">9310</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#FFFFFF style="text-align:left;"> Objective  C </th><td  bgcolor=#FFFFFF style="text-align:right;">9</td><td  bgcolor=#FFFFFF style="text-align:right;">98</td><td  bgcolor=#FFFFFF style="text-align:right;">0</td><td  bgcolor=#FFFFFF style="text-align:right;">370</td><td  bgcolor=#FFFFFF style="text-align:right;">468</td>
++<th  bgcolor=#FFFFFF style="text-align:left;"> Python </th><td  bgcolor=#FFFFFF style="text-align:right;">47</td><td  bgcolor=#FFFFFF style="text-align:right;">183</td><td  bgcolor=#FFFFFF style="text-align:right;">518</td><td  bgcolor=#FFFFFF style="text-align:right;">1099</td><td  bgcolor=#FFFFFF style="text-align:right;">1800</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#C6E2FF style="text-align:left;"> Bourne  Shell </th><td  bgcolor=#C6E2FF style="text-align:right;">8</td><td  bgcolor=#C6E2FF style="text-align:right;">61</td><td  bgcolor=#C6E2FF style="text-align:right;">98</td><td  bgcolor=#C6E2FF style="text-align:right;">271</td><td  bgcolor=#C6E2FF style="text-align:right;">430</td>
++<th  bgcolor=#C6E2FF style="text-align:left;"> Objective  C </th><td  bgcolor=#C6E2FF style="text-align:right;">9</td><td  bgcolor=#C6E2FF style="text-align:right;">98</td><td  bgcolor=#C6E2FF style="text-align:right;">0</td><td  bgcolor=#C6E2FF style="text-align:right;">370</td><td  bgcolor=#C6E2FF style="text-align:right;">468</td>
+ </tr>
+ <tr>
+ <th  bgcolor=#FFFFFF style="text-align:left;"> Perl </th><td  bgcolor=#FFFFFF style="text-align:right;">3</td><td  bgcolor=#FFFFFF style="text-align:right;">21</td><td  bgcolor=#FFFFFF style="text-align:right;">23</td><td  bgcolor=#FFFFFF style="text-align:right;">240</td><td  bgcolor=#FFFFFF style="text-align:right;">284</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#C6E2FF style="text-align:left;"> IDL </th><td  bgcolor=#C6E2FF style="text-align:right;">1</td><td  bgcolor=#C6E2FF style="text-align:right;">18</td><td  bgcolor=#C6E2FF style="text-align:right;">4</td><td  bgcolor=#C6E2FF style="text-align:right;">124</td><td  bgcolor=#C6E2FF style="text-align:right;">146</td>
++<th  bgcolor=#C6E2FF style="text-align:left;"> Bourne  Shell </th><td  bgcolor=#C6E2FF style="text-align:right;">5</td><td  bgcolor=#C6E2FF style="text-align:right;">46</td><td  bgcolor=#C6E2FF style="text-align:right;">71</td><td  bgcolor=#C6E2FF style="text-align:right;">226</td><td  bgcolor=#C6E2FF style="text-align:right;">343</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#FFFFFF style="text-align:left;"> C </th><td  bgcolor=#FFFFFF style="text-align:right;">2</td><td  bgcolor=#FFFFFF style="text-align:right;">3</td><td  bgcolor=#FFFFFF style="text-align:right;">3</td><td  bgcolor=#FFFFFF style="text-align:right;">24</td><td  bgcolor=#FFFFFF style="text-align:right;">30</td>
++<th  bgcolor=#FFFFFF style="text-align:left;"> IDL </th><td  bgcolor=#FFFFFF style="text-align:right;">1</td><td  bgcolor=#FFFFFF style="text-align:right;">18</td><td  bgcolor=#FFFFFF style="text-align:right;">4</td><td  bgcolor=#FFFFFF style="text-align:right;">124</td><td  bgcolor=#FFFFFF style="text-align:right;">146</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#C6E2FF style="text-align:left;"> Python </th><td  bgcolor=#C6E2FF style="text-align:right;">2</td><td  bgcolor=#C6E2FF style="text-align:right;">1</td><td  bgcolor=#C6E2FF style="text-align:right;">4</td><td  bgcolor=#C6E2FF style="text-align:right;">13</td><td  bgcolor=#C6E2FF style="text-align:right;">18</td>
++<th  bgcolor=#C6E2FF style="text-align:left;"> C </th><td  bgcolor=#C6E2FF style="text-align:right;">2</td><td  bgcolor=#C6E2FF style="text-align:right;">3</td><td  bgcolor=#C6E2FF style="text-align:right;">3</td><td  bgcolor=#C6E2FF style="text-align:right;">24</td><td  bgcolor=#C6E2FF style="text-align:right;">30</td>
+ </tr>
+ <tr>
+-<th  bgcolor=#FFFFFF style="text-align:left;"> SUM: </th><td  bgcolor=#FFFFFF style="text-align:right;">1941</td><td  bgcolor=#FFFFFF style="text-align:right;">27022</td><td  bgcolor=#FFFFFF style="text-align:right;">34078</td><td  bgcolor=#FFFFFF style="text-align:right;">110036</td><td  bgcolor=#FFFFFF style="text-align:right;">171136</td>
++<th  bgcolor=#FFFFFF style="text-align:left;"> SUM: </th><td  bgcolor=#FFFFFF style="text-align:right;">1858</td><td  bgcolor=#FFFFFF style="text-align:right;">25240</td><td  bgcolor=#FFFFFF style="text-align:right;">32752</td><td  bgcolor=#FFFFFF style="text-align:right;">104721</td><td  bgcolor=#FFFFFF style="text-align:right;">162713</td>
+ </tr>
+ </table>
+ 
Index: /issm/oecreview/Archive/12081-12100/ISSM-12099-12100.diff
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-12099-12100.diff	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-12099-12100.diff	(revision 12325)
@@ -0,0 +1,36 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test452.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test452.m	(revision 12099)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test452.m	(revision 12100)
+@@ -1,7 +1,6 @@
+ md=triangle(model,'../Exp/Square.exp',350000);
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+-md.cluster=none;
+ md.initialization.vx(:)=0;
+ md.initialization.vy(:)=0;
+ md.initialization.vel(:)=0;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test448.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test448.m	(revision 12099)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test448.m	(revision 12100)
+@@ -2,7 +2,6 @@
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+ md.initialization.vx(:)=0;
+ md.initialization.vy(:)=0;
+ md.initialization.vel(:)=0;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test450.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test450.m	(revision 12099)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test450.m	(revision 12100)
+@@ -2,7 +2,6 @@
+ md=setmask(md,'../Exp/SquareShelf.exp','');
+ md=parameterize(md,'../Par/SquareSheetShelf.par');
+ md=setflowequation(md,'macayeal','all');
+-md.cluster=none;
+ md.initialization.vx(:)=0;
+ md.initialization.vy(:)=0;
+ md.initialization.vel(:)=0;
Index: /issm/oecreview/Archive/12081-12100/ISSM-DocReview-12081-12100.tex
===================================================================
--- /issm/oecreview/Archive/12081-12100/ISSM-DocReview-12081-12100.tex	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/ISSM-DocReview-12081-12100.tex	(revision 12325)
@@ -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/12081-12100/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12081-12100/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12081-12100
Index: /issm/oecreview/Archive/12081-12100/Makefile
===================================================================
--- /issm/oecreview/Archive/12081-12100/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12081-12100
+
+
+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/12081-12100/log.tex
===================================================================
--- /issm/oecreview/Archive/12081-12100/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/log.tex	(revision 12325)
@@ -0,0 +1,38 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12081-12082.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp \\ Export determination: 6. \\Rationale: Reorganizing and adding assertion for safety
+M /issm/trunk-jpl/src/m/model/mesh/triangle.m converting to 'order' to bollean \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12082-12083.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/mesh/triangle.m \\ Export determination: 6. \\Rationale: converting to 'order' to bollean
+M /issm/trunk-jpl/externalpackages/android-sdk/install.sh Minor bug \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12083-12084.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/android-sdk/install.sh \\ Export determination: 6. \\Rationale: Minor bug
+M /issm/trunk-jpl/externalpackages/android-ndk/install.sh Minor bug \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12084-12085.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/android-ndk/install.sh \\ Export determination: 6. \\Rationale: Minor bug
+M /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp Fixed WriteData \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12085-12086.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp \\ Export determination: 6. \\Rationale: Fixed WriteData
+M /issm/trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp M /issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp Fixed checks \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12086-12087.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/shared/TriMesh/SplitMeshForRifts.cpp M /issm/trunk-jpl/src/c/shared/TriMesh/TriMeshUtils.cpp \\ Export determination: 6. \\Rationale: Fixed checks
+M /issm/trunk-jpl/src/m/model/plot/plot\_overlay.m redblue is flipped in overlay \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12087-12088.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/plot/plot\_overlay.m \\ Export determination: 6. \\Rationale: redblue is flipped in overlay
+M /issm/trunk-jpl/src/m/model/collapse.m D /issm/trunk-jpl/src/m/model/mesh/meshnodensity.m D /issm/trunk-jpl/src/m/model/mesh/meshrefine.m M /issm/trunk-jpl/src/m/model/plot/applyoptions.m M /issm/trunk-jpl/src/m/model/plot/plot\_gridded.m M /issm/trunk-jpl/src/m/utils/Exp/exptool.m never used (that's 2 modules less) \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12088-12089.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/collapse.m D /issm/trunk-jpl/src/m/model/mesh/meshnodensity.m D /issm/trunk-jpl/src/m/model/mesh/meshrefine.m M /issm/trunk-jpl/src/m/model/plot/applyoptions.m M /issm/trunk-jpl/src/m/model/plot/plot\_gridded.m M /issm/trunk-jpl/src/m/utils/Exp/exptool.m \\ Export determination: 6. \\Rationale: never used (that's 2 modules less)
+M /issm/trunk-jpl/src/m/model/plot/applyoptions.m M /issm/trunk-jpl/src/m/model/plot/plot\_gridded.m reverted: to be implemented by Chris \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12089-12090.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/plot/applyoptions.m M /issm/trunk-jpl/src/m/model/plot/plot\_gridded.m \\ Export determination: 6. \\Rationale: reverted: to be implemented by Chris
+D /issm/trunk-jpl/src/modules/TriMeshNoDensity D /issm/trunk-jpl/src/modules/TriMeshRefine M /issm/trunk-jpl/src/modules/matlab/Makefile.am Removed 2 modules never used \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12090-12091.diff: \\ Function name: \\D /issm/trunk-jpl/src/modules/TriMeshNoDensity D /issm/trunk-jpl/src/modules/TriMeshRefine M /issm/trunk-jpl/src/modules/matlab/Makefile.am \\ Export determination: 6. \\Rationale: Removed 2 modules never used
+A /issm/trunk-jpl/configs/config-arm.sh ARM processors configuration file \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12091-12092.diff: \\ Function name: \\A /issm/trunk-jpl/configs/config-arm.sh \\ Export determination: 6. \\Rationale: ARM processors configuration file
+M /issm/trunk-jpl/m4/issm\_options.m4 commenting comments \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-12092-12093.diff: \\ Function name: \\M /issm/trunk-jpl/m4/issm\_options.m4 \\ Export determination: 6. \\Rationale: commenting comments
+M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.cpp M /issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.h M /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp M /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h M /issm/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp M /issm/trunk-jpl/src/modules/TriMesh/TriMesh.cpp M /issm/trunk-jpl/src/modules/TriMesh/TriMesh.h D /issm/trunk-jpl/src/modules/TriMeshRifts M /issm/trunk-jpl/src/modules/matlab/Makefile.am Merging TriMesh and TriMeshRifts \\\\
+\noindent \textbf{Change \#13} with diff file ISSM-12093-12094.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.cpp M /issm/trunk-jpl/src/c/modules/TriMeshRiftsx/TriMeshRiftsx.h M /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp M /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.h M /issm/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp M /issm/trunk-jpl/src/modules/TriMesh/TriMesh.cpp M /issm/trunk-jpl/src/modules/TriMesh/TriMesh.h D /issm/trunk-jpl/src/modules/TriMeshRifts M /issm/trunk-jpl/src/modules/matlab/Makefile.am \\ Export determination: 6. \\Rationale: Merging TriMesh and TriMeshRifts
+M /issm/trunk-jpl/src/m/model/mesh/triangle.m Merging TriMesh and TriMeshRifts \\\\
+\noindent \textbf{Change \#14} with diff file ISSM-12094-12095.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/mesh/triangle.m \\ Export determination: 6. \\Rationale: Merging TriMesh and TriMeshRifts
+D /issm/trunk-jpl/src/c/modules/TriMeshRiftsx not needed anymore \\\\
+\noindent \textbf{Change \#15} with diff file ISSM-12095-12096.diff: \\ Function name: \\D /issm/trunk-jpl/src/c/modules/TriMeshRiftsx \\ Export determination: 6. \\Rationale: not needed anymore
+M /issm/trunk-jpl/src/c/modules/modules.h minor \\\\
+\noindent \textbf{Change \#16} with diff file ISSM-12096-12097.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/modules.h \\ Export determination: 6. \\Rationale: minor
+M /issm/trunk-jpl/etc/environment.sh M /issm/trunk-jpl/etc/environment\_variables.sh A /issm/trunk-jpl/externalpackages/android A /issm/trunk-jpl/externalpackages/android/android-emulators (from /issm/trunk-jpl/externalpackages/android-dev-dir/android-emulators:12095) A /issm/trunk-jpl/externalpackages/android/android-ndk (from /issm/trunk-jpl/externalpackages/android-ndk:12095) M /issm/trunk-jpl/externalpackages/android/android-ndk/install.sh A /issm/trunk-jpl/externalpackages/android/android-sdk (from /issm/trunk-jpl/externalpackages/android-sdk:12095) M /issm/trunk-jpl/externalpackages/android/android-sdk/install.sh D /issm/trunk-jpl/externalpackages/android-dev-dir D /issm/trunk-jpl/externalpackages/android-ndk D /issm/trunk-jpl/externalpackages/android-sdk Modification to environment variables and file strucutre of Android. \\\\
+\noindent \textbf{Change \#17} with diff file ISSM-12097-12098.diff: \\ Function name: \\M /issm/trunk-jpl/etc/environment.sh M /issm/trunk-jpl/etc/environment\_variables.sh A /issm/trunk-jpl/externalpackages/android A /issm/trunk-jpl/externalpackages/android/android-emulators (from /issm/trunk-jpl/externalpackages/android-dev-dir/android-emulators:12095) A /issm/trunk-jpl/externalpackages/android/android-ndk (from /issm/trunk-jpl/externalpackages/android-ndk:12095) M /issm/trunk-jpl/externalpackages/android/android-ndk/install.sh A /issm/trunk-jpl/externalpackages/android/android-sdk (from /issm/trunk-jpl/externalpackages/android-sdk:12095) M /issm/trunk-jpl/externalpackages/android/android-sdk/install.sh D /issm/trunk-jpl/externalpackages/android-dev-dir D /issm/trunk-jpl/externalpackages/android-ndk D /issm/trunk-jpl/externalpackages/android-sdk \\ Export determination: 6. \\Rationale: Modification to environment variables and file strucutre of Android.
+M /issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp M /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp M /issm/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp M /issm/trunk-jpl/src/c/shared/Exp/DomainOutlineWrite.cpp M /issm/trunk-jpl/src/c/shared/Exp/exp.h M /issm/trunk-jpl/src/modules/TriMesh/TriMesh.cpp Removed 'whole' option of DomainOutlineRead (missleading) \\\\
+\noindent \textbf{Change \#18} with diff file ISSM-12098-12099.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/Exp2Kmlx/Exp2Kmlx.cpp M /issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp M /issm/trunk-jpl/src/c/shared/Exp/DomainOutlineRead.cpp M /issm/trunk-jpl/src/c/shared/Exp/DomainOutlineWrite.cpp M /issm/trunk-jpl/src/c/shared/Exp/exp.h M /issm/trunk-jpl/src/modules/TriMesh/TriMesh.cpp \\ Export determination: 6. \\Rationale: Removed 'whole' option of DomainOutlineRead (missleading)
+M /issm/trunk-jpl/src/dox/issm.dox updated code stats \\\\
+\noindent \textbf{Change \#19} with diff file ISSM-12099-12100.diff: \\ Function name: \\M /issm/trunk-jpl/src/dox/issm.dox \\ Export determination: 6. \\Rationale: updated code stats
+M /issm/trunk-jpl/test/NightlyRun/test448.m M /issm/trunk-jpl/test/NightlyRun/test450.m M /issm/trunk-jpl/test/NightlyRun/test452.m no more serial solution \\\\
Index: /issm/oecreview/Archive/12081-12100/r1.tex
===================================================================
--- /issm/oecreview/Archive/12081-12100/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12081
Index: /issm/oecreview/Archive/12081-12100/r2.tex
===================================================================
--- /issm/oecreview/Archive/12081-12100/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12081-12100/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12100
Index: /issm/oecreview/Archive/12101-12120/Date.tex
===================================================================
--- /issm/oecreview/Archive/12101-12120/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12101-12120/ISSM-12101-12102.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12101-12102.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12101-12102.diff	(revision 12325)
@@ -0,0 +1,1917 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py	(revision 12102)
+@@ -1,8 +1,9 @@
+ from model import *
+ from TriMesh import *
++from triangle import *
+ 
+-#md=model()
+-#md=triangle(md,'../Exp/Square.exp',150000);
++md=model()
++md=triangle(md,'../Exp/Square.exp',150000);
+ 
+-[index,x,y,segments,segmentmarkers]=TriMesh('../Exp/Square.exp',15000.0**2.0,True)
+-print(index,x,y,segments,segmentmarkers)
++#[index,x,y,segments,segmentmarkers]=TriMesh('../Exp/Square.exp',15000.0**2.0,True)
++#print(index,x,y,segments,segmentmarkers)
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12102)
+@@ -571,12 +571,7 @@
+ 	else
+ 		HAVE_METIS=no
+ 	fi
+-
+-	if test $HAVE_METIS = no; then
+-		AC_MSG_ERROR([--with-metis-dir  missing. Metis is needed to run ISSM]);
+-	else
+-		AC_MSG_RESULT($HAVE_METIS)
+-	fi
++	AM_CONDITIONAL([METIS], [test x$HAVE_METIS = xyes])
+ 	dnl }}}
+ 	dnl mpi{{{
+ 	AC_MSG_CHECKING(for mpi)
+@@ -602,6 +597,7 @@
+ 			AC_SUBST([MPILIB])
+ 		fi
+ 	fi
++	AM_CONDITIONAL([MPI], [test x$HAVE_MPI = xyes])
+ 	AC_MSG_RESULT($HAVE_MPI)
+ 	dnl }}}
+ 	dnl petsc{{{
+@@ -1227,6 +1223,15 @@
+ 	AC_MSG_ERROR([need python-version if python compile is required!]);
+ 	fi
+ 
++	dnl check that if we have MPI, we have metis
++	if test "$HAVE_METIS" = "yes"  && test "$HAVE_MPI" = "no" ; then
++	AC_MSG_ERROR([need mpi if using the metis partitioner!]);
++	fi
++
++
++
++
++
+ 	AC_MSG_RESULT(done)
+ 	dnl }}}
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx64.sh	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx64.sh	(revision 12102)
+@@ -18,8 +18,8 @@
+ 
+ 	#install numpy
+ 	cd numpy
+-	python3.2 setup.py build
+-	python3.2 setup.py install
++	python setup.py build
++	python setup.py install
+ 
+ 	
+ elif [[ $install == "2" ]];then 
+@@ -29,8 +29,8 @@
+ 
+ 	#install scipy
+ 	cd scipy
+-	python3.2 setup.py build
+-	python3.2 setup.py install
++	python setup.py build
++	python setup.py install
+ 
+ elif [[ $install == "3" ]];then 
+ 	rm -rf numpy scipy
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/nose/install-macosx64sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/nose/install-macosx64sh	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/nose/install-macosx64sh	(revision 12102)
+@@ -1,10 +1,27 @@
+ #/bin/bash
+-#Install Python3 nose module
++#Install Python nose module
+ 
+-rm -rf py3k
++pythonversion=2
++	
++rm -rf src 
+ 
+-svn checkout http://python-nose.googlecode.com/svn/branches/py3k
+-cd py3k
++if [[ $pythonversion == "3" ]];then
+ 
+-python3.2 ./setup.py build
+-python3.2 ./setup.py install
++	svn checkout http://python-nose.googlecode.com/svn/branches/py3k
++	mv py3k src
++
++	cd src
++	python ./setup.py build
++	python ./setup.py install
++fi
++
++if [[ $pythonversion == "2" ]];then
++
++	tar -zxvf  nose-1.1.2.tar.gz
++	mv nose-1.1.2 src
++	rm -rf nose-1.1.2
++
++	cd src
++	python ./setup.py build
++	python ./setup.py install
++fi
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solutions/issm.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solutions/issm.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solutions/issm.cpp	(revision 12102)
+@@ -41,14 +41,22 @@
+ 	ierr=PetscInitialize(&argc,&argv,(char*)0,"");  
+ 	if(ierr) _error_("Could not initialize Petsc");
+ 	#else
++	#ifdef _HAVE_MPI_
+ 	MPI_Init(&argc,&argv);
+ 	#endif
++	#endif
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Barrier(MPI_COMM_WORLD); start=MPI_Wtime();
++	#else
++	start=(double)clock();
++	#endif
+ 
+ 	/*Size and rank: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Comm_rank(MPI_COMM_WORLD,&my_rank);  
+ 	MPI_Comm_size(MPI_COMM_WORLD,&num_procs); 
++	#endif
+ 
+ 	/*First process inputs*/
+ 	_printf_(true,"\n");
+@@ -61,7 +69,11 @@
+ 	AnalysisConfiguration(&analyses,&numanalyses,solution_type);
+ 	
+ 	/*Create femmodel, using input file: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Barrier(MPI_COMM_WORLD); start_init=MPI_Wtime();
++	#else
++	start_init=(double)clock();
++	#endif
+ 	femmodel=new FemModel(binfilename,outbinfilename,solution_type,analyses,numanalyses);
+ 	
+ 	/*get type of solution we are going to run: */
+@@ -81,10 +93,19 @@
+ 	femmodel->parameters->FindParam(&dakota_analysis,QmuIsdakotaEnum);
+ 	femmodel->parameters->FindParam(&control_analysis,InversionIscontrolEnum);
+ 	femmodel->parameters->FindParam(&tao_analysis,InversionTaoEnum);
++	#ifdef _HAVE_MPI_
+ 	MPI_Barrier(MPI_COMM_WORLD); finish_init=MPI_Wtime();
++	#else
++	finish_init=(double)clock();
++	#endif
+ 
+ 	_printf_(true,"call computational core:\n");
++	#ifdef _HAVE_MPI_
+ 	MPI_Barrier(MPI_COMM_WORLD); start_core=MPI_Wtime( );
++	#else
++	start_core=(double)clock();
++	#endif
++	
+ 	if(dakota_analysis){
+ 		#ifdef _HAVE_DAKOTA_
+ 		Dakotax(femmodel);
+@@ -105,8 +126,12 @@
+ 	else{
+ 		solutioncore(femmodel);
+ 	}
++	#ifdef _HAVE_MPI_
+ 	MPI_Barrier(MPI_COMM_WORLD); finish_core=MPI_Wtime( );
+-
++	#else
++	finish_core=(double)clock();
++	#endif
++	
+ 	_printf_(true,"write results to disk:\n");
+ 	OutputResultsx(femmodel->elements, femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,femmodel->results);
+ 
+@@ -126,18 +151,29 @@
+ 	delete femmodel;
+ 
+ 	/*Get finish time and close*/
++	#ifdef _HAVE_MPI_
+ 	MPI_Barrier(MPI_COMM_WORLD); finish = MPI_Wtime( );
+ 	_printf_(true,"\n   %-34s %f seconds  \n","FemModel initialization elapsed time:",finish_init-start_init);
+ 	_printf_(true,"   %-34s %f seconds  \n","Core solution elapsed time:",finish_core-start_core);
+ 	_printf_(true,"\n   %s %i hrs %i min %i sec\n\n","Total elapsed time:",int((finish-start)/3600),int(int(finish-start)%3600/60),int(finish-start)%60);
++	#else
++	finish=(double)clock();
++	_printf_(true,"\n   %-34s %f seconds  \n","FemModel initialization elapsed time:",(finish_init-start_init)/CLOCKS_PER_SEC);
++	_printf_(true,"   %-34s %f seconds  \n","Core solution elapsed time:",(finish_core-start_core)/CLOCKS_PER_SEC);
++	_printf_(true,"\n   %s %i hrs %i min %i sec\n\n","Total elapsed time:",int((finish-start)/3600/CLOCKS_PER_SEC),int(int((finish-start)/CLOCKS_PER_SEC)%3600/60),(int(finish-start)/CLOCKS_PER_SEC)%60);
++	#endif
+ 	
++		
+ 	
++	#ifdef _HAVE_PETSC_
+ 	_printf_(true,"closing MPI and Petsc\n");
+-	#ifdef _HAVE_PETSC_
+ 	PetscFinalize(); 
+ 	#else
++	#ifdef _HAVE_MPI_
++	_printf_(true,"closing MPI and Petsc\n");
+ 	MPI_Finalize();
+ 	#endif
++	#endif
+ 	
+ 	/*end module: */
+ 	ISSMEND();
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp	(revision 12102)
+@@ -1,47 +0,0 @@
+-/* \file PetscVectorToDoubleVector.cpp
+- */
+-
+-#ifdef HAVE_CONFIG_H
+-	#include <config.h>
+-#else
+-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+-#endif
+-
+-/*Petsc includes: */
+-#include "petscmat.h"
+-#include "petscvec.h"
+-#include "petscksp.h"
+-
+-#include "mex.h"
+-#include "../../shared/shared.h"
+-#include <string>
+-
+-void PetscVectorToDoubleVector(double** pvector, int* prows, Vec petsc_vector){
+-
+-	int     i;
+-	int     rows;
+-	int    *idxm   = NULL;
+-	double *vector = NULL;
+-
+-	/*output: */
+-	mxArray* dataref=NULL;
+-
+-	/*Get size of vector: */
+-	if(petsc_vector){
+-		VecGetSize(petsc_vector,&rows);
+-		if(rows){
+-			idxm=(int*)xmalloc(rows*sizeof(int));
+-			vector=(double*)xmalloc(rows*sizeof(double));
+-			for(i=0;i<rows;i++)idxm[i]=i;
+-
+-			VecGetValues(petsc_vector,rows,idxm,vector);
+-		}
+-	}
+-	else{
+-		rows=0;
+-	}
+-
+-	/*Assign output pointers: */
+-	*pvector=vector;
+-	*prows=rows;
+-}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp	(revision 12102)
+@@ -1,53 +0,0 @@
+-/* \file PetscMatrixToDoubleMatrix.cpp
+- * \brief: convert a sparse or dense Petsc matrix into a matlab matrix
+- */
+-
+-
+-#ifdef HAVE_CONFIG_H
+-	#include <config.h>
+-#else
+-#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+-#endif
+-
+-
+-/*Petsc includes: */
+-#include "petscmat.h"
+-#include "petscvec.h"
+-#include "petscksp.h"
+-
+-/*Petsc includes: */
+-#include "mex.h"
+-
+-#include "../../shared/shared.h"
+-#include <string>
+-
+-
+-void PetscMatrixToDoubleMatrix(double** pmatrix, int* prows, int* pcols,Mat petsc_matrix){
+-
+-	int i,j,k;
+-
+-	/*output: */
+-	double* matrix=NULL;
+-	int     rows,cols;
+-
+-	/*intermediary: */
+-	int*    idxm=NULL;
+-	int*    idxn=NULL;
+-
+-	/*Some needed information: */
+-	MatGetSize(petsc_matrix,&rows,&cols);
+-
+-	idxm=(int*)xmalloc(rows*sizeof(int));
+-	idxn=(int*)xmalloc(cols*sizeof(int));
+-
+-	for(i=0;i<rows;i++)idxm[i]=i;
+-	for(i=0;i<cols;i++)idxn[i]=i;
+-
+-	matrix=(double*)xmalloc(rows*cols*sizeof(double));
+-	MatGetValues(petsc_matrix,rows,idxm,cols,idxn,matrix);
+-
+-	/*Assign output pointers: */
+-	*pmatrix=matrix;
+-	*prows=rows;
+-	*pcols=cols;
+-}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp	(revision 12102)
+@@ -230,7 +230,7 @@
+ 		PetscMatrixToDoubleMatrix(&matrix_ptr,&rows,&cols,matrix->matrix);
+ 		#else
+ 		matrix_ptr=matrix->matrix->ToSerial();
+-		matrix->matrix->GetSize(&rows,cols);
++		matrix->matrix->GetSize(&rows,&cols);
+ 		#endif
+ 
+ 		/*Now transpose the matrix and allocate with Matlab's memory manager: */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/matlabio.h	(revision 12102)
+@@ -71,15 +71,16 @@
+ int MatlabNArrayToNArray(double** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix);
+ int MatlabNArrayToNArray(bool** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix);
+ int MatlabNArrayToNArray(char** pmatrix,int* pmatrix_numel,int* pmatrix_ndims,int** pmatrix_size,const mxArray* mxmatrix);
+-int MatlabMatrixToPetscMatrix(Mat* matrix,int* prows,int* pcols, const mxArray* mxmatrix);
+ 
+-/*Matlab to Petsc routines: */
+-int MatlabVectorToPetscVector(Vec* pvector,int* pvector_rows,const mxArray* mxvector);
+-void PetscMatrixToDoubleMatrix(double** pmatrix, int* prows, int* pcols,Mat matrix);
+-void PetscVectorToDoubleVector(double** pvector, int* prows, Vec vector);
+-
+ /*Matlab to SeqMat routines: */
+ SeqMat* MatlabMatrixToSeqMat(const mxArray* dataref);
+ SeqVec* MatlabVectorToSeqVec(const mxArray* dataref);
+ 
++/*Matlab to Petsc routines: */
++#ifdef _HAVE_PETSC_
++int MatlabMatrixToPetscMatrix(Mat* matrix,int* prows,int* pcols, const mxArray* mxmatrix);
++int MatlabVectorToPetscVector(Vec* pvector,int* pvector_rows,const mxArray* mxvector);
++#endif
++
++
+ #endif	/* _IO_H_ */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Loads.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Loads.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Loads.cpp	(revision 12102)
+@@ -62,9 +62,14 @@
+ 	localloads=this->Size();
+ 
+ 	/*figure out total number of loads combining all the cpus (no clones here)*/
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce(&localloads,&numberofloads,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&numberofloads,1,MPI_INT,0,MPI_COMM_WORLD);
++	#else
++	numberofloads=localloads;
++	#endif
+ 
++
+ 	return numberofloads;
+ }
+ /*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Constraints.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Constraints.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Constraints.cpp	(revision 12102)
+@@ -47,8 +47,13 @@
+ 	localconstraints=this->Size();
+ 
+ 	/*figure out total number of constraints combining all the cpus (no clones here)*/
+-	MPI_Reduce(&localconstraints,&numberofconstraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+-	MPI_Bcast(&numberofconstraints,1,MPI_INT,0,MPI_COMM_WORLD);
++	#ifdef _HAVE_MPI_
++		MPI_Reduce(&localconstraints,&numberofconstraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
++		MPI_Bcast(&numberofconstraints,1,MPI_INT,0,MPI_COMM_WORLD);
++	#else
++		numberofconstraints=localconstraints;
++	#endif
++	
+ 
+ 	return numberofconstraints;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Nodes.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Nodes.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Nodes.cpp	(revision 12102)
+@@ -82,10 +82,14 @@
+ 	/* Now every object has distributed dofs, but locally, and with a dof count starting from 
+ 	 * 0. This means the dofs between all the cpus are not unique. We now offset the dofs of eache
+ 	 * cpus by the total last dofs of the previus cpu, starting from 0.
+-	 * First: bet number of dofs for each cpu*/
++	 * First: get number of dofs for each cpu*/
+ 	alldofcount=(int*)xmalloc(num_procs*sizeof(int));
++	#ifdef _HAVE_MPI_
+ 	MPI_Gather(&dofcount,1,MPI_INT,alldofcount,1,MPI_INT,0,MPI_COMM_WORLD);
+ 	MPI_Bcast(alldofcount,num_procs,MPI_INT,0,MPI_COMM_WORLD);
++	#else
++	alldofcount[0]=dofcount;
++	#endif
+ 
+ 	/* Every cpu should start its own dof count at the end of the dofcount from cpu-1*/
+ 	dofcount=0;
+@@ -118,7 +122,11 @@
+ 			node->ShowTrueDofs(truedofs,maxdofspernode,setenum);//give maxdofspernode, column size, so that nodes can index into truedofs
+ 		}
+ 	}
++	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( (void*)truedofs,(void*)alltruedofs,numnodes*maxdofspernode,MPI_INT,MPI_MAX,MPI_COMM_WORLD);
++	#else
++	alltruedofs[0]=truedofs[0];
++	#endif
+ 
+ 	/* Now every cpu knows the true dofs of everyone else that is not a clone*/
+ 	for (i=0;i<this->Size();i++){
+@@ -161,7 +169,11 @@
+ 	 * when we start building the dof list for all vertexs, a cpu can check whether its vertex already has been 
+ 	 * dealt with by another cpu. We take the minimum because we are going to manage dof assignment in increasing 
+ 	 * order of cpu rank. This is also why we initialized this array to num_procs.*/
++	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( (void*)ranks,(void*)minranks,numnodes,MPI_INT,MPI_MIN,MPI_COMM_WORLD);
++	#else
++	for(i=0;i<numnodes;i++)minranks[i]=ranks[i];
++	#endif
+ 
+ 	/*Now go through all objects, and use minranks to flag which objects are cloned: */
+ 	for(i=0;i<this->Size();i++){
+@@ -204,8 +216,9 @@
+ 	}
+ 
+ 	/*Grab max of all cpus: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( (void*)&max,(void*)&allmax,1,MPI_INT,MPI_MAX,MPI_COMM_WORLD);
+-	max=allmax;
++	#endif
+ 
+ 	return max;
+ }
+@@ -236,7 +249,11 @@
+ 	}
+ 
+ 	/*Gather from all cpus: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( (void*)&numdofs,(void*)&allnumdofs,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
++	#else
++	allnumdofs=numdofs;
++	#endif
+ 	return allnumdofs;
+ }
+ /*}}}*/
+@@ -259,7 +276,11 @@
+ 	}
+ 
+ 	/*Gather from all cpus: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( (void*)&numnodes,(void*)&allnumnodes,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
++	#else
++	allnumnodes=numnodes;
++	#endif
+ 
+ 	return allnumnodes;
+ }
+@@ -285,9 +306,11 @@
+ 		}
+ 	}
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&max_sid,&node_max_sid,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_max_sid,1,MPI_INT,0,MPI_COMM_WORLD);
+ 	max_sid=node_max_sid;
++	#endif
+ 
+ 	if(max_sid==1){
+ 		return 0;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Elements.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Elements.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Elements.cpp	(revision 12102)
+@@ -124,6 +124,7 @@
+ 	}
+ 
+ 	/*Synchronize across cluster, so as to not end up with different sizes for each patch on each cpu: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&numvertices,&max_numvertices,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&max_numvertices,1,MPI_INT,0,MPI_COMM_WORLD);
+ 	numvertices=max_numvertices;
+@@ -131,6 +132,7 @@
+ 	MPI_Reduce (&numnodes,&max_numnodes,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&max_numnodes,1,MPI_INT,0,MPI_COMM_WORLD);
+ 	numnodes=max_numnodes;
++	#endif
+ 
+ 	/*Ok, initialize Patch object: */
+ 	patch=new Patch(numrows,numvertices,numnodes);
+@@ -190,9 +192,13 @@
+ 		/*No patch here, we prepare vectors*/
+ 
+ 		/*Get rank of first cpu that has results*/
++		#ifdef _HAVE_MPI_
+ 		if(this->Size()) rank=my_rank;
+ 		else rank=num_procs;
+ 		MPI_Allreduce (&rank,&minrank,1,MPI_INT,MPI_MIN,MPI_COMM_WORLD);
++		#else
++		minrank=my_rank;
++		#endif
+ 
+ 		/*see what the first element of this partition has in stock (this is common to all partitions)*/
+ 		if(my_rank==minrank){
+@@ -200,10 +206,13 @@
+ 			Element* element=(Element*)this->GetObjectByOffset(0);
+ 			element->ListResultsInfo(&resultsenums,&resultssizes,&resultstimes,&resultssteps,&numberofresults);
+ 		}
++		#ifdef _HAVE_MPI_
+ 		MPI_Bcast(&numberofresults,1,MPI_DOUBLE,minrank,MPI_COMM_WORLD);
++		#endif
+ 
+ 		/*Get out if there is no results. Otherwise broadcast info*/
+ 		if(!numberofresults) return;
++		#ifdef _HAVE_MPI_
+ 		if(my_rank!=minrank){
+ 			resultsenums=(int*)xmalloc(numberofresults*sizeof(int));
+ 			resultssizes=(int*)xmalloc(numberofresults*sizeof(int));
+@@ -214,6 +223,7 @@
+ 		MPI_Bcast(resultssizes,numberofresults,MPI_INT,minrank,MPI_COMM_WORLD);
+ 		MPI_Bcast(resultstimes,numberofresults,MPI_DOUBLE,minrank,MPI_COMM_WORLD);
+ 		MPI_Bcast(resultssteps,numberofresults,MPI_INT,minrank,MPI_COMM_WORLD);
++		#endif
+ 
+ 		/*Loop over all results and get nodal vector*/
+ 		for(int i=0;i<numberofresults;i++){
+@@ -272,7 +282,11 @@
+ 	int numberofelements;
+ 
+ 	local_nelem=this->Size();
++	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( (void*)&local_nelem,(void*)&numberofelements,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
++	#else
++	numberofelements=local_nelem;
++	#endif
+ 
+ 	return numberofelements;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Vertices.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Vertices.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Vertices.cpp	(revision 12102)
+@@ -60,8 +60,12 @@
+ 	 * cpus by the total last dofs of the previus cpu, starting from 0.
+ 	 * First: bet number of dofs for each cpu*/
+ 	alldofcount=(int*)xmalloc(num_procs*sizeof(int));
++	#ifdef _HAVE_MPI_
+ 	MPI_Gather(&dofcount,1,MPI_INT,alldofcount,1,MPI_INT,0,MPI_COMM_WORLD);
+ 	MPI_Bcast(alldofcount,num_procs,MPI_INT,0,MPI_COMM_WORLD);
++	#else
++	alldofcount[0]=dofcount;
++	#endif
+ 
+ 	/* Every cpu should start its own dof count at the end of the dofcount from cpu-1*/
+ 	dofcount=0;
+@@ -84,7 +88,11 @@
+ 		Vertex* vertex=(Vertex*)this->GetObjectByOffset(i);
+ 		vertex->ShowTrueDofs(truedofs);
+ 	}
++	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce((void*)truedofs,(void*)alltruedofs,numberofobjects*numberofdofsperobject,MPI_INT,MPI_MAX,MPI_COMM_WORLD);
++	#else
++	for(i=0;i<numberofobjects*numberofdofsperobject;i++)alltruedofs[i]=truedofs[i];
++	#endif
+ 
+ 	/* Now every cpu knows the true dofs of everyone else that is not a clone*/
+ 	for (i=0;i<this->Size();i++){
+@@ -120,7 +128,11 @@
+ 	 * when we start building the dof list for all vertexs, a cpu can check whether its vertex already has been 
+ 	 * dealt with by another cpu. We take the minimum because we are going to manage dof assignment in increasing 
+ 	 * order of cpu rank. This is also why we initialized this array to num_procs.*/
++	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( (void*)ranks,(void*)minranks,numberofobjects,MPI_INT,MPI_MIN,MPI_COMM_WORLD);
++	#else
++	for(i=0;i<numberofobjects;i++)minranks[i]=ranks[i];
++	#endif
+ 
+ 	/*Now go through all objects, and use minranks to flag which objects are cloned: */
+ 	for(i=0;i<this->Size();i++){
+@@ -148,9 +160,11 @@
+ 		if (sid>max_sid)max_sid=sid;
+ 	}
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&max_sid,&vertex_max_sid,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&vertex_max_sid,1,MPI_INT,0,MPI_COMM_WORLD);
+ 	max_sid=vertex_max_sid;
++	#endif
+ 
+ 	/*sid starts at 0*/
+ 	max_sid++;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ThicknessAbsGradientx/ThicknessAbsGradientx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ThicknessAbsGradientx/ThicknessAbsGradientx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ThicknessAbsGradientx/ThicknessAbsGradientx.cpp	(revision 12102)
+@@ -26,9 +26,11 @@
+ 	}
+ 
+ 	/*Sum all J from all cpus of the cluster:*/
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
+ 	J=J_sum;
++	#endif
+ 
+ 	/*Assign output pointers: */
+ 	*pJ=J;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVzx/MinVzx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVzx/MinVzx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVzx/MinVzx.cpp	(revision 12102)
+@@ -31,9 +31,11 @@
+ 	}
+ 
+ 	/*Figure out minimum across the cluster: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&minvz,&node_minvz,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_minvz,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	minvz=node_minvz;
++	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pminvz=minvz;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVxx/MaxVxx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVxx/MaxVxx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVxx/MaxVxx.cpp	(revision 12102)
+@@ -31,9 +31,11 @@
+ 	}
+ 
+ 	/*Figure out minimum across the cluster: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&maxvx,&node_maxvx,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_maxvx,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	maxvx=node_maxvx;
++	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pmaxvx=maxvx;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp	(revision 12102)
+@@ -31,9 +31,11 @@
+ 	}
+ 
+ 	/*Figure out minimum across the cluster: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&min_dt,&node_min_dt,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_min_dt,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
+ 	min_dt=node_min_dt;
++	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pdt=min_dt;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp	(revision 12102)
+@@ -155,8 +155,12 @@
+ 		}
+ 		vec_nodes_on_floatingice->Assemble();
+ 		
++		#ifdef _HAVE_MPI_
+ 		MPI_Allreduce(&local_nflipped,&nflipped,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
+ 		_printf_(VerboseConvergence(),"   Additional number of vertices allowed to unground: %i\n",nflipped);
++		#else
++		nflipped=local_nflipped;
++		#endif
+ 
+ 		/*Avoid leaks: */
+ 		xfree((void**)&elements_neighboring_floatingce);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/IceVolumex/IceVolumex.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/IceVolumex/IceVolumex.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/IceVolumex/IceVolumex.cpp	(revision 12102)
+@@ -18,8 +18,12 @@
+ 		Element* element=(Element*)elements->GetObjectByOffset(i);
+ 		local_ice_volume+=element->IceVolume();
+ 	}
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce(&local_ice_volume,&total_ice_volume,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&total_ice_volume,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
++	#else
++	total_ice_volume=local_ice_volume;
++	#endif
+ 
+ 	/*Assign output pointers: */
+ 	*pV=total_ice_volume;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVxx/MaxAbsVxx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVxx/MaxAbsVxx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVxx/MaxAbsVxx.cpp	(revision 12102)
+@@ -31,9 +31,11 @@
+ 	}
+ 
+ 	/*Figure out maximum across the cluster: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&maxabsvx,&node_maxabsvx,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_maxabsvx,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	maxabsvx=node_maxabsvx;
++	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pmaxabsvx=maxabsvx;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVelx/MinVelx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVelx/MinVelx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVelx/MinVelx.cpp	(revision 12102)
+@@ -32,9 +32,11 @@
+ 	}
+ 
+ 	/*Figure out minimum across the cluster: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&minvel,&node_minvel,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_minvel,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	minvel=node_minvel;
++	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pminvel=minvel;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVelx/MaxVelx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVelx/MaxVelx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVelx/MaxVelx.cpp	(revision 12102)
+@@ -32,9 +32,11 @@
+ 	}
+ 
+ 	/*Figure out maximum across the cluster: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&maxvel,&node_maxvel,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_maxvel,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	maxvel=node_maxvel;
++	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pmaxvel=maxvel;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVyx/MaxVyx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVyx/MaxVyx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVyx/MaxVyx.cpp	(revision 12102)
+@@ -31,9 +31,11 @@
+ 	}
+ 
+ 	/*Figure out minimum across the cluster: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&maxvy,&node_maxvy,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_maxvy,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	maxvy=node_maxvy;
++	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pmaxvy=maxvy;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.cpp	(revision 12102)
+@@ -30,9 +30,11 @@
+ 	}
+ 
+ 	/*Sum all J from all cpus of the cluster:*/
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
+ 	J=J_sum;
++	#endif
+ 
+ 	/*Assign output pointers: */
+ 	*pJ=J;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp	(revision 12102)
+@@ -36,8 +36,10 @@
+ 	}
+ 
+ 	/*Broadcast whether we found the element: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( &found,&sumfound,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
+ 	if(!sumfound)_error_("%s%i%s","could not find material with id",index," to compute ElementResponse");
++	#endif
+ 
+ 	/*Ok, we found the element, compute responseocity: */
+ 	if(my_rank==cpu_found){
+@@ -45,8 +47,10 @@
+ 	}
+ 
+ 	/*Broadcast and plug into response: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( &cpu_found,&cpu_found,1,MPI_INT,MPI_MAX,MPI_COMM_WORLD);
+ 	MPI_Bcast(&response,1,MPI_DOUBLE,cpu_found,MPI_COMM_WORLD); 
++	#endif
+ 
+ 	*presponse=response;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.cpp	(revision 12102)
+@@ -27,9 +27,11 @@
+ 	}
+ 
+ 	/*Sum all J from all cpus of the cluster:*/
+-	MPI_Reduce (&S,&S_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD );
++	#ifdef _HAVE_MPI_
++ 	MPI_Reduce (&S,&S_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&S_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
+ 	S=S_sum;
++	#endif
+ 
+ 	/*add surface area to element inputs:*/
+ 	InputUpdateFromConstantx(elements,nodes,vertices,loads,materials,parameters,S,SurfaceAreaEnum);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp	(revision 12102)
+@@ -41,7 +41,9 @@
+ 
+ 		/*Partition using Metis:*/
+ 		if (num_procs>1){
++			#ifdef _HAVE_METIS_
+ 			METIS_PartMeshNodalPatch(&numberofelements,&numberofnodes, index, &etype, &numflag, &num_procs, &edgecut, epart, npart);
++			#endif
+ 		}
+ 		else if (num_procs==1){
+ 			/*METIS does not know how to deal with one cpu only!*/
+@@ -66,7 +68,9 @@
+ 
+ 		/*Partition using Metis:*/
+ 		if (num_procs>1){
++			#ifdef _HAVE_METIS_
+ 			METIS_PartMeshNodalPatch(&numberofelements2d,&numberofnodes2d, index2d, &etype2d, &numflag, &num_procs, &edgecut, epart2d, npart2d);
++			#endif
+ 		}
+ 		else if (num_procs==1){
+ 			/*METIS does not know how to deal with one cpu only!*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp	(revision 12102)
+@@ -35,12 +35,18 @@
+ 	}
+ 
+ 	/*Broadcast whether we found the element: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( &found,&sumfound,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
+ 	if(!sumfound)_error_("%s%i%s%s","could not find element with vertex with id",index," to compute nodal value ",EnumToStringx(natureofdataenum));
++	#endif
+ 
+ 	/*Broadcast and plug into response: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( &cpu_found,&cpu_found,1,MPI_INT,MPI_MAX,MPI_COMM_WORLD);
+ 	MPI_Bcast(&value,1,MPI_DOUBLE,cpu_found,MPI_COMM_WORLD); 
++	#else
++	value=cpu_found;
++	#endif
+ 
+ 	*pnodalvalue=value;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVyx/MaxAbsVyx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVyx/MaxAbsVyx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVyx/MaxAbsVyx.cpp	(revision 12102)
+@@ -32,9 +32,11 @@
+ 	}
+ 
+ 	/*Figure out maximum across the cluster: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&maxabsvy,&node_maxabsvy,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_maxabsvy,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	maxabsvy=node_maxabsvy;
++	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pmaxabsvy=maxabsvy;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ThicknessAbsMisfitx/ThicknessAbsMisfitx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ThicknessAbsMisfitx/ThicknessAbsMisfitx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ThicknessAbsMisfitx/ThicknessAbsMisfitx.cpp	(revision 12102)
+@@ -26,9 +26,11 @@
+ 	}
+ 
+ 	/*Sum all J from all cpus of the cluster:*/
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
+ 	J=J_sum;
++	#endif
+ 
+ 	/*Assign output pointers: */
+ 	*pJ=J;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVxx/MinVxx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVxx/MinVxx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVxx/MinVxx.cpp	(revision 12102)
+@@ -31,9 +31,11 @@
+ 	}
+ 
+ 	/*Figure out minimum across the cluster: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&minvx,&node_minvx,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_minvx,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	minvx=node_minvx;
++	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pminvx=minvx;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceLogVxVyMisfitx/SurfaceLogVxVyMisfitx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceLogVxVyMisfitx/SurfaceLogVxVyMisfitx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceLogVxVyMisfitx/SurfaceLogVxVyMisfitx.cpp	(revision 12102)
+@@ -26,9 +26,11 @@
+ 	}
+ 
+ 	/*Sum all J from all cpus of the cluster:*/
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
+ 	J=J_sum;
++	#endif
+ 
+ 	/*Assign output pointers: */
+ 	*pJ=J;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVzx/MaxVzx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVzx/MaxVzx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxVzx/MaxVzx.cpp	(revision 12102)
+@@ -32,9 +32,11 @@
+ 	}
+ 
+ 	/*Figure out minimum across the cluster: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&maxvz,&node_maxvz,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_maxvz,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	maxvz=node_maxvz;
++	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pmaxvz=maxvz;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalConstraintsState.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalConstraintsState.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalConstraintsState.cpp	(revision 12102)
+@@ -35,9 +35,11 @@
+ 		}
+ 	}
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	num_unstable_constraints=sum_num_unstable_constraints;
++	#endif
+ 
+ 	/*Have we converged? : */
+ 	if (num_unstable_constraints==0) converged=1;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalIsPresent.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalIsPresent.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalIsPresent.cpp	(revision 12102)
+@@ -27,9 +27,11 @@
+ 		}
+ 	}
+ 	
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	found=mpi_found;
++	#endif
+ 
+ 	return found;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp	(revision 12102)
+@@ -31,9 +31,11 @@
+ 		}
+ 	}
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	found=mpi_found;
++	#endif
+ 
+ 	return found;
+ }
+@@ -92,9 +94,11 @@
+ 		}
+ 	}
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	num_unstable_constraints=sum_num_unstable_constraints;
++	#endif
+ 	
+ 	/*Assign output pointers: */
+ 	*pnum_unstable_constraints=num_unstable_constraints;
+@@ -130,9 +134,11 @@
+ 	}
+ 	
+ 	/*Is there just one found? that would mean we have frozen! : */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	found=mpi_found;
++	#endif
+ 
+ 	return found;
+ }
+@@ -188,9 +194,11 @@
+ 		}
+ 	}
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	found=mpi_found;
++	#endif
+ 
+ 	return found;
+ }
+@@ -219,9 +227,11 @@
+ 		}
+ 	}
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&found,&mpi_found,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&mpi_found,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	found=mpi_found;
++	#endif
+ 
+ 	if (found){
+ 		/*We found an unstable constraint. : */
+@@ -278,9 +288,11 @@
+ 		}
+ 	}
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	num_unstable_constraints=sum_num_unstable_constraints;
++	#endif
+ 	
+ 	/*Assign output pointers: */
+ 	*pnum_unstable_constraints=num_unstable_constraints;
+@@ -316,9 +328,11 @@
+ 		}
+ 	}
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&max_penetration,&mpi_max_penetration,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&mpi_max_penetration,1,MPI_DOUBLE,0,MPI_COMM_WORLD);                
+ 	max_penetration=mpi_max_penetration;
++	#endif
+ 
+ 	/*feed max_penetration to inputs: */
+ 	for(i=0;i<loads->Size();i++){
+@@ -353,9 +367,11 @@
+ 		}
+ 	}
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&num_unstable_constraints,&sum_num_unstable_constraints,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&sum_num_unstable_constraints,1,MPI_INT,0,MPI_COMM_WORLD);                
+ 	num_unstable_constraints=sum_num_unstable_constraints;
++	#endif
+ 
+ 	return num_unstable_constraints;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceLogVelMisfitx/SurfaceLogVelMisfitx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceLogVelMisfitx/SurfaceLogVelMisfitx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceLogVelMisfitx/SurfaceLogVelMisfitx.cpp	(revision 12102)
+@@ -26,9 +26,11 @@
+ 	}
+ 
+ 	/*Sum all J from all cpus of the cluster:*/
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
+ 	J=J_sum;
++	#endif
+ 
+ 	/*Assign output pointers: */
+ 	*pJ=J;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp	(revision 12102)
+@@ -29,8 +29,10 @@
+ 	}
+ 
+ 	/*In parallel, we need to gather the converged status: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( (void*)&num_notconverged,(void*)&total_notconverged,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
+ 	num_notconverged=total_notconverged;
++	#endif
+ 	_printf_(VerboseConvergence(),"      #elements above convergence criterion = %i\n",num_notconverged);
+ 
+ 	/*Free ressources:*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceRelVelMisfitx/SurfaceRelVelMisfitx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceRelVelMisfitx/SurfaceRelVelMisfitx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceRelVelMisfitx/SurfaceRelVelMisfitx.cpp	(revision 12102)
+@@ -26,9 +26,11 @@
+ 	}
+ 
+ 	/*Sum all J from all cpus of the cluster:*/
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
+ 	J=J_sum;
++	#endif
+ 
+ 	/*Assign output pointers: */
+ 	*pJ=J;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12102)
+@@ -92,22 +92,26 @@
+ 	}
+ 
+ 	/*Ok, broadcast to other cpus: */
++ 	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&numanalyses,1,MPI_INT,0,MPI_COMM_WORLD);
+ 	if(my_rank!=0){
+ 		analyses=(double*)xmalloc(numanalyses*sizeof(double));
+ 		strings=(char**)xmalloc(numanalyses*sizeof(char*));
+ 	}
+ 	MPI_Bcast(analyses,numanalyses,MPI_DOUBLE,0,MPI_COMM_WORLD);
++	#endif
+ 	for(i=0;i<numanalyses;i++){
+ 		char* string=strings[i];
+ 		if(my_rank==0){
+ 			if(string==NULL) _error_("PETSc options for analysis %s have been declared but were not found",EnumToStringx((int)analyses[i]));
+ 		}
+ 		if(my_rank==0)stringlength=(strlen(string)+1)*sizeof(char);
++		#ifdef _HAVE_MPI_
+ 		MPI_Bcast(&stringlength,1,MPI_INT,0,MPI_COMM_WORLD);
+ 		if(my_rank!=0)string=(char*)xmalloc(stringlength);
+ 		MPI_Bcast(string,stringlength,MPI_CHAR,0,MPI_COMM_WORLD);
+ 		if(my_rank!=0)strings[i]=string;
++		#endif
+ 	}
+ 
+ 	/*Ok, out of strings and analyses and numanalyses, create parameters, and plug them into parameters container: */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVzx/MaxAbsVzx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVzx/MaxAbsVzx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MaxAbsVzx/MaxAbsVzx.cpp	(revision 12102)
+@@ -31,9 +31,11 @@
+ 	}
+ 
+ 	/*Figure out minimum across the cluster: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&maxabsvz,&node_maxabsvz,1,MPI_DOUBLE,MPI_MAX,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_maxabsvz,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	maxabsvz=node_maxabsvz;
++	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pmaxabsvz=maxabsvz;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceAbsVelMisfitx/SurfaceAbsVelMisfitx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceAbsVelMisfitx/SurfaceAbsVelMisfitx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/SurfaceAbsVelMisfitx/SurfaceAbsVelMisfitx.cpp	(revision 12102)
+@@ -26,9 +26,11 @@
+ 	}
+ 
+ 	/*Sum all J from all cpus of the cluster:*/
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
+ 	J=J_sum;
++	#endif
+ 
+ 	/*Assign output pointers: */
+ 	*pJ=J;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MassFluxx/MassFluxx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MassFluxx/MassFluxx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MassFluxx/MassFluxx.cpp	(revision 12102)
+@@ -58,8 +58,10 @@
+ 		}
+ 	}
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( (void*)&mass_flux,(void*)&all_mass_flux,1,MPI_DOUBLE,MPI_SUM,MPI_COMM_WORLD);
+ 	mass_flux=all_mass_flux;
++	#endif
+ 
+ 	/*Free ressources:*/
+ 	for(j=0;j<M;j++){
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVyx/MinVyx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVyx/MinVyx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MinVyx/MinVyx.cpp	(revision 12102)
+@@ -31,9 +31,11 @@
+ 	}
+ 
+ 	/*Figure out minimum across the cluster: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&minvy,&node_minvy,1,MPI_DOUBLE,MPI_MIN,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&node_minvy,1,MPI_DOUBLE,0,MPI_COMM_WORLD);   
+ 	minvy=node_minvy;
++	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pminvy=minvy;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.cpp	(revision 12102)
+@@ -26,9 +26,11 @@
+ 	}
+ 
+ 	/*Sum all J from all cpus of the cluster:*/
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
+ 	J=J_sum;
++	#endif
+ 
+ 	/*Assign output pointers: */
+ 	*pJ=J;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.cpp	(revision 12102)
+@@ -26,9 +26,11 @@
+ 	}
+ 
+ 	/*Sum all J from all cpus of the cluster:*/
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce (&J,&J_sum,1,MPI_DOUBLE,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&J_sum,1,MPI_DOUBLE,0,MPI_COMM_WORLD);
+ 	J=J_sum;
++	#endif
+ 
+ 	/*Assign output pointers: */
+ 	*pJ=J;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/petsc/patches/PetscVectorToDoubleVector.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/petsc/patches/PetscVectorToDoubleVector.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/petsc/patches/PetscVectorToDoubleVector.cpp	(revision 12102)
+@@ -7,14 +7,14 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
++#include <string>
++
+ /*Petsc includes: */
+ #include "petscmat.h"
+ #include "petscvec.h"
+ #include "petscksp.h"
+ 
+-#include "mex.h"
+-#include "../../shared/shared.h"
+-#include <string>
++#include "../../../shared/shared.h"
+ 
+ void PetscVectorToDoubleVector(double** pvector, int* prows, Vec petsc_vector){
+ 
+@@ -23,9 +23,6 @@
+ 	int    *idxm   = NULL;
+ 	double *vector = NULL;
+ 
+-	/*output: */
+-	mxArray* dataref=NULL;
+-
+ 	/*Get size of vector: */
+ 	if(petsc_vector){
+ 		VecGetSize(petsc_vector,&rows);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/petsc/patches/PetscMatrixToDoubleMatrix.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/petsc/patches/PetscMatrixToDoubleMatrix.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/petsc/patches/PetscMatrixToDoubleMatrix.cpp	(revision 12102)
+@@ -9,6 +9,7 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
++#include <string>
+ 
+ /*Petsc includes: */
+ #include "petscmat.h"
+@@ -16,12 +17,9 @@
+ #include "petscksp.h"
+ 
+ /*Petsc includes: */
+-#include "mex.h"
++#include "../../../shared/shared.h"
+ 
+-#include "../../shared/shared.h"
+-#include <string>
+ 
+-
+ void PetscMatrixToDoubleMatrix(double** pmatrix, int* prows, int* pcols,Mat petsc_matrix){
+ 
+ 	int i,j,k;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/toolkits.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/toolkits.h	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/toolkits.h	(revision 12102)
+@@ -19,8 +19,14 @@
+ #include "./petsc/petscincludes.h"
+ #endif
+ 
++#ifdef _HAVE_MPI_
+ #include "./mpi/mpiincludes.h"
++#endif
++
++#ifdef _HAVE_METIS_
+ #include "./metis/metisincludes.h"
++#endif
++
+ #include "./triangle/triangleincludes.h"
+ #include "./toolkitsenums.h"
+ #include "./issm/issmtoolkit.h"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12102)
+@@ -205,20 +205,12 @@
+ 					./shared/Wrapper/wrappershared.h\
+ 					./shared/Wrapper/ModuleBoot.cpp\
+ 					./shared/Wrapper/ModuleEnd.cpp\
+-					./toolkits/mpi/mpiincludes.h\
+-					./toolkits/mpi/patches/mpipatches.h\
+-					./toolkits/mpi/patches/DetermineLocalSize.cpp\
+-					./toolkits/mpi/patches/MPI_Upperrow.cpp\
+-					./toolkits/mpi/patches/MPI_Lowerrow.cpp\
+-					./toolkits/mpi/patches/MPI_Boundariesfromrange.cpp\
+ 					./toolkits/metis/metisincludes.h\
+ 					./toolkits/issm/issmtoolkit.h\
+ 					./toolkits/issm/SeqVec.h\
+ 					./toolkits/issm/SeqVec.cpp\
+ 					./toolkits/issm/SeqMat.h\
+ 					./toolkits/issm/SeqMat.cpp\
+-					./toolkits/metis/patches/metispatches.h\
+-					./toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp\
+ 					./toolkits/triangle/triangleincludes.h\
+ 					./toolkitsenums.h\
+ 					./toolkits.h\
+@@ -699,6 +691,8 @@
+ 					./toolkits/petsc/patches/NewMat.cpp\
+ 					./toolkits/petsc/patches/SerialToVec.cpp\
+ 					./toolkits/petsc/patches/VecFree.cpp\
++					./toolkits/petsc/patches/PetscMatrixToDoubleMatrix.cpp\
++					./toolkits/petsc/patches/PetscVectorToDoubleVector.cpp\
+ 					./toolkits/petsc/patches/VecDuplicatePatch.cpp\
+ 					./toolkits/petsc/patches/KSPFree.cpp\
+ 					./toolkits/petsc/patches/ISFree.cpp\
+@@ -721,6 +715,18 @@
+ gsl_sources= ./modules/Solverx/SolverxGsl.cpp
+ 
+ #}}}
++#Mpi sources  {{{1
++mpi_sources= ./toolkits/mpi/mpiincludes.h\
++				./toolkits/mpi/patches/mpipatches.h\
++				./toolkits/mpi/patches/DetermineLocalSize.cpp\
++				./toolkits/mpi/patches/MPI_Upperrow.cpp\
++				./toolkits/mpi/patches/MPI_Lowerrow.cpp\
++				./toolkits/mpi/patches/MPI_Boundariesfromrange.cpp
++#}}}
++#Metis sources  {{{1
++metis_sources= ./toolkits/metis/patches/metispatches.h\
++					./toolkits/metis/patches/METIS_PartMeshNodalPatch.cpp
++#}}}
+ #Python sources  {{{1
+ python_sources=     ./python/io/pythonio.h\
+ 					./python/python-binding.h\
+@@ -743,13 +749,14 @@
+ 				    ./matlab/io/MatlabVectorToVector.cpp\
+ 					 ./matlab/io/MatlabVectorToDoubleVector.cpp\
+ 					 ./matlab/io/MatlabMatrixToDoubleMatrix.cpp\
+-					 ./matlab/io/MatlabMatrixToPetscMatrix.cpp\
+-					 ./matlab/io/MatlabVectorToPetscVector.cpp\
+-					 ./matlab/io/PetscMatrixToDoubleMatrix.cpp\
+-					 ./matlab/io/PetscVectorToDoubleVector.cpp\
+ 					 ./matlab/io/MatlabMatrixToSeqMat.cpp\
+ 					 ./matlab/io/MatlabVectorToSeqVec.cpp
+ #}}}
++#Matlab and Petsc sources  {{{1
++matlabpetsc_sources= ./matlab/io/MatlabMatrixToPetscMatrix.cpp\
++					 ./matlab/io/MatlabVectorToPetscVector.cpp
++	
++#}}}
+ #Modules sources{{{1
+ module_sources= ./objects/Options/Option.cpp\
+ 			./objects/Options/Option.h\
+@@ -910,6 +917,22 @@
+ if THREED
+ issm_sources +=  $(threed_sources)
+ endif
++
++if MPI
++issm_sources +=  $(mpi_sources)
++endif
++
++if METIS
++issm_sources +=  $(metis_sources)
++endif
++
++if PETSC
++if MATLAB
++issm_sources +=  $(matlabpetsc_sources)
++endif
++endif
++
++
+ #}}}
+ #Library flags and sources {{{1
+ ALLCXXFLAGS= -fPIC -D_GNU_SOURCE -fno-omit-frame-pointer -pthread -D_CPP_  $(CXXFLAGS) $(CXXOPTFLAGS) 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Metric.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Metric.h	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Metric.h	(revision 12102)
+@@ -4,6 +4,7 @@
+ #include "./include.h"
+ #include "../../shared/Bamg/shared.h"
+ #include "R2.h"
++#include <math.h>
+ 
+ namespace bamg {
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Patch.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Patch.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Patch.cpp	(revision 12102)
+@@ -119,11 +119,17 @@
+ 	int         total_numrows;
+ 	int         node_numrows;
+ 	double     *total_values  = NULL;
++	#ifdef _HAVE_MPI_
+ 	MPI_Status  status;
++	#endif
+ 
+ 	/*First, figure out total number of rows combining all the cpus: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Reduce(&this->numrows,&total_numrows,1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD );
+ 	MPI_Bcast(&total_numrows,1,MPI_INT,0,MPI_COMM_WORLD);
++	#else
++	total_numrows=this->numrows;
++	#endif
+ 
+ 	/*return if patch empty*/
+ 	if(total_numrows==0) return;
+@@ -139,6 +145,7 @@
+ 	}
+ 
+ 	/*Now, ask other nodes to send their values: */
++	#ifdef _HAVE_MPI_
+ 	for (i=1;i<num_procs;i++){
+ 		if (my_rank==i){ 
+ 			MPI_Send(&this->numrows,1,MPI_INT,0,1,MPI_COMM_WORLD);   
+@@ -150,6 +157,7 @@
+ 			count+=node_numrows*this->numcols;
+ 		}
+ 	}	
++	#endif
+ 
+ 	/*Now, node 0 has total_values, of size total_numrows*this->numcols. Update the fields in the patch, to reflect this new 
+ 	 * reality. For other cpus, no point in keeping their data anymore: */
+@@ -158,8 +166,10 @@
+ 		xfree((void**)&this->values);
+ 		this->values=total_values;
+ 	}
++	#ifdef _HAVE_MPI_
+ 	else{
+ 		this->numrows=0;
+ 		xfree((void**)&this->values);
+ 	}
++	#endif
+ }/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.cpp	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.cpp	(revision 12102)
+@@ -197,7 +197,9 @@
+ 
+ 				/*Ok, we have reached the end of the file. break: */
+ 				record_code=0; //0 means bailout
++				#ifdef _HAVE_MPI_
+ 				MPI_Bcast(&record_code,1,MPI_INT,0,MPI_COMM_WORLD);  /*tell others cpus we are bailing: */
++				#endif
+ 				break;
+ 			}
+ 			else{
+@@ -206,19 +208,22 @@
+ 				fread(&record_length,sizeof(int),1,this->fid);
+ 				fread(&record_code,sizeof(int),1,this->fid);
+ 					
++				#ifdef _HAVE_MPI_
+ 				/*Tell other cpus what we are doing: */
+ 				MPI_Bcast(&record_code,1,MPI_INT,0,MPI_COMM_WORLD);  /*tell other cpus what we are going to do: */
+ 
+ 				/*Tell other cpus the name of the data, then branch according to the data type: */
+ 				MPI_Bcast(&record_enum,1,MPI_INT,0,MPI_COMM_WORLD);  
+ 				MPI_Bcast(&record_length,1,MPI_INT,0,MPI_COMM_WORLD);  
++				#endif
+ 				
+-
+ 				switch(record_code){
+ 					case 1: 
+ 						/*Read the boolean and broadcast it to other cpus:*/
+ 						if(fread(&booleanint,sizeof(int),1,this->fid)!=1) _error_(" could not read boolean ");
++						#ifdef _HAVE_MPI_
+ 						MPI_Bcast(&booleanint,1,MPI_INT,0,MPI_COMM_WORLD); 
++						#endif
+ 
+ 						/*create BoolParam: */
+ 						this->constants->AddObject(new BoolParam(record_enum,(bool)booleanint)); //cast to boolean
+@@ -227,7 +232,9 @@
+ 					case 2:
+ 						/*Read the integer and broadcast it to other cpus:*/
+ 						if(fread(&integer,sizeof(int),1,this->fid)!=1) _error_(" could not read integer ");
++						#ifdef _HAVE_MPI_
+ 						MPI_Bcast(&integer,1,MPI_INT,0,MPI_COMM_WORLD); 
++						#endif
+ 
+ 						/*create IntParam: */
+ 						this->constants->AddObject(new IntParam(record_enum,integer));
+@@ -236,7 +243,9 @@
+ 					case 3:
+ 						/*Read the scalar and broadcast it to other cpus:*/
+ 						if(fread(&scalar,sizeof(double),1,this->fid)!=1) _error_(" could not read scalar ");
++						#ifdef _HAVE_MPI_
+ 						MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
++						#endif
+ 
+ 						/*create DoubleParam: */
+ 						this->constants->AddObject(new DoubleParam(record_enum,scalar));
+@@ -245,7 +254,9 @@
+ 					case 4: 
+ 						/*We have to read a string from disk. First read the dimensions of the string, then the string: */
+ 						if(fread(&string_size,sizeof(int),1,this->fid)!=1) _error_(" could not read length of string ");
++						#ifdef _HAVE_MPI_
+ 						MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
++						#endif
+ 
+ 						if(string_size){
+ 							string=(char*)xmalloc((string_size+1)*sizeof(char));
+@@ -253,7 +264,9 @@
+ 
+ 							/*Read string, then broadcast: */
+ 							if(fread(string,string_size*sizeof(char),1,this->fid)!=1)_error_("  could not read string ");
++							#ifdef _HAVE_MPI_
+ 							MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
++							#endif
+ 						}
+ 						else{
+ 							string=(char*)xmalloc(sizeof(char));
+@@ -307,6 +320,7 @@
+ 			}
+ 		}
+ 	} //}}}
++	#ifdef _HAVE_MPI_
+ 	else{ //cpu ~0 {{{2
+ 		for(;;){ //wait on cpu 0
+ 			MPI_Bcast(&record_code,1,MPI_INT,0,MPI_COMM_WORLD);  /*get from cpu 0 what we are going to do: */
+@@ -376,6 +390,7 @@
+ 			}
+ 		}
+ 	} //}}}
++	#endif
+ }
+ /*}}}*/
+ /*FUNCTION IoModel::FetchData(bool*     pbool,int data_enum){{{1*/
+@@ -398,7 +413,9 @@
+ 	if(my_rank==0){  
+ 		if(fread(&booleanint,sizeof(int),1,fid)!=1) _error_(" could not read boolean ");
+ 	}
++	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&booleanint,1,MPI_INT,0,MPI_COMM_WORLD); 
++	#endif
+ 
+ 	/*cast to bool: */
+ 	/*Assign output pointers: */
+@@ -427,7 +444,9 @@
+ 		if(fread(&integer,sizeof(int),1,fid)!=1) _error_(" could not read integer ");
+ 	}
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&integer,1,MPI_INT,0,MPI_COMM_WORLD); 
++	#endif
+ 
+ 	/*Assign output pointers: */
+ 	*pinteger=integer;
+@@ -455,7 +474,9 @@
+ 	if(my_rank==0){
+ 		if(fread(&scalar,sizeof(double),1,fid)!=1)_error_(" could not read scalar ");
+ 	}
++	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&scalar,1,MPI_DOUBLE,0,MPI_COMM_WORLD); 
++	#endif
+ 
+ 	/*Assign output pointers: */
+ 	*pscalar=scalar;
+@@ -486,7 +507,9 @@
+ 		if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string ");
+ 	}
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
++	#endif
+ 
+ 	/*Now allocate string: */
+ 	if(string_size){
+@@ -497,7 +520,9 @@
+ 		if(my_rank==0){  
+ 			if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_("  could not read string ");
+ 		}
++		#ifdef _HAVE_MPI_
+ 		MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
++		#endif
+ 	}
+ 	else{
+ 		string=(char*)xmalloc(sizeof(char));
+@@ -537,12 +562,16 @@
+ 		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
+ 	}
+ 
++	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
++	#endif
+ 
+ 	if(my_rank==0){  
+ 		if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
+ 	}
+-	MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 
++	#ifdef _HAVE_MPI_
++	MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD);
++	#endif
+ 
+ 	/*Now allocate matrix: */
+ 	if(M*N){
+@@ -553,7 +582,9 @@
+ 			if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
+ 		}
+ 		
++		#ifdef _HAVE_MPI_
+ 		MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
++		#endif
+ 	}
+ 
+ 	/*Now cast to integer: */
+@@ -601,12 +632,16 @@
+ 	if(my_rank==0){  
+ 		if(fread(&M,sizeof(int),1,fid)!=1) _error_("could not read number of rows for matrix ");
+ 	}
++	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
++	#endif
+ 
+ 	if(my_rank==0){  
+ 		if(fread(&N,sizeof(int),1,fid)!=1) _error_("could not read number of columns for matrix ");
+ 	}
++	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 
++	#endif
+ 
+ 	/*Now allocate matrix: */
+ 	if(M*N){
+@@ -616,7 +651,9 @@
+ 		if(my_rank==0){  
+ 			if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
+ 		}
++		#ifdef _HAVE_MPI_
+ 		MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
++		#endif
+ 	}
+ 
+ 	/*Assign output pointers: */
+@@ -651,7 +688,9 @@
+ 	if(my_rank==0){  
+ 		if(fread(&numstrings,sizeof(int),1,fid)!=1) _error_(" could not read length of string array");
+ 	}
++	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&numstrings,1,MPI_INT,0,MPI_COMM_WORLD); 
++	#endif
+ 
+ 	/*Now allocate string array: */
+ 	if(numstrings){
+@@ -664,7 +703,9 @@
+ 			if(my_rank==0){  
+ 				if(fread(&string_size,sizeof(int),1,fid)!=1) _error_(" could not read length of string ");
+ 			}
++			#ifdef _HAVE_MPI_
+ 			MPI_Bcast(&string_size,1,MPI_INT,0,MPI_COMM_WORLD); 
++			#endif
+ 			if(string_size){
+ 				string=(char*)xmalloc((string_size+1)*sizeof(char));
+ 				string[string_size]='\0';
+@@ -673,7 +714,9 @@
+ 				if(my_rank==0){  
+ 					if(fread(string,string_size*sizeof(char),1,fid)!=1)_error_("  could not read string ");
+ 				}
++				#ifdef _HAVE_MPI_
+ 				MPI_Bcast(string,string_size,MPI_CHAR,0,MPI_COMM_WORLD); 
++				#endif
+ 			}
+ 			else{
+ 				string=(char*)xmalloc(sizeof(char));
+@@ -716,7 +759,9 @@
+ 	if(my_rank==0){  
+ 		if(fread(&numrecords,sizeof(int),1,fid)!=1) _error_("could not read number of records in matrix array ");
+ 	}
++	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&numrecords,1,MPI_INT,0,MPI_COMM_WORLD); 
++	#endif
+ 
+ 	if(numrecords){
+ 
+@@ -737,12 +782,16 @@
+ 			if(my_rank==0){  
+ 				if(fread(&M,sizeof(int),1,fid)!=1) _error_("%s%i%s","could not read number of rows in ",i,"th matrix of matrix array");
+ 			}
++			#ifdef _HAVE_MPI_
+ 			MPI_Bcast(&M,1,MPI_INT,0,MPI_COMM_WORLD); 
++			#endif
+ 
+ 			if(my_rank==0){  
+ 				if(fread(&N,sizeof(int),1,fid)!=1) _error_("%s%i%s","could not read number of columns in ",i,"th matrix of matrix array");
+ 			}
++			#ifdef _HAVE_MPI_
+ 			MPI_Bcast(&N,1,MPI_INT,0,MPI_COMM_WORLD); 
++			#endif
+ 
+ 			/*Now allocate matrix: */
+ 			if(M*N){
+@@ -753,7 +802,9 @@
+ 					if(fread(matrix,M*N*sizeof(double),1,fid)!=1) _error_("could not read matrix ");
+ 				}
+ 
++				#ifdef _HAVE_MPI_
+ 				MPI_Bcast(matrix,M*N,MPI_DOUBLE,0,MPI_COMM_WORLD); 
++				#endif
+ 			}
+ 
+ 			/*Assign: */
+@@ -1046,13 +1097,17 @@
+ 			}
+ 		}
+ 	}
++	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&found,1,MPI_INT,0,MPI_COMM_WORLD); 
+ 	if(!found)_error_("%s %s ","could not find data with name",EnumToStringx(data_enum));
++	#endif
+ 
+ 	/*Broadcast code and vector type: */
++	#ifdef _HAVE_MPI_
+ 	MPI_Bcast(&record_code,1,MPI_INT,0,MPI_COMM_WORLD); 
+ 	MPI_Bcast(&vector_type,1,MPI_INT,0,MPI_COMM_WORLD); 
+ 	if(record_code==5) MPI_Bcast(&vector_type,1,MPI_INT,0,MPI_COMM_WORLD); 
++	#endif
+ 
+ 	/*Assign output pointers:*/
+ 	*pcode=record_code;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/Makefile.am	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/Makefile.am	(revision 12102)
+@@ -1,2 +1,2 @@
+-EXTRA_DIST =  perl  pro py
+-SUBDIRS = c modules m 
++EXTRA_DIST =  perl  pro 
++SUBDIRS = c modules m  py
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.py	(revision 12102)
+@@ -0,0 +1,55 @@
++from TriMesh import *
++from numpy import *
++
++def triangle(md, domainname, resolution,riftname=''):
++	#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, resolution, riftname)
++	#
++	#   Examples:
++	#      md=triangle(md,'DomainOutline.exp',1000);
++	#      md=triangle(md,'DomainOutline.exp',1000,'Rifts.exp');
++
++
++	#Figure out a characteristic area. Resolution is a node oriented concept (ex a 1000m  resolution node would 
++	#be made of 1000*1000 area squares). 
++
++	#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)')
++		if choice != 'y':
++			print 'no meshing done ... exiting'
++			return []
++		
++	area = resolution**2.
++
++	#Mesh using TriMesh
++	[md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMesh(domainname,riftname,area)
++
++	#Fill in rest of fields:
++	md.mesh.numberofelements = size(md.mesh.elements)
++	md.mesh.numberofvertices = size(md.mesh.x)
++	md.mesh.z = zeros(md.mesh.numberofvertices)
++	md.mesh.vertexonboundary = zeros(md.mesh.numberofvertices)
++	md.mesh.vertexonboundary[md.mesh.segments[:,0:2].astype(int)] = 1.
++	md.mesh.vertexonbed = ones(md.mesh.numberofvertices)
++	md.mesh.vertexonsurface = ones(md.mesh.numberofvertices)
++	md.mesh.elementonbed = ones(md.mesh.numberofelements)
++	md.mesh.elementonsurface = ones(md.mesh.numberofelements)
++
++	#Now, build the connectivity tables for this mesh.
++	print "Node: NodeConnectivity not implemented yet!"
++	#md.mesh.vertexconnectivity = NodeConnectivity((md.mesh.elements), (md.mesh.numberofvertices))
++	print "Node: ElementConnectivity not implemented yet!"
++	#md.mesh.elementconnectivity = ElementConnectivity((md.mesh.elements), (md.mesh.vertexconnectivity))
++
++	#type of model
++	md.mesh.dimension = 2.
++	return md
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh	(revision 12102)
+@@ -1,28 +1,15 @@
+ #!/bin/sh
+ 
+-#petsc 3.2
+-#mpich 1.4
++pythonversion=2.7
+ 
+ ./configure \
+ 	--prefix=$ISSM_TIER \
+-	--with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+-	--with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \
+ 	--with-matlab-dir=$MATLAB_DIR \
++	--with-python-dir=$ISSM_TIER/externalpackages/python/install\
++	--with-python-version=$pythonversion \
++	--with-python-numpy-dir=$ISSM_TIER/externalpackages/python/install/Python.framework/Versions/$pythonversion/lib/python$pythonversion/site-packages/numpy/core/include/numpy\
+ 	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+-	--with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+-	--with-chaco-dir=$ISSM_TIER/externalpackages/chaco/install \
+-	--with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \
+ 	--with-math-lib="/usr/lib/libm.dylib" \
+-	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install/lib \
+ 	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
+ 	--with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5  -O3 -DNDEBUG -w "\
+-	--with-numthreads=8 \
+ 	--with-gsl-dir=$ISSM_TIER/externalpackages/gsl/install
+-#	--with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install  \
+-#	--with-petsc-arch=$ISSM_ARCH \
+-#	--with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+-#	--with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/include/ " \
+-#	--with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-#	--with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-#	--with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ 
+-#   --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py	(revision 12101)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py	(revision 12102)
+@@ -81,6 +81,7 @@
+ from hydrology import *
+ from miscellaneous import *
+ from private import *
++from triangle import *
+ 
+ #}}}
+ 
Index: /issm/oecreview/Archive/12101-12120/ISSM-12102-12103.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12102-12103.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12102-12103.diff	(revision 12325)
@@ -0,0 +1,21 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm.sh	(revision 12102)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm.sh	(revision 12103)
+@@ -1,10 +1,12 @@
+ #!/bin/sh
+ 
++pythonversion=2.7
++
+ ./configure \
+ 	--prefix=$ISSM_TIER \
+-	--without-mpi \
+-	--without-matlab \
++	--with-python-dir=$ISSM_TIER/externalpackages/python/install\
++	--with-python-version=$pythonversion \
++	--with-python-numpy-dir=$ISSM_TIER/externalpackages/python/install/Python.framework/Versions/$pythonversion/lib/python$pythonversion/site-packages/numpy/core/include/numpy\
++	--with-vendor=arm \
+ 	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+-	--without-metis \
+-	--with-vendor=arm
+ 	--with-gsl-dir=$ISSM_TIER/externalpackages/gsl/install
Index: /issm/oecreview/Archive/12101-12120/ISSM-12103-12104.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12103-12104.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12103-12104.diff	(revision 12325)
@@ -0,0 +1,19 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12103)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12104)
+@@ -73,10 +73,14 @@
+ 	for(i=0;i<M;i++)idxm[i]=i;
+ 	for(i=0;i<N;i++)idxn[i]=i;
+ 
++	printf("-------------- file: Matrix.cpp line: %i\n",__LINE__); 
+ 	this->matrix=NewMat(M,N,sparsity);
++	printf("-------------- file: Matrix.cpp line: %i\n",__LINE__); 
+ 	MatSetValues(this->matrix,M,idxm,N,idxn,serial_mat,INSERT_VALUES);
++	printf("-------------- file: Matrix.cpp line: %i\n",__LINE__); 
+ 	MatAssemblyBegin(this->matrix,MAT_FINAL_ASSEMBLY);
+ 	MatAssemblyEnd(this->matrix,MAT_FINAL_ASSEMBLY);
++	printf("-------------- file: Matrix.cpp line: %i\n",__LINE__); 
+ 
+ 	xfree((void**)&idxm);
+ 	xfree((void**)&idxn);
Index: /issm/oecreview/Archive/12101-12120/ISSM-12104-12105.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12104-12105.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12104-12105.diff	(revision 12325)
@@ -0,0 +1,19 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12104)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/Matrix.cpp	(revision 12105)
+@@ -73,14 +73,10 @@
+ 	for(i=0;i<M;i++)idxm[i]=i;
+ 	for(i=0;i<N;i++)idxn[i]=i;
+ 
+-	printf("-------------- file: Matrix.cpp line: %i\n",__LINE__); 
+ 	this->matrix=NewMat(M,N,sparsity);
+-	printf("-------------- file: Matrix.cpp line: %i\n",__LINE__); 
+ 	MatSetValues(this->matrix,M,idxm,N,idxn,serial_mat,INSERT_VALUES);
+-	printf("-------------- file: Matrix.cpp line: %i\n",__LINE__); 
+ 	MatAssemblyBegin(this->matrix,MAT_FINAL_ASSEMBLY);
+ 	MatAssemblyEnd(this->matrix,MAT_FINAL_ASSEMBLY);
+-	printf("-------------- file: Matrix.cpp line: %i\n",__LINE__); 
+ 
+ 	xfree((void**)&idxm);
+ 	xfree((void**)&idxn);
Index: /issm/oecreview/Archive/12101-12120/ISSM-12105-12106.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12105-12106.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12105-12106.diff	(revision 12325)
@@ -0,0 +1,18 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/petsc/patches/NewMat.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/petsc/patches/NewMat.cpp	(revision 12105)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/petsc/patches/NewMat.cpp	(revision 12106)
+@@ -67,7 +67,12 @@
+ 	o_nz=(int)((double)nnz/(double)M/2.0); //number of non zeros per row/2
+ 
+ 	#ifdef _HAVE_PETSCDEV_
+-	MatCreateAIJ(MPI_COMM_WORLD,m,n,M,N,d_nz,NULL,o_nz,NULL,&outmatrix); 
++	if(sparsity==1){
++		MatCreateDense(MPI_COMM_WORLD,m,n,M,N,NULL,&outmatrix); 
++	}
++	else{
++		MatCreateAIJ(MPI_COMM_WORLD,m,n,M,N,d_nz,NULL,o_nz,NULL,&outmatrix); 
++	}
+ 	#else
+ 	MatCreateMPIAIJ(MPI_COMM_WORLD,m,n,M,N,d_nz,NULL,o_nz,NULL,&outmatrix); 
+ 	#endif
Index: /issm/oecreview/Archive/12101-12120/ISSM-12106-12107.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12106-12107.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12106-12107.diff	(revision 12325)
@@ -0,0 +1,28 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-dev-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-dev-linux64.sh	(revision 12106)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-dev-linux64.sh	(revision 12107)
+@@ -5,6 +5,7 @@
+ if [ $STEP -eq 1 ]; then
+ 	# Adapted from petsc 3.2. 
+ 	# Used Mercurial to get code
++	rm -rf src
+ 	hg clone http://petsc.cs.iit.edu/petsc/petsc-dev src
+ 	cd src
+ 	hg clone http://petsc.cs.iit.edu/petsc/BuildSystem config/BuildSystem
+@@ -24,6 +25,7 @@
+ 
+ 
+ if [ $STEP -eq 2 ]; then
++	rm -rf install
+ 	cd src
+ 	./config/configure.py \
+ 	--prefix="$ISSM_TIER/externalpackages/petsc/install" \
+@@ -41,6 +43,7 @@
+ 	--download-f-blas-lapack=yes \
+ 	--download-plapack=yes \
+ 	--download-parmetis=yes \
++	--download-spai=yes \
+ 	--with-pic=1
+ 
+ 	#Compile petsc and install it
Index: /issm/oecreview/Archive/12101-12120/ISSM-12107-12108.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12107-12108.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12107-12108.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Nodes.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Nodes.cpp	(revision 12107)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Nodes.cpp	(revision 12108)
+@@ -125,7 +125,7 @@
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( (void*)truedofs,(void*)alltruedofs,numnodes*maxdofspernode,MPI_INT,MPI_MAX,MPI_COMM_WORLD);
+ 	#else
+-	alltruedofs[0]=truedofs[0];
++	for(i=0;i<numnodes*maxdofspernode;i++)alltruedofs[i]=truedofs[i];
+ 	#endif
+ 
+ 	/* Now every cpu knows the true dofs of everyone else that is not a clone*/
Index: /issm/oecreview/Archive/12101-12120/ISSM-12108-12109.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12108-12109.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12108-12109.diff	(revision 12325)
@@ -0,0 +1,31 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Nodes.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Nodes.cpp	(revision 12108)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Nodes.cpp	(revision 12109)
+@@ -122,8 +122,9 @@
+ 			node->ShowTrueDofs(truedofs,maxdofspernode,setenum);//give maxdofspernode, column size, so that nodes can index into truedofs
+ 		}
+ 	}
++
+ 	#ifdef _HAVE_MPI_
+-	MPI_Allreduce ( (void*)truedofs,(void*)alltruedofs,numnodes*maxdofspernode,MPI_INT,MPI_MAX,MPI_COMM_WORLD);
++	MPI_Allreduce((void*)truedofs,(void*)alltruedofs,numnodes*maxdofspernode,MPI_INT,MPI_MAX,MPI_COMM_WORLD);
+ 	#else
+ 	for(i=0;i<numnodes*maxdofspernode;i++)alltruedofs[i]=truedofs[i];
+ 	#endif
+@@ -152,7 +153,6 @@
+ 	int* minranks=NULL;
+ 	int  numnodes;
+ 
+-
+ 	/*Figure out number of nodes for this analysis: */
+ 	numnodes=this->NumberOfNodes(analysis_type);
+ 
+@@ -218,6 +218,7 @@
+ 	/*Grab max of all cpus: */
+ 	#ifdef _HAVE_MPI_
+ 	MPI_Allreduce ( (void*)&max,(void*)&allmax,1,MPI_INT,MPI_MAX,MPI_COMM_WORLD);
++	max=allmax;
+ 	#endif
+ 
+ 	return max;
Index: /issm/oecreview/Archive/12101-12120/ISSM-12109-12110.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12109-12110.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12109-12110.diff	(revision 12325)
@@ -0,0 +1,15 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py	(revision 12109)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py	(revision 12110)
+@@ -1,9 +1,5 @@
+ from model import *
+-from TriMesh import *
+ from triangle import *
+ 
+-md=model()
++md=model();
+ md=triangle(md,'../Exp/Square.exp',150000);
+-
+-#[index,x,y,segments,segmentmarkers]=TriMesh('../Exp/Square.exp',15000.0**2.0,True)
+-#print(index,x,y,segments,segmentmarkers)
Index: /issm/oecreview/Archive/12101-12120/ISSM-12110-12111.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12110-12111.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12110-12111.diff	(revision 12325)
@@ -0,0 +1,20 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py	(revision 12110)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test101.py	(revision 12111)
+@@ -1,5 +0,0 @@
+-from model import *
+-from triangle import *
+-
+-md=model();
+-md=triangle(md,'../Exp/Square.exp',150000);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test102.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test102.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test102.py	(revision 12111)
+@@ -0,0 +1,5 @@
++from model import *
++from triangle import *
++
++md=model();
++md=triangle(md,'../Exp/Square.exp',150000);
Index: /issm/oecreview/Archive/12101-12120/ISSM-12111-12112.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12111-12112.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12111-12112.diff	(revision 12325)
@@ -0,0 +1,541 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test102.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test102.py	(revision 12111)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test102.py	(revision 12112)
+@@ -1,5 +1,7 @@
+ from model import *
+ from triangle import *
++from setmask import *
+ 
+ md=model();
+ md=triangle(md,'../Exp/Square.exp',150000);
++md=setmask(md,'all','');
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/pythonio.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/pythonio.h	(revision 12111)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/pythonio.h	(revision 12112)
+@@ -20,20 +20,19 @@
+ class Parameters;
+ 
+ //void WriteData(PyObject* py_tuple,DataSet* dataset);
+-//void WriteData(PyObject* py_tuple,double* matrix, int M,int N);
+ //void WriteData(PyObject* py_tuple,int*    matrix, int M,int N);
+ //void WriteData(PyObject* py_tuple,double* vector, int M);
+ //void WriteData(PyObject* py_tuple,int integer);
+ //void WriteData(PyObject* py_tuple,bool boolean);
+ //void WriteData(PyObject* py_tuple,double scalar);
+ //void WriteData(DataHandle* py_tuple,Parameters* parameters);
++void WriteData(PyObject* py_tuple, int index, double* matrix, int M,int N);
+ void WriteData(PyObject* py_tuple, int index, char* string);
+ void WriteData(PyObject* py_tuple, int index, Matrix* matrix);
+ void WriteData(PyObject* py_tuple, int index, Vector* vector);
+ 
+ 
+ //void FetchData(DataSet** pdataset,PyObject* py_ref);
+-//void FetchData(double** pmatrix,int* pM,int *pN,PyObject* py_ref);
+ //void FetchData(double** pmatrix,int* pnumel,int* pndims,int** psize,PyObject* py_ref);
+ //void FetchData(int** pmatrix,int* pM,int *pN,PyObject* py_ref);
+ //void FetchData(bool** pmatrix,int* pM,int *pN,PyObject* py_ref);
+@@ -46,6 +45,7 @@
+ //void FetchData(Vector** pvector,PyObject* py_ref);
+ //void FetchData(char** pmatrix,int* pnumel,int* pndims,int** psize,PyObject* py_ref);
+ //void FetchData(Parameters** pparameters, DataHandle py_ref);
++void FetchData(double** pmatrix,int* pM,int *pN,PyObject* py_array);
+ void FetchData(char** pstring,PyObject* py_unicode);
+ void FetchData(double* pscalar,PyObject* py_float);
+ void FetchData(int* pinteger,PyObject* py_long);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp	(revision 12111)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp	(revision 12112)
+@@ -56,7 +56,31 @@
+ 	
+ }
+ /*}}}*/
++/*FUNCTION FetchData(double** pmatrix,int* pM, int* pN, PyObject* py_matrix){{{1*/
++void FetchData(double** pmatrix,int* pM,int *pN,PyObject* py_matrix){
+ 
++	/*output: */
++	double* matrix=NULL;
++	int M,N;
++	int ndim;
++	npy_intp*  dims=NULL;
++
++	/*retrive dimensions: */
++	ndim=PyArray_NDIM((const PyArrayObject*)py_matrix);
++	if(ndim!=2)_error_("expecting an MxN matrix in input!");
++	dims=PyArray_DIMS((PyArrayObject*)py_matrix);
++	M=dims[0]; N=dims[1];
++	
++	/*retrieve internal value: */
++	matrix=(double*)PyArray_DATA((PyArrayObject*)py_matrix);
++
++	/*output: */
++	if(pM)*pM=M;
++	if(pN)*pN=N;
++	if(pmatrix)*pmatrix=matrix;
++}
++/*}}}*/
++
+ /*Python version dependent: */
+ #if _PYTHON_MAJOR_ >= 3 
+ /*FUNCTION FetchData(char** pstring,PyObject* py_unicode){{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/WritePythonData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/WritePythonData.cpp	(revision 12111)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/WritePythonData.cpp	(revision 12112)
+@@ -63,3 +63,16 @@
+ 
+ }
+ /*}}}*/
++/*FUNCTION WriteData(PyObject* py_tuple,int index, double* matrix, int M, int N){{{1*/
++void WriteData(PyObject* tuple, int index, double* matrix, int M,int N){
++	
++	npy_intp dims[2]={0,0};
++	PyObject* array=NULL;
++	
++	dims[0]=(npy_intp)M;
++	dims[1]=(npy_intp)N;
++	array=PyArray_SimpleNewFromData(2,dims,NPY_DOUBLE,matrix);
++	
++	PyTuple_SetItem(tuple, index, array);
++
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/python/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/python/Makefile.am	(revision 12111)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/python/Makefile.am	(revision 12112)
+@@ -2,7 +2,9 @@
+ EXEEXT=$(PYTHONWRAPPEREXT)
+ #Bin programs {{{1
+ if MODULES
+-bin_PROGRAMS = TriMesh
++bin_PROGRAMS = TriMesh \
++			   NodeConnectivity \
++			   ElementConnectivity
+ endif 
+ #}}}
+ #Flags and libraries {{{1
+@@ -25,6 +27,12 @@
+ AM_CXXFLAGS += $(CXXOPTFLAGS) 
+ #}}}
+ #Bin sources {{{1
++ElementConnectivity_SOURCES = ../ElementConnectivity/ElementConnectivity.cpp\
++			  ../ElementConnectivity/ElementConnectivity.h
++
++NodeConnectivity_SOURCES = ../NodeConnectivity/NodeConnectivity.cpp\
++										../NodeConnectivity/NodeConnectivity.h
++
+ TriMesh_SOURCES = ../TriMesh/TriMesh.cpp\
+ 			  ../TriMesh/TriMesh.h
+ #}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp	(revision 12111)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp	(revision 12112)
+@@ -4,11 +4,12 @@
+ 
+ #include "./NodeConnectivity.h"
+ 
+-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++WRAPPER(NodeConnectivity){
+ 
+ 	/*inputs: */
+ 	double* elements=NULL;
+-	int     nel,nods;
++	int     nel;
++	int     nods;
+ 
+ 	/*outputs: */
+ 	double* connectivity=NULL;
+@@ -17,8 +18,8 @@
+ 	/*Boot module: */
+ 	MODULEBOOT();
+ 
+-	/*checks on arguments on the matlab side: */
+-	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&NodeConnectivityUsage);
++	/*checks on arguments: */
++	CHECKARGUMENTS(NLHS,NRHS,&NodeConnectivityUsage);
+         
+ 	/*Input datasets: */
+ 	FetchData(&elements,&nel,NULL,ELEMENTS);
+@@ -30,9 +31,6 @@
+ 	/*write output datasets: */
+ 	WriteData(CONNECTIVITY,connectivity,nods,width);
+ 
+-	/*Free ressources: */
+-	xfree((void**)&elements);
+-
+ 	/*end module: */
+ 	MODULEEND();
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.h	(revision 12111)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.h	(revision 12112)
+@@ -5,29 +5,54 @@
+ #ifndef _NODECONNECTIVITY_H
+ #define _NODECONNECTIVITY_H
+ 
+-/* local prototypes: */
+-void NodeConnectivityUsage(void);
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
+ 
++/*Very important definition in case we are compiling a python module!: needs to come before header files inclusion*/
++#ifdef _HAVE_PYTHON_
++#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
++#endif
++
++/*Header files: */
+ #include "../../c/include/globals.h"
++#include "../../c/toolkits/toolkits.h"
++#include "../../c/include/include.h"
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
+ #include "../../c/issm-binding.h"
++#include "../../c/io/io.h"
++#include "../../c/EnumDefinitions/EnumDefinitions.h"
+ 
+-#undef __FUNCT__ 
+-#define __FUNCT__  "NodeConnectivity"
+-
++#ifdef _HAVE_MATLAB_MODULES_
+ /* serial input macros: */
+ #define ELEMENTS (mxArray*)prhs[0]
+ #define NUMNODES (mxArray*)prhs[1]
+-
+ /* serial output macros: */
+ #define CONNECTIVITY (mxArray**)&plhs[0]
++#endif
+ 
++#ifdef _HAVE_PYTHON_MODULES_
++/* serial input macros: */
++#define ELEMENTS PyTuple_GetItem(args,0)
++#define NUMNODES PyTuple_GetItem(args,1)
++/* serial output macros: */
++#define CONNECTIVITY output,0
++#endif
++
++#undef __FUNCT__ 
++#define __FUNCT__  "NodeConnectivity"
++
+ /* serial arg counts: */
+ #undef NLHS
+ #define NLHS  1
+ #undef NRHS
+ #define NRHS  2
+ 
++/* local prototypes: */
++void NodeConnectivityUsage(void);
++
+ #endif  /* _NODECONNECTIVITY_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp	(revision 12111)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp	(revision 12112)
+@@ -4,7 +4,7 @@
+ 
+ #include "./ElementConnectivity.h"
+ 
+-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++WRAPPER(ElementConnectivity){
+ 
+ 	/*inputs: */
+ 	double* elements=NULL;
+@@ -18,8 +18,8 @@
+ 	/*Boot module: */
+ 	MODULEBOOT();
+ 
+-	/*checks on arguments on the matlab side: */
+-	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ElementConnectivityUsage);
++	/*checks on arguments: */
++	CHECKARGUMENTS(NLHS,NRHS,&ElementConnectivityUsage);
+         
+ 	/*Input datasets: */
+ 	FetchData(&elements,&nel,NULL,ELEMENTS);
+@@ -31,10 +31,6 @@
+ 	/*write output datasets: */
+ 	WriteData(ELEMENTCONNECTIVITY,elementconnectivity,nel,3);
+ 
+-	/*Free ressources: */
+-	xfree((void**)&elements);
+-	xfree((void**)&nodeconnectivity);
+-
+ 	/*end module: */
+ 	MODULEEND();
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.h	(revision 12111)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.h	(revision 12112)
+@@ -5,29 +5,56 @@
+ #ifndef _ELEMENTCONNECTIVITY_H
+ #define _ELEMENTCONNECTIVITY_H
+ 
+-/* local prototypes: */
+-void ElementConnectivityUsage(void);
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
+ 
++/*Very important definition in case we are compiling a python module!: needs to come before header files inclusion*/
++#ifdef _HAVE_PYTHON_
++#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
++#endif
++
++/*Header files: */
+ #include "../../c/include/globals.h"
++#include "../../c/toolkits/toolkits.h"
++#include "../../c/include/include.h"
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
+ #include "../../c/issm-binding.h"
++#include "../../c/io/io.h"
++#include "../../c/EnumDefinitions/EnumDefinitions.h"
+ 
+-#undef __FUNCT__ 
+-#define __FUNCT__  "ElementConnectivity"
+-
++#ifdef _HAVE_MATLAB_MODULES_
+ /* serial input macros: */
++/* serial input macros: */
+ #define ELEMENTS (mxArray*)prhs[0]
+ #define NODECONNECTIVITY (mxArray*)prhs[1]
+-
+ /* serial output macros: */
+ #define ELEMENTCONNECTIVITY (mxArray**)&plhs[0]
++#endif
+ 
++#ifdef _HAVE_PYTHON_MODULES_
++/* serial input macros: */
++/* serial input macros: */
++#define ELEMENTS PyTuple_GetItem(args,0)
++#define NODECONNECTIVITY PyTuple_GetItem(args,1)
++/* serial output macros: */
++#define ELEMENTCONNECTIVITY output,0
++#endif
++
++#undef __FUNCT__ 
++#define __FUNCT__  "ElementConnectivity"
++
+ /* serial arg counts: */
+ #undef NLHS
+ #define NLHS  1
+ #undef NRHS
+ #define NRHS  2
+ 
++/* local prototypes: */
++void ElementConnectivityUsage(void);
++
+ #endif  /* _ELEMENTCONNECTIVITY_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.cpp	(revision 12111)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/TriMesh/TriMesh.cpp	(revision 12112)
+@@ -25,7 +25,7 @@
+ 	/*Boot module: */
+ 	MODULEBOOT();
+ 
+-	/*checks on arguments on the matlab side: */
++	/*checks on arguments: */
+ 	CHECKARGUMENTS(NLHS,NRHS,&TriMeshUsage);
+ 	
+ 	/*Fetch data needed for meshing: */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.py	(revision 12111)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.py	(revision 12112)
+@@ -1,5 +1,7 @@
+-from TriMesh import *
+ from numpy import *
++import TriMesh as tm
++import NodeConnectivity as nc
++import ElementConnectivity as ec
+ 
+ def triangle(md, domainname, resolution,riftname=''):
+ 	#TRIANGLE - create model mesh using the triangle package
+@@ -31,7 +33,7 @@
+ 	area = resolution**2.
+ 
+ 	#Mesh using TriMesh
+-	[md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=TriMesh(domainname,riftname,area)
++	[md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=tm.TriMesh(domainname,riftname,area)
+ 
+ 	#Fill in rest of fields:
+ 	md.mesh.numberofelements = size(md.mesh.elements)
+@@ -45,10 +47,8 @@
+ 	md.mesh.elementonsurface = ones(md.mesh.numberofelements)
+ 
+ 	#Now, build the connectivity tables for this mesh.
+-	print "Node: NodeConnectivity not implemented yet!"
+-	#md.mesh.vertexconnectivity = NodeConnectivity((md.mesh.elements), (md.mesh.numberofvertices))
+-	print "Node: ElementConnectivity not implemented yet!"
+-	#md.mesh.elementconnectivity = ElementConnectivity((md.mesh.elements), (md.mesh.vertexconnectivity))
++	[md.mesh.vertexconnectivity]= nc.NodeConnectivity(md.mesh.elements, md.mesh.numberofvertices)
++	[md.mesh.elementconnectivity] = ec.ElementConnectivity(md.mesh.elements, md.mesh.vertexconnectivity)
+ 
+ 	#type of model
+ 	md.mesh.dimension = 2.
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh
+___________________________________________________________________
+Modified: svn:ignore
+   - Makefile.in
+Makefile
+
+   + __pycache__
+Makefile.in
+Makefile
+
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/setmask.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/setmask.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/setmask.py	(revision 12112)
+@@ -0,0 +1,55 @@
++from numpy import *
++import FlagElements as fe
++
++def setmask(md, floatingicename, groundedicename):
++	#SETMASK - establish boundaries between grounded and floating ice.
++	#
++	#   By default, ice is considered grounded. The contour floatingicename defines nodes 
++	#   for which ice is floating. The contour groundedicename defines nodes inside an floatingice, 
++	#   that are grounded (ie: ice rises, islands, etc ...)
++	#   All input files are in the Argus format (extension .exp).
++	#
++	#   Usage:
++	#      md=setmask(md,floatingicename,groundedicename)
++	#
++	#   Examples:
++	#      md=setmask(md,'all','');
++	#      md=setmask(md,'Iceshelves.exp','Islands.exp');
++
++	#%Get assigned fields
++	x = md.mesh.x
++	y = md.mesh.y
++	elements = md.mesh.elements
++
++	#Assign elementonfloatingice, elementongroundedice, vertexongroundedice and vertexonfloatingice. Only change at your own peril! This is synchronized heavily with the GroundingLineMigration module. {{{1
++	elementonfloatingice = fe.FlagElements(md, floatingicename)
++	elementongroundedice = fe.FlagElements(md, groundedicename) 
++
++	#Because groundedice nodes and elements can be included into an floatingice, we need to update. Remember, all the previous 
++	#arrays come from domain outlines that can intersect one another: 
++
++	elementonfloatingice = logical_and(elementonfloatingice,~elementongroundedice)
++	elementongroundedice = ~elementonfloatingice
++
++	#the order here is important. we choose vertexongroundedice as default on the grounding line.
++	vertexonfloatingice = zeros(md.mesh.numberofvertices,'bool')
++	vertexongroundedice = zeros(md.mesh.numberofvertices,'bool')
++
++	pos=argwhere(elementongroundedice==1)
++	pos=md.mesh.elements[pos,:]-1
++	if pos.size:
++		vertexongroundedice[pos]=True
++
++	pos=argwhere(~vertexongroundedice)
++	if pos.size:
++		vertexonfloatingice[pos]=True;
++	#%}}}
++
++	#Return: 
++	md.mask.elementonfloatingice = double(elementonfloatingice)
++	md.mask.vertexonfloatingice = double(vertexonfloatingice)
++	md.mask.elementongroundedice = double(elementongroundedice)
++	md.mask.vertexongroundedice = double(vertexongroundedice)
++	md.mask.vertexonwater = zeros(md.mesh.numberofvertices)
++	md.mask.elementonwater = zeros(md.mesh.numberofelements)
++	return md
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Geometry/FlagElements.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Geometry/FlagElements.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Geometry/FlagElements.py	(revision 12112)
+@@ -0,0 +1,54 @@
++from numpy import * 
++def FlagElements(md,region):
++#FLAGELEMENTS - flag the elements in an region
++#
++#   The region can be given with an exp file, a list of elements.
++#
++#   Usage: 
++#      flag=FlagElements(md,region);
++#
++#   Example:
++#      flag=FlagElements(md,'all');
++#      flag=FlagElements(md,'');
++#      flag=FlagElements(md,'Domain.exp');
++#      flag=FlagElements(md,'~Domain.exp');
++#      flag=FlagElements(md,md.mask.elementongroundedice);
++
++	if isinstance(region,basestring):
++		if not(region):
++			flag=zeros(md.mesh.numberofelements,'bool')
++			invert=0;
++		elif region=='all':
++			flag=ones(md.mesh.numberofelements,'bool')
++			invert=0;
++		else:
++			#make sure that we actually don't want the elements outside the domain outline!
++			if region[0]=='~':
++				region=region[1:]
++				invert=1;
++			else:
++				invert=0;
++			
++			#does the region domain outline exist or do we have to look for xlim,ylim in basinzoom?
++			if not os.path.isfile(region):
++				[xlim,ylim]=basinzoom('basin',region);
++				flag_nodes=double(md.mesh.x<xlim(2) & md.mesh.x>xlim(1) &  md.mesh.y<ylim(2) & md.mesh.y>ylim(1));
++				flag=prod(flag_nodes(md.mesh.elements),2);
++			else:
++				#ok, flag elements
++				flag=ContourToMesh(md.mesh.elements[:,0:3],md.mesh.x,md.mesh.y,region,'element',1);
++		
++		if invert:
++			flag=~flag;
++	
++	elif isinstance(region,nparray):
++		if len(region)!=md.mesh.numberofelements:
++			print FlagElements.__doc__
++			print 'Flaglist for region must be of same size as number of elements in model'
++			return []
++		flag=region;
++	else:
++		print 'Invalid region option'
++		return []
++
++	return flag;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh	(revision 12111)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh	(revision 12112)
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ 
+-pythonversion=2.7
++pythonversion=3.2
+ 
+ ./configure \
+ 	--prefix=$ISSM_TIER \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py	(revision 12111)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py	(revision 12112)
+@@ -82,6 +82,7 @@
+ from miscellaneous import *
+ from private import *
+ from triangle import *
++from setmask import *
+ 
+ #}}}
+ 
Index: /issm/oecreview/Archive/12101-12120/ISSM-12112-12113.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12112-12113.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12112-12113.diff	(revision 12325)
@@ -0,0 +1,91 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test102.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test102.py	(revision 12112)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test102.py	(revision 12113)
+@@ -1,7 +1,9 @@
+ from model import *
+ from triangle import *
+ from setmask import *
++from parameterize import *
+ 
+ md=model();
+ md=triangle(md,'../Exp/Square.exp',150000);
+ md=setmask(md,'all','');
++md=parameterize(md,'../Par/SquareShelfConstrained.par')
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/parameterization/parameterize.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/parameterization/parameterize.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/parameterization/parameterize.py	(revision 12113)
+@@ -0,0 +1,27 @@
++import os
++def  parameterize(md,parametername):
++	#PARAMETERIZE - parameterize a model
++	#
++	#   from a parameter matlab file, start filling in all the model fields that were not 
++	#   filled in by the mesh.py and setmask.py model methods.
++	#   Warning: the parameter file must be able to be run in Python
++	#
++	#   Usage:
++	#      md=parameterize(md,parametername)
++	#
++	#   Example:
++	#      md=parameterize(md,'Square.par');
++
++	#some checks
++	if not os.path.isfile(parametername):
++		print 'parameterize error message: file '+parametername+' not found.'
++		return []
++
++	#Try and run parameter file.
++	execfile(parametername)
++	
++	#ame and notes
++	if len(md.miscellaneous.name)==0:
++		md.miscellaneous.name=os.path.basename(parametername)
++	
++	md=addnote(md,'Model created by using parameter file: '+parametername+' on: '+str(datetime.datetime.now()))
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/addnote.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/addnote.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/addnote.py	(revision 12113)
+@@ -0,0 +1,29 @@
++def addnote(md, string):
++
++    # Local Variables: md, string, i, notes, miscellaneous, newnotes
++    # Function calls: ischar, nargout, cell, nargin, length, addnote, error
++    #ADDNOTE - add a note to the existing model notes field
++    #
++    #   Usage:
++    #      md=addnote(md,string);
++    #
++    #   Example:
++    #      md=addnote(md,'Pine Island, Geometry of 2007');
++    
++	if not isinstance(string,basetring):
++        print 'addnote error message: second input argument should be a string'
++		return []
++    
++    notes = md.miscellaneous.notes
++    
++	if isinstance(notes,basestring):
++		newnotes=[notes,string]
++    else:
++		newnotes=[];
++		for i in range(len(notes)):
++			newnotes=newnotes+notes[i]
++            
++        newnotes=newnotes+nodes;
++        
++    md.miscellaneous.notes = newnotes
++    return md
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/model.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/model.py	(revision 12112)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/model.py	(revision 12113)
+@@ -110,6 +110,5 @@
+ 		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("results","[%s,%s]" % ("1x1",obj.results.__class__.__name__),"model results'"))
+ 		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("radaroverlay","[%s,%s]" % ("1x1",obj.radaroverlay.__class__.__name__),"radar image for plot overlay"))
+ 		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("miscellaneous","[%s,%s]" % ("1x1",obj.miscellaneous.__class__.__name__),"miscellaneous fields"))
+-		string="%s\n%s" % (string,"%19s: %-22s -- %s" % ("miscellaneous","[%s,%s]" % ("1x1",obj.miscellaneous.__class__.__name__),"miscellaneous fields"))
+ 		return string;
+ 		 #}}}
Index: /issm/oecreview/Archive/12101-12120/ISSM-12114-12115.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12114-12115.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12114-12115.diff	(revision 12325)
@@ -0,0 +1,80 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12114)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12115)
+@@ -64,6 +64,10 @@
+ 			export CXX=icpc
+ 			export CXXFLAGS=" -O3 -xS -D_INTEL_LINUX_ "
+ 			export CFLAGS=" -O3 -xS -D_INTEL_LINUX_ "
++		elif test $VENDOR = arm-linux; then
++			export CC=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-cc
++			export CXX=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-cc
++
+ 		else
+ 		AC_MSG_ERROR([unknow compiler vendor!])
+ 		fi
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-android-4.0.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-android-4.0.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-android-4.0.sh	(revision 12115)
+@@ -0,0 +1,35 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf src install gsl-1.15
++mkdir src install
++
++#Untar 
++tar -zxvf  gsl-1.15.tar.gz
++
++#Move gsl into src directory
++mv gsl-1.15/* src
++rm -rf gsl-1.15
++
++#Configure gsl
++cd src
++
++./configure \
++    CC=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-gcc\
++    LD=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-ld\
++    AR=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-ar\
++    RANLIB=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-ranlib\
++    NM=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-nm\
++    OBJ_EXT=o\
++    LIB_EXT=a\
++    --host="arm-linux"\
++	--prefix="$ISSM_TIER/externalpackages/gsl/install" 
++
++#Compile gsl
++if [ -z $1 ]; then
++	make
++else
++	make -j $1
++fi
++
++make install
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-android-4.0.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make	(revision 12114)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make	(revision 12115)
+@@ -10,10 +10,10 @@
+ # http://www.codesourcery.com/gnu_toolchains/arm/arm_gnu_linux_abi.pdf
+ 
+ ANDROID_BIN=$(ISSM_TIER)/src/android/tmp/android-14-toolchain/bin
+-CC=$(ANDROID_DEV_DIR)/tmp/android-linux-4.0/bin/arm-linux-androideabi-gcc
+-AR=$(ANDROID_DEV_DIR)/tmp/android-linux-4.0/bin/arm-linux-androideabi-ar
+-RANLIB=$(ANDROID_DEV_DIR)/tmp/android-linux-4.0/bin/arm-linux-androideabi-ranlib
+-CSWITCHES = $(CFLAGS)  -I/usr/X11R6/include -L/usr/X11R6/lib -I$(MATLAB_DIR)/extern/include -fPIC -I$(MATLAB_DIR)/include
++CC=$(ANDROID_DIR)/arm-linux-android-4.0/bin/arm-linux-androideabi-gcc
++AR=$(ANDROID_DIR)/arm-linux-android-4.0/bin/arm-linux-androideabi-ar
++RANLIB=$(ANDROID_DIR)/arm-linux-android-4.0/bin/arm-linux-androideabi-ranlib
++CSWITCHES = $(CFLAGS)
+ TRILIBDEFS = -DTRILIBRARY
+ OBJ_EXT=o
+ LIB_EXT=a
Index: /issm/oecreview/Archive/12101-12120/ISSM-12115-12116.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12115-12116.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12115-12116.diff	(revision 12325)
@@ -0,0 +1,28 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.py	(revision 12115)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.py	(revision 12116)
+@@ -35,12 +35,13 @@
+ 	#Mesh using TriMesh
+ 	[md.mesh.elements,md.mesh.x,md.mesh.y,md.mesh.segments,md.mesh.segmentmarkers]=tm.TriMesh(domainname,riftname,area)
+ 
++
+ 	#Fill in rest of fields:
+ 	md.mesh.numberofelements = size(md.mesh.elements)
+ 	md.mesh.numberofvertices = size(md.mesh.x)
+ 	md.mesh.z = zeros(md.mesh.numberofvertices)
+ 	md.mesh.vertexonboundary = zeros(md.mesh.numberofvertices)
+-	md.mesh.vertexonboundary[md.mesh.segments[:,0:2].astype(int)] = 1.
++	md.mesh.vertexonboundary[md.mesh.segments[:,0:2].astype(int)-1] = 1.
+ 	md.mesh.vertexonbed = ones(md.mesh.numberofvertices)
+ 	md.mesh.vertexonsurface = ones(md.mesh.numberofvertices)
+ 	md.mesh.elementonbed = ones(md.mesh.numberofelements)
+@@ -49,7 +50,7 @@
+ 	#Now, build the connectivity tables for this mesh.
+ 	[md.mesh.vertexconnectivity]= nc.NodeConnectivity(md.mesh.elements, md.mesh.numberofvertices)
+ 	[md.mesh.elementconnectivity] = ec.ElementConnectivity(md.mesh.elements, md.mesh.vertexconnectivity)
+-
++	
+ 	#type of model
+ 	md.mesh.dimension = 2.
+ 	return md
Index: /issm/oecreview/Archive/12101-12120/ISSM-12116-12117.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12116-12117.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12116-12117.diff	(revision 12325)
@@ -0,0 +1,54 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/materials.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/materials.py	(revision 12116)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/materials.py	(revision 12117)
+@@ -18,6 +18,8 @@
+ 		self.rheology_B   = float('NaN')
+ 		self.rheology_n   = float('NaN')
+ 		self.rheology_law = "";
++
++		self.setdefaultparameters()
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -39,3 +41,40 @@
+ 
+ 		return string
+ 		#}}}
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++			#ice density (kg/m^3)
++			obj.rho_ice=917
++
++			#water density (kg/m^3)
++			obj.rho_water=1023
++
++			#water viscosity (N.s/m^2)
++			obj.mu_water=0.001787  
++
++			#ice heat capacity cp (J/kg/K)
++			obj.heatcapacity=2093
++
++			#ice latent heat of fusion L (J/kg)
++			obj.latentheat=3.34*10**5
++
++			#ice thermal conductivity (W/m/K)
++			obj.thermalconductivity=2.4
++
++			#the melting point of ice at 1 atmosphere of pressure in K
++			obj.meltingpoint=273.15
++
++			#rate of change of melting point with pressure (K/Pa)
++			obj.beta=9.8*10**-8
++
++			#mixed layer (ice-water interface) heat capacity (J/kg/K)
++			obj.mixed_layer_capacity=3974
++
++			#thermal exchange velocity (ice-water interface) (m/s)
++			obj.thermal_exchange_velocity=1.00*10**-4
++
++			#Rheology law: what is the temperature dependence of B with T
++			#available: none, paterson and arrhenius
++			obj.rheology_law='Paterson'
++			return obj
++		#}}}
Index: /issm/oecreview/Archive/12101-12120/ISSM-12117-12118.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12117-12118.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12117-12118.diff	(revision 12325)
@@ -0,0 +1,283 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/python/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/python/Makefile.am	(revision 12117)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/python/Makefile.am	(revision 12118)
+@@ -2,9 +2,10 @@
+ EXEEXT=$(PYTHONWRAPPEREXT)
+ #Bin programs {{{1
+ if MODULES
+-bin_PROGRAMS = TriMesh \
+-			   NodeConnectivity \
+-			   ElementConnectivity
++bin_PROGRAMS = ElementConnectivity\
++			   InterpFromMeshToMesh2d \
++			   NodeConnectivity\
++			   TriMesh 
+ endif 
+ #}}}
+ #Flags and libraries {{{1
+@@ -30,6 +31,9 @@
+ ElementConnectivity_SOURCES = ../ElementConnectivity/ElementConnectivity.cpp\
+ 			  ../ElementConnectivity/ElementConnectivity.h
+ 
++InterpFromMeshToMesh2d_SOURCES = ../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp\
++							../InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
++
+ NodeConnectivity_SOURCES = ../NodeConnectivity/NodeConnectivity.cpp\
+ 										../NodeConnectivity/NodeConnectivity.h
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12117)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 12118)
+@@ -3,44 +3,30 @@
+  */
+ #include "./InterpFromMeshToMesh2d.h"
+ 
+-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+ 
+-	int i;
++WRAPPER(InterpFromMeshToMesh2d){
+ 
+ 	/*input: */
+ 	double* index=NULL;
+ 	int     index_cols;
+-
+ 	double* x_data=NULL;
+ 	int     x_data_rows;
+-
+ 	double* y_data=NULL;
+ 	int     y_data_rows;
+-
+ 	double* data=NULL; 
+ 	int     data_rows;
+ 	int     data_cols;
+-
+ 	double* x_interp=NULL;
+-	double* y_interp=NULL;
+-
+ 	int     x_interp_rows;
++	double* y_interp=NULL;
+ 	int     y_interp_rows;
+-
++	char*   contourname=NULL;
+ 	double* default_values=NULL;
+ 	int     num_default_values=0;
++	DataSet *contours = NULL;
+ 
+-	//contours
+-	mxArray*  matlabstructure=NULL;
+-	Contour** contours=NULL;
+-	int       numcontours;
+-	Contour*  contouri=NULL;
+-
+ 	/*Intermediary*/
+-	int nods_data;
+ 	int nels_data;
+-	int nods_interp;
+-	int verbose=0;
+ 
+ 	/* output: */
+ 	double* data_interp=NULL;
+@@ -48,67 +34,41 @@
+ 	/*Boot module: */
+ 	MODULEBOOT();
+ 
+-	/*checks on arguments on the matlab side: */
++	/*checks on output arguments on the matlab side: */
++	#ifdef _HAVE_MATLAB_MODULES_
+ 	if(nlhs!=NLHS){
+ 		InterpFromMeshToMesh2dUsage();
+ 		_error_("InterpFromMeshToMesh2dUsage usage error");
+ 	}
++	#endif
++	/*check on input arguments: */
+ 	if((nrhs!=6) & (nrhs!=8)){
+ 		InterpFromMeshToMesh2dUsage();
+ 		_error_("InterpFromMeshToMesh2dUsage usage error");
+ 	}
+ 
+ 	/*Input datasets: */
+-	if (verbose) printf("Fetching inputs\n");
+-	FetchData(&index,&nels_data,&index_cols,INDEXHANDLE);
+-	FetchData(&x_data,&x_data_rows,NULL,XHANDLE);
+-	FetchData(&y_data,&y_data_rows,NULL,YHANDLE);
+-	FetchData(&data,&data_rows,&data_cols,DATAHANDLE);
+-	FetchData(&x_interp,&x_interp_rows,NULL,XINTERPHANDLE);
+-	FetchData(&y_interp,&y_interp_rows,NULL,YINTERPHANDLE);
++	FetchData(&index,&nels_data,&index_cols,INDEX);
++	FetchData(&x_data,&x_data_rows,NULL,X);
++	FetchData(&y_data,&y_data_rows,NULL,Y);
++	FetchData(&data,&data_rows,&data_cols,DATA);
++	FetchData(&x_interp,&x_interp_rows,XINTERP);
++	FetchData(&y_interp,&y_interp_rows,YINTERP);
+ 
++	/*Figure out contours and default values: */
+ 	if(nrhs==8){
+-		
+-		/*Call expread on filename to build a contour array in the matlab workspace: */
+-		mexCallMATLAB( 1, &matlabstructure, 1, (mxArray**)&FILENAME, "expread");
+-
+-		/*default values: */
+-		FetchData(&default_values,&num_default_values,DEFAULTHANDLE);
+-
+-		/*contours: */
+-		numcontours=mxGetNumberOfElements(matlabstructure);
+-		contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
+-		for(i=0;i<numcontours;i++){
+-			//allocate
+-			contouri=(Contour*)xmalloc(sizeof(Contour));
+-			//retrieve dimension of this contour.
+-			contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
+-			//set pointers.
+-			contouri->x=mxGetPr(mxGetField(matlabstructure,i,"x"));
+-			contouri->y=mxGetPr(mxGetField(matlabstructure,i,"y"));
+-			*(contours+i)=contouri;
+-		}
+-
+-		/* Debugging of contours :{{{1*/
+-		/*for(i=0;i<numcontours;i++){
+-		  printf("\nContour echo: contour number  %i / %i\n",i+1,numcontours);
+-		  contouri=*(contours+i);
+-		  printf("   Number of vertices %i\n",contouri->nods);
+-		  for (j=0;j<contouri->nods;j++){
+-		  printf("   %lf %lf\n",*(contouri->x+j),*(contouri->y+j));
+-		  }
+-		  }*/
+-		/*}}}*/
++		FetchData(&default_values,&num_default_values,DEFAULT);
++		FetchData(&contourname,CONTOURNAME);
++		contours=DomainOutlineRead(contourname);
+ 	}
+ 	else{
+ 		num_default_values=0;
+ 		default_values=NULL;
+-		numcontours=0;
+-		contours=NULL;
++		contours=new DataSet();
+ 	}
+ 
++
+ 	/*some checks*/
+-	if (verbose) printf("Checking inputs\n");
+ 	if (x_data_rows!=y_data_rows){
+ 		_error_("vectors x and y should have the same length!");
+ 	}
+@@ -119,22 +79,18 @@
+ 		_error_("index should have 3 columns (input provided has %i columns)",index_cols);
+ 	}
+ 
+-	/*get number of elements and number of nodes in the data*/
+-	nods_data=x_data_rows;
+-	nods_interp=x_interp_rows;
+-
+ 	/* Run core computations: */
+-	if (verbose) printf("Call core\n");
+-	InterpFromMeshToMesh2dx(&data_interp,index,x_data,y_data,nods_data,nels_data,data,data_rows,data_cols,x_interp,y_interp,nods_interp,default_values,num_default_values,contours,numcontours);
++	InterpFromMeshToMesh2dx(&data_interp,index,x_data,y_data,x_data_rows,nels_data,data,data_rows,data_cols,x_interp,y_interp,x_interp_rows,default_values,num_default_values,contours);
+ 
+ 	/*Write data: */
+-	WriteData(DATAINTERP,data_interp,nods_interp,data_cols);
++	WriteData(DATAINTERP,data_interp,x_interp_rows,data_cols);
+ 
+ 	/*end module: */
+ 	MODULEEND();
+ }
+ 
+-void InterpFromMeshToMesh2dUsage(void)
++void InterpFromMeshToMesh2dUsage(void)//{{{1
++
+ {
+ 	_printf_(true,"INTERFROMMESHTOMESH2D - interpolation from a 2d triangular mesh onto a list of point\n");
+ 	_printf_(true,"\n");
+@@ -160,3 +116,4 @@
+ 	_printf_(true,"      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y,253,'Contour.exp');\n");
+ 	_printf_(true,"\n");
+ }
++//}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h	(revision 12117)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h	(revision 12118)
+@@ -5,34 +5,67 @@
+ #ifndef _INTERPFROMMESHTOMESH2d_H
+ #define _INTERPFROMMESHTOMESH2d_H
+ 
+-/* local prototypes: */
+-void InterpFromMeshToMesh2dUsage(void);
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
+ 
++/*Very important definition in case we are compiling a python module!: needs to come before header files inclusion*/
++#ifdef _HAVE_PYTHON_
++#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
++#endif
++
++/*Header files: */
+ #include "../../c/include/globals.h"
++#include "../../c/toolkits/toolkits.h"
++#include "../../c/include/include.h"
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
+ #include "../../c/issm-binding.h"
++#include "../../c/io/io.h"
++#include "../../c/EnumDefinitions/EnumDefinitions.h"
+ 
+-#undef __FUNCT__ 
+-#define __FUNCT__  "InterpFromMeshToMesh2d"
+-
+-
++#ifdef _HAVE_MATLAB_MODULES_
+ /* serial input macros: */
+-#define INDEXHANDLE prhs[0]
+-#define XHANDLE prhs[1]
+-#define YHANDLE prhs[2]
+-#define DATAHANDLE prhs[3]
+-#define XINTERPHANDLE prhs[4]
+-#define YINTERPHANDLE prhs[5]
+-#define DEFAULTHANDLE prhs[6]
+-#define FILENAME prhs[7]
++#define INDEX prhs[0]
++#define X prhs[1]
++#define Y prhs[2]
++#define DATA prhs[3]
++#define XINTERP prhs[4]
++#define YINTERP prhs[5]
++#define DEFAULT prhs[6]
++#define CONTOURNAME prhs[7]
+ 
+ /* serial output macros: */
+ #define DATAINTERP (mxArray**)&plhs[0]
++#endif
+ 
++#ifdef _HAVE_PYTHON_MODULES_
++/* serial input macros: */
++#define INDEX PyTuple_GetItem(args,0)
++#define X PyTuple_GetItem(args,1)
++#define Y PyTuple_GetItem(args,2)
++#define DATA PyTuple_GetItem(args,3)
++#define XINTERP PyTuple_GetItem(args,4)
++#define YINTERP PyTuple_GetItem(args,5)
++#define DEFAULT PyTuple_GetItem(args,6)
++#define CONTOURNAME PyTuple_GetItem(args,7)
++/* serial output macros: */
++#define DATAINTERP output,0
++#endif
++
++#undef __FUNCT__ 
++#define __FUNCT__  "InterpFromMeshToMesh2d"
++
+ /* serial arg counts: */
+ #undef NLHS
+ #define NLHS  1
++#undef NRHS
++#define NRHS  6 //can be 8 though
+ 
++/* local prototypes: */
++void InterpFromMeshToMesh2dUsage(void);
++
+ #endif
Index: /issm/oecreview/Archive/12101-12120/ISSM-12118-12119.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12118-12119.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12118-12119.diff	(revision 12325)
@@ -0,0 +1,14 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/include/python_macros.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/include/python_macros.h	(revision 12118)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/include/python_macros.h	(revision 12119)
+@@ -22,7 +22,8 @@
+  * will be trapped. Really nifty!*/
+ 
+ #define MODULEBOOT(); ModuleBoot();  \
+-	PyObject* output = PyTuple_New(NLHS); if (!output) return NULL;
++	PyObject* output = PyTuple_New(NLHS); if (!output) return NULL;\
++			int nrhs = (int)PyTuple_Size(args);
+ 
+ #define MODULEEND();  ModuleEnd(); \
+ 						 return output;
Index: /issm/oecreview/Archive/12101-12120/ISSM-12119-12120.diff
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-12119-12120.diff	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-12119-12120.diff	(revision 12325)
@@ -0,0 +1,52 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/pythonio.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/pythonio.h	(revision 12119)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/pythonio.h	(revision 12120)
+@@ -40,11 +40,11 @@
+ //void FetchData(Matrix** pmatrix,PyObject* py_ref);
+ //void FetchData(int** pvector,int* pM,PyObject* py_ref);
+ //void FetchData(float** pvector,int* pM,PyObject* py_ref);
+-//void FetchData(double** pvector,int* pM,PyObject* py_ref);
+ //void FetchData(bool** pvector,int* pM,PyObject* py_ref);
+ //void FetchData(Vector** pvector,PyObject* py_ref);
+ //void FetchData(char** pmatrix,int* pnumel,int* pndims,int** psize,PyObject* py_ref);
+ //void FetchData(Parameters** pparameters, DataHandle py_ref);
++void FetchData(double** pvector,int* pM,PyObject* py_ref);
+ void FetchData(double** pmatrix,int* pM,int *pN,PyObject* py_array);
+ void FetchData(char** pstring,PyObject* py_unicode);
+ void FetchData(double* pscalar,PyObject* py_float);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp	(revision 12119)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/python/io/FetchPythonData.cpp	(revision 12120)
+@@ -80,7 +80,30 @@
+ 	if(pmatrix)*pmatrix=matrix;
+ }
+ /*}}}*/
++/*FUNCTION FetchData(double** pvector,int* pM, PyObject* py_vector){{{1*/
++void FetchData(double** pvector,int* pM,PyObject* py_vector){
+ 
++	/*output: */
++	double* vector=NULL;
++	int M;
++	int ndim;
++	npy_intp*  dims=NULL;
++
++	/*retrive dimensions: */
++	ndim=PyArray_NDIM((const PyArrayObject*)py_vector);
++	if(ndim!=1)_error_("expecting an Mx1 vector in input!");
++	dims=PyArray_DIMS((PyArrayObject*)py_vector);
++	M=dims[0]; 
++	
++	/*retrieve internal value: */
++	vector=(double*)PyArray_DATA((PyArrayObject*)py_vector);
++
++	/*output: */
++	if(pM)*pM=M;
++	if(pvector)*pvector=vector;
++}
++/*}}}*/
++
+ /*Python version dependent: */
+ #if _PYTHON_MAJOR_ >= 3 
+ /*FUNCTION FetchData(char** pstring,PyObject* py_unicode){{{1*/
Index: /issm/oecreview/Archive/12101-12120/ISSM-DocReview-12101-12120.tex
===================================================================
--- /issm/oecreview/Archive/12101-12120/ISSM-DocReview-12101-12120.tex	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/ISSM-DocReview-12101-12120.tex	(revision 12325)
@@ -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/12101-12120/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12101-12120/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12101-12120
Index: /issm/oecreview/Archive/12101-12120/Makefile
===================================================================
--- /issm/oecreview/Archive/12101-12120/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12101-12120
+
+
+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/12101-12120/log.tex
===================================================================
--- /issm/oecreview/Archive/12101-12120/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/log.tex	(revision 12325)
@@ -0,0 +1,36 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12101-12102.diff: \\ Function name: \\A /issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscMatrixToDoubleMatrix.cpp A /issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscVectorToDoubleVector.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/petscpatches.h \\ Export determination: 6. \\Rationale: Relocation from matlab to petsc patches
+M /issm/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh M /issm/trunk-jpl/externalpackages/nose/install-macosx64sh M /issm/trunk-jpl/externalpackages/scipy/install-macosx64.sh M /issm/trunk-jpl/m4/issm\_options.m4 M /issm/trunk-jpl/src/Makefile.am M /issm/trunk-jpl/src/c/Container/Constraints.cpp M /issm/trunk-jpl/src/c/Container/Elements.cpp M /issm/trunk-jpl/src/c/Container/Loads.cpp M /issm/trunk-jpl/src/c/Container/Nodes.cpp M /issm/trunk-jpl/src/c/Container/Vertices.cpp M /issm/trunk-jpl/src/c/Makefile.am D /issm/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp D /issm/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/matlabio.h M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalConstraintsState.cpp M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalIsPresent.cpp M /issm/trunk-jpl/src/c/modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.cpp M /issm/trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp M /issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp M /issm/trunk-jpl/src/c/modules/IceVolumex/IceVolumex.cpp M /issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp M /issm/trunk-jpl/src/c/modules/MassFluxx/MassFluxx.cpp M /issm/trunk-jpl/src/c/modules/MaxAbsVxx/MaxAbsVxx.cpp M /issm/trunk-jpl/src/c/modules/MaxAbsVyx/MaxAbsVyx.cpp M /issm/trunk-jpl/src/c/modules/MaxAbsVzx/MaxAbsVzx.cpp M /issm/trunk-jpl/src/c/modules/MaxVelx/MaxVelx.cpp M /issm/trunk-jpl/src/c/modules/MaxVxx/MaxVxx.cpp M /issm/trunk-jpl/src/c/modules/MaxVyx/MaxVyx.cpp M /issm/trunk-jpl/src/c/modules/MaxVzx/MaxVzx.cpp M /issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp M /issm/trunk-jpl/src/c/modules/MinVelx/MinVelx.cpp M /issm/trunk-jpl/src/c/modules/MinVxx/MinVxx.cpp M /issm/trunk-jpl/src/c/modules/MinVyx/MinVyx.cpp M /issm/trunk-jpl/src/c/modules/MinVzx/MinVzx.cpp M /issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp M /issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp M /issm/trunk-jpl/src/c/modules/RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.cpp M /issm/trunk-jpl/src/c/modules/SurfaceAbsVelMisfitx/SurfaceAbsVelMisfitx.cpp M /issm/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.cpp M /issm/trunk-jpl/src/c/modules/SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.cpp M /issm/trunk-jpl/src/c/modules/SurfaceLogVelMisfitx/SurfaceLogVelMisfitx.cpp M /issm/trunk-jpl/src/c/modules/SurfaceLogVxVyMisfitx/SurfaceLogVxVyMisfitx.cpp M /issm/trunk-jpl/src/c/modules/SurfaceRelVelMisfitx/SurfaceRelVelMisfitx.cpp M /issm/trunk-jpl/src/c/modules/ThicknessAbsGradientx/ThicknessAbsGradientx.cpp M /issm/trunk-jpl/src/c/modules/ThicknessAbsMisfitx/ThicknessAbsMisfitx.cpp M /issm/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Metric.h M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/Patch.cpp M /issm/trunk-jpl/src/c/solutions/issm.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscMatrixToDoubleMatrix.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscVectorToDoubleVector.cpp M /issm/trunk-jpl/src/c/toolkits/toolkits.h A /issm/trunk-jpl/src/m/model/mesh/triangle.py M /issm/trunk-jpl/startup.py M /issm/trunk-jpl/test/NightlyRun/test101.py Stripped out the following layers: METIS: if not running with MPI, do not partition! MPI: can now run without PETSC and MPI, just using the gsl matrix format. PETSC and MPI: idem. Can not run MPI and PETSC separately. \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12102-12103.diff: \\ Function name: \\M /issm/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh M /issm/trunk-jpl/externalpackages/nose/install-macosx64sh M /issm/trunk-jpl/externalpackages/scipy/install-macosx64.sh M /issm/trunk-jpl/m4/issm\_options.m4 M /issm/trunk-jpl/src/Makefile.am M /issm/trunk-jpl/src/c/Container/Constraints.cpp M /issm/trunk-jpl/src/c/Container/Elements.cpp M /issm/trunk-jpl/src/c/Container/Loads.cpp M /issm/trunk-jpl/src/c/Container/Nodes.cpp M /issm/trunk-jpl/src/c/Container/Vertices.cpp M /issm/trunk-jpl/src/c/Makefile.am D /issm/trunk-jpl/src/c/matlab/io/PetscMatrixToDoubleMatrix.cpp D /issm/trunk-jpl/src/c/matlab/io/PetscVectorToDoubleVector.cpp M /issm/trunk-jpl/src/c/matlab/io/WriteMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/matlabio.h M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/RiftConstraintsState.cpp M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalConstraintsState.cpp M /issm/trunk-jpl/src/c/modules/ConstraintsStatex/ThermalIsPresent.cpp M /issm/trunk-jpl/src/c/modules/DragCoefficientAbsGradientx/DragCoefficientAbsGradientx.cpp M /issm/trunk-jpl/src/c/modules/ElementResponsex/ElementResponsex.cpp M /issm/trunk-jpl/src/c/modules/GroundinglineMigrationx/GroundinglineMigrationx.cpp M /issm/trunk-jpl/src/c/modules/IceVolumex/IceVolumex.cpp M /issm/trunk-jpl/src/c/modules/InputConvergencex/InputConvergencex.cpp M /issm/trunk-jpl/src/c/modules/MassFluxx/MassFluxx.cpp M /issm/trunk-jpl/src/c/modules/MaxAbsVxx/MaxAbsVxx.cpp M /issm/trunk-jpl/src/c/modules/MaxAbsVyx/MaxAbsVyx.cpp M /issm/trunk-jpl/src/c/modules/MaxAbsVzx/MaxAbsVzx.cpp M /issm/trunk-jpl/src/c/modules/MaxVelx/MaxVelx.cpp M /issm/trunk-jpl/src/c/modules/MaxVxx/MaxVxx.cpp M /issm/trunk-jpl/src/c/modules/MaxVyx/MaxVyx.cpp M /issm/trunk-jpl/src/c/modules/MaxVzx/MaxVzx.cpp M /issm/trunk-jpl/src/c/modules/MeshPartitionx/MeshPartitionx.cpp M /issm/trunk-jpl/src/c/modules/MinVelx/MinVelx.cpp M /issm/trunk-jpl/src/c/modules/MinVxx/MinVxx.cpp M /issm/trunk-jpl/src/c/modules/MinVyx/MinVyx.cpp M /issm/trunk-jpl/src/c/modules/MinVzx/MinVzx.cpp M /issm/trunk-jpl/src/c/modules/NodalValuex/NodalValuex.cpp M /issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp M /issm/trunk-jpl/src/c/modules/RheologyBbarAbsGradientx/RheologyBbarAbsGradientx.cpp M /issm/trunk-jpl/src/c/modules/SurfaceAbsVelMisfitx/SurfaceAbsVelMisfitx.cpp M /issm/trunk-jpl/src/c/modules/SurfaceAreax/SurfaceAreax.cpp M /issm/trunk-jpl/src/c/modules/SurfaceAverageVelMisfitx/SurfaceAverageVelMisfitx.cpp M /issm/trunk-jpl/src/c/modules/SurfaceLogVelMisfitx/SurfaceLogVelMisfitx.cpp M /issm/trunk-jpl/src/c/modules/SurfaceLogVxVyMisfitx/SurfaceLogVxVyMisfitx.cpp M /issm/trunk-jpl/src/c/modules/SurfaceRelVelMisfitx/SurfaceRelVelMisfitx.cpp M /issm/trunk-jpl/src/c/modules/ThicknessAbsGradientx/ThicknessAbsGradientx.cpp M /issm/trunk-jpl/src/c/modules/ThicknessAbsMisfitx/ThicknessAbsMisfitx.cpp M /issm/trunk-jpl/src/c/modules/TimeAdaptx/TimeAdaptx.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Metric.h M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/Patch.cpp M /issm/trunk-jpl/src/c/solutions/issm.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscMatrixToDoubleMatrix.cpp M /issm/trunk-jpl/src/c/toolkits/petsc/patches/PetscVectorToDoubleVector.cpp M /issm/trunk-jpl/src/c/toolkits/toolkits.h A /issm/trunk-jpl/src/m/model/mesh/triangle.py M /issm/trunk-jpl/startup.py M /issm/trunk-jpl/test/NightlyRun/test101.py \\ Export determination: 6. \\Rationale: Stripped out the following layers: METIS: if not running with MPI, do not partition! MPI: can now run without PETSC and MPI, just using the gsl matrix format. PETSC and MPI: idem. Can not run MPI and PETSC separately.
+M /issm/trunk-jpl/configs/config-arm.sh Arm processor configuration \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12103-12104.diff: \\ Function name: \\M /issm/trunk-jpl/configs/config-arm.sh \\ Export determination: 6. \\Rationale: Arm processor configuration
+M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp Create dense matrix if sparsity=1 \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12104-12105.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp \\ Export determination: 6. \\Rationale: Create dense matrix if sparsity=1
+M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp oops, wrong file \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12105-12106.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/objects/Numerics/Matrix.cpp \\ Export determination: 6. \\Rationale: oops, wrong file
+M /issm/trunk-jpl/src/c/toolkits/petsc/patches/NewMat.cpp Create dense matrix if sparsity=1 \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12106-12107.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/toolkits/petsc/patches/NewMat.cpp \\ Export determination: 6. \\Rationale: Create dense matrix if sparsity=1
+M /issm/trunk-jpl/externalpackages/petsc/install-dev-linux64.sh Added spai install \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12107-12108.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/petsc/install-dev-linux64.sh \\ Export determination: 6. \\Rationale: Added spai install
+M /issm/trunk-jpl/src/c/Container/Nodes.cpp Bug in MPI\_Gather \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12108-12109.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Nodes.cpp \\ Export determination: 6. \\Rationale: Bug in MPI\_Gather
+M /issm/trunk-jpl/src/c/Container/Nodes.cpp Fixed bug introduced while stripping MPI \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12109-12110.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Nodes.cpp \\ Export determination: 6. \\Rationale: Fixed bug introduced while stripping MPI
+M /issm/trunk-jpl/test/NightlyRun/test101.py triangle now working completely in python \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12110-12111.diff: \\ Function name: \\M /issm/trunk-jpl/test/NightlyRun/test101.py \\ Export determination: 6. \\Rationale: triangle now working completely in python
+D /issm/trunk-jpl/test/NightlyRun/test101.py A /issm/trunk-jpl/test/NightlyRun/test102.py (from /issm/trunk-jpl/test/NightlyRun/test101.py:12110) Moving to 102 \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12111-12112.diff: \\ Function name: \\D /issm/trunk-jpl/test/NightlyRun/test101.py A /issm/trunk-jpl/test/NightlyRun/test102.py (from /issm/trunk-jpl/test/NightlyRun/test101.py:12110) \\ Export determination: 6. \\Rationale: Moving to 102
+M /issm/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh M /issm/trunk-jpl/src/c/python/io/FetchPythonData.cpp M /issm/trunk-jpl/src/c/python/io/WritePythonData.cpp M /issm/trunk-jpl/src/c/python/io/pythonio.h M /issm/trunk-jpl/src/m/model/mesh M /issm/trunk-jpl/src/m/model/mesh/triangle.py A /issm/trunk-jpl/src/m/model/setmask.py A /issm/trunk-jpl/src/m/utils/Geometry/FlagElements.py M /issm/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp M /issm/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.h M /issm/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp M /issm/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.h M /issm/trunk-jpl/src/modules/TriMesh/TriMesh.cpp M /issm/trunk-jpl/src/modules/python/Makefile.am M /issm/trunk-jpl/startup.py M /issm/trunk-jpl/test/NightlyRun/test102.py Finished python version of setmask.py and FlagElements.py Also finished triangle.py, with addition of 2 python modules NodeConnectivity and ElementConnectivity. \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-12112-12113.diff: \\ Function name: \\M /issm/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh M /issm/trunk-jpl/src/c/python/io/FetchPythonData.cpp M /issm/trunk-jpl/src/c/python/io/WritePythonData.cpp M /issm/trunk-jpl/src/c/python/io/pythonio.h M /issm/trunk-jpl/src/m/model/mesh M /issm/trunk-jpl/src/m/model/mesh/triangle.py A /issm/trunk-jpl/src/m/model/setmask.py A /issm/trunk-jpl/src/m/utils/Geometry/FlagElements.py M /issm/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp M /issm/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.h M /issm/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp M /issm/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.h M /issm/trunk-jpl/src/modules/TriMesh/TriMesh.cpp M /issm/trunk-jpl/src/modules/python/Makefile.am M /issm/trunk-jpl/startup.py M /issm/trunk-jpl/test/NightlyRun/test102.py \\ Export determination: 6. \\Rationale: Finished python version of setmask.py and FlagElements.py Also finished triangle.py, with addition of 2 python modules NodeConnectivity and ElementConnectivity.
+M /issm/trunk-jpl/src/m/classes/model.py A /issm/trunk-jpl/src/m/model/addnote.py A /issm/trunk-jpl/src/m/model/parameterization/parameterize.py M /issm/trunk-jpl/test/NightlyRun/test102.py Implemented parameterize routine in python \\\\
+\noindent \textbf{Change \#13} with diff file ISSM-12113-12114.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/classes/model.py A /issm/trunk-jpl/src/m/model/addnote.py A /issm/trunk-jpl/src/m/model/parameterization/parameterize.py M /issm/trunk-jpl/test/NightlyRun/test102.py \\ Export determination: 6. \\Rationale: Implemented parameterize routine in python \\\\
+\noindent \textbf{Change \#14} with diff file ISSM-12114-12115.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/gsl/install-android-4.0.sh M /issm/trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make M /issm/trunk-jpl/m4/issm\_options.m4 \\ Export determination: 6. \\Rationale: Created the install script for GSL to cross-compile for arm-linux-android and made minor modifications to other scripts. \\\\
+\noindent \textbf{Change \#15} with diff file ISSM-12115-12116.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/gsl/install-android-4.0.sh M /issm/trunk-jpl/externalpackages/triangle/configs/android/android-4.0/configure.make M /issm/trunk-jpl/m4/issm\_options.m4 \\ Export determination: 6. \\Rationale: Created the install script for GSL to cross-compile for arm-linux-android and made minor modifications to other scripts.
+M /issm/trunk-jpl/src/m/model/mesh/triangle.py Indexing bug \\\\
+\noindent \textbf{Change \#16} with diff file ISSM-12116-12117.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/mesh/triangle.py \\ Export determination: 6. \\Rationale: Indexing bug
+M /issm/trunk-jpl/src/m/classes/materials.py Added defaults for materials class \\\\
+\noindent \textbf{Change \#17} with diff file ISSM-12117-12118.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/classes/materials.py \\ Export determination: 6. \\Rationale: Added defaults for materials class
+M /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp M /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h M /issm/trunk-jpl/src/modules/python/Makefile.am Adapted InterpFromMeshToMesh2d to python \\\\
+\noindent \textbf{Change \#18} with diff file ISSM-12118-12119.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp M /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h M /issm/trunk-jpl/src/modules/python/Makefile.am \\ Export determination: 6. \\Rationale: Adapted InterpFromMeshToMesh2d to python
+M /issm/trunk-jpl/src/c/python/include/python\_macros.h Added nrhs as input argument for all python modules to access \\\\
+\noindent \textbf{Change \#19} with diff file ISSM-12119-12120.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/python/include/python\_macros.h \\ Export determination: 6. \\Rationale: Added nrhs as input argument for all python modules to access
+M /issm/trunk-jpl/src/c/python/io/FetchPythonData.cpp M /issm/trunk-jpl/src/c/python/io/pythonio.h Added fetch data capability for double* vector \\\\
Index: /issm/oecreview/Archive/12101-12120/r1.tex
===================================================================
--- /issm/oecreview/Archive/12101-12120/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12101
Index: /issm/oecreview/Archive/12101-12120/r2.tex
===================================================================
--- /issm/oecreview/Archive/12101-12120/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12101-12120/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12120
Index: /issm/oecreview/Archive/12121-12140/Date.tex
===================================================================
--- /issm/oecreview/Archive/12121-12140/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12121-12140/ISSM-12121-12122.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12121-12122.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12121-12122.diff	(revision 12325)
@@ -0,0 +1,75 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/Par/SquareShelfConstrained.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/Par/SquareShelfConstrained.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/Par/SquareShelfConstrained.py	(revision 12122)
+@@ -0,0 +1,57 @@
++from numpy import *
++import scipy.io as matio
++import InterpFromMeshToMesh2d as im
++
++#Start defining model parameters here
++#Geometry
++hmin = 300.
++hmax = 1000.
++ymin = min(md.mesh.y)
++ymax = max(md.mesh.y)
++
++md.geometry.thickness = hmax+(hmin-hmax)*(md.mesh.y-ymin)/(ymax-ymin)
++md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
++md.geometry.surface = md.geometry.bed+md.geometry.thickness
++
++#%Initial velocity 
++mat=matio.loadmat('../Data/SquareShelfConstrained.data')
++#deal with 'F' oriented matlab matrices!
++index=mat['index'].astype(float)
++index=reshape(index.T,(len(index),3),order='F')
++
++md.initialization.vx = im.InterpFromMeshToMesh2d(index, mat['x'], mat['y'], mat['vx'], md.mesh.x, md.mesh.y)
++md.initialization.vy = im.InterpFromMeshToMesh2d(index, mat['x'], mat['y'], mat['vy'], md.mesh.x, md.mesh.y)
++md.initialization.vz = zeros(md.mesh.numberofvertices)
++md.initialization.pressure = zeros(md.mesh.numberofvertices)
++#%Materials
++md.initialization.temperature = (273.-20)*ones(md.mesh.numberofvertices)
++md.materials.rheology_B = paterson(md.initialization.temperature)
++md.materials.rheology_n = 3.*ones(md.mesh.numberofelements)
++#%Surface mass balance and basal melting
++md.surfaceforcings.mass_balance = 10.*ones(md.mesh.numberofvertices)
++md.basalforcings.melting_rate = 5.*ones(md.mesh.numberofvertices)
++#%Friction
++pos = nonzero(md.mask.elementonfloatingice)
++md.friction.coefficient = 20.*ones(md.mesh.numberofvertices)
++md.friction.coefficient[(md.mesh.elements[int(pos)-1,:])] = 0.
++md.friction.p = ones(md.mesh.numberofelements)
++md.friction.q = ones(md.mesh.numberofelements)
++#%Numerical parameters
++md.diagnostic.viscosity_overshoot = 0.0
++md.prognostic.stabilization = 1.
++md.thermal.stabilization = 1.
++md.verbose = verbose[-1]
++md.settings.waitonlock = 30.
++md.diagnostic.restol = 0.05
++md.diagnostic.reltol = 0.05
++md.steadystate.reltol = 0.05
++md.diagnostic.abstol = nan
++md.timestepping.time_step = 1.
++md.timestepping.final_time = 3.
++#%Deal with boundary conditions:
++md = SetIceShelfBC(md)
++#%Change name so that no test have the same name
++A = dbstack
++if length(A) > 2.:
++    md.miscellaneous.name = A[2].file[0:0-2.]
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test102.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test102.py	(revision 12121)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test102.py	(revision 12122)
+@@ -4,6 +4,6 @@
+ from parameterize import *
+ 
+ md=model();
+-md=triangle(md,'../Exp/Square.exp',150000);
++md=triangle(md,'../Exp/Square.exp',50000);
+ md=setmask(md,'all','');
+-md=parameterize(md,'../Par/SquareShelfConstrained.par')
++md=parameterize(md,'../Par/SquareShelfConstrained.py')
Index: /issm/oecreview/Archive/12121-12140/ISSM-12122-12123.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12122-12123.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12122-12123.diff	(revision 12325)
@@ -0,0 +1,922 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/thermal.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/thermal.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/thermal.py	(revision 12123)
+@@ -12,6 +12,10 @@
+ 		self.penalty_lock      = 0
+ 		self.penalty_factor    = 0
+ 		self.isenthalpy        = 0
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -24,3 +28,25 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,'isenthalpy','use an enthalpy formulation to include temperate ice (default is 0)'))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		
++		#Number of unstable constraints acceptable
++		obj.penalty_threshold=0
++
++		#Type of stabilization used
++		obj.stabilization=1
++
++		#Maximum number of iterations
++		obj.maxiter=100
++
++		#factor used to compute the values of the penalties: kappa=max(stiffness matrix)*10^penalty_factor
++		obj.penalty_factor=3
++
++		#Should we use cold ice (default) or enthalpy formulation
++		obj.isenthalpy=0
++
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/settings.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/settings.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/settings.py	(revision 12123)
+@@ -5,11 +5,15 @@
+ 	#properties
+ 	def __init__(self):
+ 		# {{{ Properties
+-		self.io_gather           = 0;
+-		self.lowmem              = 0;
+-		self.results_as_patches  = 0;
+-		self.output_frequency    = 0;
+-		self.waitonlock          = 0;
++		self.io_gather           = 0
++		self.lowmem              = 0
++		self.results_as_patches  = 0
++		self.output_frequency    = 0
++		self.waitonlock          = 0
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -22,3 +26,28 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,"waitonlock","maximum number of minutes to wait for batch results, or return 0"))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		
++		#are we short in memory ? (0 faster but requires more memory)
++		obj.lowmem=0
++
++		#i/o:
++		obj.io_gather=1
++
++		#results frequency by default every step
++		obj.output_frequency=1
++
++		#do not use patches by default (difficult to plot)
++		obj.results_as_patches=0
++
++		#this option can be activated to load automatically the results
++		#onto the model after a parallel run by waiting for the lock file
++		#N minutes that is generated once the solution has converged
++		#0 to desactivate
++		obj.waitonlock=float('Inf')
++
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/balancethickness.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/balancethickness.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/balancethickness.py	(revision 12123)
+@@ -7,6 +7,10 @@
+ 		self.spcthickness = float('NaN')
+ 		self.thickening_rate           = float('NaN')
+ 		self.stabilization           = 0
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -18,3 +22,12 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,'stabilization','0: None, 1: SU, 2: MacAyeal''s artificial diffusivity, 3:DG'))
+ 		return string
+ 		#}}}
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		
++		#Type of stabilization used
++		obj.stabilization=1
++
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/groundingline.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/groundingline.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/groundingline.py	(revision 12123)
+@@ -7,6 +7,10 @@
+ 		# {{{ Properties
+ 		self.migration=''
+ 		self.melting_rate=float('NaN')
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -15,4 +19,16 @@
+ 		string="%s\n\n%s"%(string,fielddisplay(obj,'migration','type of grounding line migration: ''SoftMigration'',''AgressiveMigration'' or ''None'''))
+ 		string="%s\n%s"%(string,fielddisplay(obj,'melting_rate','melting rate applied when previously grounded parts start floating'))
+ 		return string
+-		#}}}
++		#}}}	
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++
++		#Type of migration
++		obj.migration='None'
++
++		#basal melting rate correction: 
++		obj.melting_rate=0;
++
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/transient.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/transient.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/transient.py	(revision 12123)
+@@ -10,6 +10,10 @@
+ 		self.isthermal         = 0
+ 		self.isgroundingline   = 0
+ 		self.requested_outputs = float('NaN')
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -21,3 +25,16 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,'requested_outputs','list of additional outputs requested'))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		
++		#full analysis: Diagnostic, Prognostic and Thermal but no groundingline migration for now
++		obj.isprognostic=1
++		obj.isdiagnostic=1
++		obj.isthermal=1
++		obj.isgroundingline=0
++
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/hydrology.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/hydrology.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/hydrology.py	(revision 12123)
+@@ -12,6 +12,10 @@
+ 		self.q              = 0
+ 		self.kn             = 0
+ 		self.stabilization  = 0
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 	
+ 		#}}}
+ 	def __repr__(obj):
+@@ -27,3 +31,20 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,'stabilization','artificial diffusivity (default is 1). can be more than 1 to increase diffusivity.'))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		
++		#Parameters from Johnson's 2002 thesis, section 3.5.4			 
++		obj.n=.02			
++		obj.CR=.01
++		obj.p=2
++		obj.q=1
++		obj.kn=0
++
++		#Type of stabilization to use 0:nothing 1:artificial_diffusivity
++		obj.stabilization=1
++
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/surfaceforcings.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/surfaceforcings.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/surfaceforcings.py	(revision 12123)
+@@ -7,6 +7,10 @@
+ 		# {{{ Properties
+ 		self.precipitation = float('NaN')
+ 		self.mass_balance  = float('NaN')
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -17,3 +21,9 @@
+ 
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/rifts.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/rifts.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/rifts.py	(revision 12123)
+@@ -7,6 +7,10 @@
+ 		# {{{ Properties
+ 		self.riftstruct     = float('NaN')
+ 		self.riftproperties = float('NaN')
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -16,3 +20,9 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,'riftproperties',''))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/mesh.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/mesh.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/mesh.py	(revision 12123)
+@@ -45,6 +45,9 @@
+ 		self.extractedvertices           = float('NaN');
+ 		self.extractedelements           = float('NaN');
+ 
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -106,3 +109,17 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,"hemisphere","Indicate hemisphere ""n"" or ""s"" "))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		
++		#the connectivity is the avergaded number of nodes linked to a
++		#given node through an edge. This connectivity is used to initially
++		#allocate memory to the stiffness matrix. A value of 16 seems to
++		#give a good memory/time ration. This value can be checked in
++		#trunk/test/Miscellaneous/runme.m
++		obj.average_vertex_connectivity=25
++
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/timestepping.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/timestepping.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/timestepping.py	(revision 12123)
+@@ -5,10 +5,14 @@
+ 	#properties
+ 	def __init__(self):
+ 		# {{{ Properties
+-		self.time_step       = 0;
+-		self.final_time      = 0;
+-		self.time_adapt      = 0;
+-		self.cfl_coefficient = 0;
++		self.time_step       = 0
++		self.final_time      = 0
++		self.time_adapt      = 0
++		self.cfl_coefficient = 0
++		
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -19,3 +23,19 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,"cfl_coefficient","coefficient applied to cfl condition"))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		
++		#time between 2 time steps
++		obj.time_step=1/2
++
++		#final time
++		obj.final_time=10*obj.time_step
++
++		#time adaptation? 
++		obj.time_adapt=0
++		obj.cfl_coefficient=.5
++
++		return obj
++	#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/constants.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/constants.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/constants.py	(revision 12123)
+@@ -8,6 +8,10 @@
+ 		self.g                    = 0
+ 		self.yts                  = 0
+ 		self.referencetemperature = 0
++		
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -19,3 +23,19 @@
+ 
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		
++		#acceleration due to gravity (m/s^2)
++		obj.g=9.81
++
++		#converstion from year to seconds
++		obj.yts=365*24*3600
++
++		#the reference temperature for enthalpy model (cf Aschwanden)
++		obj.referencetemperature=223.15
++
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/friction.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/friction.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/friction.py	(revision 12123)
+@@ -8,6 +8,10 @@
+ 		self.coefficient = float('NaN')
+ 		self.p           = float('NaN')
+ 		self.q           = float('NaN')
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -17,3 +21,9 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,"q","q exponent"))
+ 		return string
+ 		#}}}
++
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/materials.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/materials.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/materials.py	(revision 12123)
+@@ -43,38 +43,38 @@
+ 		#}}}
+ 	def setdefaultparameters(obj):
+ 		# {{{setdefaultparameters
+-			#ice density (kg/m^3)
+-			obj.rho_ice=917
++		#ice density (kg/m^3)
++		obj.rho_ice=917
+ 
+-			#water density (kg/m^3)
+-			obj.rho_water=1023
++		#water density (kg/m^3)
++		obj.rho_water=1023
+ 
+-			#water viscosity (N.s/m^2)
+-			obj.mu_water=0.001787  
++		#water viscosity (N.s/m^2)
++		obj.mu_water=0.001787  
+ 
+-			#ice heat capacity cp (J/kg/K)
+-			obj.heatcapacity=2093
++		#ice heat capacity cp (J/kg/K)
++		obj.heatcapacity=2093
+ 
+-			#ice latent heat of fusion L (J/kg)
+-			obj.latentheat=3.34*10**5
++		#ice latent heat of fusion L (J/kg)
++		obj.latentheat=3.34*10**5
+ 
+-			#ice thermal conductivity (W/m/K)
+-			obj.thermalconductivity=2.4
++		#ice thermal conductivity (W/m/K)
++		obj.thermalconductivity=2.4
+ 
+-			#the melting point of ice at 1 atmosphere of pressure in K
+-			obj.meltingpoint=273.15
++		#the melting point of ice at 1 atmosphere of pressure in K
++		obj.meltingpoint=273.15
+ 
+-			#rate of change of melting point with pressure (K/Pa)
+-			obj.beta=9.8*10**-8
++		#rate of change of melting point with pressure (K/Pa)
++		obj.beta=9.8*10**-8
+ 
+-			#mixed layer (ice-water interface) heat capacity (J/kg/K)
+-			obj.mixed_layer_capacity=3974
++		#mixed layer (ice-water interface) heat capacity (J/kg/K)
++		obj.mixed_layer_capacity=3974
+ 
+-			#thermal exchange velocity (ice-water interface) (m/s)
+-			obj.thermal_exchange_velocity=1.00*10**-4
++		#thermal exchange velocity (ice-water interface) (m/s)
++		obj.thermal_exchange_velocity=1.00*10**-4
+ 
+-			#Rheology law: what is the temperature dependence of B with T
+-			#available: none, paterson and arrhenius
+-			obj.rheology_law='Paterson'
+-			return obj
++		#Rheology law: what is the temperature dependence of B with T
++		#available: none, paterson and arrhenius
++		obj.rheology_law='Paterson'
++		return obj
+ 		#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/diagnostic.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/diagnostic.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/diagnostic.py	(revision 12123)
+@@ -23,6 +23,10 @@
+ 		self.rift_penalty_threshold   = 0
+ 		self.referential              = float('NaN')
+ 		self.requested_outputs        = float('NaN')
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -61,3 +65,35 @@
+ 
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		#maximum of non-linear iterations.
++		obj.maxiter=100
++
++		#Convergence criterion: absolute, relative and residual
++		obj.restol=10**-4;
++		obj.reltol=0.01
++		obj.abstol=10
++
++		obj.stokesreconditioning=10**13
++		obj.shelf_dampening=0
++
++		#Penalty factor applied kappa=max(stiffness matrix)*10^penalty_factor
++		obj.penalty_factor=3
++
++		#coefficient to update the viscosity between each iteration of
++		#a diagnostic according to the following formula
++		#viscosity(n)=viscosity(n)+viscosity_overshoot(viscosity(n)-viscosity(n-1))
++		obj.viscosity_overshoot=0
++
++		#Stop the iterations of rift if below a threshold
++		obj.rift_penalty_threshold=0
++
++		#in some solutions, it might be needed to stop a run when only
++		#a few constraints remain unstable. For thermal computation, this
++		#parameter is often used.
++		obj.rift_penalty_lock=10
++
++		return obj
++	#}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/debug.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/debug.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/debug.py	(revision 12123)
+@@ -7,6 +7,10 @@
+ 		# {{{ Properties
+ 		self.valgrind=False
+ 		self.gprof   = False
++		
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -16,3 +20,9 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,"gprof","use gnu-profiler to find out where the time is spent"))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/initialization.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/initialization.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/initialization.py	(revision 12123)
+@@ -14,6 +14,10 @@
+ 		self.temperature   = float('NaN')
+ 		self.watercolumn   = float('NaN')
+ 		self.waterfraction = float('NaN')
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -30,3 +34,9 @@
+ 
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/prognostic.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/prognostic.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/prognostic.py	(revision 12123)
+@@ -11,6 +11,10 @@
+ 		self.stabilization          = 0
+ 		self.vertex_pairing         = float('NaN')
+ 		self.penalty_factor         = 0
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -22,3 +26,22 @@
+ 
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		
++		#Type of stabilization to use 0:nothing 1:artificial_diffusivity 3:Discontinuous Galerkin
++		obj.stabilization=1
++
++		#Factor applied to compute the penalties kappa=max(stiffness matrix)*10^penalty_factor
++		obj.penalty_factor=3
++
++		#Minimum ice thickness that can be used
++		obj.min_thickness=1
++
++		#Hydrostatic adjustment
++		obj.hydrostatic_adjustment='Absolute'
++
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/mask.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/mask.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/mask.py	(revision 12123)
+@@ -11,6 +11,10 @@
+ 		self.vertexonfloatingice  = float('NaN')
+ 		self.vertexongroundedice  = float('NaN')
+ 		self.vertexonwater        = float('NaN')
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -24,3 +28,9 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,"vertexonwater","vertex on water flags list"))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/radaroverlay.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/radaroverlay.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/radaroverlay.py	(revision 12123)
+@@ -8,6 +8,10 @@
+ 		self.pwr = float('NaN')
+ 		self.x   = float('NaN')
+ 		self.y   = float('NaN')
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -17,3 +21,9 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,'y','corresponding y coordinates'))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/autodiff.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/autodiff.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/autodiff.py	(revision 12123)
+@@ -8,6 +8,10 @@
+ 		self.isautodiff = False
+ 		self.forward    = True
+ 		self.reverse    = False
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -17,3 +21,8 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,'reverse','backward differentiation'))
+ 		return string
+ 		#}}}
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/steadystate.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/steadystate.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/steadystate.py	(revision 12123)
+@@ -8,6 +8,10 @@
+ 		self.reltol            = 0
+ 		self.maxiter           = 0
+ 		self.requested_outputs = float('NaN')
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -17,3 +21,16 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,'requested_outputs','additional requested outputs'))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		
++		#maximum of steady state iterations
++		obj.maxiter=100
++
++		#Relative tolerance for the steadystate convertgence
++		obj.reltol=0.01
++
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/geometry.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/geometry.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/geometry.py	(revision 12123)
+@@ -10,6 +10,10 @@
+ 		self.bed               = float('NaN')
+ 		self.bathymetry        = float('NaN')
+ 		self.hydrostatic_ratio = float('NaN')
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -23,3 +27,9 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,'hydrostatic_ratio','coefficient for ice shelves'' thickness correction: hydrostatic_ratio H_obs+ (1-hydrostatic_ratio) H_hydro'))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/qmu.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/qmu.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/qmu.py	(revision 12123)
+@@ -21,9 +21,19 @@
+ 		self.mass_flux_segments          = []
+ 		self.adjacency                   = float('NaN')
+ 		self.vertex_weight               = float('NaN')
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+ 		string="   qmu parameters: not implemented yet!"
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/miscellaneous.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/miscellaneous.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/miscellaneous.py	(revision 12123)
+@@ -8,6 +8,10 @@
+ 		self.notes = ''
+ 		self.name  = ''
+ 		self.dummy = {}
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -18,3 +22,9 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,'dummy','empty field to store some data'))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/private.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/private.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/private.py	(revision 12123)
+@@ -8,6 +8,10 @@
+ 		self.runtimename = ''
+ 		self.bamg        = {}
+ 		self.solution    = '';
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -17,3 +21,9 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,'solution','type of solution launched'))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/inversion.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/inversion.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/inversion.py	(revision 12123)
+@@ -57,3 +57,48 @@
+ 		string="%s\n%s"%(string,'   503: ThicknessAbsGradient')
+ 		return string
+ 		#}}}
++
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		
++		#default is incomplete adjoint for now
++		obj.incomplete_adjoint=1
++
++		#parameter to be inferred by control methods (only
++		#drag and B are supported yet)
++		obj.control_parameters=['FrictionCoefficient']
++
++		#number of steps in the control methods
++		obj.nsteps=20
++
++		#maximum number of iteration in the optimization algorithm for
++		#each step
++		obj.maxiter_per_step=20*ones(obj.nsteps)
++
++		#the inversed parameter is updated as follows:
++		#new_par=old_par + gradient_scaling(n)*C*gradient with C in [0 1];
++		#usually the gradient_scaling must be of the order of magnitude of the 
++		#inversed parameter (10^8 for B, 50 for drag) and can be decreased
++		#after the first iterations
++		obj.gradient_scaling=50*ones(obj.nsteps)
++
++		#several responses can be used:
++		obj.cost_functions=101*ones(obj.nsteps)
++
++		#step_threshold is used to speed up control method. When
++		#misfit(1)/misfit(0) < obj.step_threshold, we go directly to
++		#the next step
++		obj.step_threshold=.7*ones(obj.nsteps) #30 per cent decrement
++
++		#stop control solution at the gradient computation and return it? 
++		obj.gradient_only=0
++
++		#cost_function_threshold is a criteria to stop the control methods.
++		#if J[n]-J[n-1]/J[n] < criteria, the control run stops
++		#NaN if not applied
++		obj.cost_function_threshold=NaN #not activated 
++
++		return obj
++		#}}}
++
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/basalforcings.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/basalforcings.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/basalforcings.py	(revision 12123)
+@@ -8,6 +8,10 @@
+ 		self.melting_rate             = float('NaN')
+ 		self.melting_rate_correction  = float('NaN')
+ 		self.geothermalflux           = float('NaN')
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -18,3 +22,8 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,"geothermalflux","geothermal heat flux [W/m^2]"))
+ 		return string
+ 		#}}}
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		return obj
++	#}}}
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/flowequation.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/flowequation.py	(revision 12122)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/flowequation.py	(revision 12123)
+@@ -14,6 +14,10 @@
+ 		self.bordermacayeal       = float('NaN')
+ 		self.borderpattyn         = float('NaN')
+ 		self.borderstokes         = float('NaN')
++
++		#set defaults
++		self.setdefaultparameters()
++
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+@@ -29,3 +33,9 @@
+ 		string="%s\n%s"%(string,fielddisplay(obj,'borderstokes','vertices on Stokes'' border (for tiling)'))
+ 		return string
+ 		#}}}
++		
++	def setdefaultparameters(obj):
++		# {{{setdefaultparameters
++		return obj
++	#}}}
++
Index: /issm/oecreview/Archive/12121-12140/ISSM-12123-12124.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12123-12124.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12123-12124.diff	(revision 12325)
@@ -0,0 +1,65 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/Par/SquareShelfConstrained.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/Par/SquareShelfConstrained.py	(revision 12123)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/Par/SquareShelfConstrained.py	(revision 12124)
+@@ -1,6 +1,8 @@
+ from numpy import *
++from verbose import *
+ import scipy.io as matio
+ import InterpFromMeshToMesh2d as im
++from   paterson import  *
+ 
+ #Start defining model parameters here
+ #Geometry
+@@ -13,7 +15,7 @@
+ md.geometry.bed=-md.materials.rho_ice/md.materials.rho_water*md.geometry.thickness;
+ md.geometry.surface = md.geometry.bed+md.geometry.thickness
+ 
+-#%Initial velocity 
++#Initial velocity 
+ mat=matio.loadmat('../Data/SquareShelfConstrained.data')
+ #deal with 'F' oriented matlab matrices!
+ index=mat['index'].astype(float)
+@@ -23,24 +25,24 @@
+ md.initialization.vy = im.InterpFromMeshToMesh2d(index, mat['x'], mat['y'], mat['vy'], md.mesh.x, md.mesh.y)
+ md.initialization.vz = zeros(md.mesh.numberofvertices)
+ md.initialization.pressure = zeros(md.mesh.numberofvertices)
+-#%Materials
++#Materials
+ md.initialization.temperature = (273.-20)*ones(md.mesh.numberofvertices)
+ md.materials.rheology_B = paterson(md.initialization.temperature)
+ md.materials.rheology_n = 3.*ones(md.mesh.numberofelements)
+-#%Surface mass balance and basal melting
++#Surface mass balance and basal melting
+ md.surfaceforcings.mass_balance = 10.*ones(md.mesh.numberofvertices)
+ md.basalforcings.melting_rate = 5.*ones(md.mesh.numberofvertices)
+-#%Friction
++#Friction
+ pos = nonzero(md.mask.elementonfloatingice)
+ md.friction.coefficient = 20.*ones(md.mesh.numberofvertices)
+-md.friction.coefficient[(md.mesh.elements[int(pos)-1,:])] = 0.
++md.friction.coefficient[md.mesh.elements[pos,:].astype(int)-1] =0.
+ md.friction.p = ones(md.mesh.numberofelements)
+ md.friction.q = ones(md.mesh.numberofelements)
+-#%Numerical parameters
++#Numerical parameters
+ md.diagnostic.viscosity_overshoot = 0.0
+ md.prognostic.stabilization = 1.
+ md.thermal.stabilization = 1.
+-md.verbose = verbose[-1]
++md.verbose = verbose()
+ md.settings.waitonlock = 30.
+ md.diagnostic.restol = 0.05
+ md.diagnostic.reltol = 0.05
+@@ -48,9 +50,9 @@
+ md.diagnostic.abstol = nan
+ md.timestepping.time_step = 1.
+ md.timestepping.final_time = 3.
+-#%Deal with boundary conditions:
++#Deal with boundary conditions:
+ md = SetIceShelfBC(md)
+-#%Change name so that no test have the same name
++#Change name so that no test have the same name
+ A = dbstack
+ if length(A) > 2.:
+     md.miscellaneous.name = A[2].file[0:0-2.]
Index: /issm/oecreview/Archive/12121-12140/ISSM-12124-12125.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12124-12125.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12124-12125.diff	(revision 12325)
@@ -0,0 +1,15 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.py	(revision 12124)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/mesh/triangle.py	(revision 12125)
+@@ -37,8 +37,8 @@
+ 
+ 
+ 	#Fill in rest of fields:
+-	md.mesh.numberofelements = size(md.mesh.elements)
+-	md.mesh.numberofvertices = size(md.mesh.x)
++	md.mesh.numberofelements = len(md.mesh.elements)
++	md.mesh.numberofvertices = len(md.mesh.x)
+ 	md.mesh.z = zeros(md.mesh.numberofvertices)
+ 	md.mesh.vertexonboundary = zeros(md.mesh.numberofvertices)
+ 	md.mesh.vertexonboundary[md.mesh.segments[:,0:2].astype(int)-1] = 1.
Index: /issm/oecreview/Archive/12121-12140/ISSM-12125-12126.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12125-12126.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12125-12126.diff	(revision 12325)
@@ -0,0 +1,55 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Meca/paterson.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Meca/paterson.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Meca/paterson.py	(revision 12126)
+@@ -0,0 +1,50 @@
++from numpy import *
++
++def paterson(temperature):
++
++    # Local Variables: pos11, pos5, pos10, temperature, pos, T, pos8, pos9, pos6, pos7, pos4, rigidity, pos2, pos3, pos1
++    # Function calls: length, zeros, argwhere, paterson, error
++    #PATERSON - figure out the rigidity of ice for a given temperature
++    #
++    #   rigidigty (in s^(1/3)Pa) is the flow law paramter in the flow law sigma=B*e(1/3) (Paterson, p97). 
++    #   temperature is in Kelvin degrees
++    #
++    #   Usage:
++    #      rigidity=paterson(temperature)
++    
++	pos=argwhere(temperature<0.)
++	if len(pos):
++		print 'input temperature should be in Kelvin (positive)'
++		return []
++    
++	T = temperature-273.15
++	#The routine below is equivalent to:
++	# n=3; T=temperature-273;
++	# %From paterson,
++	# Temp=[0;-2;-5;-10;-15;-20;-25;-30;-35;-40;-45;-50];
++	# A=[6.8*10^-15;2.4*10^-15;1.6*10^-15;4.9*10^-16;2.9*10^-16;1.7*10^-16;9.4*
++	# 10^-17;5.1*10^-17;2.7*10^-17;1.4*10^-17;7.3*10^-18;3.6*10^-18];;%s-1(kPa-3)
++	# %Convert into rigidity B
++	# B=A.^(-1/n)*10^3; %s^(1/3)Pa
++	# %Now, do a cubic fit between Temp and B: 
++	# fittedmodel=fit(Temp,B,'cubicspline');
++	# rigidity=fittedmodel(temperature);
++
++	rigidity=zeros(len(T))
++	pos1=argwhere(T<=-45);           rigidity[pos1]=10**8*(-0.000292866376675*(T[pos1]+50)**3+ 0.011672640664130*(T[pos1]+50)**2  -0.325004442485481*(T[pos1]+50)+  6.524779401948101)
++	pos2=argwhere(logical_and(-45<=T,T<-40));   rigidity[pos2]=10**8*(-0.000292866376675*(T[pos2]+45)**3+ 0.007279645014004*(T[pos2]+45)**2  -0.230243014094813*(T[pos2]+45)+  5.154964909039554)
++	pos3=argwhere(logical_and(-40<=T,T<-35));   rigidity[pos3]=10**8*(0.000072737147457*(T[pos3]+40)**3+  0.002886649363879*(T[pos3]+40)**2  -0.179411542205399*(T[pos3]+40)+  4.149132666831214)
++	pos4=argwhere(logical_and(-35<=T,T<-30));   rigidity[pos4]=10**8*(-0.000086144770023*(T[pos4]+35)**3+ 0.003977706575736*(T[pos4]+35)**2  -0.145089762507325*(T[pos4]+35)+  3.333333333333331)
++	pos5=argwhere(logical_and(-30<=T,T<-25));   rigidity[pos5]=10**8*(-0.000043984685769*(T[pos5]+30)**3+ 0.002685535025386*(T[pos5]+30)**2  -0.111773554501713*(T[pos5]+30)+  2.696559088937191)
++	pos6=argwhere(logical_and(-25<=T,T<-20));   rigidity[pos6]=10**8*(-0.000029799523463*(T[pos6]+25)**3+ 0.002025764738854*(T[pos6]+25)**2  -0.088217055680511*(T[pos6]+25)+  2.199331606342181)
++	pos7=argwhere(logical_and(-20<=T,T<-15));   rigidity[pos7]=10**8*(0.000136920904777*(T[pos7]+20)**3+  0.001578771886910*(T[pos7]+20)**2  -0.070194372551690*(T[pos7]+20)+  1.805165505978111)
++	pos8=argwhere(logical_and(-15<=T,T<-10));   rigidity[pos8]=10**8*(-0.000899763781026*(T[pos8]+15)**3+ 0.003632585458564*(T[pos8]+15)**2  -0.044137585824322*(T[pos8]+15)+  1.510778053489523)
++	pos9=argwhere(logical_and(-10<=T,T<-5));    rigidity[pos9]=10**8*(0.001676964325070*(T[pos9]+10)**3-  0.009863871256831*(T[pos9]+10)**2  -0.075294014815659*(T[pos9]+10)+  1.268434288203714)
++	pos10=argwhere(logical_and(-5<=T,T<-2));    rigidity[pos10]=10**8*(-0.003748937622487*(T[pos10]+5)**3+0.015290593619213*(T[pos10]+5)**2  -0.048160403003748*(T[pos10]+5)+  0.854987973338348)
++	pos11=argwhere(-2<=T);           rigidity[pos11]=10**8*(-0.003748937622488*(T[pos11]+2)**3-0.018449844983174*(T[pos11]+2)**2  -0.057638157095631*(T[pos11]+2)+  0.746900791092860)
++
++	#Now make sure that rigidity is positive
++	pos=argwhere(rigidity<0);        rigidity[pos]=1**6 
++
++	return rigidity
++
Index: /issm/oecreview/Archive/12121-12140/ISSM-12126-12127.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12126-12127.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12126-12127.diff	(revision 12325)
@@ -0,0 +1,395 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp	(revision 12126)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp	(revision 12127)
+@@ -10,7 +10,7 @@
+ 
+ #include "./ContourToMeshx.h"
+ 
+-int ContourToMeshx( Vector** pin_nod,Vector** pin_elem, double* index, double* x, double* y,Contour** contours,int numcontours,char* interptype,int nel,int nods, int edgevalue) {
++int ContourToMeshx( Vector** pin_nod,Vector** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue) {
+ 
+ 	int noerr=1;
+ 	int i;
+@@ -36,7 +36,6 @@
+ 	in_elem=new Vector(nel);
+ 
+ 	/*initialize thread parameters: */
+-	gate.numcontours=numcontours;
+ 	gate.contours=contours;
+ 	gate.nods=nods;
+ 	gate.edgevalue=edgevalue;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp	(revision 12126)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp	(revision 12127)
+@@ -25,15 +25,9 @@
+ 	int i;
+ 
+ 	/*Contour:*/
+-	Contour* contouri=NULL;
+-	int      numnodes;
+-	double*  xc=NULL;
+-	double*  yc=NULL;
++	DataSet* contours=NULL;
+ 
+-
+ 	/*parameters: */
+-	int numcontours;
+-	Contour** contours=NULL;
+ 	int nods;
+ 	int edgevalue;
+ 	double* x=NULL;
+@@ -48,7 +42,6 @@
+ 	num_threads=handle->num;
+ 
+ 	/*recover parameters :*/
+-	numcontours=gate->numcontours;
+ 	contours=gate->contours;
+ 	nods=gate->nods;
+ 	edgevalue=gate->edgevalue;
+@@ -60,12 +53,9 @@
+ 	PartitionRange(&i0,&i1,nods,num_threads,my_thread);
+ 
+ 	/*Loop through all contours: */
+-	for (i=0;i<numcontours;i++){
+-		contouri=*(contours+i);
+-		numnodes=contouri->nods;
+-		xc=contouri->x;
+-		yc=contouri->y;
+-		IsInPoly(in_nod,xc,yc,numnodes,x,y,i0,i1,edgevalue);
++	for (i=0;i<contours->Size();i++){
++		Contour* contour=(Contour*)contours->GetObjectByOffset(i);
++		IsInPoly(in_nod,contour->x,contour->y,contour->nods,x,y,i0,i1,edgevalue);
+ 	}
+ 
+ 	return NULL;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.h	(revision 12126)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.h	(revision 12127)
+@@ -12,8 +12,7 @@
+ /*threading: */
+ typedef struct{
+ 
+-	int numcontours;
+-	Contour** contours;
++	DataSet* contours;
+ 	int nods;
+ 	int edgevalue;
+ 	Vector* in_nod;
+@@ -24,7 +23,7 @@
+ 
+ 
+ /* local prototypes: */
+-int ContourToMeshx( Vector** pin_nods,Vector** pin_elem, double* index, double* x, double* y,Contour** contours,int numcontours,char* interptype,int nel,int nods, int edgevalue);
++int ContourToMeshx( Vector** pin_nods,Vector** pin_elem, double* index, double* x, double* y,DataSet* contours,char* interptype,int nel,int nods, int edgevalue);
+ 
+ void* ContourToMeshxt(void* vContourToMeshxThreadStruct);
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.h	(revision 12126)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.h	(revision 12127)
+@@ -7,41 +7,66 @@
+ #ifndef _CONTOURTOMESH_H
+ #define _CONTOURTOMESH_H
+ 
+-/* local prototypes: */
+-void ContourToMeshUsage(void);
+ 
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++/*Very important definition in case we are compiling a python module!: needs to come before header files inclusion*/
++#ifdef _HAVE_PYTHON_
++#define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
++#endif
++
++/*Header files: */
+ #include "../../c/include/globals.h"
++#include "../../c/toolkits/toolkits.h"
++#include "../../c/include/include.h"
+ #include "../../c/modules/modules.h"
+ #include "../../c/Container/Container.h"
+ #include "../../c/shared/shared.h"
+ #include "../../c/issm-binding.h"
++#include "../../c/io/io.h"
++#include "../../c/EnumDefinitions/EnumDefinitions.h"
+ 
+-#undef __FUNCT__
+-#define __FUNCT__ "ContourToMesh"
++#ifdef _HAVE_MATLAB_MODULES_
++/* serial input macros: */
++#define INDEX (mxArray *)prhs[0]
++#define X (mxArray *)prhs[1]
++#define Y (mxArray *)prhs[2]
++#define CONTOURNAME (mxArray *)prhs[3]
++#define INTERPTYPE (mxArray *)prhs[4]
++#define EDGEVALUE (mxArray *)prhs[5]
++/* serial output macros: */
++#define PLHS0 (mxArray**)&plhs[0]
++#define PLHS1 (mxArray**)&plhs[1]
++#endif
+ 
+-
+-#ifndef ALL
+-#define ALL 0
++#ifdef _HAVE_PYTHON_MODULES_
++/* serial input macros: */
++#define INDEX PyTuple_GetItem(args,0)
++#define X PyTuple_GetItem(args,1)
++#define Y PyTuple_GetItem(args,2)
++#define CONTOURNAME PyTuple_GetItem(args,3)
++#define INTERPTYPE PyTuple_GetItem(args,4)
++#define EDGEVALUE PyTuple_GetItem(args,5)
++/* serial output macros: */
++#define PLHS0 output,0
++#define PLHS1 output,1
+ #endif
+ 
+-/* input macros: */
+-#define INDEXHANDLE prhs[0]
+-#define XHANDLE prhs[1]
+-#define YHANDLE prhs[2]
+-#define FILENAME prhs[3]
+-#define INTERPTYPEHANDLE prhs[4]
+-#define EDGEVALUEHANDLE prhs[5]
++#undef __FUNCT__
++#define __FUNCT__ "ContourToMesh"
+ 
+-/* serial output macros: */
+-#define PLHS0 (mxArray**)&plhs[0]
+-#define PLHS1 (mxArray**)&plhs[1]
+-
+ /* serial arg counts: */
+ #undef NLHS
+ #define NLHS  2
+ #undef NRHS
+ #define NRHS 6
+ 
++/* local prototypes: */
++void ContourToMeshUsage(void);
+ 
+ #endif  /* _CONTOURTOMESH_H */
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12126)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 12127)
+@@ -20,78 +20,55 @@
+ 	
+ #include "./ContourToMesh.h"
+ 
+-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
++WRAPPER(ContourToMesh){
+ 
+ 	int i,j;
+ 
+ 	/* required input: */
+ 	int     edgevalue;
+ 	double *index      = NULL;
++	int     nel;
+ 	double *x          = NULL;
++	int     nods;
+ 	double *y          = NULL;
+ 	char   *interptype = NULL;
++	char* contourname  = NULL;
++	DataSet* contours  = NULL;
+ 
+ 	/* output: */
+ 	Vector *in_nod  = NULL;
+-	int     nods;
+ 	Vector *in_elem = NULL;
+-	int     nel;
+ 
+-	//contours
+-	mxArray  *matlabstructure = NULL;
+-	int       numcontours;
+-	Contour **contours        = NULL;
+-	Contour  *contouri        = NULL;
+-
+ 	/*Boot module: */
+ 	MODULEBOOT();
+ 
+-	/*checks on arguments on the matlab side: */
+-	//CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&ContourToMeshUsage); Cant' use it here, as we have variable  outputs.
+-	if((nlhs!=1 && nlhs!=2) || (nrhs!=NRHS)){
++	/*checks on output arguments on the matlab side: */
++	#ifdef _HAVE_MATLAB_MODULES_
++	if(nlhs!=1 && nlhs!=2){
+ 		ContourToMeshUsage();
+ 		_error_(" usage. See above");
+ 	}
++	#endif
++	/*check on input arguments: */
++	if(nrhs!=NRHS){
++		ContourToMeshUsage();
++		_error_(" usage. See above");
++	}
+ 
+-	/*First, call expread on filename to build a contour array in the matlab workspace: */
+-	mexCallMATLAB( 1, &matlabstructure, 1, (mxArray**)&FILENAME, "expread");
+ 
+ 	/*Fetch inputs: */
+-	FetchData(&index,&nel,NULL,INDEXHANDLE);
+-	FetchData(&x,&nods,NULL,XHANDLE);
+-	FetchData(&y,NULL,NULL,YHANDLE);
+-	FetchData(&edgevalue,EDGEVALUEHANDLE);
++	FetchData(&index,&nel,NULL,INDEX);
++	FetchData(&x,&nods,NULL,X);
++	FetchData(&y,NULL,NULL,Y);
++	FetchData(&edgevalue,EDGEVALUE);
++	FetchData(&contourname,CONTOURNAME);
++	contours=DomainOutlineRead(contourname);
+ 
+-	//Fetch contours
+-	numcontours=mxGetNumberOfElements(matlabstructure);
+-	contours=(Contour**)xmalloc(numcontours*sizeof(Contour*));
+-	for(i=0;i<numcontours;i++){
+-		//allocate
+-		contouri=(Contour*)xmalloc(sizeof(Contour));
+-		//retrieve dimension of this contour.
+-		contouri->nods=(int)mxGetScalar(mxGetField(matlabstructure,i,"nods"));
+-		//set pointers.
+-		contouri->x=mxGetPr(mxGetField(matlabstructure,i,"x"));
+-		contouri->y=mxGetPr(mxGetField(matlabstructure,i,"y"));
+-		*(contours+i)=contouri;
+-	}
+-
+ 	/*Fetch  interptype: */
+-	FetchData(&interptype,INTERPTYPEHANDLE);
++	FetchData(&interptype,INTERPTYPE);
+ 
+-	/* Debugging of contours :{{{1*/
+-	/*for(i=0;i<numcontours;i++){
+-		printf("\nContour echo: contour number  %i / %i\n",i+1,numcontours);
+-		contouri=*(contours+i);
+-		printf("   Number of vertices %i\n",contouri->nods);
+-		for (j=0;j<contouri->nods;j++){
+-			printf("   %lf %lf\n",*(contouri->x+j),*(contouri->y+j));
+-		}
+-	}*/
+-	/*}}}*/
+-
+ 	/*Run interpolation routine: */
+-	ContourToMeshx( &in_nod,&in_elem,index,x,y,contours,numcontours,interptype,nel,nods,edgevalue);
++	ContourToMeshx( &in_nod,&in_elem,index,x,y,contours,interptype,nel,nods,edgevalue);
+ 
+ 	/* output: */
+ 	if (strcmp(interptype,"node")==0){
+@@ -111,7 +88,7 @@
+ 	
+ }
+ 
+-void ContourToMeshUsage(void)
++void ContourToMeshUsage(void)//{{{1
+ {
+ 	printf("CONTOURTOMESH - Flag the elements or nodes inside a contour\n");
+ 	printf("\n");
+@@ -133,3 +110,4 @@
+ 	printf("         [in_nodes,in_elements]=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','element and node',0)\n");
+ 	printf("\n");
+ }
++//}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/BC/SetIceShelfBC.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/BC/SetIceShelfBC.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/BC/SetIceShelfBC.py	(revision 12127)
+@@ -0,0 +1,93 @@
++def SetIceShelfBC(md,icefrontfile='')
++	#SETICESHELFBC - Create the boundary conditions for diagnostic and thermal models for a  Ice Shelf with Ice Front
++	#
++	#   Neumann BC are used on the ice front (an ANRGUS contour around the ice front
++	#   must be given in input)
++	#   Dirichlet BC are used elsewhere for diagnostic
++	#
++	#   Usage:
++	#      md=SetIceShelfBC(md,varargin)
++	#
++	#   Example:
++	#      md=SetIceShelfBC(md);
++	#      md=SetIceShelfBC(md,'Front.exp');
++	#
++	#   See also: SETICESHEETBC, SETMARINEICESHEETBC
++
++	#node on Dirichlet (boundary and ~icefront)
++	if not icefrontfile:
++		nodeonicefront=zeros(md.mesh.numberofvertices)
++	else:
++		if not os.path.isfile(icefrontfile):
++			print 'SetIceShelfBC error message: ice front file '+icefrontfile+ ' not found'
++			return []
++		nodeinsideicefront=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,icefrontfile,'node',2);
++		nodeonicefront=double(md.mesh.vertexonboundary & nodeinsideicefront);
++	
++	pos=find(md.mesh.vertexonboundary & ~nodeonicefront);
++	md.diagnostic.spcvx=NaN*ones(md.mesh.numberofvertices,1);
++	md.diagnostic.spcvy=NaN*ones(md.mesh.numberofvertices,1);
++	md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1);
++	md.diagnostic.spcvx(pos)=0;
++	md.diagnostic.spcvy(pos)=0;
++	md.diagnostic.spcvz(pos)=0;
++	md.diagnostic.referential=NaN*ones(md.mesh.numberofvertices,6);
++
++	#Dirichlet Values
++	if (length(md.inversion.vx_obs)==md.mesh.numberofvertices & length(md.inversion.vy_obs)==md.mesh.numberofvertices)
++		disp('      boundary conditions for diagnostic model: spc set as observed velocities');
++		md.diagnostic.spcvx(pos)=md.inversion.vx_obs(pos);
++		md.diagnostic.spcvy(pos)=md.inversion.vy_obs(pos);
++	else
++		disp('      boundary conditions for diagnostic model: spc set as zero');
++	end
++
++	#segment on Ice Front
++	#segment on Neumann (Ice Front)
++	pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2)));
++	if (md.mesh.dimension==2)
++		pressureload=md.mesh.segments(pos,:);
++	elseif md.mesh.dimension==3
++		pressureload_layer1=[md.mesh.segments(pos,1:2)  md.mesh.segments(pos,2)+md.mesh.numberofvertices2d  md.mesh.segments(pos,1)+md.mesh.numberofvertices2d  md.mesh.segments(pos,3)];
++		pressureload=[];
++		for i=1:md.mesh.numberoflayers-1,
++			pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.mesh.numberofvertices2d pressureload_layer1(:,5)+(i-1)*md.mesh.numberofelements2d ];
++		end
++	end
++
++	#Add water or air enum depending on the element
++	pressureload=[pressureload 1*md.mask.elementonfloatingice(pressureload(:,end))];
++
++	#plug onto model
++	md.diagnostic.icefront=pressureload;
++
++	#Create zeros basalforcings and surfaceforcings
++	if isnan(md.surfaceforcings.precipitation),
++		md.surfaceforcings.precipitation=zeros(md.mesh.numberofvertices,1);
++		disp('      no surfaceforcings.precipitation specified: values set as zero');
++	end
++	if isnan(md.surfaceforcings.mass_balance),
++		md.surfaceforcings.mass_balance=zeros(md.mesh.numberofvertices,1);
++		disp('      no surfaceforcings.mass_balance specified: values set as zero');
++	end
++	if isnan(md.basalforcings.melting_rate),
++		md.basalforcings.melting_rate=zeros(md.mesh.numberofvertices,1);
++		disp('      no basalforcings.melting_rate specified: values set as zero');
++	end
++	if isnan(md.balancethickness.thickening_rate),
++		md.balancethickness.thickening_rate=zeros(md.mesh.numberofvertices,1);
++		disp('      no balancethickness.thickening_rate specified: values set as zero');
++	end
++
++	md.prognostic.spcthickness=NaN*ones(md.mesh.numberofvertices,1);
++	md.balancethickness.spcthickness=NaN*ones(md.mesh.numberofvertices,1);
++
++	if (length(md.initialization.temperature)==md.mesh.numberofvertices),
++		md.thermal.spctemperature=NaN*ones(md.mesh.numberofvertices,1);
++		pos=find(md.mesh.vertexonsurface); md.thermal.spctemperature(pos)=md.initialization.temperature(pos); #impose observed temperature on surface
++		if (length(md.basalforcings.geothermalflux)~=md.mesh.numberofvertices),
++			md.basalforcings.geothermalflux=zeros(md.mesh.numberofvertices,1);
++		end
++	else
++		disp('      no thermal boundary conditions created: no observed temperature found');
++	end
Index: /issm/oecreview/Archive/12121-12140/ISSM-12127-12128.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12127-12128.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12127-12128.diff	(revision 12325)
@@ -0,0 +1,39 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/python/pythonincludes.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/python/pythonincludes.h	(revision 12127)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/toolkits/python/pythonincludes.h	(revision 12128)
+@@ -6,6 +6,19 @@
+ #define _PYTHON_INCLUDES_H_
+ 
+ 
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#if _PYTHON_MAJOR_ == 2
++#undef NPY_NO_DEPRECATED_API
++#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
++#else
++#define NPY_NO_DEPRECATED_API 
++#endif
++
+ #include "Python.h"
+ #include "arrayobject.h"
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12127)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12128)
+@@ -949,10 +949,7 @@
+ if PYTHON
+ libISSMPython_a_SOURCES = $(python_sources)
+ libISSMPython_a_CXXFLAGS= $(ALLCXXFLAGS)
+-if PYTHON3
+-libISSMPython_a_CXXFLAGS+=  -DNPY_NO_DEPRECATED_API 
+ endif
+-endif
+ 
+ if MATLAB
+ libISSMMatlab_a_SOURCES = $(matlab_sources)
Index: /issm/oecreview/Archive/12121-12140/ISSM-12128-12129.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12128-12129.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12128-12129.diff	(revision 12325)
@@ -0,0 +1,55 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/triangle.c.patch.python
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/triangle.c.patch.python	(revision 12128)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/triangle.c.patch.python	(revision 12129)
+@@ -4,8 +4,8 @@
+ >  * matlab, we had to change the allocation routine trimalloc, as well as the 
+ >  * double precision activation in exactinit(); The rest is not changed. 
+ >  * We also created the ice_makefile to compile Triangle into a library. */
+-> #include <mat.h>
+-> #include <matrix.h>
++> /* #include <mat.h>
++> #include <matrix.h> */
+ > #define ANSI_DECLARATORS
+ > #define NO_TIMER
+ > 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm.sh	(revision 12128)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm.sh	(revision 12129)
+@@ -1,12 +0,0 @@
+-#!/bin/sh
+-
+-pythonversion=2.7
+-
+-./configure \
+-	--prefix=$ISSM_TIER \
+-	--with-python-dir=$ISSM_TIER/externalpackages/python/install\
+-	--with-python-version=$pythonversion \
+-	--with-python-numpy-dir=$ISSM_TIER/externalpackages/python/install/Python.framework/Versions/$pythonversion/lib/python$pythonversion/site-packages/numpy/core/include/numpy\
+-	--with-vendor=arm \
+-	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+-	--with-gsl-dir=$ISSM_TIER/externalpackages/gsl/install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh	(revision 12129)
+@@ -0,0 +1,12 @@
++#!/bin/sh
++
++pythonversion=2.7
++
++./configure \
++	--prefix=$ISSM_TIER \
++	--with-python-dir=$ISSM_TIER/externalpackages/python/install\
++	--with-python-version=$pythonversion \
++	--with-python-numpy-dir=$ISSM_TIER/externalpackages/python/install/Python.framework/Versions/$pythonversion/lib/python$pythonversion/site-packages/numpy/core/include/numpy\
++	--with-vendor=arm-linux\
++	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
++	--with-gsl-dir=$ISSM_TIER/externalpackages/gsl/install
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12121-12140/ISSM-12129-12130.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12129-12130.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12129-12130.diff	(revision 12325)
@@ -0,0 +1,25 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12129)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12130)
+@@ -1,7 +1,7 @@
+ #This installs the Android SDK (Software Development Kit)
+ #which is needed for the compilation of the Java project. 
+ 
+-step=3;
++step=2;
+ 
+ #Different steps here. 
+ #1: install sdk, ant and sdk tools
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh	(revision 12129)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh	(revision 12130)
+@@ -7,6 +7,6 @@
+ 	--with-python-dir=$ISSM_TIER/externalpackages/python/install\
+ 	--with-python-version=$pythonversion \
+ 	--with-python-numpy-dir=$ISSM_TIER/externalpackages/python/install/Python.framework/Versions/$pythonversion/lib/python$pythonversion/site-packages/numpy/core/include/numpy\
+-	--with-vendor=arm-linux\
++	--with-vendor=arm-linux \
+ 	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+ 	--with-gsl-dir=$ISSM_TIER/externalpackages/gsl/install
Index: /issm/oecreview/Archive/12121-12140/ISSM-12130-12131.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12130-12131.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12130-12131.diff	(revision 12325)
@@ -0,0 +1,47 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/freetype/freetype-2.4.9.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/freetype/freetype-2.4.9.tar.gz
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/freetype/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/freetype/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/freetype/install.sh	(revision 12131)
+@@ -0,0 +1,26 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf src
++rm -rf install
++rm -rf freetype-2.4.9
++mkdir src install
++
++#Untar 
++tar -zxvf  freetype-2.4.9.tar.gz
++
++#Move freetype into src directory
++mv freetype-2.4.9/* src
++rm -rf freetype-2.4.9
++
++#Configure freetype
++cd src
++sudo ./configure 
++
++#Compile and install freetype
++if [ -z $1 ]; then
++	sudo make
++else
++	sudo make -j $1
++fi
++sudo make install
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/freetype/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12121-12140/ISSM-12131-12132.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12131-12132.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12131-12132.diff	(revision 12325)
@@ -0,0 +1,8 @@
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/freetype
+___________________________________________________________________
+Added: svn:ignore
+   + install
+src
+
+
Index: /issm/oecreview/Archive/12121-12140/ISSM-12132-12133.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12132-12133.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12132-12133.diff	(revision 12325)
@@ -0,0 +1,13 @@
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy
+___________________________________________________________________
+Modified: svn:ignore
+   - scipy
+numpy
+
+   + scipy
+scipy-*
+numpy
+numpy-*
+
+
Index: /issm/oecreview/Archive/12121-12140/ISSM-12133-12134.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12133-12134.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12133-12134.diff	(revision 12325)
@@ -0,0 +1,20 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/nose/nose-1.1.2.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/nose/nose-1.1.2.tar.gz
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/nose
+___________________________________________________________________
+Modified: svn:ignore
+   - py3k
+
+   + py3k
+src-*
+
+
Index: /issm/oecreview/Archive/12121-12140/ISSM-12134-12135.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12134-12135.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12134-12135.diff	(revision 12325)
@@ -0,0 +1,32 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/distribute/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/distribute/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/distribute/install.sh	(revision 12135)
+@@ -0,0 +1,4 @@
++#!/bin/bash
++
++curl -O http://python-distribute.org/distribute_setup.py
++python distribute_setup.py
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/distribute/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/distribute/distribute-0.6.26.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/distribute/distribute-0.6.26.tar.gz
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/distribute
+___________________________________________________________________
+Added: svn:ignore
+   + distribute_setup.py
+
+
Index: /issm/oecreview/Archive/12121-12140/ISSM-12135-12136.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12135-12136.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12135-12136.diff	(revision 12325)
@@ -0,0 +1,48 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ipython/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ipython/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ipython/install.sh	(revision 12136)
+@@ -0,0 +1,19 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf src
++rm -rf install
++rm -rf ipython-0.12
++mkdir src install
++
++#Untar 
++tar -zxvf  ipython-0.12.tar.gz
++
++#Move ipython into src directory
++mv ipython-0.12/* src
++rm -rf ipython-0.12
++
++#install  ipython
++cd src
++python setup.py build
++python setup.py install
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ipython/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ipython/ipython-0.12.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ipython/ipython-0.12.tar.gz
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ipython
+___________________________________________________________________
+Added: svn:ignore
+   + src-*
+install
+
+
Index: /issm/oecreview/Archive/12121-12140/ISSM-12136-12137.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12136-12137.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12136-12137.diff	(revision 12325)
@@ -0,0 +1,34 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libermate/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libermate/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libermate/install.sh	(revision 12137)
+@@ -0,0 +1,13 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf install
++rm -rf libermate-0.4
++mkdir install
++
++#Untar 
++tar -zxvf  libermate-0.4.tgz
++
++#Move libermate into install directory
++mv libermate-0.4/* install
++rm -rf libermate-0.4
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libermate/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libermate/libermate-0.4.tgz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libermate/libermate-0.4.tgz
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
Index: /issm/oecreview/Archive/12121-12140/ISSM-12137-12138.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12137-12138.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12137-12138.diff	(revision 12325)
@@ -0,0 +1,7 @@
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libermate
+___________________________________________________________________
+Added: svn:ignore
+   + install
+
+
Index: /issm/oecreview/Archive/12121-12140/ISSM-12138-12139.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12138-12139.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12138-12139.diff	(revision 12325)
@@ -0,0 +1,39 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pyclips/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pyclips/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pyclips/install.sh	(revision 12139)
+@@ -0,0 +1,18 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf install
++rm -rf pyclips-1.0.7.348
++mkdir install
++
++#Untar 
++tar -zxvf  pyclips-1.0.7.348.tar.gz
++
++#Move pyclips into install directory
++mv pyclips/* install
++rm -rf pyclips
++
++#install
++cd install
++python setup.py build
++sudo python setup.py install
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pyclips/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pyclips/pyclips-1.0.7.348.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pyclips/pyclips-1.0.7.348.tar.gz
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
Index: /issm/oecreview/Archive/12121-12140/ISSM-12139-12140.diff
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-12139-12140.diff	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-12139-12140.diff	(revision 12325)
@@ -0,0 +1,7 @@
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pyclips
+___________________________________________________________________
+Added: svn:ignore
+   + install
+
+
Index: /issm/oecreview/Archive/12121-12140/ISSM-DocReview-12121-12140.tex
===================================================================
--- /issm/oecreview/Archive/12121-12140/ISSM-DocReview-12121-12140.tex	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/ISSM-DocReview-12121-12140.tex	(revision 12325)
@@ -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/12121-12140/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12121-12140/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12121-12140
Index: /issm/oecreview/Archive/12121-12140/Makefile
===================================================================
--- /issm/oecreview/Archive/12121-12140/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12121-12140
+
+
+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/12121-12140/log.tex
===================================================================
--- /issm/oecreview/Archive/12121-12140/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/log.tex	(revision 12325)
@@ -0,0 +1,38 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12121-12122.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.cpp M /issm/trunk-jpl/src/c/modules/ContourToNodesx/ContourToNodesx.h M /issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.cpp M /issm/trunk-jpl/src/c/modules/InterpFromMeshToMesh2dx/InterpFromMeshToMesh2dx.h \\ Export determination: 6. \\Rationale: Added new ContourToNodesx prototype to handle same functionality, but with DataSet* contours in input instead of just a simple Contour struct Adapted InterpFromMeshToMesh2dx accordingly.
+M /issm/trunk-jpl/test/NightlyRun/test102.py A /issm/trunk-jpl/test/Par/SquareShelfConstrained.py Converting SquareShelfConstrained.par to SquareShelfConstrained.py Pushing test102.py forward. \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12122-12123.diff: \\ Function name: \\M /issm/trunk-jpl/test/NightlyRun/test102.py A /issm/trunk-jpl/test/Par/SquareShelfConstrained.py \\ Export determination: 6. \\Rationale: Converting SquareShelfConstrained.par to SquareShelfConstrained.py Pushing test102.py forward.
+M /issm/trunk-jpl/src/m/classes/autodiff.py M /issm/trunk-jpl/src/m/classes/balancethickness.py M /issm/trunk-jpl/src/m/classes/basalforcings.py M /issm/trunk-jpl/src/m/classes/constants.py M /issm/trunk-jpl/src/m/classes/debug.py M /issm/trunk-jpl/src/m/classes/diagnostic.py M /issm/trunk-jpl/src/m/classes/flowequation.py M /issm/trunk-jpl/src/m/classes/friction.py M /issm/trunk-jpl/src/m/classes/geometry.py M /issm/trunk-jpl/src/m/classes/groundingline.py M /issm/trunk-jpl/src/m/classes/hydrology.py M /issm/trunk-jpl/src/m/classes/initialization.py M /issm/trunk-jpl/src/m/classes/inversion.py M /issm/trunk-jpl/src/m/classes/mask.py M /issm/trunk-jpl/src/m/classes/materials.py M /issm/trunk-jpl/src/m/classes/mesh.py M /issm/trunk-jpl/src/m/classes/miscellaneous.py M /issm/trunk-jpl/src/m/classes/private.py M /issm/trunk-jpl/src/m/classes/prognostic.py M /issm/trunk-jpl/src/m/classes/qmu.py M /issm/trunk-jpl/src/m/classes/radaroverlay.py M /issm/trunk-jpl/src/m/classes/rifts.py M /issm/trunk-jpl/src/m/classes/settings.py M /issm/trunk-jpl/src/m/classes/steadystate.py M /issm/trunk-jpl/src/m/classes/surfaceforcings.py M /issm/trunk-jpl/src/m/classes/thermal.py M /issm/trunk-jpl/src/m/classes/timestepping.py M /issm/trunk-jpl/src/m/classes/transient.py Added setdefaultparameters routines to python classes \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12123-12124.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/classes/autodiff.py M /issm/trunk-jpl/src/m/classes/balancethickness.py M /issm/trunk-jpl/src/m/classes/basalforcings.py M /issm/trunk-jpl/src/m/classes/constants.py M /issm/trunk-jpl/src/m/classes/debug.py M /issm/trunk-jpl/src/m/classes/diagnostic.py M /issm/trunk-jpl/src/m/classes/flowequation.py M /issm/trunk-jpl/src/m/classes/friction.py M /issm/trunk-jpl/src/m/classes/geometry.py M /issm/trunk-jpl/src/m/classes/groundingline.py M /issm/trunk-jpl/src/m/classes/hydrology.py M /issm/trunk-jpl/src/m/classes/initialization.py M /issm/trunk-jpl/src/m/classes/inversion.py M /issm/trunk-jpl/src/m/classes/mask.py M /issm/trunk-jpl/src/m/classes/materials.py M /issm/trunk-jpl/src/m/classes/mesh.py M /issm/trunk-jpl/src/m/classes/miscellaneous.py M /issm/trunk-jpl/src/m/classes/private.py M /issm/trunk-jpl/src/m/classes/prognostic.py M /issm/trunk-jpl/src/m/classes/qmu.py M /issm/trunk-jpl/src/m/classes/radaroverlay.py M /issm/trunk-jpl/src/m/classes/rifts.py M /issm/trunk-jpl/src/m/classes/settings.py M /issm/trunk-jpl/src/m/classes/steadystate.py M /issm/trunk-jpl/src/m/classes/surfaceforcings.py M /issm/trunk-jpl/src/m/classes/thermal.py M /issm/trunk-jpl/src/m/classes/timestepping.py M /issm/trunk-jpl/src/m/classes/transient.py \\ Export determination: 6. \\Rationale: Added setdefaultparameters routines to python classes
+M /issm/trunk-jpl/test/Par/SquareShelfConstrained.py Almost finished translated to python \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12124-12125.diff: \\ Function name: \\M /issm/trunk-jpl/test/Par/SquareShelfConstrained.py \\ Export determination: 6. \\Rationale: Almost finished translated to python
+M /issm/trunk-jpl/src/m/model/mesh/triangle.py Bug fix. \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12125-12126.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/mesh/triangle.py \\ Export determination: 6. \\Rationale: Bug fix.
+A /issm/trunk-jpl/src/m/utils/Meca/paterson.py Converted paterson.m to paterson.py \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12126-12127.diff: \\ Function name: \\A /issm/trunk-jpl/src/m/utils/Meca/paterson.py \\ Export determination: 6. \\Rationale: Converted paterson.m to paterson.py
+M /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp M /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.h M /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp A /issm/trunk-jpl/src/m/utils/BC/SetIceShelfBC.py M /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp M /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.h Starting conversion of SetIceShelfBC Needs ContourToMesh python module, so converted this module to python interface. Also simplified Contours* treatment. \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12127-12128.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.cpp M /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshx.h M /issm/trunk-jpl/src/c/modules/ContourToMeshx/ContourToMeshxt.cpp A /issm/trunk-jpl/src/m/utils/BC/SetIceShelfBC.py M /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp M /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.h \\ Export determination: 6. \\Rationale: Starting conversion of SetIceShelfBC Needs ContourToMesh python module, so converted this module to python interface. Also simplified Contours* treatment.
+M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/toolkits/python/pythonincludes.h Folded NPY\_DEPRECATED python stuff into pythonincludes header file \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12128-12129.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/toolkits/python/pythonincludes.h \\ Export determination: 6. \\Rationale: Folded NPY\_DEPRECATED python stuff into pythonincludes header file
+A /issm/trunk-jpl/configs/config-arm-linux.sh (from /issm/trunk-jpl/configs/config-arm.sh:12114) D /issm/trunk-jpl/configs/config-arm.sh M /issm/trunk-jpl/externalpackages/triangle/triangle.c.patch.python Minor modification to Triangle.c python patch and the arm-linux configuration script. \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12129-12130.diff: \\ Function name: \\A /issm/trunk-jpl/configs/config-arm-linux.sh (from /issm/trunk-jpl/configs/config-arm.sh:12114) D /issm/trunk-jpl/configs/config-arm.sh M /issm/trunk-jpl/externalpackages/triangle/triangle.c.patch.python \\ Export determination: 6. \\Rationale: Minor modification to Triangle.c python patch and the arm-linux configuration script.
+M /issm/trunk-jpl/configs/config-arm-linux.sh M /issm/trunk-jpl/externalpackages/android/android-sdk/install.sh Minor modification to config-arm-linux.sh \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12130-12131.diff: \\ Function name: \\M /issm/trunk-jpl/configs/config-arm-linux.sh M /issm/trunk-jpl/externalpackages/android/android-sdk/install.sh \\ Export determination: 6. \\Rationale: Minor modification to config-arm-linux.sh
+A /issm/trunk-jpl/externalpackages/freetype A /issm/trunk-jpl/externalpackages/freetype/freetype-2.4.9.tar.gz A /issm/trunk-jpl/externalpackages/freetype/install.sh Freetype package \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12131-12132.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/freetype A /issm/trunk-jpl/externalpackages/freetype/freetype-2.4.9.tar.gz A /issm/trunk-jpl/externalpackages/freetype/install.sh \\ Export determination: 6. \\Rationale: Freetype package
+M /issm/trunk-jpl/externalpackages/freetype Ignoring src and install for svn \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-12132-12133.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/freetype \\ Export determination: 6. \\Rationale: Ignoring src and install for svn
+M /issm/trunk-jpl/externalpackages/scipy Ignoring some svn files \\\\
+\noindent \textbf{Change \#13} with diff file ISSM-12133-12134.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/scipy \\ Export determination: 6. \\Rationale: Ignoring some svn files
+M /issm/trunk-jpl/externalpackages/nose A /issm/trunk-jpl/externalpackages/nose/nose-1.1.2.tar.gz nose package \\\\
+\noindent \textbf{Change \#14} with diff file ISSM-12134-12135.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/nose A /issm/trunk-jpl/externalpackages/nose/nose-1.1.2.tar.gz \\ Export determination: 6. \\Rationale: nose package
+A /issm/trunk-jpl/externalpackages/distribute A /issm/trunk-jpl/externalpackages/distribute/distribute-0.6.26.tar.gz A /issm/trunk-jpl/externalpackages/distribute/install.sh distribute package for installing python packages in 3.2.2 \\\\
+\noindent \textbf{Change \#15} with diff file ISSM-12135-12136.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/distribute A /issm/trunk-jpl/externalpackages/distribute/distribute-0.6.26.tar.gz A /issm/trunk-jpl/externalpackages/distribute/install.sh \\ Export determination: 6. \\Rationale: distribute package for installing python packages in 3.2.2
+A /issm/trunk-jpl/externalpackages/ipython A /issm/trunk-jpl/externalpackages/ipython/install.sh A /issm/trunk-jpl/externalpackages/ipython/ipython-0.12.tar.gz ipython package \\\\
+\noindent \textbf{Change \#16} with diff file ISSM-12136-12137.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/ipython A /issm/trunk-jpl/externalpackages/ipython/install.sh A /issm/trunk-jpl/externalpackages/ipython/ipython-0.12.tar.gz \\ Export determination: 6. \\Rationale: ipython package
+A /issm/trunk-jpl/externalpackages/libermate A /issm/trunk-jpl/externalpackages/libermate/install.sh A /issm/trunk-jpl/externalpackages/libermate/libermate-0.4.tgz matlab to python scripts \\\\
+\noindent \textbf{Change \#17} with diff file ISSM-12137-12138.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/libermate A /issm/trunk-jpl/externalpackages/libermate/install.sh A /issm/trunk-jpl/externalpackages/libermate/libermate-0.4.tgz \\ Export determination: 6. \\Rationale: matlab to python scripts
+M /issm/trunk-jpl/externalpackages/libermate Ignoring install directory \\\\
+\noindent \textbf{Change \#18} with diff file ISSM-12138-12139.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/libermate \\ Export determination: 6. \\Rationale: Ignoring install directory
+A /issm/trunk-jpl/externalpackages/pyclips A /issm/trunk-jpl/externalpackages/pyclips/install.sh A /issm/trunk-jpl/externalpackages/pyclips/pyclips-1.0.7.348.tar.gz py clips package \\\\
+\noindent \textbf{Change \#19} with diff file ISSM-12139-12140.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/pyclips A /issm/trunk-jpl/externalpackages/pyclips/install.sh A /issm/trunk-jpl/externalpackages/pyclips/pyclips-1.0.7.348.tar.gz \\ Export determination: 6. \\Rationale: py clips package
+M /issm/trunk-jpl/externalpackages/pyclips Ignoring install directory \\\\
Index: /issm/oecreview/Archive/12121-12140/r1.tex
===================================================================
--- /issm/oecreview/Archive/12121-12140/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12121
Index: /issm/oecreview/Archive/12121-12140/r2.tex
===================================================================
--- /issm/oecreview/Archive/12121-12140/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12121-12140/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12140
Index: /issm/oecreview/Archive/12141-12160/Date.tex
===================================================================
--- /issm/oecreview/Archive/12141-12160/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12141-12160/ISSM-12141-12142.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12141-12142.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12141-12142.diff	(revision 12325)
@@ -0,0 +1,11 @@
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle
+___________________________________________________________________
+Modified: svn:ignore
+   - install
+
+   + install
+install-matlab
+install-python
+
+
Index: /issm/oecreview/Archive/12141-12160/ISSM-12142-12143.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12142-12143.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12142-12143.diff	(revision 12325)
@@ -0,0 +1,27 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matplotlib/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matplotlib/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matplotlib/install.sh	(revision 12143)
+@@ -0,0 +1,7 @@
++#/bin/bash
++
++git clone https://github.com/matplotlib/matplotlib
++mv matplotlib src
++cd src
++python setup.py build
++python setup.py install
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matplotlib/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matplotlib
+___________________________________________________________________
+Added: svn:ignore
+   + src-*
+src
+install
+
+
Index: /issm/oecreview/Archive/12141-12160/ISSM-12143-12144.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12143-12144.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12143-12144.diff	(revision 12325)
@@ -0,0 +1,55 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libpng/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libpng/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libpng/install.sh	(revision 12144)
+@@ -0,0 +1,26 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf src
++rm -rf install
++rm -rf libpng-1.5.10
++mkdir src install
++
++#Untar 
++tar -zxvf  libpng-1.5.10.tar.gz
++
++#Move libpng into src directory
++mv libpng-1.5.10/* src
++rm -rf libpng-1.5.10
++
++#Configure libpng
++cd src
++sudo ./configure 
++
++#Compile and install libpng
++if [ -z $1 ]; then
++	sudo make
++else
++	sudo make -j $1
++fi
++sudo make install
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libpng/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libpng/libpng-1.5.10.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libpng/libpng-1.5.10.tar.gz
+___________________________________________________________________
+Added: svn:mime-type
+   + application/octet-stream
+
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libpng
+___________________________________________________________________
+Added: svn:ignore
+   + src
+install
+
+
Index: /issm/oecreview/Archive/12141-12160/ISSM-12144-12145.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12144-12145.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12144-12145.diff	(revision 12325)
@@ -0,0 +1,100 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-mpich1.4.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-mpich1.4.sh	(revision 12144)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-mpich1.4.sh	(revision 12145)
+@@ -1,31 +0,0 @@
+-#!/bin/sh
+-
+-#External packages versions:
+-#petsc 3.1 or 3.2
+-#mpich 1.4
+-
+-./configure \
+- --prefix=$ISSM_TIER \
+- --with-matlab-dir=$MATLAB_DIR \
+- --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+- --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+- --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
+- --with-tao-dir=$ISSM_TIER/externalpackages/tao/install \
+- --with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+- --with-mpi-lib="-L$ISSM_TIER/externalpackages/mpich2/install/lib/ -lmpich -lmpl " \
+- --with-petsc-arch=$ISSM_ARCH \
+- --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
+- --with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+- --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+- --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
+- --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-scotch-dir="$ISSM_TIER/externalpackages/scotch/install" \
+- --with-chaco-dir="$ISSM_TIER/externalpackages/chaco/install" \
+- --with-shapelib-dir="$ISSM_TIER/externalpackages/shapelib/install" \
+- --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/4.1.1/ -lgfortran" \
+- --with-graphics-lib=/usr/lib64/libX11.so \
+- --with-cxxoptflags="-march=opteron -O2" \
+- --with-numthreads=32 \
+- --enable-debugging
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-mpich1.0.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-mpich1.0.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-mpich1.0.sh	(revision 12145)
+@@ -0,0 +1,31 @@
++#!/bin/sh
++
++#External packages versions:
++#petsc 3.1 or 3.2
++#mpich 1.0.2
++
++./configure \
++ --prefix=$ISSM_TIER \
++ --with-matlab-dir=$MATLAB_DIR \
++ --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
++ --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
++ --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
++ --with-tao-dir=$ISSM_TIER/externalpackages/tao/install \
++ --with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
++ --with-mpi-lib="-L$ISSM_TIER/externalpackages/mpich2/install/lib/ -lmpich " \
++ --with-petsc-arch=$ISSM_ARCH \
++ --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
++ --with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
++ --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
++ --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
++ --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++ --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++ --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++ --with-scotch-dir="$ISSM_TIER/externalpackages/scotch/install" \
++ --with-chaco-dir="$ISSM_TIER/externalpackages/chaco/install" \
++ --with-shapelib-dir="$ISSM_TIER/externalpackages/shapelib/install" \
++ --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/4.1.1/ -lgfortran" \
++ --with-graphics-lib=/usr/lib64/libX11.so \
++ --with-cxxoptflags="-march=opteron -O2" \
++ --with-numthreads=32 \
++ --enable-debugging
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-mpich1.0.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid.sh	(revision 12144)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid.sh	(revision 12145)
+@@ -2,7 +2,7 @@
+ 
+ #External packages versions:
+ #petsc 3.1 or 3.2
+-#mpich 1.0.2
++#mpich 1.4
+ 
+ ./configure \
+  --prefix=$ISSM_TIER \
+@@ -12,7 +12,7 @@
+  --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
+  --with-tao-dir=$ISSM_TIER/externalpackages/tao/install \
+  --with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+- --with-mpi-lib="-L$ISSM_TIER/externalpackages/mpich2/install/lib/ -lmpich " \
++ --with-mpi-lib="-L$ISSM_TIER/externalpackages/mpich2/install/lib/ -lmpich -lmpl " \
+  --with-petsc-arch=$ISSM_ARCH \
+  --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
+  --with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
Index: /issm/oecreview/Archive/12141-12160/ISSM-12146-12147.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12146-12147.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12146-12147.diff	(revision 12325)
@@ -0,0 +1,12 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/Makefile.am	(revision 12146)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/Makefile.am	(revision 12147)
+@@ -13,7 +13,6 @@
+ 				./planet/*.m \
+ 				./qmu/*.m \
+ 				./utils/*.m \
+-				./utils/Analysis/*.m \
+ 				./utils/Array/*.m \
+ 				./utils/BC/*.m \
+ 				./utils/Basins/*.m \
Index: /issm/oecreview/Archive/12141-12160/ISSM-12147-12148.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12147-12148.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12147-12148.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Exp/expdisp.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Exp/expdisp.m	(revision 12147)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Exp/expdisp.m	(revision 12148)
+@@ -40,7 +40,7 @@
+ 	unitmultiplier=varargin{4}; if isnan(unitmultiplier), unitmultiplier=1; end
+ end
+ 
+-domain=expread(domainoutline,1);
++domain=expread(domainoutline);
+ 
+ figure(figurenumber),hold on
+ for i=1:length(domain),
Index: /issm/oecreview/Archive/12141-12160/ISSM-12148-12149.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12148-12149.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12148-12149.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/groundingline.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/groundingline.m	(revision 12148)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/groundingline.m	(revision 12149)
+@@ -36,7 +36,7 @@
+ 					checkmessage(['requesting grounding line migration, but bathymetry is absent!']);
+ 				end
+ 				pos=find(md.mask.vertexongroundedice); 
+-				if any(md.geometry.bed(pos)-md.geometry.bathymetry(pos)),
++				if any(abs(md.geometry.bed(pos)-md.geometry.bathymetry(pos))>10^-10),
+ 					checkmessage(['bathymetry not equal to bed on grounded ice !']);
+ 				end
+ 				pos=find(md.mask.vertexonfloatingice); 
Index: /issm/oecreview/Archive/12141-12160/ISSM-12149-12150.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12149-12150.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12149-12150.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_section.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_section.m	(revision 12149)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_section.m	(revision 12150)
+@@ -35,7 +35,7 @@
+ end
+ 
+ %read contours: 
+-profiles=expread(getfieldvalue(options,'sectionvalue'),1);
++profiles=expread(getfieldvalue(options,'sectionvalue'));
+ numprofiles=length(profiles);
+ 
+ %Loop over number of profiles: 
Index: /issm/oecreview/Archive/12141-12160/ISSM-12150-12151.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12150-12151.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12150-12151.diff	(revision 12325)
@@ -0,0 +1,169 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/mail
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/mail	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/mail	(revision 12151)
+@@ -0,0 +1,158 @@
++#!/bin/sh
++
++# This is a shell script to emulate the standard mail(1) aka mailx(1)
++# aka Mail(1) tool usage for sending emails. This shell script is not
++# a client for checking or reading mail. Also, this version of mail
++# does not touch any mail boxes.
++
++# Copyright (c) 2003 by Jeremy C. Reed
++# This software is provided "as is" without any warranties. You may
++# redistribute and use this source, with or without modification,
++# as long as you include this copyright and disclaimer.
++
++# To do: some switches to consider:
++# -v  display details of delivery
++# -E  do not send empty messages
++# -c  send carbon copies to users
++# -b  send blind carbon copies
++
++# todo: test if read can read in long enough lines
++# some shells may have limit of 256 characters per read?
++ 
++SENDMAIL=sendmail  # set to path of your sendmail(8) command
++SENDMAIL_ARGS="-t -i" # -i is so dot doesn't terminate message
++                      # -t is to get recipients from headers
++
++unset subject
++unset to_addr
++dontsendempty=0
++
++about ()
++{
++  echo "This is mailx.sh version 0.03. This is simple, shell script"
++  echo "to implement mailx(1) functionality for sending mail. It does"
++  echo "not provide an interface for checking or reading email messages."
++  echo
++
++  # maybe do this without forking a command
++  mailname=$( basename $0 )
++
++  if [ -n "$1" ] ; then
++    echo "$mailname: $1" 1>&2
++  fi
++
++  echo "Usage: $mailname [-s subject] to-addr ..." 1>&2
++
++  if [ -n "$1" ] ; then
++    if [ -n "$2" ] ; then 
++      exit $2
++    fi
++    exit 100
++  fi
++
++  exit 0
++}
++
++if [ $# -eq 0 ] ; then
++  about "Sorry, this is not a mail reader." 1
++fi
++
++while [ -n "$1" ] ; do
++  case "$1" in
++  -*)
++      if [ "$1" = "-s" ] ; then
++        if [ -z "$2" ] ; then
++          about "The \"-s\" option requires an argument." 4
++        fi
++        subject="$2"
++        shift
++      elif [ "$1" = "-u" -o "$1" = "-f" ] ; then
++        about "Sorry, this is not a mail reader." 2
++#      elif [ "$1" = "-E" ] ; then
++# this probably needs to have entire message saved to temp file first
++#        dontsendempty=1
++      else
++#        about "unknown option -- $1" 3
++        about "Switch \"$1\" is not implemented." 3
++      fi
++      ;;
++  *)  if [ -n "$to_addr" ] ; then
++        to_addr="${to_addr}, $1"
++      else
++        to_addr="$1"
++      fi
++      ;;
++  esac
++  shift
++done
++
++
++if [ -t 0 ] ; then   # no piped in standard input
++  if [ -z "$subject" ] ; then
++    echo -n "Subject: "
++    OLD_IFS=$IFS
++    IFS=""
++    read -r subject
++    IFS=$OLD_IFS
++  fi
++fi
++
++if [ -z "$to_addr" ] ; then
++  about "No recipients specified." 6
++#  about "You must specify recipients." 6
++fi
++
++# generate SMTP headers
++
++# mail(1) doesn't seem to set date
++#date +"Date: %a, %e %b %G %T %z"
++## maybe pipe though sed to get rid of extra space
++## before single digit day of month?
++
++{
++# if [ -n "$to_addr" ] ; then
++echo "To: ${to_addr}"
++# fi
++
++if [ -n "$subject" ] ; then
++  echo "Subject: $subject"
++fi
++
++# end of headers
++echo ""
++
++# output
++line_count=0
++OLD_IFS=$IFS
++IFS=""
++while read -r line ; do
++  # finish if manual, non-piped input is a period on a line by itself
++  if [ "$line" = "." -a -t 0 ] ; then
++      break
++  fi
++  echo "$line"
++  line_count=$(( line_count + 1 ))
++done
++
++IFS=$OLD_IFS
++
++if [ -t 0 ] ; then   # no piped in standard input
++  echo "EOT" 1>&2
++fi
++
++# later add switch to not send mail by exiting
++if [ "$line_count" -eq 0 ] ; then
++#  if [ "$dontsendempty" -eq 1 ] ; then
++# todo this, have it save to temp file and then send to sendmail as needed
++#    # No message, so just exit cleanly
++#    exit 0
++#  fi
++  if [ -z "$subject" ] ; then
++    echo "No message, no subject; hope that's ok" 1>&2
++  else
++    echo "Null message body; hope that's ok" 1>&2
++  fi
++fi
++
++} | $SENDMAIL $SENDMAIL_ARGS
++
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/mail
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12141-12160/ISSM-12151-12152.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12151-12152.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12151-12152.diff	(revision 12325)
@@ -0,0 +1,12 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp	(revision 12151)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp	(revision 12152)
+@@ -1,6 +1,7 @@
+ #include "../Alloc/alloc.h"
+ #include "../../include/include.h"
+ #include "../Exceptions/exceptions.h"
++#include "./isnan.h"
+ #include <math.h>
+ 
+ void XZvectorsToCoordinateSystem(double* T,double* xzvectors){
Index: /issm/oecreview/Archive/12141-12160/ISSM-12152-12153.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12152-12153.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12152-12153.diff	(revision 12325)
@@ -0,0 +1,94 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/win732
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/win732	(revision 12152)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/win732	(revision 12153)
+@@ -5,8 +5,8 @@
+ #-------------------------------#
+ 
+ #ISSM main directory (full path)
+-ISSM_DIR="/cygdrive/c/issm"
+-ISSM_TIER="/cygdrive/c/issm/trunk-jpl/cron/trunk-jpl"
++ISSM_DIR="/cygdrive/c/issm-uci"
++ISSM_TIER="/cygdrive/c/issm-uci/trunk-jpl/cron/trunk-jpl"
+ 
+ #ISSM Architecture
+ ISSM_ARCH="cygwin-intel"
+@@ -15,7 +15,7 @@
+ MACHINE="win7"
+ 
+ #MATLAB path
+-MATLAB_PATH="C:/MATLAB/R2011b32/"
++MATLAB_PATH="C:/MATLAB/R2012a/"
+ 
+ #COMPILATION CONFIGURATION FILE
+ COMPILE_CONFIG_FILE="config-win7-32.sh"
+@@ -31,13 +31,13 @@
+ #              ->skip to section 3
+ # - "none"     leave ISSM as is in its directory
+ #              ->skip to section 3
+-ISSM_INSTALLATION="none"
++ISSM_INSTALLATION="checkout"
+ 
+ #SVN repository
+ REPOSITORY="http://issm.ess.uci.edu/svn/issm/issm/trunk-jpl"
+ 
+ #execution path used for parallel runs
+-EXECUTION_PATH="/cygdrive/c/issm/ExecutionNightlyRun"
++EXECUTION_PATH="/cygdrive/c/issm-uci/ExecutionNightlyRun"
+ 
+ #-----------------------------------#
+ # 3: External packages installation #
+@@ -48,8 +48,8 @@
+ # - "copy"    copy existing directories (EXTERNALPACKAGESDIR)
+ # - "none"    leave external packages as is
+ #             ->skip to section 4
+-ISSM_EXTERNALPACKAGES="none"
+-EXTERNALPACKAGESDIR="/cygdrive/c/issm/trunk-jpl/externalpackages"
++ISSM_EXTERNALPACKAGES="link"
++EXTERNALPACKAGESDIR="/cygdrive/c/issm-uci/trunk-jpl/externalpackages"
+ 
+ #List of external pakages to be installed
+ EXTERNALPACKAGES=" autoconf automake petsc metis triangle cccl"
+@@ -65,7 +65,7 @@
+ #ISSM_COMPILATION can have 2 values:
+ # - "yes" compile ISSM
+ # - "no"  do not compile ISSM
+-ISSM_COMPILATION="no"
++ISSM_COMPILATION="yes"
+ 
+ #----------------------#
+ # 5: Mail notification #
+@@ -73,10 +73,10 @@
+ 
+ #Mail delivery. If SKIPMAIL="no", the html nightly run report will be
+ #sent to the adresses present in $ISSM_TIER/cron/mailinglist.
+-SKIPMAIL="no"
++SKIPMAIL="yes"
+ 
+ #Sender email address
+-EMAIL_ADRESS="eric.larour@jpl.nasa.gov"
++EMAIL_ADRESS="eric.larour@gmail.com"
+ 
+ #------------------------#
+ # 6: Nightly run options #
+@@ -84,7 +84,7 @@
+ 
+ #number of cpus used in ISSM installation and compilation (one is usually
+ #safer as some packages are very sensitive to parallel compilation)
+-NUMCPUS_INSTALL=8
++NUMCPUS_INSTALL=1
+ 
+ #number of cpus used in the nightly runs.
+ NUMCPUS_RUN=1
+@@ -94,9 +94,9 @@
+ #by Matlab and nightlyrun.m
+ #ex: "'id',[101 102 103]"
+ 
+-NROPTIONS="'benchmark','all'"
++NROPTIONS="'benchmark',102:2:120"
+ 
+ #------------------------#
+ # 7: Matlab#
+ #------------------------#
+-MATLABBIN=/cygdrive/c/MATLAB/R2011b32/bin/matlab
++MATLABBIN=/cygdrive/c/MATLAB/R2012a/bin/matlab
Index: /issm/oecreview/Archive/12141-12160/ISSM-12153-12154.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12153-12154.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12153-12154.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-64.sh	(revision 12153)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-64.sh	(revision 12154)
+@@ -14,7 +14,7 @@
+ declare -x LIBPATH="C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework64\\v3.5;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Lib\\amd64;"
+ declare -x LOCALAPPDATA="C:\\Users\\schlegel\\AppData\\Local"
+ declare -x MANPATH="/usr/local/man:/usr/share/man:/usr/man:"
+-declare -x PATH="/usr/local/bin:/usr/bin:/usr/include:/cygdrive/c/cygwin/usr/bin:/cygdrive/c/cygwin/usr/include:/cygdrive/c/Windows/Microsoft.NET/Framework64/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework64/v3.5:/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/Tools:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/amd64:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/VCPackages:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/NETFX 4.0 Tools/x64:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/x64:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Microsoft Windows Performance Toolkit:/cygdrive/c/MATLAB/R2011b/runtime/win64:/cygdrive/b/MATLAB/R2011b/bin:/cygdrive/c/MATLAB/R2011b/extern/include:/cygdrive/c/MATLAB/R2011a/runtime/win64:/cygdrive/c/MATLAB/R2011a/bin:/cygdrive/c/MATLAB/R2011a/extern/include"
++declare -x PATH="/usr/local/bin:/usr/bin:/usr/include:/cygdrive/c/cygwin/usr/bin:/cygdrive/c/cygwin/usr/include:/cygdrive/c/Windows/Microsoft.NET/Framework64/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework64/v3.5:/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/Tools:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/amd64:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/VCPackages:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/NETFX 4.0 Tools/x64:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/x64:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Microsoft Windows Performance Toolkit:/cygdrive/c/MATLAB/R2012a/runtime/win64:/cygdrive/c/MATLAB/R2012a/bin:/cygdrive/c/MATLAB/R2012a/extern/include:/cygdrive/c/MATLAB/R2011a/runtime/win64:/cygdrive/c/MATLAB/R2011a/bin:/cygdrive/c/MATLAB/R2011a/extern/include"
+ declare -x PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
+ declare -x PROCESSOR_ARCHITECTURE="x86"
+ declare -x PROCESSOR_ARCHITEW6432="AMD64"
Index: /issm/oecreview/Archive/12141-12160/ISSM-12154-12155.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12154-12155.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12154-12155.diff	(revision 12325)
@@ -0,0 +1,437 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12155)
+@@ -5,16 +5,16 @@
+ cat EnumDefinitions.h | grep -e "[0-9]Enum," -e "[a-zA-Z]Enum," | grep -v include | sed -e "s/,//g" | awk '{ printf "%s %s\n", NR, $0 }' > temp
+ 
+ #Removed existing files
+-rm $ISSM_TIER/src/m/enum/*.m
+-rm $ISSM_TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp
+-rm $ISSM_TIER/src/c/modules/StringToEnumx/StringToEnumx.cpp
++rm $ISSM_DIR/src/m/enum/*.m
++rm $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp
++rm $ISSM_DIR/src/c/modules/StringToEnumx/StringToEnumx.cpp
+ 
+ #Get number of enums
+ NUMENUMS=$(wc -l temp | awk '{printf("%s",$1);}');
+ 
+ #Build EnumToStringx.cpp {{{1
+ #Header
+-cat <<END >  $ISSM_TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp
++cat <<END >  $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp
+ /*
+ * \file EnumToStringx.cpp:
+ * \brief: output string associated with enum
+@@ -34,9 +34,9 @@
+ 
+ END
+ #core
+-cat temp |  awk '{print "\t\t" "case " $2" : return \"" substr($2,1,length($2)-4) "\";"}' >> $ISSM_TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp
++cat temp |  awk '{print "\t\t" "case " $2" : return \"" substr($2,1,length($2)-4) "\";"}' >> $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp
+ #Footer
+-cat <<END >> $ISSM_TIER/src/c/modules/EnumToStringx/EnumToStringx.cpp
++cat <<END >> $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp
+ 		default : return "unknown";
+ 
+ 	}
+@@ -56,7 +56,7 @@
+ #}}}
+ #Build StringToEnumx.cpp {{{1
+ #Header
+-cat <<END > $ISSM_TIER/src/c/modules/StringToEnumx/StringToEnumx.cpp
++cat <<END > $ISSM_DIR/src/c/modules/StringToEnumx/StringToEnumx.cpp
+ /*
+ * \file StringToEnumx.cpp:
+ * \brief: output enum associated with string
+@@ -80,11 +80,11 @@
+ i1=1;
+ i2=120;
+ for (( i=1 ; i<=100 ; i++ )); do
+-	echo "   if(stage==$i){" >> $ISSM_TIER//src/c/modules/StringToEnumx/StringToEnumx.cpp
++	echo "   if(stage==$i){" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp
+ 	awk -v i1=$i1 -v i2=$i2 '{if(NR>=i1 && NR<=i2) print $0 }' temp |
+-	awk '{print "\t" ((NR==1)?"      if":"      else if") " (strcmp(name,\"" substr($2,1,length($2)-4) "\")==0) return " $2 ";"}' >> $ISSM_TIER//src/c/modules/StringToEnumx/StringToEnumx.cpp
+-	echo "         else stage=$(($i+1));" >> $ISSM_TIER//src/c/modules/StringToEnumx/StringToEnumx.cpp
+-	echo "   }" >> $ISSM_TIER//src/c/modules/StringToEnumx/StringToEnumx.cpp
++	awk '{print "\t" ((NR==1)?"      if":"      else if") " (strcmp(name,\"" substr($2,1,length($2)-4) "\")==0) return " $2 ";"}' >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp
++	echo "         else stage=$(($i+1));" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp
++	echo "   }" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp
+ 	
+ 	if [ $i2 -ge $NUMENUMS ]; then break; fi
+ 	let i1=$i1+120
+@@ -92,7 +92,7 @@
+ done
+ 
+ #footer
+-cat <<END >> $ISSM_TIER/src/c/modules/StringToEnumx/StringToEnumx.cpp
++cat <<END >> $ISSM_DIR/src/c/modules/StringToEnumx/StringToEnumx.cpp
+ 	/*If we reach this point, the string provided has not been found*/
+    _error_("Enum %s not found",name);
+ }
+@@ -126,7 +126,7 @@
+ 	fi
+ 	#}}}
+ 	#Add case to matlabenum file{{{
+-	cat <<END > $ISSM_TIER"/src/m/enum/"$(echo $NAMEENUM".m")
++	cat <<END > $ISSM_DIR"/src/m/enum/"$(echo $NAMEENUM".m")
+ function macro=$(echo $NAMEENUM)()
+ %$(echo $NAMEENUM | awk {'print toupper($1)'}) - Enum of $(echo $NAME)
+ %
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/Synchronize.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/Synchronize.sh	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/Synchronize.sh	(revision 12155)
+@@ -1,7 +1,7 @@
+ #!/bin/bash
+ #Synchronize Verbosity
+ #first remove existing files
+-rm $ISSM_TIER/src/m/shared/Verb*.m
++rm $ISSM_DIR/src/m/shared/Verb*.m
+ 
+ echo "Synchronizing Verbosity levels..."
+ 
+@@ -50,7 +50,7 @@
+ 	echo "$FILENAME -> 2^$POWER = $BINARY"
+ 
+ 	#Add Verbosity Matlab file{{{
+-	cat <<END > $ISSM_TIER"/src/m/shared/"$(echo $FILENAME".m")
++	cat <<END > $ISSM_DIR"/src/m/shared/"$(echo $FILENAME".m")
+ function bool=$(echo $FILENAME)()
+ %$(echo $FILENAME | awk {'print toupper($1)'}) - Return true if $(echo $LEVELNAME | awk {'print tolower($1)'}) level is activated
+ %
+@@ -147,7 +147,7 @@
+ END
+ #}}}
+ #Complete verbose.m {{{1
+-VERBOSEPATH="$ISSM_TIER/src/m/classes/verbose.m"
++VERBOSEPATH="$ISSM_DIR/src/m/classes/verbose.m"
+ cat $VERBOSEPATH  | sed "/%BEGINFIELDS/,$ d"  > temp_begin
+ cat $VERBOSEPATH  | sed "1,/%ENDFIELDS/d" > temp_end
+ cat temp_begin FIELDS temp_end > $VERBOSEPATH
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MeshProfileIntersectionx/SegmentIntersect.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MeshProfileIntersectionx/SegmentIntersect.cpp	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/MeshProfileIntersectionx/SegmentIntersect.cpp	(revision 12155)
+@@ -5,7 +5,7 @@
+ 
+ int SegmentIntersect(double* palpha, double* pbeta, double* x1, double* y1, double* x2, double* y2){
+ 
+-	/*See ISSM_TIER/src/m/utils/Geometry/SegIntersect.m for matlab routine from which we take this routine: */
++	/*See ISSM_DIR/src/m/utils/Geometry/SegIntersect.m for matlab routine from which we take this routine: */
+ 
+ 	/*output: */
+ 	double alpha=-1;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/petscversion.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/petscversion.m	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/petscversion.m	(revision 12155)
+@@ -7,7 +7,7 @@
+ %default
+ PETSC_VERSION=3;
+ 
+-configfile=[issmtier() '/config.h'];
++configfile=[issmdir() '/config.h'];
+ if ~exist(configfile,'file'),
+ 	error(['File ' configfile ' not found. ISSM has not been configured yet!']);
+ end
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/modis.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/modis.m	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/modis.m	(revision 12155)
+@@ -13,11 +13,11 @@
+ y1=max(ylim);
+ 
+ %Get path  to gdal binaries
+-path_gdal=[issmtier() '/externalpackages/gdal/install/bin/'];
++path_gdal=[issmdir() '/externalpackages/gdal/install/bin/'];
+ 
+ %Was gdal compiled? 
+ if ~exist([path_gdal 'gdal_translate']),
+-	error(['modis error message: GDAL library needs to be compiled to use this routine. Compile GDAL in ' issmtier() '/externalpackages/gdal to use this routine.']);
++	error(['modis error message: GDAL library needs to be compiled to use this routine. Compile GDAL in ' issmdir() '/externalpackages/gdal to use this routine.']);
+ end
+ 
+ inputname='./temp.tif';
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/issmscpin.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/issmscpin.m	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/issmscpin.m	(revision 12155)
+@@ -31,18 +31,18 @@
+ 	if ispc,
+ 		%use the putty project pscp.exe: it should be in the path.
+ 		
+-		%get ISSM_TIER variable
+-		[status,ISSM_TIER]=system('echo [%ISSM_TIER_WIN%]');
++		%get ISSM_DIR variable
++		[status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]');
+ 		if status, 
+-			error('scpin error message: could not find ISSM_TIER_WIN envirnoment variable');
++			error('scpin error message: could not find ISSM_DIR_WIN envirnoment variable');
+ 		end
+-		ISSM_TIER=ISSM_TIER(2:end-2);
++		ISSM_DIR=ISSM_DIR(2:end-2);
+ 
+ 		username=input('Username: (quoted string) ');
+ 		key=input('Key: (quoted string) ');
+ 
+ 		for i=1:numel(packages),
+-			[status,result]=system([ISSM_TIER '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' host ':' path '/' packages{i} ' ./']);
++			[status,result]=system([ISSM_DIR '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' host ':' path '/' packages{i} ' ./']);
+ 			if status, 
+ 				error('scpin error message: could not call putty pscp');
+ 			end
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/issmscpout.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/issmscpout.m	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/issmscpout.m	(revision 12155)
+@@ -22,18 +22,18 @@
+ 	if ispc,
+ 		%use the putty project pscp.exe: it should be in the path.
+ 		
+-		%get ISSM_TIER variable
+-		[status,ISSM_TIER]=system('echo [%ISSM_TIER_WIN%]');
++		%get ISSM_DIR variable
++		[status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]');
+ 		if status, 
+-			error('scpout error message: could not find ISSM_TIER_WIN envirnoment variable');
++			error('scpout error message: could not find ISSM_DIR_WIN envirnoment variable');
+ 		end
+-		ISSM_TIER=ISSM_TIER(2:end-2);
++		ISSM_DIR=ISSM_DIR(2:end-2);
+ 
+ 		username=input('Username: (quoted string) ');
+ 		key=input('Key: (quoted string) ');
+ 
+ 		for i=1:numel(packages),
+-			[status,result]=system([ISSM_TIER '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' packages{i} ' ' host ':' path]);
++			[status,result]=system([ISSM_DIR '/externalpackages/ssh/pscp.exe -l "' username '" -pw "' key '" ' packages{i} ' ' host ':' path]);
+ 			if status, 
+ 				error('scpout error message: could not call putty pscp');
+ 			end
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/issmssh.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/issmssh.m	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/issmssh.m	(revision 12155)
+@@ -14,17 +14,17 @@
+ 	if ispc,
+ 		%use the putty project plink.exe: it should be in the path.
+ 		
+-		%get ISSM_TIER variable
+-		[status,ISSM_TIER]=system('echo [%ISSM_TIER_WIN%]');
++		%get ISSM_DIR variable
++		[status,ISSM_DIR]=system('echo [%ISSM_DIR_WIN%]');
+ 		if status, 
+-			error('issmssh error message: could not find ISSM_TIER_WIN envirnoment variable');
++			error('issmssh error message: could not find ISSM_DIR_WIN envirnoment variable');
+ 		end
+-		ISSM_TIER=ISSM_TIER(2:end-2);
++		ISSM_DIR=ISSM_DIR(2:end-2);
+ 
+ 		username=input('Username: (quoted string) ');
+ 		key=input('Key: (quoted string) ');
+ 
+-		system([ISSM_TIER '/externalpackages/ssh/plink.exe -ssh -l "' username '" -pw "' key '" ' host ' "' command '"']);
++		system([ISSM_DIR '/externalpackages/ssh/plink.exe -ssh -l "' username '" -pw "' key '" ' host ' "' command '"']);
+ 
+ 	else
+ 		%just use standard unix ssh
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/ispetsc.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/ispetsc.m	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/ispetsc.m	(revision 12155)
+@@ -5,7 +5,7 @@
+ %       flag=ispetsc();
+ 
+ 
+-configfile=[issmtier() '/bin/config.h']; %should find it in the install target
++configfile=[issmdir() '/bin/config.h']; %should find it in the install target
+ if ~exist(configfile,'file'),
+ 	error(['File ' configfile ' not found. ISSM has not been configured yet!']);
+ end
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/ismumps.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/ismumps.m	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/OS/ismumps.m	(revision 12155)
+@@ -5,7 +5,7 @@
+ %       flag=ismumps();
+ 
+ 
+-configfile=[issmtier() '/bin/config.h']; %should find it in the install target
++configfile=[issmdir() '/bin/config.h']; %should find it in the install target
+ if ~exist(configfile,'file'),
+ 	error(['File ' configfile ' not found. ISSM has not been configured yet!']);
+ end
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Miscellaneous/issmdoc.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Miscellaneous/issmdoc.m	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Miscellaneous/issmdoc.m	(revision 12155)
+@@ -1,11 +1,11 @@
+ %Quick documentation for ISSM
+ 
+ %First get ISSM tier: 
+-ISSM_TIER=issmtier;
++ISSM_DIR=issmdir;
+ 
+ disp(sprintf('\n%s','  A comprehensive documentation is available on http://issm.jpl.nasa.gov'));
+ disp(sprintf('\n%s','  Example: how to create a square ice shelf'));
+-disp(sprintf('%s','	   go to ',ISSM_TIER,'/examples/SquareIceshelf'));
++disp(sprintf('%s','	   go to ',ISSM_DIR,'/examples/SquareIceshelf'));
+ disp(sprintf('%s','	   md=model;                                %creates a new empty model structure'));
+ disp(sprintf('%s','	   md=triangle(md,''DomainOutline.exp'',50000);   %creates a mesh of the domain outline with a resolution of 50000m'));
+ disp(sprintf('%s','	   md=geography(md,''all'','''');               %defines the glacier system as an ice shelf (no island)'));
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/TracksToMatrix.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/TracksToMatrix.m	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/TracksToMatrix.m	(revision 12155)
+@@ -25,7 +25,7 @@
+ end
+ 
+ %Add path to dace
+-addpath([issmtier() '/externalpackages/dace/install'])
++addpath([issmdir() '/externalpackages/dace/install'])
+ 
+ %First create the x_m and y_m fot the matrix
+ x_f=[xmin:posting:xmin+posting*nx]';
+@@ -81,4 +81,4 @@
+ MatData=reshape(VecData,ny,nx);
+ 
+ %remove DACE path
+-rmpath([issmtier() '/externalpackages/dace/install']);
++rmpath([issmdir() '/externalpackages/dace/install']);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/issmtier.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/issmtier.m	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/issmtier.m	(revision 12155)
+@@ -1,18 +0,0 @@
+-function ISSM_TIER=issmtier()
+-%ISSMTIER - Get ISSM_TIER environment variable contents.
+-%
+-%   Usage:
+-%      ISSM_TIER=issmtier()
+-
+-if ~ispc, 
+-	ISSM_TIER =getenv('ISSM_TIER');
+-else
+-	ISSM_TIER =getenv('ISSM_TIER_WIN');
+-	if strcmpi(ISSM_TIER(end),'/') | strcmpi(ISSM_TIER(end),'\'),
+-		ISSM_TIER = ISSM_TIER(1:end-1); %shave off the last '/'
+-	end
+-end
+-
+-if (isempty(ISSM_TIER)),
+-	error('issmdir error message: ''ISSM_TIER'' environment variable is empty! You should define ISSM_TIER in your .cshrc or .bashrc!');
+-end
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/flaimdir.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/flaimdir.m	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/flaimdir.m	(revision 12155)
+@@ -4,4 +4,4 @@
+ %   Usage:
+ %      FLAIM_DIR=flaimdir()
+ 
+-FLAIM_DIR=[issmtier '/externalpackages/flaim/install'];
++FLAIM_DIR=[issmdir '/externalpackages/flaim/install'];
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/ucisvn.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/ucisvn.m	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/ucisvn.m	(revision 12155)
+@@ -0,0 +1,15 @@
++function UCI_SVN=ucisvn()
++%ISSMDIR - Get UCI_SVN environment variable
++%
++%   Usage:
++%      UCI_SVN=ucisvn()
++
++if ~ispc,
++	UCI_SVN =getenv('UCI_SVN');
++else
++	UCI_SVN =getenv('UCI_SVN_WIN');
++end
++
++if (isempty(UCI_SVN)),
++	error('ucisvn error message: ''UCI_SVN'' environment variable is empty! You should define UCI_SVN in your .cshrc or .bashrc');
++end
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/issmdir.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/issmdir.m	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/issmdir.m	(revision 12155)
+@@ -1,5 +1,5 @@
+ function ISSM_DIR=issmdir()
+-%ISSMDIR - Get ISSM_DIR environment variable contents.
++%ISSMDIR - Get ISSM_DIR environment variable
+ %
+ %   Usage:
+ %      ISSM_DIR=issmdir()
+@@ -8,6 +8,9 @@
+ 	ISSM_DIR =getenv('ISSM_DIR');
+ else
+ 	ISSM_DIR =getenv('ISSM_DIR_WIN');
++	if strcmpi(ISSM_DIR(end),'/') | strcmpi(ISSM_DIR(end),'\'),
++		ISSM_DIR = ISSM_DIR(1:end-1); %shave off the last '/'
++	end
+ end
+ 
+ if (isempty(ISSM_DIR)),
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/jplsvn.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/jplsvn.m	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/Shell/jplsvn.m	(revision 12155)
+@@ -0,0 +1,15 @@
++function JPL_SVN=jplsvn()
++%ISSMDIR - Get JPL_SVN environment variable
++%
++%   Usage:
++%      JPL_SVN=jplsvn()
++
++if ~ispc,
++	JPL_SVN =getenv('JPL_SVN');
++else
++	JPL_SVN =getenv('JPL_SVN_WIN');
++end
++
++if (isempty(JPL_SVN)),
++	error('jplsvn error message: ''JPL_SVN'' environment variable is empty! You should define JPL_SVN in your .cshrc or .bashrc');
++end
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/generic.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/generic.py	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/generic.py	(revision 12155)
+@@ -15,11 +15,11 @@
+ 		self.np=1
+ 		self.port=0
+ 		self.interactive=1
+-		self.codepath=issmtier() + '/bin'
+-		self.executionpath=issmtier() + '/execution'
+-		self.valgrind=issmtier() + '/externalpackages/valgrind/install/bin/valgrind'
+-		self.valgrindlib=issmtier() + '/externalpackages/valgrind/install/lib/libmpidebug.so'
+-		self.valgrindsup=issmtier() + '/externalpackages/valgrind/issm.supp'
++		self.codepath=issmdir() + '/bin'
++		self.executionpath=issmdir() + '/execution'
++		self.valgrind=issmdir() + '/externalpackages/valgrind/install/bin/valgrind'
++		self.valgrindlib=issmdir() + '/externalpackages/valgrind/install/lib/libmpidebug.so'
++		self.valgrindsup=issmdir() + '/externalpackages/valgrind/issm.supp'
+ 		#}}}
+ 	def __repr__(obj):
+ 		# {{{ Display
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/generic.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/generic.m	(revision 12154)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/classes/clusters/generic.m	(revision 12155)
+@@ -12,11 +12,11 @@
+ 		 np=1;
+ 		 port=0;
+ 		 interactive=1;
+-		 codepath=[issmtier() '/bin'];
+-		 executionpath=[issmtier() '/execution'];
+-		 valgrind=[issmtier() '/externalpackages/valgrind/install/bin/valgrind'];
+-		 valgrindlib=[issmtier() '/externalpackages/valgrind/install/lib/libmpidebug.so'];
+-		 valgrindsup=[issmtier() '/externalpackages/valgrind/issm.supp'];
++		 codepath=[issmdir() '/bin'];
++		 executionpath=[issmdir() '/execution'];
++		 valgrind=[issmdir() '/externalpackages/valgrind/install/bin/valgrind'];
++		 valgrindlib=[issmdir() '/externalpackages/valgrind/install/lib/libmpidebug.so'];
++		 valgrindsup=[issmdir() '/externalpackages/valgrind/issm.supp'];
+ 		 %}}}
+ 	 end
+ 	 methods
Index: /issm/oecreview/Archive/12141-12160/ISSM-12155-12156.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12155-12156.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12155-12156.diff	(revision 12325)
@@ -0,0 +1,1179 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cppcheck/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cppcheck/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cppcheck/install.sh	(revision 12156)
+@@ -16,5 +16,5 @@
+ else 
+ 	make -j $1
+ fi  
+-make install PREFIX=$ISSM_TIER/externalpackages/cppcheck/install
++make install PREFIX=$ISSM_DIR/externalpackages/cppcheck/install
+ cd ..
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12156)
+@@ -41,7 +41,7 @@
+ if [[ $step == "2" ]]; then
+ 
+ 	#Once this is done, we need to install an emulator. Location will default to ~/.android/avd, 
+-	#which we will move to $ISSM_TIER/externalpackages/android-emulators.  
++	#which we will move to $ISSM_DIR/externalpackages/android-emulators.  
+ 	#For now, it's called: Android-4.0.3
+ 
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cmake/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cmake/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cmake/install.sh	(revision 12156)
+@@ -13,7 +13,7 @@
+ 
+ #Compile cmake
+ cd install 
+-./bootstrap --prefix=$ISSM_TIER/externalpackages/cmake/install
++./bootstrap --prefix=$ISSM_DIR/externalpackages/cmake/install
+ if [ -z $1 ]; then
+ 	make
+ else 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh	(revision 12156)
+@@ -19,7 +19,7 @@
+ 
+ #Configure doxygen
+ cd src 
+-./configure --prefix="$ISSM_TIER/externalpackages/python/install" --enable-framework="$ISSM_TIER/externalpackages/python/install"
++./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-framework="$ISSM_DIR/externalpackages/python/install"
+ if [ -z $1 ]; then
+ 	make
+ else
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-macosx64.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-macosx64.sh	(revision 12156)
+@@ -18,7 +18,7 @@
+ export CFLAGS=" -arch x86_64"
+ export CXXFLAGS=" -arch x86_64"
+ ./configure \
+-	--prefix="$ISSM_TIER/externalpackages/mpich2/install" \
++	--prefix="$ISSM_DIR/externalpackages/mpich2/install" \
+ 	--enable-f91 \
+ 	--enable-sharedlibs=osx-gcc \
+ 	--enable-shared \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-linux64.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-linux64.sh	(revision 12156)
+@@ -17,7 +17,7 @@
+ export CFLAGS="$CFLAGS -fPIC"
+ export FFLAGS="$FFLAGS -fPIC"
+ ./configure \
+-	--prefix="$ISSM_TIER/externalpackages/mpich2/install" \
++	--prefix="$ISSM_DIR/externalpackages/mpich2/install" \
+ 	--enable-sharedlibs=gcc \
+ 	--enable-f91=gfortran 
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-altix64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-altix64.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-altix64.sh	(revision 12156)
+@@ -17,7 +17,7 @@
+ export CFLAGS="$CFLAGS -fPIC"
+ export FFLAGS="$FFLAGS -fPIC"
+ ./configure \
+-	--prefix="$ISSM_TIER/externalpackages/mpich2/install" \
++	--prefix="$ISSM_DIR/externalpackages/mpich2/install" \
+ 	--enable-sharedlibs=gcc \
+ 	--enable-f91=gfortran 
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-linux64.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-linux64.sh	(revision 12156)
+@@ -16,7 +16,7 @@
+ export CFLAGS="$CFLAGS -fPIC"
+ export FFLAGS="$FFLAGS -fPIC"
+ ./configure \
+-	--prefix="$ISSM_TIER/externalpackages/mpich2/install" \
++	--prefix="$ISSM_DIR/externalpackages/mpich2/install" \
+ 	--enable-shared \
+ 	--enable-sharedlibs=gcc \
+ 	--enable-f91=gfortran 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-macosx32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-macosx32.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-macosx32.sh	(revision 12156)
+@@ -16,7 +16,7 @@
+ make distclean
+ export CFLAGS=" -m32"
+ ./configure \
+-	--prefix="$ISSM_TIER/externalpackages/mpich2/install" \
++	--prefix="$ISSM_DIR/externalpackages/mpich2/install" \
+ 	--enable-f91=gfortran \
+ 	--enable-sharedlibs=osx-gcc
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-win32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-win32.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-win32.sh	(revision 12156)
+@@ -16,7 +16,7 @@
+ make distclean
+ export CFLAGS="$CFLAGS -fPIC"
+ export FFLAGS="$FFLAGS -fPIC"
+-./configure --prefix="$ISSM_TIER/externalpackages/mpich2/install" 
++./configure --prefix="$ISSM_DIR/externalpackages/mpich2/install" 
+ 
+ #Apply Patch to examples
+ patch ./examples/Makefile ../configs/1.0.2/win32/Examples.Makefile.patch
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-macosx32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-macosx32.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-macosx32.sh	(revision 12156)
+@@ -18,7 +18,7 @@
+ export CXXFLAGS=" -arch i386"
+ export CPPFLAGS=" -arch i386"
+ ./configure \
+-	--prefix="$ISSM_TIER/externalpackages/mpich2/install" \
++	--prefix="$ISSM_DIR/externalpackages/mpich2/install" \
+ 	--enable-f91=gfortran \
+ 	--enable-sharedlibs=osx-gcc \
+ 	--enable-shared \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gmake/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gmake/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gmake/install.sh	(revision 12156)
+@@ -15,7 +15,7 @@
+ cd src 
+ 
+ #Configure and compile: 
+-./configure --prefix=$ISSM_TIER/externalpackages/gmake/install
++./configure --prefix=$ISSM_DIR/externalpackages/gmake/install
+ 
+ if [ -z $1 ]; then
+ 	make
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/adic/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/adic/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/adic/install.sh	(revision 12156)
+@@ -18,13 +18,13 @@
+ mkdir build
+ cd build
+ ../source/configure \
+-	--with-rose=$ISSM_TIER/externalpackages/rose/install \
+-	--with-openanalysis=$ISSM_TIER/externalpackages/openanalysis/openanalysis/x86_64-Linux \
+-	--with-boost=$ISSM_TIER/externalpackages/boost/install \
+-	--with-xerces=$ISSM_TIER/externalpackages/xerces/src \
+-	--with-xaifbooster=$ISSM_TIER/externalpackages/xaifbooster/xaifBooster \
+-	--with-colpack=$ISSM_TIER/externalpackages/colpack/install\
+-	--prefix=$ISSM_TIER/externalpackages/adic/install 
++	--with-rose=$ISSM_DIR/externalpackages/rose/install \
++	--with-openanalysis=$ISSM_DIR/externalpackages/openanalysis/openanalysis/x86_64-Linux \
++	--with-boost=$ISSM_DIR/externalpackages/boost/install \
++	--with-xerces=$ISSM_DIR/externalpackages/xerces/src \
++	--with-xaifbooster=$ISSM_DIR/externalpackages/xaifbooster/xaifBooster \
++	--with-colpack=$ISSM_DIR/externalpackages/colpack/install\
++	--prefix=$ISSM_DIR/externalpackages/adic/install 
+ if [ -z $1 ]; then
+ 	make
+ else
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-win32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-win32.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-win32.sh	(revision 12156)
+@@ -13,7 +13,7 @@
+ 
+ #configure
+ cd install
+-./configure  --prefix="$ISSM_TIER/externalpackages/valgrind/install"
++./configure  --prefix="$ISSM_DIR/externalpackages/valgrind/install"
+ 
+ #Compile valgrind
+ make  -j 4
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-macosx64.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-macosx64.sh	(revision 12156)
+@@ -13,7 +13,7 @@
+ 
+ #configure
+ cd install
+-./configure  --prefix="$ISSM_TIER/externalpackages/valgrind/install" --enable-only64bit
++./configure  --prefix="$ISSM_DIR/externalpackages/valgrind/install" --enable-only64bit
+ 
+ #Compile valgrind
+ make  -j 4
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-linux64.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-linux64.sh	(revision 12156)
+@@ -13,7 +13,7 @@
+ 
+ #configure
+ cd install
+-./configure  --prefix="$ISSM_TIER/externalpackages/valgrind/install"
++./configure  --prefix="$ISSM_DIR/externalpackages/valgrind/install"
+ 
+ #Compile valgrind
+ make  -j 4
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-altix64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-altix64.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-altix64.sh	(revision 12156)
+@@ -13,7 +13,7 @@
+ 
+ #configure
+ cd install
+-./configure --prefix="$ISSM_TIER/externalpackages/valgrind/install"
++./configure --prefix="$ISSM_DIR/externalpackages/valgrind/install"
+ 
+ #Compile valgrind
+ make  -j 4
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-macosx32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-macosx32.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-macosx32.sh	(revision 12156)
+@@ -13,7 +13,7 @@
+ 
+ #configure
+ cd install
+-./configure  --prefix="$ISSM_TIER/externalpackages/valgrind/install" --enable-only32bit
++./configure  --prefix="$ISSM_DIR/externalpackages/valgrind/install" --enable-only32bit
+ 
+ #Compile valgrind
+ make  -j 4
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/rose/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/rose/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/rose/install.sh	(revision 12156)
+@@ -14,9 +14,9 @@
+ #Configure
+ cd build
+ ../source/configure \
+-	--prefix=$ISSM_TIER/externalpackages/rose/install \
+-	--with-boost=$ISSM_TIER/externalpackages/boost/install\
+-	--srcdir=$ISSM_TIER/externalpackages/rose/source
++	--prefix=$ISSM_DIR/externalpackages/rose/install \
++	--with-boost=$ISSM_DIR/externalpackages/boost/install\
++	--srcdir=$ISSM_DIR/externalpackages/rose/source
+ 
+ if [ -z $1 ]; then
+ 	make
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/doxygen/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/doxygen/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/doxygen/install.sh	(revision 12156)
+@@ -7,7 +7,7 @@
+ svn co https://doxygen.svn.sourceforge.net/svnroot/doxygen/trunk install
+ 
+ #Configure doxygen
+-cd install && ./configure --prefix "$ISSM_TIER/externalpackages/doxygen/install"
++cd install && ./configure --prefix "$ISSM_DIR/externalpackages/doxygen/install"
+ if [ -z $1 ]; then
+ 	make
+ else
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/autoconf/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/autoconf/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/autoconf/install.sh	(revision 12156)
+@@ -14,6 +14,6 @@
+ 
+ #Compile autoconf
+ cd src 
+-./configure --prefix="$ISSM_TIER/externalpackages/autoconf/install" 
++./configure --prefix="$ISSM_DIR/externalpackages/autoconf/install" 
+ make  
+ make install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-5.0.1-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-5.0.1-linux64.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-5.0.1-linux64.sh	(revision 12156)
+@@ -16,5 +16,5 @@
+ cd install 
+ 
+ #Compile metis
+-make config prefix="$ISSM_TIER/externalpackages/metis/install"
++make config prefix="$ISSM_DIR/externalpackages/metis/install"
+ make install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pcre/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pcre/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pcre/install.sh	(revision 12156)
+@@ -12,6 +12,6 @@
+ 
+ #Configure doxygen
+ cd install 
+-./configure --prefix "$ISSM_TIER/externalpackages/python/install"
++./configure --prefix "$ISSM_DIR/externalpackages/python/install"
+ make
+ make install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libtool/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libtool/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libtool/install.sh	(revision 12156)
+@@ -12,6 +12,6 @@
+ 
+ #Compile libtool
+ cd src 
+-./configure --prefix="$ISSM_TIER/externalpackages/libtool/install" 
++./configure --prefix="$ISSM_DIR/externalpackages/libtool/install" 
+ make  
+ make install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/swig/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/swig/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/swig/install.sh	(revision 12156)
+@@ -12,15 +12,15 @@
+ 
+ #Copy pcre prototype in include directory
+ cd install 
+-#cp $ISSM_TIER/externalpackages/pcre/install/pcre.h  ./Source/Include/
+-#cp $ISSM_TIER/externalpackages/pcre/install/.libs/*  ./Source/Include/
+-export CFLAGS="$CFLAGS -I$ISSM_TIER/externalpackages/pcre/install"
+-export LDFLAGS="-L$ISSM_TIER/externalpackages/pcre/install/.libs/"
++#cp $ISSM_DIR/externalpackages/pcre/install/pcre.h  ./Source/Include/
++#cp $ISSM_DIR/externalpackages/pcre/install/.libs/*  ./Source/Include/
++export CFLAGS="$CFLAGS -I$ISSM_DIR/externalpackages/pcre/install"
++export LDFLAGS="-L$ISSM_DIR/externalpackages/pcre/install/.libs/"
+ export LIBS="-lpcre"
+ #Configure doxygen
+ ./configure \
+- --prefix="$ISSM_TIER/externalpackages/python/install" \
+- --with-pcre-prefix="$ISSM_TIER/externalpackages/pcre/install" \
+- --with-pcre-exec-prefix="$ISSM_TIER/externalpackages/pcre/install"
++ --prefix="$ISSM_DIR/externalpackages/python/install" \
++ --with-pcre-prefix="$ISSM_DIR/externalpackages/pcre/install" \
++ --with-pcre-exec-prefix="$ISSM_DIR/externalpackages/pcre/install"
+ make 
+ make install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/rats/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/rats/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/rats/install.sh	(revision 12156)
+@@ -11,7 +11,7 @@
+ 
+ #compile
+ cd src
+-./configure --prefix=$ISSM_TIER/externalpackages/rats/install
++./configure --prefix=$ISSM_DIR/externalpackages/rats/install
+ make
+ make install
+ cd ..
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/adolc/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/adolc/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/adolc/install.sh	(revision 12156)
+@@ -19,7 +19,7 @@
+ cd src 
+ 
+ ./configure \
+-	--prefix=$ISSM_TIER/externalpackages/adolc/install \
++	--prefix=$ISSM_DIR/externalpackages/adolc/install \
+ 	--enable-sparse \
+ 	--enable-docexa \
+ 	--enable-addexa \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/graphviz/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/graphviz/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/graphviz/install.sh	(revision 12156)
+@@ -13,7 +13,7 @@
+ 
+ #Configure dakota
+ cd src
+-./configure --prefix="$ISSM_TIER/externalpackages/graphviz/install"
++./configure --prefix="$ISSM_DIR/externalpackages/graphviz/install"
+ cd ..
+ 
+ #Compile and install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/bbftp/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/bbftp/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/bbftp/install.sh	(revision 12156)
+@@ -18,6 +18,6 @@
+ 
+ #Configure and compile
+ cd bbftpc
+-./configure --prefix=$ISSM_TIER/externalpackages/bbftp/install
++./configure --prefix=$ISSM_DIR/externalpackages/bbftp/install
+ make
+ make install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-macosx64.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-macosx64.sh	(revision 12156)
+@@ -28,12 +28,12 @@
+ #Configure dakota
+ cd src
+ ./configure \
+-   --prefix="$ISSM_TIER/externalpackages/dakota/install" \
++   --prefix="$ISSM_DIR/externalpackages/dakota/install" \
+    --without-graphics  \
+    --with-pic \
+    --disable-mpi \
+-   --with-blas="-L$ISSM_TIER/externalpackages/petsc/install/lib -lfblas " \
+-   --with-lapack="-L$ISSM_TIER/externalpackages/petsc/install/lib -lflapack -lPLAPACK "
++   --with-blas="-L$ISSM_DIR/externalpackages/petsc/install/lib -lfblas " \
++   --with-lapack="-L$ISSM_DIR/externalpackages/petsc/install/lib -lflapack -lPLAPACK "
+ cd ..
+ 
+ #Before compiling, if running on 64 bits, we need to active fPIC compilation. Some packages 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-pleiades.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-pleiades.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-pleiades.sh	(revision 12156)
+@@ -28,7 +28,7 @@
+ #Configure dakota
+ cd src
+ ./configure \ 
+-	--prefix="$ISSM_TIER/externalpackages/dakota/install" \
++	--prefix="$ISSM_DIR/externalpackages/dakota/install" \
+ 	--without-graphics  \
+ 	--with-pic \
+ 	--disable-mpi \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-altix64-cosmos.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-altix64-cosmos.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-altix64-cosmos.sh	(revision 12156)
+@@ -28,7 +28,7 @@
+ #Configure dakota
+ cd src
+ ./configure \ 
+-	--prefix="$ISSM_TIER/externalpackages/dakota/install" \
++	--prefix="$ISSM_DIR/externalpackages/dakota/install" \
+ 	--without-graphics  \
+ 	--with-pic \
+ 	--disable-mpi \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-linux64-astrid.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-linux64-astrid.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-linux64-astrid.sh	(revision 12156)
+@@ -28,7 +28,7 @@
+ #Configure dakota
+ cd src
+ ./configure \
+-	--prefix="$ISSM_TIER/externalpackages/dakota/install" \
++	--prefix="$ISSM_DIR/externalpackages/dakota/install" \
+ 	--without-graphics  \
+ 	--with-pic \
+ 	--disable-mpi \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-linux64-murdo.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-linux64-murdo.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-linux64-murdo.sh	(revision 12156)
+@@ -28,7 +28,7 @@
+ #Configure dakota
+ cd src
+ ./configure \
+-	--prefix="$ISSM_TIER/externalpackages/dakota/install" \
++	--prefix="$ISSM_DIR/externalpackages/dakota/install" \
+ 	--without-graphics  \
+ 	--with-pic \
+ 	--disable-mpi \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cccl/install-win7.orig.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cccl/install-win7.orig.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cccl/install-win7.orig.sh	(revision 12156)
+@@ -14,7 +14,7 @@
+ cd src 
+ 
+ #Compile
+-./configure --prefix="$ISSM_TIER/externalpackages/cccl/install"
++./configure --prefix="$ISSM_DIR/externalpackages/cccl/install"
+ 
+ make
+ make install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gdal/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gdal/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gdal/install.sh	(revision 12156)
+@@ -16,7 +16,7 @@
+ #Configure gdal
+ cd src
+ ./configure \
+-	--prefix="$ISSM_TIER/externalpackages/gdal/install" \
++	--prefix="$ISSM_DIR/externalpackages/gdal/install" \
+ 	--without-python \
+ 	--with-netcdf=no \
+ 	--with-jasper=no \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/latex2rtf/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/latex2rtf/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/latex2rtf/install.sh	(revision 12156)
+@@ -9,5 +9,5 @@
+ 
+ #Compile
+ cd install
+-export PREFIX="$ISSM_TIER/externalpackages/latex2rtf/install/"
++export PREFIX="$ISSM_DIR/externalpackages/latex2rtf/install/"
+ make
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-cosmos.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-cosmos.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-cosmos.sh	(revision 12156)
+@@ -12,8 +12,8 @@
+ #configure
+ cd src
+ ./config/configure.py \
+-	--prefix="$ISSM_TIER/externalpackages/petsc/install" \
+-	--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++	--prefix="$ISSM_DIR/externalpackages/petsc/install" \
++	--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+ 	--with-batch=1  \
+ 	--ISSM_ARCH=$ISSM_ARCH \
+ 	--with-debugging=no COPTFLAGS=-O3 FOPTFLAGS=-O3 \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-cosmos.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-cosmos.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-cosmos.sh	(revision 12156)
+@@ -11,7 +11,7 @@
+ 
+ #configure
+ cd install
+-PETSC_DIR=$ISSM_TIER/externalpackages/petsc/install
++PETSC_DIR=$ISSM_DIR/externalpackages/petsc/install
+ ./config/configure.py  \
+ 	--prefix=$PETSC_DIR \
+ 	--with-batch=1  \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-macosx64.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-macosx64.sh	(revision 12156)
+@@ -12,10 +12,10 @@
+ #configure
+ cd src
+ ./config/configure.py \
+-  --prefix="$ISSM_TIER/externalpackages/petsc/install" \
+-  --PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++  --prefix="$ISSM_DIR/externalpackages/petsc/install" \
++  --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+   --PETSC_ARCH=macosx-gnu \
+-  --with-mpi-dir="$ISSM_TIER/externalpackages/mpich2/install" \
++  --with-mpi-dir="$ISSM_DIR/externalpackages/mpich2/install" \
+   --with-debugging=0 \
+   --with-shared-libraries=0 \
+   --download-mumps=yes \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-greenplanet.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-greenplanet.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-greenplanet.sh	(revision 12156)
+@@ -12,8 +12,8 @@
+ #configure
+ cd src
+ ./config/configure.py \
+-	--prefix="$ISSM_TIER/externalpackages/petsc/install" \
+-	--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++	--prefix="$ISSM_DIR/externalpackages/petsc/install" \
++	--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+ 	--PETSC_ARCH="$ISSM_ARCH" \
+ 	--with-batch=1 \
+ 	--with-debugging=0 \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx64.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx64.sh	(revision 12156)
+@@ -12,10 +12,10 @@
+ #configure
+ cd src
+ ./config/configure.py \
+-  --prefix="$ISSM_TIER/externalpackages/petsc/install" \
+-  --PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++  --prefix="$ISSM_DIR/externalpackages/petsc/install" \
++  --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+   --PETSC_ARCH=macosx-gnu \
+-  --with-mpi-dir="$ISSM_TIER/externalpackages/mpich2/install" \
++  --with-mpi-dir="$ISSM_DIR/externalpackages/mpich2/install" \
+   --with-debugging=0 \
+   --with-shared-libraries=0 \
+   --download-mumps=yes \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-ogive.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-ogive.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-ogive.sh	(revision 12156)
+@@ -12,9 +12,9 @@
+ #configure
+ cd src
+ ./config/configure.py \
+-	--prefix="$ISSM_TIER/externalpackages/petsc/install" \
+-	--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
+-	--with-mpi-dir=$ISSM_TIER/externalpackages/mpich2/install \
++	--prefix="$ISSM_DIR/externalpackages/petsc/install" \
++	--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
++	--with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \
+ 	--PETSC_ARCH=macosx-gnu \
+ 	--with-fc=/usr/local/bin/gfortran \
+ 	--with-debugging=0 \
+@@ -29,7 +29,7 @@
+ 	--COPTFLAGS="-march=opteron -O2 " \
+ 	--FOPTFLAGS="-march=opteron -O2 " \
+ 	--CXXOPTFLAGS="-march=opteron -O2 " \
+-	--FFLAGS="-I$ISSM_TIER/externalpackages/mpich2/install/include -L$ISSM_TIER/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran " 
++	--FFLAGS="-I$ISSM_DIR/externalpackages/mpich2/install/include -L$ISSM_DIR/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran " 
+ 
+ #Compile petsc and install it
+ make
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-ogive.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-ogive.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-ogive.sh	(revision 12156)
+@@ -11,10 +11,10 @@
+ 
+ #configure
+ cd install
+-./config/configure.py  --prefix="$ISSM_TIER/externalpackages/petsc/install" \
+-	--with-mpi-dir=$ISSM_TIER/externalpackages/mpich2/install \
++./config/configure.py  --prefix="$ISSM_DIR/externalpackages/petsc/install" \
++	--with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \
+ 	--PETSC_ARCH=macosx-gnu \
+-	--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/install" \
++	--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" \
+ 	--with-fc=/usr/local/bin/gfortran \
+ 	--with-debugging=0 \
+ 	--with-shared=0 \
+@@ -23,7 +23,7 @@
+ 	--download-blacs=yes \
+ 	--download-blas=yes \
+ 	--download-f-blas-lapack=yes \
+-	--FFLAGS="-I$ISSM_TIER/externalpackages/mpich2/install/include -L$ISSM_TIER/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran" \
++	--FFLAGS="-I$ISSM_DIR/externalpackages/mpich2/install/include -L$ISSM_DIR/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran" \
+ 	--download-plapack=yes
+ 
+ #Compile petsc and install it
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-linux64.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-linux64.sh	(revision 12156)
+@@ -12,11 +12,11 @@
+ #configure
+ cd src
+ ./config/configure.py \
+-	--prefix="$ISSM_TIER/externalpackages/petsc/install" \
+-	--with-mpi-dir=$ISSM_TIER/externalpackages/mpich2/install \
++	--prefix="$ISSM_DIR/externalpackages/petsc/install" \
++	--with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \
+ 	--with-clanguage=C++ \
+ 	--PETSC_ARCH=linux-gnu-amd64 \
+-	--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++	--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+ 	--with-debugging=0 \
+ 	--with-shared-libraries=0 \
+ 	--download-mumps=yes \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-eric.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-eric.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-eric.sh	(revision 12156)
+@@ -16,10 +16,10 @@
+ 	#configure
+ 	cd install
+ 	./config/configure.py  \
+-		--prefix="$ISSM_TIER/externalpackages/petsc/install" \
+-		--with-mpi-dir=$ISSM_TIER/externalpackages/mpich2/install \
++		--prefix="$ISSM_DIR/externalpackages/petsc/install" \
++		--with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \
+ 		--PETSC_ARCH=macosx-gnu \
+-		--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/install" \
++		--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" \
+ 		--with-fc=/usr/local/bin/gfortran \
+ 		--with-debugging=0 \
+ 		--with-shared=0 \
+@@ -28,7 +28,7 @@
+ 		--download-blacs=yes \
+ 		--download-blas=yes \
+ 		--download-f-blas-lapack=yes \
+-		--FFLAGS="-I$ISSM_TIER/externalpackages/mpich2/install/include -L$ISSM_TIER/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran  -fPIC -arch i386" \
++		--FFLAGS="-I$ISSM_DIR/externalpackages/mpich2/install/include -L$ISSM_DIR/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran  -fPIC -arch i386" \
+ 		--download-plapack=yes \
+ 		--CXXFLAGS=" -fPIC -arch i386" \
+ 		--CFLAGS=" -fPIC -arch i386" \
+@@ -42,19 +42,19 @@
+ if [ $STEP -eq 2 ]; then
+ 	cd install
+ 	./config/configure.py  \
+-		--prefix="$ISSM_TIER/externalpackages/petsc/install" \
+-		--with-mpi-dir=$ISSM_TIER/externalpackages/mpich2/install \
++		--prefix="$ISSM_DIR/externalpackages/petsc/install" \
++		--with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \
+ 		--PETSC_ARCH=macosx-gnu \
+-		--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/install" \
++		--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" \
+ 		--with-fc=/usr/local/bin/gfortran \
+ 		--with-debugging=0 \
+ 		--with-shared=0 \
+-		--with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/externalpackages/MUMPS_4.6.3  \
++		--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/MUMPS_4.6.3  \
+ 		--download-scalapack=yes \
+ 		--download-blacs=yes \
+ 		--download-blas=yes \
+ 		--download-f-blas-lapack=yes \
+-		--FFLAGS="-I$ISSM_TIER/externalpackages/mpich2/install/include -L$ISSM_TIER/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran  -fPIC -arch i386" \
++		--FFLAGS="-I$ISSM_DIR/externalpackages/mpich2/install/include -L$ISSM_DIR/externalpackages/mpich2/install/lib -L/usr/local/bin -lmpich -lpmpich -lgfortran  -fPIC -arch i386" \
+ 		--download-plapack=yes \
+ 		--CXXFLAGS=" -fPIC -arch i386" \
+ 		--CFLAGS=" -fPIC -arch i386" \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-win32-eric.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-win32-eric.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-win32-eric.sh	(revision 12156)
+@@ -13,9 +13,9 @@
+ cd install
+ ./config/configure.py  \
+ 	--with-parallel-no \
+-	--prefix="$ISSM_TIER/externalpackages/petsc/install" \
++	--prefix="$ISSM_DIR/externalpackages/petsc/install" \
+ 	--PETSC_ARCH=cygwin-intel \
+-	--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/install" \
++	--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" \
+ 	--with-debugging=0 \
+ 	--with-mpi=0 \
+ 	--download-c-blas-lapack=1
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-win7.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-win7.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-win7.sh	(revision 12156)
+@@ -13,9 +13,9 @@
+ cd src
+ ./config/configure.py  \
+ 	--with-parallel-no \
+-	--prefix="$ISSM_TIER/externalpackages/petsc/install" \
++	--prefix="$ISSM_DIR/externalpackages/petsc/install" \
+ 	--PETSC_ARCH=cygwin-intel \
+-	--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++	--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+ 	--with-debugging=0 \
+ 	--with-mpi=0 \
+ 	--download-c-blas-lapack=yes \
+@@ -25,10 +25,10 @@
+ 	--with-clanguage=cxx 
+ 
+ #./config/configure.py  \
+-# --prefix="$ISSM_TIER/externalpackages/petsc/install" \
+-# --PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++# --prefix="$ISSM_DIR/externalpackages/petsc/install" \
++# --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+ # --PETSC_ARCH=macosx-gnu \
+-# --with-mpi-dir=$ISSM_TIER/externalpackages/mpich2/install \
++# --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \
+ # --with-debugging=0 \
+ # --with-shared=0 \
+ # --download-mumps=yes \
+@@ -37,7 +37,7 @@
+ # --download-blas=yes \
+ # --download-f-blas-lapack=yes \
+ # --download-plapack=yes \
+-# --FFLAGS="-I$ISSM_TIER/externalpackages/mpich2/install/include -arch i386" \
++# --FFLAGS="-I$ISSM_DIR/externalpackages/mpich2/install/include -arch i386" \
+ # --COPTFLAGS="-march=opteron -O2 -arch i386" \
+ # --FOPTFLAGS="-march=opteron -O2 -arch i386" \
+ # --CXXOPTFLAGS="-march=opteron -O2 -arch i386" \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-altix64-castor.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-altix64-castor.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-altix64-castor.sh	(revision 12156)
+@@ -16,8 +16,8 @@
+ 	#configure
+ 	cd src
+ 	./config/configure.py \
+-	  --prefix="$ISSM_TIER/externalpackages/petsc/install" \
+-	  --PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++	  --prefix="$ISSM_DIR/externalpackages/petsc/install" \
++	  --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+ 	  --ISSM_ARCH=$ISSM_ARCH \
+ 	  --with-debugging=no \
+ 	  --with-shared=0 COPTFLAGS=-O3 FOPTFLAGS=-O3 \
+@@ -40,8 +40,8 @@
+ if [ $STEP -eq 2 ]; then
+ 	cd src
+ 	./config/configure.py \
+-		--prefix="$ISSM_TIER/externalpackages/petsc/install" \
+-		--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++		--prefix="$ISSM_DIR/externalpackages/petsc/install" \
++		--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+ 		--with-batch=1  \
+ 		--ISSM_ARCH=$ISSM_ARCH \
+ 		--with-debugging=no \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-altix64-castor.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-altix64-castor.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-altix64-castor.sh	(revision 12156)
+@@ -16,7 +16,7 @@
+ 	#configure
+ 	cd install
+ 	./config/configure.py \
+-		--prefix="$ISSM_TIER/externalpackages/petsc/install" \
++		--prefix="$ISSM_DIR/externalpackages/petsc/install" \
+ 		--with-batch=1  \
+ 		--ISSM_ARCH=$ISSM_ARCH \
+ 		--PETSC_DIR=$PETSC_DIR   \
+@@ -40,7 +40,7 @@
+ if [ $STEP -eq 2 ]; then
+ 	cd install
+ 	./config/configure.py  \
+-		--prefix="$ISSM_TIER/externalpackages/petsc/install" \
++		--prefix="$ISSM_DIR/externalpackages/petsc/install" \
+ 		--with-batch=1  \
+ 		--ISSM_ARCH=$ISSM_ARCH \
+ 		--PETSC_DIR=$PETSC_DIR   \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-win7.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-win7.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-win7.sh	(revision 12156)
+@@ -13,9 +13,9 @@
+ cd install
+ ./config/configure.py  \
+ 	--with-parallel-no \
+-	--prefix="$ISSM_TIER/externalpackages/petsc/install" \
++	--prefix="$ISSM_DIR/externalpackages/petsc/install" \
+ 	--PETSC_ARCH=cygwin-intel \
+-	--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/install" \
++	--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" \
+ 	--with-debugging=0 \
+ 	--with-mpi=0 \
+ 	--download-c-blas-lapack=1
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-pleiades.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-pleiades.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-pleiades.sh	(revision 12156)
+@@ -16,10 +16,10 @@
+ 	#configure
+ 	cd src
+ 	./config/configure.py \
+-		--prefix="$ISSM_TIER/externalpackages/petsc/install" \
++		--prefix="$ISSM_DIR/externalpackages/petsc/install" \
+ 		--with-batch=1  \
+ 		--PETSC_ARCH="$ISSM_ARCH" \
+-		--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++		--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+ 		--with-debugging=no \
+ 		--with-shared=0 \
+ 		--with-blas-lapack-dir=/nasa/intel/mkl/10.0.011/ \
+@@ -43,10 +43,10 @@
+ if [ $STEP -eq 2 ]; then
+ 	cd src
+ 	./config/configure.py \
+-	 --prefix="$ISSM_TIER/externalpackages/petsc/install" \
++	 --prefix="$ISSM_DIR/externalpackages/petsc/install" \
+ 	 --with-batch=1  \
+ 	 --PETSC_ARCH="$ISSM_ARCH" \
+-	 --PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++	 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+ 	 --with-debugging=no \
+ 	 --with-shared=0 \
+ 	 --with-blas-lapack-dir=/nasa/intel/mkl/10.0.011/ \
+@@ -56,7 +56,7 @@
+ 	 --download-mumps=yes \
+ 	 --download-scalapack=yes \
+ 	 --download-blacs=yes  \
+-	 --with-plapack-dir=$ISSM_TIER/externalpackages/petsc/src/$ISSM_ARCH \
++	 --with-plapack-dir=$ISSM_DIR/externalpackages/petsc/src/$ISSM_ARCH \
+ 	 --download-parmetis=yes \
+ 	 --FFLAGS=-I/usr/include \
+ 	 --with-cc=icc \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-dev-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-dev-linux64.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-dev-linux64.sh	(revision 12156)
+@@ -28,11 +28,11 @@
+ 	rm -rf install
+ 	cd src
+ 	./config/configure.py \
+-	--prefix="$ISSM_TIER/externalpackages/petsc/install" \
+-	--with-mpi-dir="$ISSM_TIER/externalpackages/mpich2/install" \
++	--prefix="$ISSM_DIR/externalpackages/petsc/install" \
++	--with-mpi-dir="$ISSM_DIR/externalpackages/mpich2/install" \
+ 	--with-clanguage=C++ \
+ 	--PETSC_ARCH=linux-gnu-amd64 \
+-	--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++	--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+ 	--with-debugging=0 \
+ 	--with-shared-libraries=0 \
+ 	--download-metis=yes \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-pleiades.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-pleiades.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-pleiades.sh	(revision 12156)
+@@ -16,7 +16,7 @@
+ 	#configure
+ 	cd install
+ 	./config/configure.py  \
+-		--prefix="$ISSM_TIER/externalpackages/petsc/install" \
++		--prefix="$ISSM_DIR/externalpackages/petsc/install" \
+ 		--with-batch=1  \
+ 		--PETSC_ARCH=$ISSM_ARCH \
+ 		--PETSC_DIR=$PETSC_DIR   \
+@@ -43,7 +43,7 @@
+ if [ $STEP -eq 2 ]; then
+ 	cd install
+ 	./config/configure.py  \
+-		--prefix="$ISSM_TIER/externalpackages/petsc/install" \
++		--prefix="$ISSM_DIR/externalpackages/petsc/install" \
+ 		--with-batch=1  \
+ 		--PETSC_ARCH=$ISSM_ARCH \
+ 		--PETSC_DIR=$PETSC_DIR   \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh	(revision 12156)
+@@ -16,10 +16,10 @@
+ 	#configure
+ 	cd src
+ 	./config/configure.py \
+-		--prefix="$ISSM_TIER/externalpackages/petsc/install" \
++		--prefix="$ISSM_DIR/externalpackages/petsc/install" \
+ 		--with-batch=1  \
+ 		--PETSC_ARCH="$ISSM_ARCH" \
+-		--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++		--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+ 		--with-debugging=0 \
+ 		--with-shared-libraries=0 \
+ 		--with-blas-lapack-dir=/nasa/intel/mkl/10.0.011/ \
+@@ -43,10 +43,10 @@
+ if [ $STEP -eq 2 ]; then
+ 	cd src
+ 	./config/configure.py \
+-	 --prefix="$ISSM_TIER/externalpackages/petsc/install" \
++	 --prefix="$ISSM_DIR/externalpackages/petsc/install" \
+ 	 --with-batch=1  \
+ 	 --PETSC_ARCH="$ISSM_ARCH" \
+-	 --PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++	 --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+ 	 --with-debugging=0 \
+ 	 --with-shared-libraries=0 \
+ 	 --with-blas-lapack-dir=/nasa/intel/mkl/10.0.011/ \
+@@ -56,7 +56,7 @@
+ 	 --download-mumps=yes \
+ 	 --download-scalapack=yes \
+ 	 --download-blacs=yes  \
+-	 --with-plapack-dir=$ISSM_TIER/externalpackages/petsc/src/$ISSM_ARCH \
++	 --with-plapack-dir=$ISSM_DIR/externalpackages/petsc/src/$ISSM_ARCH \
+ 	 --download-parmetis=yes \
+ 	 --FFLAGS=-I/usr/include \
+ 	 --with-cc=icc \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-mathieu.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-mathieu.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-mathieu.sh	(revision 12156)
+@@ -12,10 +12,10 @@
+ #configure
+ cd src
+ ./config/configure.py  \
+- --prefix="$ISSM_TIER/externalpackages/petsc/install" \
+- --PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++ --prefix="$ISSM_DIR/externalpackages/petsc/install" \
++ --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+  --PETSC_ARCH=macosx-gnu \
+- --with-mpi-dir=$ISSM_TIER/externalpackages/mpich2/install \
++ --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \
+  --with-debugging=0 \
+  --with-shared=0 \
+  --download-mumps=yes \
+@@ -24,7 +24,7 @@
+  --download-blas=yes \
+  --download-f-blas-lapack=yes \
+  --download-plapack=yes \
+- --FFLAGS="-I$ISSM_TIER/externalpackages/mpich2/install/include -arch i386" \
++ --FFLAGS="-I$ISSM_DIR/externalpackages/mpich2/install/include -arch i386" \
+  --COPTFLAGS="-march=opteron -O2 -arch i386" \
+  --FOPTFLAGS="-march=opteron -O2 -arch i386" \
+  --CXXOPTFLAGS="-march=opteron -O2 -arch i386" \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-linux64-astrid.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-linux64-astrid.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-linux64-astrid.sh	(revision 12156)
+@@ -12,10 +12,10 @@
+ #configure
+ cd src
+ ./config/configure.py \
+- --prefix="$ISSM_TIER/externalpackages/petsc/install" \
+- --with-mpi-dir=$ISSM_TIER/externalpackages/mpich2/install \
++ --prefix="$ISSM_DIR/externalpackages/petsc/install" \
++ --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \
+  --PETSC_ARCH=linux-gnu-amd64 \
+- --PETSC_DIR="$ISSM_TIER/externalpackages/petsc/src" \
++ --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
+  --with-debugging=0 \
+  --with-shared=0 \
+  --download-mumps=yes \
+@@ -24,7 +24,7 @@
+  --download-blas=yes \
+  --download-f-blas-lapack=yes \
+  --download-parmetis=yes \
+- --FFLAGS=-I$ISSM_TIER/externalpackages/mpich2/install/include \
++ --FFLAGS=-I$ISSM_DIR/externalpackages/mpich2/install/include \
+  --download-plapack=yes \
+  --COPTFLAGS="-march=opteron -O2" \
+  --FOPTFLAGS="-march=opteron -O2" \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-linux64-astrid.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-linux64-astrid.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-linux64-astrid.sh	(revision 12156)
+@@ -12,10 +12,10 @@
+ #configure
+ cd install
+ ./config/configure.py  \
+-	--prefix="$ISSM_TIER/externalpackages/petsc/install" \
+-	--with-mpi-dir=$ISSM_TIER/externalpackages/mpich2/install \
++	--prefix="$ISSM_DIR/externalpackages/petsc/install" \
++	--with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \
+ 	--PETSC_ARCH=linux-gnu-amd64 \
+-	--PETSC_DIR="$ISSM_TIER/externalpackages/petsc/install" \
++	--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/install" \
+ 	--with-fc=gfortran \
+ 	--with-debugging=1 \
+ 	--with-shared=0 \
+@@ -24,7 +24,7 @@
+ 	--download-blacs=yes \
+ 	--download-blas=yes \
+ 	--download-f-blas-lapack=yes \
+-	--FFLAGS=-I$ISSM_TIER/externalpackages/mpich2/install/include \
++	--FFLAGS=-I$ISSM_DIR/externalpackages/mpich2/install/include \
+ 	--download-plapack=yes \
+ 	--COPTFLAGS="-march=opteron -O2" \
+ 	--FOPTFLAGS="-march=opteron -O2" \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/bsdtar/install-win7.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/bsdtar/install-win7.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/bsdtar/install-win7.sh	(revision 12156)
+@@ -12,6 +12,6 @@
+ rm -rf libarchive-3.0.3
+ 
+ cd src 
+-./configure --prefix="$ISSM_TIER/externalpackages/bsdtar/install" 
++./configure --prefix="$ISSM_DIR/externalpackages/bsdtar/install" 
+ make
+ make install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/tao/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/tao/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/tao/install.sh	(revision 12156)
+@@ -13,7 +13,7 @@
+ mv tao-2.0-p3/* install/
+ rm -rf tao-2.0-p3
+ cd install
+-export TAO_DIR="$ISSM_TIER/externalpackages/tao/install/"
++export TAO_DIR="$ISSM_DIR/externalpackages/tao/install/"
+ 
+ #petsc needs to be compiled with --with-clanguage=C++
+ make
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/qhull/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/qhull/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/qhull/install.sh	(revision 12156)
+@@ -14,6 +14,6 @@
+ 
+ #Configure qhull
+ cd src
+-./configure --prefix="$ISSM_TIER/externalpackages/qhull/install"
++./configure --prefix="$ISSM_DIR/externalpackages/qhull/install"
+ make
+ make install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-macosx64.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-macosx64.sh	(revision 12156)
+@@ -17,7 +17,7 @@
+ export CFLAGS=" -arch x86_64"
+ 
+ ./configure \
+-	--prefix="$ISSM_TIER/externalpackages/gsl/install" 
++	--prefix="$ISSM_DIR/externalpackages/gsl/install" 
+ 
+ #Compile gsl
+ if [ -z $1 ]; then
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64-murdo.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64-murdo.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64-murdo.sh	(revision 12156)
+@@ -15,7 +15,7 @@
+ cd src
+ 
+ ./configure \
+-	--prefix="$ISSM_TIER/externalpackages/gsl/install" 
++	--prefix="$ISSM_DIR/externalpackages/gsl/install" 
+ 
+ #Compile gsl
+ if [ -z $1 ]; then
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-android-4.0.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-android-4.0.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-android-4.0.sh	(revision 12156)
+@@ -23,7 +23,7 @@
+     OBJ_EXT=o\
+     LIB_EXT=a\
+     --host="arm-linux"\
+-	--prefix="$ISSM_TIER/externalpackages/gsl/install" 
++	--prefix="$ISSM_DIR/externalpackages/gsl/install" 
+ 
+ #Compile gsl
+ if [ -z $1 ]; then
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh	(revision 12156)
+@@ -21,9 +21,9 @@
+ #Configure and compile
+ cd src 
+ ./bootstrap.sh \
+-	--prefix="$ISSM_TIER/externalpackages/boost/install" \
++	--prefix="$ISSM_DIR/externalpackages/boost/install" \
+ 	--with-python=python3.2 \
+-	--with-python-root="$ISSM_TIER/externalpackages/python/install" 
++	--with-python-root="$ISSM_DIR/externalpackages/python/install" 
+ 
+ #Compile boost
+ ./bjam install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ncview/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ncview/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ncview/install.sh	(revision 12156)
+@@ -14,11 +14,11 @@
+ #Configure doxygen
+ cd install
+ ./configure \
+-	--prefix "$ISSM_TIER/externalpackages/ncview/install" \
++	--prefix "$ISSM_DIR/externalpackages/ncview/install" \
+ 	--x-libraries=/usr/X11/lib/ \
+ 	--x-includes=/usr/X11/include/ \
+-	--with-netcdf_incdir="$ISSM_TIER/externalpackages/netcdf/install/include/" \
+-	--with-netcdf_libdir="$ISSM_TIER/externalpackages/netcdf/install/lib/"
++	--with-netcdf_incdir="$ISSM_DIR/externalpackages/netcdf/install/include/" \
++	--with-netcdf_libdir="$ISSM_DIR/externalpackages/netcdf/install/lib/"
+ 
+ make
+ make install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/vim/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/vim/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/vim/install.sh	(revision 12156)
+@@ -18,7 +18,7 @@
+ export CC=gcc
+ cd src/src 
+ ./configure \
+-	--prefix "$ISSM_TIER/externalpackages/vim/install" \
++	--prefix "$ISSM_DIR/externalpackages/vim/install" \
+ 	--with-gcc "/usr/bin/gcc"
+ 
+ #Compile vim
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/netcdf/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/netcdf/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/netcdf/install.sh	(revision 12156)
+@@ -14,7 +14,7 @@
+ 
+ #Configure and compile
+ cd install
+-./configure  --prefix="$ISSM_TIER/externalpackages/netcdf/install" 
++./configure  --prefix="$ISSM_DIR/externalpackages/netcdf/install" 
+ if [ -z $1 ]; then
+ 	make
+ else
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/automake/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/automake/install.sh	(revision 12155)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/automake/install.sh	(revision 12156)
+@@ -12,6 +12,6 @@
+ 
+ #Compile automake
+ cd src 
+-./configure --prefix="$ISSM_TIER/externalpackages/automake/install" 
++./configure --prefix="$ISSM_DIR/externalpackages/automake/install" 
+ make  
+ make install
Index: /issm/oecreview/Archive/12141-12160/ISSM-12156-12157.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12156-12157.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12156-12157.diff	(revision 12325)
@@ -0,0 +1,953 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-cosmos.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-cosmos.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-cosmos.sh	(revision 12157)
+@@ -1,3 +1,3 @@
+ #!/bin/csh
+ 
+-./configure --prefix=$ISSM_TIER --with-serial=no --with-metis-dir=$ISSM_TIER/externalpackages/metis/install --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install --with-mpi-include=/opt/mpich/gm/intel10.1/include  --with-mpi-lib="-L/opt/mpich/gm/intel10.1/lib -lmpich -L/usr/local/gm/lib/ -lgm  -lpthread  -lrt" --with-petsc-arch=$ISSM_ARCH --with-mkl-dir=/opt/intel/mkl/10.0.5.025/lib/32/  --with-plapack-dir="-L$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH -lPLAPACK" --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH/INCLUDE" --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH/ --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH/ --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH  --with-vendor=intel-linux --with-graphics-lib=/usr/X11R6/lib/libX11.so
++./configure --prefix=$ISSM_DIR --with-serial=no --with-metis-dir=$ISSM_DIR/externalpackages/metis/install --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install --with-mpi-include=/opt/mpich/gm/intel10.1/include  --with-mpi-lib="-L/opt/mpich/gm/intel10.1/lib -lmpich -L/usr/local/gm/lib/ -lgm  -lpthread  -lrt" --with-petsc-arch=$ISSM_ARCH --with-mkl-dir=/opt/intel/mkl/10.0.5.025/lib/32/  --with-plapack-dir="-L$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH -lPLAPACK" --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH/INCLUDE" --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/ --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH  --with-vendor=intel-linux --with-graphics-lib=/usr/X11R6/lib/libX11.so
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-greenplanet.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-greenplanet.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-greenplanet.sh	(revision 12157)
+@@ -4,21 +4,21 @@
+ #MPI /sopt/mpi/openmpi-1.5.4_psm/intel
+ 
+ ./configure \
+- --prefix=$ISSM_TIER \
++ --prefix=$ISSM_DIR \
+  --with-modules=no \
+- --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+- --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+- --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
++ --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++ --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++ --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
+  --with-mpi-include="/sopt/mpi/openmpi-1.5.4_psm/intel/include/" \
+  --with-mpi-lib="-L/sopt/mpi/openmpi-1.5.4_psm/intel/lib/ -lmpi -lmpi_f77" \
+  --with-petsc-arch=$ISSM_ARCH \
+- --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
++ --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
+  --with-mkl-dir=/opt/intel/mkl/10.2.4.032/ \
+- --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+- --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
+- --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++ --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++ --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
++ --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
+  --with-graphics-lib=/usr/lib64/libX11.so \
+  --with-cxxoptflags="-O3 -xS" \
+  --with-vendor=intel-linux
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-win7-32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-win7-32.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-win7-32.sh	(revision 12157)
+@@ -1,16 +1,16 @@
+ #!/bin/sh
+ 
+ #Dos style path needed for the windows sdk 7.1 cl compiler: 
+-ISSM_TIER_WIN=`cygpath -m "$ISSM_TIER"`
++ISSM_DIR_WIN=`cygpath -m "$ISSM_DIR"`
+ 
+ #get configure.sh to pick up the win7 Visual Studio compiler 
+-./configure --prefix=$ISSM_TIER \
++./configure --prefix=$ISSM_DIR \
+ 	--with-vendor=intel-win7-32  \
+ 	--with-matlab-dir=$MATLAB_DIR \
+-	--with-triangle-dir="$ISSM_TIER_WIN/externalpackages/triangle/install" \
+-	--with-metis-dir="$ISSM_TIER_WIN/externalpackages/metis/install" \
+-	--with-petsc-dir="$ISSM_TIER_WIN/externalpackages/petsc/install" \
++	--with-triangle-dir="$ISSM_DIR_WIN/externalpackages/triangle/install" \
++	--with-metis-dir="$ISSM_DIR_WIN/externalpackages/metis/install" \
++	--with-petsc-dir="$ISSM_DIR_WIN/externalpackages/petsc/install" \
+ 	--with-petsc-arch=$ISSM_ARCH  \
+-	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install/lib/  \
+-	--with-mpi-lib="$ISSM_TIER_WIN/externalpackages/petsc/install/lib/libpetsc.lib" \
+-	--with-mpi-include="$ISSM_TIER_WIN/externalpackages/petsc/install/include/mpiuni" 
++	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/lib/  \
++	--with-mpi-lib="$ISSM_DIR_WIN/externalpackages/petsc/install/lib/libpetsc.lib" \
++	--with-mpi-include="$ISSM_DIR_WIN/externalpackages/petsc/install/include/mpiuni" 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour.sh	(revision 12157)
+@@ -4,24 +4,24 @@
+ #mpich 1.4
+ 
+ ./configure \
+-	--prefix=$ISSM_TIER \
++	--prefix=$ISSM_DIR \
+ 	--with-matlab-dir=$MATLAB_DIR \
+-	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+-	--with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+-	--with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+-	--with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \
+-	--with-chaco-dir=$ISSM_TIER/externalpackages/chaco/install \
++	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++	--with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++	--with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++	--with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \
++	--with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install \
+ 	--with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \
+ 	--with-math-lib="/usr/lib/libm.dylib" \
+ 	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
+ 	--with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5  -O3 -DNDEBUG -w "\
+ 	--with-numthreads=8 \
+-	--with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install  \
++	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
+ 	--with-petsc-arch=$ISSM_ARCH \
+-	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+-	--with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+-	--with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/include/ " \
+-	--with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ 
+-	#--with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
++	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++	--with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++	--with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \
++	--with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ 
++	#--with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-murdo-nopetsc.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-murdo-nopetsc.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-murdo-nopetsc.sh	(revision 12157)
+@@ -1,27 +1,27 @@
+ #!/bin/sh
+ 
+ ./configure \
+- --prefix=$ISSM_TIER \
+- --with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+- --with-mpi-lib="-L$ISSM_TIER/externalpackages/mpich2/install/lib/ -lmpich" \
++ --prefix=$ISSM_DIR \
++ --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++ --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich" \
+  --with-matlab-dir=$MATLAB_DIR \
+- --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+- --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+- --with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install/lib \
++ --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++ --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++ --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/lib \
+  --with-graphics-lib=/usr/lib64/libX11.so \
+- --with-scotch-dir="$ISSM_TIER/externalpackages/scotch/install" \
+- --with-chaco-dir="$ISSM_TIER/externalpackages/chaco/install" \
++ --with-scotch-dir="$ISSM_DIR/externalpackages/scotch/install" \
++ --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \
+  --with-cxxoptflags="-mtune=barcelona -ffast-math -O3 -msse4.2 -Wno-write-strings "\
+  --with-numthreads=18 \
+  --enable-debugging \
+- --with-gsl-dir=$ISSM_TIER/externalpackages/gsl/install
++ --with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install
+  
+  
+-# --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
++# --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
+ # --with-petsc-arch=$ISSM_ARCH \
+-# --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+-# --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
+-# --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-# --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-# --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-# --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
++# --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++# --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
++# --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++# --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++# --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++# --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx32-ogive.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx32-ogive.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx32-ogive.sh	(revision 12157)
+@@ -4,21 +4,21 @@
+ #mpich 1.4
+ 
+ ./configure \
+-	--prefix=$ISSM_TIER \
++	--prefix=$ISSM_DIR \
+ 	--with-matlab-dir=$MATLAB_DIR \
+-	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+-	--with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+-	--with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install  \
+-	--with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+-	--with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \
++	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++	--with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
++	--with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++	--with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \
+ 	--with-petsc-arch=$ISSM_ARCH \
+-	--with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
+-	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+-	--with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+-	--with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/include/ " \
+-	--with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++	--with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
++	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++	--with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++	--with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \
++	--with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
+ 	--with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \
+ 	--with-math-lib="/usr/lib/libm.dylib" \
+ 	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-mpich1.0.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-mpich1.0.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-mpich1.0.sh	(revision 12157)
+@@ -5,25 +5,25 @@
+ #mpich 1.0.2
+ 
+ ./configure \
+- --prefix=$ISSM_TIER \
++ --prefix=$ISSM_DIR \
+  --with-matlab-dir=$MATLAB_DIR \
+- --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+- --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+- --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
+- --with-tao-dir=$ISSM_TIER/externalpackages/tao/install \
+- --with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+- --with-mpi-lib="-L$ISSM_TIER/externalpackages/mpich2/install/lib/ -lmpich " \
++ --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++ --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++ --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-tao-dir=$ISSM_DIR/externalpackages/tao/install \
++ --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++ --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich " \
+  --with-petsc-arch=$ISSM_ARCH \
+- --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
+- --with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+- --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+- --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
+- --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-scotch-dir="$ISSM_TIER/externalpackages/scotch/install" \
+- --with-chaco-dir="$ISSM_TIER/externalpackages/chaco/install" \
+- --with-shapelib-dir="$ISSM_TIER/externalpackages/shapelib/install" \
++ --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
++ --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++ --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
++ --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-scotch-dir="$ISSM_DIR/externalpackages/scotch/install" \
++ --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \
++ --with-shapelib-dir="$ISSM_DIR/externalpackages/shapelib/install" \
+  --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/4.1.1/ -lgfortran" \
+  --with-graphics-lib=/usr/lib64/libX11.so \
+  --with-cxxoptflags="-march=opteron -O2" \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-win7-64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-win7-64.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-win7-64.sh	(revision 12157)
+@@ -1,16 +1,16 @@
+ #!/bin/sh
+ 
+ #Dos style path needed for the windows sdk 7.1 cl compiler: 
+-ISSM_TIER_WIN=`cygpath -m "$ISSM_TIER"`
++ISSM_DIR_WIN=`cygpath -m "$ISSM_DIR"`
+ 
+ #get configure.sh to pick up the win7 Visual Studio compiler 
+-./configure --prefix=$ISSM_TIER \
++./configure --prefix=$ISSM_DIR \
+ 	--with-vendor=intel-win7-64  \
+ 	--with-matlab-dir=$MATLAB_DIR \
+-	--with-triangle-dir="$ISSM_TIER_WIN/externalpackages/triangle/install" \
+-	--with-metis-dir="$ISSM_TIER_WIN/externalpackages/metis/install" \
+-	--with-petsc-dir="$ISSM_TIER_WIN/externalpackages/petsc/install" \
++	--with-triangle-dir="$ISSM_DIR_WIN/externalpackages/triangle/install" \
++	--with-metis-dir="$ISSM_DIR_WIN/externalpackages/metis/install" \
++	--with-petsc-dir="$ISSM_DIR_WIN/externalpackages/petsc/install" \
+ 	--with-petsc-arch=$ISSM_ARCH  \
+-	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install/lib/  \
+-	--with-mpi-lib="$ISSM_TIER_WIN/externalpackages/petsc/install/lib/libpetsc.lib" \
+-	--with-mpi-include="$ISSM_TIER_WIN/externalpackages/petsc/install/include/mpiuni" 
++	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/lib/  \
++	--with-mpi-lib="$ISSM_DIR_WIN/externalpackages/petsc/install/lib/libpetsc.lib" \
++	--with-mpi-include="$ISSM_DIR_WIN/externalpackages/petsc/install/include/mpiuni" 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-ogive.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-ogive.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-ogive.sh	(revision 12157)
+@@ -8,21 +8,21 @@
+ export CXXFLAGS=" -arch x86_64"
+ 
+ ./configure \
+-	--prefix=$ISSM_TIER \
++	--prefix=$ISSM_DIR \
+ 	--with-matlab-dir=$MATLAB_DIR \
+-	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+-	--with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+-	--with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install  \
+-	--with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+-	--with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \
++	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++	--with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
++	--with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++	--with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \
+ 	--with-petsc-arch=$ISSM_ARCH \
+-	--with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
+-	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+-	--with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+-	--with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/include/ " \
+-	--with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++	--with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
++	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++	--with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++	--with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \
++	--with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
+ 	--with-fortran-lib="/usr/local/gfortran/lib/x86_64/libgfortran.a" \
+ 	--with-math-lib="/usr/lib/libm.dylib" \
+ 	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-nicole.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-nicole.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-nicole.sh	(revision 12157)
+@@ -4,23 +4,23 @@
+ #mpich 1.4
+ 
+ ./configure \
+-	--prefix=$ISSM_TIER \
++	--prefix=$ISSM_DIR \
+ 	--with-matlab-dir=$MATLAB_DIR \
+-	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+-	--with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+-	--with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install  \
+-	--with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+-	--with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \
++	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++	--with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
++	--with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++	--with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \
+ 	--with-petsc-arch=$ISSM_ARCH \
+-	--with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
+-	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+-	--with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install -lPLAPACK" \
+-	--with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/include/ " \
+-	--with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install \
+-	--with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+-	--with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install \
+-	--with-scotch-dir="$ISSM_TIER/externalpackages/scotch/install" \
+-	--with-chaco-dir="$ISSM_TIER/externalpackages/chaco/install" \
++	--with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
++	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++	--with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install -lPLAPACK" \
++	--with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \
++	--with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install \
++	--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++	--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install \
++	--with-scotch-dir="$ISSM_DIR/externalpackages/scotch/install" \
++	--with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \
+ 	--with-fortran-lib="/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10/4.6.2/libgfortran.a" \
+ 	--with-math-lib="/usr/lib/libm.dylib" \
+ 	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh	(revision 12157)
+@@ -3,10 +3,10 @@
+ pythonversion=2.7
+ 
+ ./configure \
+-	--prefix=$ISSM_TIER \
+-	--with-python-dir=$ISSM_TIER/externalpackages/python/install\
++	--prefix=$ISSM_DIR \
++	--with-python-dir=$ISSM_DIR/externalpackages/python/install\
+ 	--with-python-version=$pythonversion \
+-	--with-python-numpy-dir=$ISSM_TIER/externalpackages/python/install/Python.framework/Versions/$pythonversion/lib/python$pythonversion/site-packages/numpy/core/include/numpy\
++	--with-python-numpy-dir=$ISSM_DIR/externalpackages/python/install/Python.framework/Versions/$pythonversion/lib/python$pythonversion/site-packages/numpy/core/include/numpy\
+ 	--with-vendor=arm-linux \
+-	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+-	--with-gsl-dir=$ISSM_TIER/externalpackages/gsl/install
++	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++	--with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-bothapis.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-bothapis.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-bothapis.sh	(revision 12157)
+@@ -6,28 +6,28 @@
+ pythonversion=2.7
+ 
+ ./configure \
+-	--prefix=$ISSM_TIER \
+-	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
++	--prefix=$ISSM_DIR \
++	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
+ 	--with-matlab-dir=$MATLAB_DIR \
+-	--with-python-dir=$ISSM_TIER/externalpackages/python/install\
++	--with-python-dir=$ISSM_DIR/externalpackages/python/install\
+ 	--with-python-version=$pythonversion \
+-	--with-python-numpy-dir=$ISSM_TIER/externalpackages/python/install/Python.framework/Versions/$pythonversion/lib/python$pythonversion/site-packages/numpy/core/include/numpy\
+-	--with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+-	--with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+-	--with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \
+-	--with-chaco-dir=$ISSM_TIER/externalpackages/chaco/install \
++	--with-python-numpy-dir=$ISSM_DIR/externalpackages/python/install/Python.framework/Versions/$pythonversion/lib/python$pythonversion/site-packages/numpy/core/include/numpy\
++	--with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++	--with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++	--with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \
++	--with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install \
+ 	--with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \
+ 	--with-math-lib="/usr/lib/libm.dylib" \
+ 	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
+ 	--with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5  -O3 -DNDEBUG -w "\
+ 	--with-numthreads=8 \
+-	--with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install  \
++	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
+ 	--with-petsc-arch=$ISSM_ARCH \
+-	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+-	--with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+-	--with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/include/ " \
+-	--with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ 
+-	#--with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
+-	#--with-boost-dir=$ISSM_TIER/externalpackages/boost/install/ \
++	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++	--with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++	--with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \
++	--with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ 
++	#--with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
++	#--with-boost-dir=$ISSM_DIR/externalpackages/boost/install/ \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-ad.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-ad.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-ad.sh	(revision 12157)
+@@ -1,24 +1,24 @@
+ #!/bin/sh
+ 
+ ./configure \
+- --prefix=$ISSM_TIER \
++ --prefix=$ISSM_DIR \
+  --with-serial=no\
+- --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+- --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
+- --with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+- --with-mpi-lib="-L$ISSM_TIER/externalpackages/mpich2/install/lib/ -lmpich" \
++ --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++ --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++ --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich" \
+  --with-petsc-arch=$ISSM_ARCH \
+- --with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+- --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+- --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
+- --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++ --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++ --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
++ --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
+  --with-graphics-lib=/usr/lib64/libX11.so \
+  --with-cxxoptflags="-march=opteron -O2" \
+  --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/4.1.1/ -lgfortran" \
+- --with-rose-dir=$ISSM_TIER/externalpackages/rose/install/ \
+- --with-adic2-dir=$ISSM_TIER/externalpackages/adic/install/ \
++ --with-rose-dir=$ISSM_DIR/externalpackages/rose/install/ \
++ --with-adic2-dir=$ISSM_DIR/externalpackages/adic/install/ \
+  --with-numthreads=24 \
+  --without-thermal \
+  --without-control \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-murdo-ad.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-murdo-ad.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-murdo-ad.sh	(revision 12157)
+@@ -1,25 +1,25 @@
+ #!/bin/sh
+ 
+ ./configure \
+- --prefix=$ISSM_TIER \
++ --prefix=$ISSM_DIR \
+  --with-serial=no\
+- --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+- --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
+- --with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+- --with-mpi-lib="-L$ISSM_TIER/externalpackages/mpich2/install/lib/ -lmpich" \
++ --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++ --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++ --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich" \
+  --with-petsc-arch=$ISSM_ARCH \
+- --with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+- --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+- --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
+- --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-hypre-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-ml-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++ --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++ --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
++ --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-hypre-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-ml-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
+  --with-graphics-lib=/usr/lib64/libX11.so \
+  --with-cxxoptflags="-mtune=barcelona -ffast-math -O3 -msse4.2 -Wno-write-strings "\
+  --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/3.4.6/ -lg2c  /usr/lib/gcc/x86_64-redhat-linux/4.1.1/libgfortran.a" \
+- --with-adic2-dir=$ISSM_TIER/externalpackages/adic/install/ \
++ --with-adic2-dir=$ISSM_DIR/externalpackages/adic/install/ \
+ --with-numthreads=24 \
+  --without-thermal \
+  --without-control \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh	(revision 12157)
+@@ -3,13 +3,13 @@
+ pythonversion=3.2
+ 
+ ./configure \
+-	--prefix=$ISSM_TIER \
++	--prefix=$ISSM_DIR \
+ 	--with-matlab-dir=$MATLAB_DIR \
+-	--with-python-dir=$ISSM_TIER/externalpackages/python/install\
++	--with-python-dir=$ISSM_DIR/externalpackages/python/install\
+ 	--with-python-version=$pythonversion \
+-	--with-python-numpy-dir=$ISSM_TIER/externalpackages/python/install/Python.framework/Versions/$pythonversion/lib/python$pythonversion/site-packages/numpy/core/include/numpy\
+-	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
++	--with-python-numpy-dir=$ISSM_DIR/externalpackages/python/install/Python.framework/Versions/$pythonversion/lib/python$pythonversion/site-packages/numpy/core/include/numpy\
++	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
+ 	--with-math-lib="/usr/lib/libm.dylib" \
+ 	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
+ 	--with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5  -O3 -DNDEBUG -w "\
+-	--with-gsl-dir=$ISSM_TIER/externalpackages/gsl/install
++	--with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-win32-eric.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-win32-eric.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-win32-eric.sh	(revision 12157)
+@@ -3,4 +3,4 @@
+ 
+ #get configure.sh to pick up the intel compiler 
+ 
+-./configure --prefix=$ISSM_TIER --with-parallel=no --with-vendor=intel-win  --with-matlab-dir=$MATLAB_DIR --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install --with-metis-dir=$ISSM_TIER/externalpackages/metis/install --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install  --with-petsc-arch=$ISSM_ARCH  --with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install/externalpackages/f2cblaslapack/$ISSM_ARCH
++./configure --prefix=$ISSM_DIR --with-parallel=no --with-vendor=intel-win  --with-matlab-dir=$MATLAB_DIR --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install --with-metis-dir=$ISSM_DIR/externalpackages/metis/install --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  --with-petsc-arch=$ISSM_ARCH  --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/f2cblaslapack/$ISSM_ARCH
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-altix64-castor.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-altix64-castor.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-altix64-castor.sh	(revision 12157)
+@@ -1,3 +1,3 @@
+ #!/bin/csh
+ 
+-./configure --prefix=$ISSM_TIER --with-serial=no --with-metis-dir=$ISSM_TIER/externalpackages/metis/install --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install --with-mpi-include=/usr/include  --with-mpi-lib="-L/usr/lib -lmpi" --with-petsc-arch=$ISSM_ARCH --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install --with-mkl-dir=/opt/intel/mkl/9.1.023/lib/64 --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH -lPLAPACK" --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH/INCLUDE" --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH/ --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH/ --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/$ISSM_ARCH --with-graphics-lib=/usr/X11R6/lib/libX11.so
++./configure --prefix=$ISSM_DIR --with-serial=no --with-metis-dir=$ISSM_DIR/externalpackages/metis/install --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install --with-mpi-include=/usr/include  --with-mpi-lib="-L/usr/lib -lmpi" --with-petsc-arch=$ISSM_ARCH --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install --with-mkl-dir=/opt/intel/mkl/9.1.023/lib/64 --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH -lPLAPACK" --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH/INCLUDE" --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH/ --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/$ISSM_ARCH --with-graphics-lib=/usr/X11R6/lib/libX11.so
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-pleiades-petsc2.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-pleiades-petsc2.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-pleiades-petsc2.sh	(revision 12157)
+@@ -1,21 +1,21 @@
+ #!/bin/csh
+ 
+ ./configure \
+- --prefix=$ISSM_TIER \
++ --prefix=$ISSM_DIR \
+  --with-modules=no \
+- --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+- --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+- --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
++ --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++ --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++ --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
+  --with-mpi-include=/nasa/sgi/mpt/1.25/include \
+  --with-mpi-lib="-L/nasa/sgi/mpt/1.25/lib/ -lmpi -lpthread -lgfortran" \
+  --with-petsc-arch=$ISSM_ARCH \
+- --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
++ --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
+  --with-mkl-dir=/nasa/intel/mkl/10.0.011/lib/64/ \
+- --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+- --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
+- --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++ --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++ --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
++ --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
+  --with-graphics-lib=/usr/lib64/libX11.so \
+  --with-cxxoptflags="-O3 -xS" \
+  --with-vendor=intel-pleiades
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-python.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-python.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-python.sh	(revision 12157)
+@@ -4,26 +4,26 @@
+ #mpich 1.4
+ 
+ ./configure \
+-	--prefix=$ISSM_TIER \
+-	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+-	--with-python-dir=$ISSM_TIER/externalpackages/python/install\
+-	--with-python-numpy-dir=$ISSM_TIER/externalpackages/python/install/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy\
+-	--with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+-	--with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+-	--with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \
+-	--with-chaco-dir=$ISSM_TIER/externalpackages/chaco/install \
++	--prefix=$ISSM_DIR \
++	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++	--with-python-dir=$ISSM_DIR/externalpackages/python/install\
++	--with-python-numpy-dir=$ISSM_DIR/externalpackages/python/install/Python.framework/Versions/3.2/lib/python3.2/site-packages/numpy/core/include/numpy\
++	--with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++	--with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++	--with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \
++	--with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install \
+ 	--with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \
+ 	--with-math-lib="/usr/lib/libm.dylib" \
+ 	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
+ 	--with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5  -O3 -DNDEBUG -w "\
+ 	--with-numthreads=8 \
+-	--with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install  \
++	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
+ 	--with-petsc-arch=$ISSM_ARCH \
+-	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+-	--with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+-	--with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/include/ " \
+-	--with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ 
+-	#--with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
+-	#--with-boost-dir=$ISSM_TIER/externalpackages/boost/install/ \
++	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++	--with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++	--with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \
++	--with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ 
++	#--with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
++	#--with-boost-dir=$ISSM_DIR/externalpackages/boost/install/ \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-pleiades.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-pleiades.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-pleiades.sh	(revision 12157)
+@@ -1,22 +1,22 @@
+ #!/bin/csh
+ 
+ ./configure \
+- --prefix=$ISSM_TIER \
++ --prefix=$ISSM_DIR \
+  --with-modules=no \
+- --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+- --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+- --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
+- --with-tao-dir=$ISSM_TIER/externalpackages/tao/install \
++ --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++ --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++ --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-tao-dir=$ISSM_DIR/externalpackages/tao/install \
+  --with-mpi-include=/nasa/sgi/mpt/1.25/include \
+  --with-mpi-lib="-L/nasa/sgi/mpt/1.25/lib/ -lmpi -lpthread -lgfortran" \
+  --with-petsc-arch=$ISSM_ARCH \
+- --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
++ --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
+  --with-mkl-dir=/nasa/intel/mkl/10.0.011/lib/64/ \
+- --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+- --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
+- --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++ --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++ --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
++ --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
+  --with-graphics-lib=/usr/lib64/libX11.so \
+  --with-cxxoptflags="-O3 -xS" \
+  --with-vendor=intel-pleiades
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-ad.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-ad.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-larour-ad.sh	(revision 12157)
+@@ -5,19 +5,19 @@
+ 
+ ./configure \
+ 	--with-serial=no\
+-	--prefix=$ISSM_TIER \
+-	--with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+-	--with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+-	--with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \
++	--prefix=$ISSM_DIR \
++	--with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++	--with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++	--with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \
+ 	--without-blas-lapack-dir \
+-	--with-chaco-dir=$ISSM_TIER/externalpackages/chaco/install \
++	--with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install \
+ 	--with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \
+-	--with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
++	--with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
+ 	--with-math-lib="/usr/lib/libm.dylib" \
+ 	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
+ 	--with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5  -O3 -DNDEBUG -w "\
+-	--with-adic2-dir=$ISSM_TIER/externalpackages/adic/install/ \
+-	--with-adolc-dir=$ISSM_TIER/externalpackages/adolc/install/ \
++	--with-adic2-dir=$ISSM_DIR/externalpackages/adic/install/ \
++	--with-adolc-dir=$ISSM_DIR/externalpackages/adolc/install/ \
+ 	--with-numthreads=8 \
+ 	--without-thermal \
+ 	--without-control \
+@@ -33,11 +33,11 @@
+ 	--without-groundingline
+  
+ #--without-prognostic \
+-#--with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install  \
++#--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
+ #--with-petsc-arch=$ISSM_ARCH \
+-#--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+-#--with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+-#--with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/include/ " \
+-#--with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-#--with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-#--with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++#--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++#--with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++#--with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \
++#--with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++#--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++#--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx32-mathieu.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx32-mathieu.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx32-mathieu.sh	(revision 12157)
+@@ -9,21 +9,21 @@
+ export CXXFLAGS=" -arch i386"
+ 
+ ./configure \
+-	--prefix=$ISSM_TIER \
++	--prefix=$ISSM_DIR \
+ 	--with-matlab-dir=$MATLAB_DIR \
+-	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+-	--with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+-	--with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install  \
+-	--with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+-	--with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \
++	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++	--with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
++	--with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++	--with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \
+ 	--with-petsc-arch=$ISSM_ARCH \
+-	--with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
+-	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+-	--with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+-	--with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/include/ " \
+-	--with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++	--with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
++	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++	--with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++	--with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \
++	--with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
+ 	--with-fortran-lib="/usr/local/lib/libgfortran.a" \
+ 	--with-math-lib="/usr/lib/libm.dylib" \
+ 	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-sophie.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-sophie.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-sophie.sh	(revision 12157)
+@@ -8,21 +8,21 @@
+ export CXXFLAGS=" -arch x86_64"
+ 
+ ./configure \
+-	--prefix=$ISSM_TIER \
++	--prefix=$ISSM_DIR \
+ 	--with-matlab-dir=$MATLAB_DIR \
+-	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+-	--with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+-	--with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install  \
+-	--with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+-	--with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \
++	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++	--with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
++	--with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++	--with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \
+ 	--with-petsc-arch=$ISSM_ARCH \
+-	--with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
+-	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+-	--with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+-	--with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/include/ " \
+-	--with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++	--with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
++	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++	--with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++	--with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \
++	--with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
+ 	--with-fortran-lib="/sw/usr/local/lib/x86_64/libgfortran.a" \
+ 	--with-math-lib="/usr/lib/libm.dylib" \
+ 	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-petsc2.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-petsc2.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid-petsc2.sh	(revision 12157)
+@@ -4,4 +4,4 @@
+ #petsc 2.6
+ #mpich 1.0.2
+ 
+-./configure --prefix=$ISSM_TIER --with-matlab-dir=$MATLAB_DIR --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install --with-metis-dir=$ISSM_TIER/externalpackages/metis/install --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install --with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  --with-mpi-lib="-L$ISSM_TIER/externalpackages/mpich2/install/lib/ -lmpich" --with-petsc-arch=$ISSM_ARCH --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install --with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install/externalpackages/fblaslapack/$ISSM_ARCH --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH -lPLAPACK" --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH/INCLUDE" --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/externalpackages/blacs-dev/$ISSM_ARCH --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/externalpackages/SCALAPACK/$ISSM_ARCH --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/externalpackages/MUMPS_4.6.3/$ISSM_ARCH --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/4.1.1/ -lgfortran" --with-graphics-lib=/usr/lib64/libX11.so --with-cxxoptflags="-march=opteron -O2" --with-numthreads=32 --with-scotch-dir=$ISSM_TIER/externalpackages/scotch/install --with-chaco-dir=$ISSM_TIER/externalpackages/chaco/install --enable-debugging --with-shapelib-dir=$ISSM_TIER/externalpackages/shapelib/install\
++./configure --prefix=$ISSM_DIR --with-matlab-dir=$MATLAB_DIR --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install --with-metis-dir=$ISSM_DIR/externalpackages/metis/install --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich" --with-petsc-arch=$ISSM_ARCH --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/fblaslapack/$ISSM_ARCH --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH -lPLAPACK" --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/$ISSM_ARCH/INCLUDE" --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/blacs-dev/$ISSM_ARCH --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/SCALAPACK/$ISSM_ARCH --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/externalpackages/MUMPS_4.6.3/$ISSM_ARCH --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/4.1.1/ -lgfortran" --with-graphics-lib=/usr/lib64/libX11.so --with-cxxoptflags="-march=opteron -O2" --with-numthreads=32 --with-scotch-dir=$ISSM_DIR/externalpackages/scotch/install --with-chaco-dir=$ISSM_DIR/externalpackages/chaco/install --enable-debugging --with-shapelib-dir=$ISSM_DIR/externalpackages/shapelib/install\
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-murdo.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-murdo.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-murdo.sh	(revision 12157)
+@@ -1,26 +1,26 @@
+ #!/bin/sh
+ 
+ ./configure \
+- --prefix=$ISSM_TIER \
++ --prefix=$ISSM_DIR \
+  --with-matlab-dir=$MATLAB_DIR \
+- --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+- --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+- --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
+- --with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+- --with-mpi-lib="-L$ISSM_TIER/externalpackages/mpich2/install/lib/ -lmpich" \
++ --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++ --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++ --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++ --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich" \
+  --with-petsc-arch=$ISSM_ARCH \
+- --with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+- --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+- --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
+- --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-scotch-dir="$ISSM_TIER/externalpackages/scotch/install" \
+- --with-chaco-dir="$ISSM_TIER/externalpackages/chaco/install" \
++ --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++ --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
++ --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-scotch-dir="$ISSM_DIR/externalpackages/scotch/install" \
++ --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \
+  --with-graphics-lib=/usr/lib64/libX11.so \
+  --with-cxxoptflags="-mtune=barcelona -ffast-math -O3 -msse4.2 -Wno-write-strings "\
+  --with-numthreads=18 \
+- --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
++ --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
+  --enable-debugging
+  
+  
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid.sh	(revision 12157)
+@@ -5,25 +5,25 @@
+ #mpich 1.4
+ 
+ ./configure \
+- --prefix=$ISSM_TIER \
++ --prefix=$ISSM_DIR \
+  --with-matlab-dir=$MATLAB_DIR \
+- --with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+- --with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+- --with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install \
+- --with-tao-dir=$ISSM_TIER/externalpackages/tao/install \
+- --with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+- --with-mpi-lib="-L$ISSM_TIER/externalpackages/mpich2/install/lib/ -lmpich -lmpl " \
++ --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++ --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++ --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-tao-dir=$ISSM_DIR/externalpackages/tao/install \
++ --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++ --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich -lmpl " \
+  --with-petsc-arch=$ISSM_ARCH \
+- --with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
+- --with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+- --with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+- --with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
+- --with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+- --with-scotch-dir="$ISSM_TIER/externalpackages/scotch/install" \
+- --with-chaco-dir="$ISSM_TIER/externalpackages/chaco/install" \
+- --with-shapelib-dir="$ISSM_TIER/externalpackages/shapelib/install" \
++ --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
++ --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++ --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
++ --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-scotch-dir="$ISSM_DIR/externalpackages/scotch/install" \
++ --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \
++ --with-shapelib-dir="$ISSM_DIR/externalpackages/shapelib/install" \
+  --with-fortran-lib="-L/usr/lib/gcc/x86_64-redhat-linux/4.1.1/ -lgfortran" \
+  --with-graphics-lib=/usr/lib64/libX11.so \
+  --with-cxxoptflags="-march=opteron -O2" \
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-mathieu.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-mathieu.sh	(revision 12156)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-mathieu.sh	(revision 12157)
+@@ -4,21 +4,21 @@
+ #mpich 1.4
+ 
+ ./configure \
+-	--prefix=$ISSM_TIER \
++	--prefix=$ISSM_DIR \
+ 	--with-matlab-dir=$MATLAB_DIR \
+-	--with-triangle-dir=$ISSM_TIER/externalpackages/triangle/install \
+-	--with-metis-dir=$ISSM_TIER/externalpackages/metis/install \
+-	--with-petsc-dir=$ISSM_TIER/externalpackages/petsc/install  \
+-	--with-mpi-include=$ISSM_TIER/externalpackages/mpich2/install/include  \
+-	--with-mpi-lib=" $ISSM_TIER/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpich.a $ISSM_TIER/externalpackages/mpich2/install/lib/libmpl.a " \
++	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++	--with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
++	--with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++	--with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpl.a " \
+ 	--with-petsc-arch=$ISSM_ARCH \
+-	--with-dakota-dir=$ISSM_TIER/externalpackages/dakota/install \
+-	--with-blas-lapack-dir=$ISSM_TIER/externalpackages/petsc/install \
+-	--with-plapack-lib="-L$ISSM_TIER/externalpackages/petsc/install/ -lPLAPACK" \
+-	--with-plapack-include="-I$ISSM_TIER/externalpackages/petsc/install/include/ " \
+-	--with-blacs-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-scalapack-dir=$ISSM_TIER/externalpackages/petsc/install/ \
+-	--with-mumps-dir=$ISSM_TIER/externalpackages/petsc/install/ \
++	--with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
++	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++	--with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++	--with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \
++	--with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
+ 	--with-fortran-lib="/usr/local/lib/libgfortran.a" \
+ 	--with-math-lib="/usr/lib/libm.dylib" \
+ 	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
Index: /issm/oecreview/Archive/12141-12160/ISSM-12157-12158.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12157-12158.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12157-12158.diff	(revision 12325)
@@ -0,0 +1,113 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py	(revision 12157)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.py	(revision 12158)
+@@ -4,23 +4,23 @@
+ #  startup.py is a script run by python at the beginning of a session, just
+ #  before handing over the prompt to the user if the environment variable
+ #  PYTHONSTARTUP is defined:
+-#  export PYTHONSTARTUP=$ISSM_TIER/startup.py
++#  export PYTHONSTARTUP=$ISSM_DIR/startup.py
+ #  This startup script should be run by users before trying to use ISSM.
+ 
+ import os,sys
+ 
+-#Recover ISSM_TIER, ISSM_DIR  and USERNAME
+-ISSM_TIER=os.getenv('ISSM_TIER')
++#Recover ISSM_DIR and USERNAME
++ISSM_DIR=os.getenv('ISSM_DIR')
+ USERNAME =os.getenv('USER')
+-if(ISSM_TIER==None):
+-	raise NameError('"ISSM_TIER" environment variable is empty! You should define ISSM_TIER in your .cshrc or .bashrc!')
++if(ISSM_DIR==None):
++	raise NameError('"ISSM_DIR" environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!')
+ 
+ #Now add all issm code paths necessary to run issm smoothly. 
+ #We capture the error output, so that we can warn the user to update 
+-#the variable ISSM_TIER in this file, in case it is not correctly setup. 
++#the variable ISSM_DIR in this file, in case it is not correctly setup. 
+ 
+ #ISSM path. Go through src/py and load everything we find  that looks like a python file
+-for root,dirs,files in os.walk(ISSM_TIER+ '/src/py'):
++for root,dirs,files in os.walk(ISSM_DIR+ '/src/py'):
+ 	for file in files:
+ 		if file.find(".py") != -1:
+ 			if file.find(".pyc") == -1:
+@@ -29,7 +29,7 @@
+ 				file=os.path.splitext(file)[0]
+ 				#__import__(file)
+ 
+-for root,dirs,files in os.walk(ISSM_TIER+ '/src/m'):
++for root,dirs,files in os.walk(ISSM_DIR+ '/src/m'):
+ 	for file in files:
+ 		if file.find(".py") != -1:
+ 			if file.find(".pyc") == -1:
+@@ -38,7 +38,7 @@
+ 				file=os.path.splitext(file)[0]
+ 				#__import__(file)
+ 				
+-sys.path.append(ISSM_TIER + '/src/modules/python')
++sys.path.append(ISSM_DIR + '/src/modules/python')
+ 
+ #Deal with scipy import: 
+ import scipy 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.m	(revision 12157)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/startup.m	(revision 12158)
+@@ -10,37 +10,37 @@
+ % clear the last warning to focus on the warnings of the ISSM path
+ lastwarn(''); 
+ 
+-%Recover ISSM_TIER , or if on a Windows machine, ISSM_TIER_WIN
++%Recover ISSM_DIR , or if on a Windows machine, ISSM_DIR_WIN
+ if ~ispc,
+-	ISSM_TIER=getenv('ISSM_TIER');
++	ISSM_DIR=getenv('ISSM_DIR');
+ else
+-	ISSM_TIER=getenv('ISSM_TIER_WIN');
+-	%ISSM_TIER='';
++	ISSM_DIR=getenv('ISSM_DIR_WIN');
++	%ISSM_DIR='';
+ end
+-if (isempty(ISSM_TIER)),
+-	error('''ISSM_TIER'' environment variable is empty! You should define ISSM_TIER in your .cshrc or .bashrc!');
++if (isempty(ISSM_DIR)),
++	error('''ISSM_DIR'' environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!');
+ end
+ 
+ %Now add all issm code paths necessary to run issm smoothly. 
+ %We capture the error output, so that we can warn the user to update 
+-%the variable ISSM_TIER in this file, in case it is not correctly setup. 
++%the variable ISSM_DIR in this file, in case it is not correctly setup. 
+ 
+ %ISSM path
+-addpath([ISSM_TIER '/src/m/utils/']); %loads recursivepath
+-addpath([ISSM_TIER '/bin']);
+-addpath(recursivepath([ISSM_TIER '/src/m']));
+-addpath(recursivepath([ISSM_TIER '/externalpackages/scotch']));
+-addpath(recursivepath([ISSM_TIER '/externalpackages/canos']));
+-addpath(recursivepath([ISSM_TIER '/externalpackages/kml']));
+-addpath(recursivepath([ISSM_TIER '/externalpackages/export_fig']));
+-addpath(recursivepath([ISSM_TIER '/externalpackages/googleearthtoolbox']));
+-addpath(recursivepath([ISSM_TIER '/externalpackages/cm_and_cb_utilities']));
++addpath([ISSM_DIR '/src/m/utils/']); %loads recursivepath
++addpath([ISSM_DIR '/bin']);
++addpath(recursivepath([ISSM_DIR '/src/m']));
++addpath(recursivepath([ISSM_DIR '/externalpackages/scotch']));
++addpath(recursivepath([ISSM_DIR '/externalpackages/canos']));
++addpath(recursivepath([ISSM_DIR '/externalpackages/kml']));
++addpath(recursivepath([ISSM_DIR '/externalpackages/export_fig']));
++addpath(recursivepath([ISSM_DIR '/externalpackages/googleearthtoolbox']));
++addpath(recursivepath([ISSM_DIR '/externalpackages/cm_and_cb_utilities']));
+ 
+-clear ISSM_TIER;
++clear ISSM_DIR;
+ 
+ %Check on any warning messages that might indicate that the paths were not correct. 
+ if ~isempty(lastwarn),
+-	fprintf('\n  Error trying to setup ''ISSM'' code paths. Try and update the ISSM_TIER variable in your .cshrc or .bashrc!\n');
++	fprintf('\n  Error trying to setup ''ISSM'' code paths. Try and update the ISSM_DIR variable in your .cshrc or .bashrc!\n');
+ 	fprintf('  ''ISSM'' will not  work at all until this is resolved\n\n');
+ else
+ 	fprintf('\n  To get started with ISSM, type issmdoc at the command prompt.\n\n');
Index: /issm/oecreview/Archive/12141-12160/ISSM-12158-12159.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12158-12159.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12158-12159.diff	(revision 12325)
@@ -0,0 +1,334 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/windowsbuild.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/windowsbuild.sh	(revision 12158)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/windowsbuild.sh	(revision 12159)
+@@ -10,7 +10,7 @@
+ #Create tar file, with today's date in the title;
+ today=`today_date`
+ 
+-cd $ISSM_TIER/bin
++cd $ISSM_DIR/bin
+ 
+ #Filter out .svn files
+ rm -rf list
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/report.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/report.sh	(revision 12158)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/report.sh	(revision 12159)
+@@ -48,7 +48,7 @@
+ BODY_FONTL=`echo $BODY_FONT | sed -e "s/style=\"/style=\"text-align:left; /g"`
+ 
+ #create some variables
+-if [ $(ls -1 $ISSM_TIER/bin | wc -l) -le 20 ];
++if [ $(ls -1 $ISSM_DIR/bin | wc -l) -le 20 ];
+ then
+ 	IS_INSTALL=0
+ else
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/getloc.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/getloc.sh	(revision 12158)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/getloc.sh	(revision 12159)
+@@ -1,13 +1,13 @@
+ #!/bin/bash
+ #get number of lines of code
+-cloc-1.55.pl $ISSM_TIER/src $ISSM_TIER/m4 --exclude-dir=.svn --exclude-ext=exp --exclude-lang=make --out=temp
++cloc-1.55.pl $ISSM_DIR/src $ISSM_DIR/m4 --exclude-dir=.svn --exclude-ext=exp --exclude-lang=make --out=temp
+ cat temp
+ ./cloc2html.py
+ rm temp
+ 
+-cat $ISSM_TIER/src/dox/issm.dox | sed '/<table/,//d' > input1
+-cat $ISSM_TIER/src/dox/issm.dox | sed '1,/<\/table>/d' > input2
+-cat input1 temp.html input2 > $ISSM_TIER/src/dox/issm.dox
++cat $ISSM_DIR/src/dox/issm.dox | sed '/<table/,//d' > input1
++cat $ISSM_DIR/src/dox/issm.dox | sed '1,/<\/table>/d' > input2
++cat input1 temp.html input2 > $ISSM_DIR/src/dox/issm.dox
+ rm input1 input2 temp.html
+ 
+ exit 1
+@@ -18,12 +18,12 @@
+ 
+ #OLDER MANUAL VESION
+ #get Matlab number of lines
+-cd $ISSM_TIER/src/m
++cd $ISSM_DIR/src/m
+ M_LOC=$(find . -name "*.m" -exec wc -l '{}' \; | awk '{ sum += $1 } END { print sum}');
+ echo "Matlab code: $M_LOC"
+ 
+ #get C/CPP number of lines
+-cd $ISSM_TIER/src
++cd $ISSM_DIR/src
+ CPP_LOC=$(find . -name "*.cpp" -exec wc -l '{}' \; | awk '{ sum += $1 } END { print sum}');
+ echo "C++    code: $CPP_LOC"
+ C_LOC=$(find . -name "*.c" -exec wc -l '{}' \; | awk '{ sum += $1 } END { print sum}');
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/archive.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/archive.sh	(revision 12158)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/archive.sh	(revision 12159)
+@@ -9,7 +9,7 @@
+ }
+ 
+ #Cleanup code 
+-cd $ISSM_TIER
++cd $ISSM_DIR
+ make clean
+ make distclean
+ 
+@@ -17,6 +17,6 @@
+ rm -rf externalpackages
+ 
+ #Create tar file, with today's date in the title;
+-cd $ISSM_TIER/..
++cd $ISSM_DIR/..
+ today=`today_date`
+-tar zcvf issm-3.0-$today.tar.gz  `basename $ISSM_TIER`
++tar zcvf issm-3.0-$today.tar.gz  `basename $ISSM_DIR`
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/automakererun.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/automakererun.sh	(revision 12158)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/automakererun.sh	(revision 12159)
+@@ -3,10 +3,10 @@
+ #  archive.
+ 
+ 
+- ACLOCAL="$ISSM_TIER/externalpackages/automake/install/bin/aclocal"
+-AUTOCONF="$ISSM_TIER/externalpackages/autoconf/install/bin/autoconf"
+-AUTOHEAD="$ISSM_TIER/externalpackages/autoconf/install/bin/autoheader"
+-AUTOMAKE="$ISSM_TIER/externalpackages/automake/install/bin/automake"
++ ACLOCAL="$ISSM_DIR/externalpackages/automake/install/bin/aclocal"
++AUTOCONF="$ISSM_DIR/externalpackages/autoconf/install/bin/autoconf"
++AUTOHEAD="$ISSM_DIR/externalpackages/autoconf/install/bin/autoheader"
++AUTOMAKE="$ISSM_DIR/externalpackages/automake/install/bin/automake"
+ 
+ echo "removing config.cach"
+ rm -rf config.cach
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/dailyrun.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/dailyrun.sh	(revision 12158)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/dailyrun.sh	(revision 12159)
+@@ -53,25 +53,25 @@
+ 
+ #Prepare run
+ #Windows hack for startup.m {{{1
+-#windows environments: ISSM_TIER_WIN variable not correctly picked up when using 
+-#the cron job. just get startup to take the ISSM_TIER variable as the pwd:
++#windows environments: ISSM_DIR_WIN variable not correctly picked up when using 
++#the cron job. just get startup to take the ISSM_DIR variable as the pwd:
+ if [ "$OS" = "winxp32" ]
+ then
+-	cat startup.m | sed 's/clear status/clear status; ISSM_TIER=pwd;/g' > startup.m.bak
++	cat startup.m | sed 's/clear status/clear status; ISSM_DIR=pwd;/g' > startup.m.bak
+ 	mv startup.m.bak startup.m
+ fi
+ #}}}
+ #create softlink to startup {{{1
+-cd $ISSM_TIER/test/NightlyRun/
+-ln -s $ISSM_TIER/startup.m .
++cd $ISSM_DIR/test/NightlyRun/
++ln -s $ISSM_DIR/startup.m .
+ #}}}
+ #Create dailylog directory and info.log {{{1
+ #put installation elapsed time in info.log
+ INSTALL_TIME=$(timer)
+ ELAPSED_INSTALL=$(timer $START_TIME)
+-rm -rf $ISSM_TIER/dailylog
+-mkdir  $ISSM_TIER/dailylog
+-cat << END > $ISSM_TIER/dailylog/info.log
++rm -rf $ISSM_DIR/dailylog
++mkdir  $ISSM_DIR/dailylog
++cat << END > $ISSM_DIR/dailylog/info.log
+ today:     $(echo $TODAY)
+ user:      $(echo $USER)
+ host:      $(echo $HOST_NAME)
+@@ -94,10 +94,10 @@
+ for (( i=1;i<=$NUMCPUS_RUN;i++ ))
+ do
+ 	#Launch matlab and the daily run script
+-	cat > $ISSM_TIER/dailylog/matlab_run$i.m << EOF
++	cat > $ISSM_DIR/dailylog/matlab_run$i.m << EOF
+ 	warning off %necessary to avoid a info.log of several Go for parallel runs
+ 	try,
+-	cd $ISSM_TIER/test/NightlyRun
++	cd $ISSM_DIR/test/NightlyRun
+ 	startup;
+ 	$(if [ "$NROPTIONS" = ""  ]
+ 	then
+@@ -110,7 +110,7 @@
+ 		%An error occured, get report and exit
+ 		directory=strsplit(pwd,'/');
+ 		message=getReport(me)
+-		fid=fopen([ISSM_TIER '/dailylog/matlaberror.log'], 'at');
++		fid=fopen([ISSM_DIR '/dailylog/matlaberror.log'], 'at');
+ 		fprintf(fid,'\nMatlab error occured in: %s\n\n',directory{end});
+ 		fprintf(fid,'%s',message);
+ 		fclose(fid);
+@@ -120,7 +120,7 @@
+ EOF
+ 
+ 	#Start run from dailylog directory
+-	cd $ISSM_TIER/dailylog/
++	cd $ISSM_DIR/dailylog/
+ 
+ 	#Start test
+ 	MATLAB_VERSION="7.6" #7.2,7.4,7.6 and 7.8
+@@ -131,7 +131,7 @@
+ wait
+ #}}}
+ #concatenate all reports {{{1
+-cd $ISSM_TIER/dailylog/
++cd $ISSM_DIR/dailylog/
+ mv matlab_log1.log  matlab_log.log
+ for (( i=2;i<=$NUMCPUS_RUN;i++ ))
+ do
+@@ -148,7 +148,7 @@
+ fi
+ ELAPSED_RUN=$(timer $INSTALL_TIME)
+ ELAPSED_TOTAL=$(timer $START_TIME)
+-cat << END >>  $ISSM_TIER/dailylog/info.log
++cat << END >>  $ISSM_DIR/dailylog/info.log
+ elapsed_run:   $(echo $ELAPSED_RUN)
+ elapsed_total: $(echo $ELAPSED_TOTAL)
+ matlab_crash:  $(echo $MATLABCRASH)
+@@ -157,8 +157,8 @@
+ 
+ #Send Report
+ #Build html report {{{1
+-cd $ISSM_TIER/dailylog/
++cd $ISSM_DIR/dailylog/
+ sh ../scripts/report.sh
+-ln -s $ISSM_TIER/dailylog/report.html $INIT_PATH
+-echo "html report located in $ISSM_TIER/dailylog/report.html and $INIT_PATH/report.html"
++ln -s $ISSM_DIR/dailylog/report.html $INIT_PATH
++echo "html report located in $ISSM_DIR/dailylog/report.html and $INIT_PATH/report.html"
+ #}}}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/GenerateReferences.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/GenerateReferences.sh	(revision 12158)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/GenerateReferences.sh	(revision 12159)
+@@ -15,7 +15,7 @@
+ \bibliographystyle{agu}
+ \begin{document}
+ \nocite{$CITE}
+-\bibliography{$ISSM_DIR/publications/bibtex/references}
++\bibliography{$JPL_SVN/publications/bibtex/references}
+ \end{document}
+ END
+ #Generate pdf
+@@ -28,7 +28,7 @@
+ cat references.bak1 | sed -e "/ibitem/,/]/d" > references.bak2                        #delete labels that are on multiple lines
+ mv references.bak2 references.bbl
+ echo "Converting to rtf"
+-$ISSM_TIER/externalpackages/latex2rtf/install/latex2rtf -P $ISSM_TIER/externalpackages/latex2rtf/install/cfg/ references
++$ISSM_DIR/externalpackages/latex2rtf/install/latex2rtf -P $ISSM_DIR/externalpackages/latex2rtf/install/cfg/ references
+ 
+ #Remove all but rtf file
+ rm -rf references.[!rtf]*
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/convertmatlabclasses.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/convertmatlabclasses.py	(revision 12158)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/convertmatlabclasses.py	(revision 12159)
+@@ -3,10 +3,10 @@
+ import sys, re, os, shutil
+ 
+ #get names of all directories to process
+-ISSM_TIER=os.getenv('ISSM_TIER');
+-if(not ISSM_TIER): raise NameError('ISSM_TIER undefined')
+-newclassesdir = ISSM_TIER + '/src/m/classes/'
+-oldclassesdir = ISSM_TIER + '/src/m/oldclasses/'
++ISSM_DIR=os.getenv('ISSM_DIR');
++if(not ISSM_DIR): raise NameError('ISSM_DIR undefined')
++newclassesdir = ISSM_DIR + '/src/m/classes/'
++oldclassesdir = ISSM_DIR + '/src/m/oldclasses/'
+ 
+ #make new directory
+ if(os.path.exists(oldclassesdir)):shutil.rmtree(oldclassesdir)
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/issmconfiguration.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/issmconfiguration.sh	(revision 12158)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/issmconfiguration.sh	(revision 12159)
+@@ -6,8 +6,8 @@
+ #keep track of present directory: 
+ presendir=`pwd`
+ 
+-if test -d "$ISSM_TIER/configs" ; then
+-	cd $ISSM_TIER/configs
++if test -d "$ISSM_DIR/configs" ; then
++	cd $ISSM_DIR/configs
+ 	LIST=`ls`
+ 	
+ 	if [[  $# == "0" ]]; then 
+@@ -39,7 +39,7 @@
+ 	echo "Configuring ISSM with following configs: $configurename"
+ 	echo ""
+ 
+-	cd $ISSM_TIER 
++	cd $ISSM_DIR 
+ 	source ./scripts/automakererun.sh 
+ 	source configs/$configurename
+ 	
+@@ -55,4 +55,4 @@
+ 
+ 
+ 
+-#alias aut='a=`pwd` && cd $ISSM_TIER && ./scripts/automakererun.sh && ./configs/config-macosx64-larour-nopetsc.sh'
++#alias aut='a=`pwd` && cd $ISSM_DIR && ./scripts/automakererun.sh && ./configs/config-macosx64-larour-nopetsc.sh'
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/run.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/run.sh	(revision 12158)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/run.sh	(revision 12159)
+@@ -5,18 +5,18 @@
+ NROPTIONS="";
+ MATLAB_VERSION="7.6" #7.2,7.4,7.6 and 7.8
+ #create softlink to startup {{{1
+-cd $ISSM_TIER/test/NightlyRun/
+-ln -s $ISSM_TIER/startup.m .
++cd $ISSM_DIR/test/NightlyRun/
++ln -s $ISSM_DIR/startup.m .
+ #}}}
+ 
+ #Launch all tests on different cpus
+ for (( i=1;i<=$NUMCPUS_RUN;i++ ))
+ do
+ 	#Launch matlab and the daily run script
+-	cat > $ISSM_TIER/dailylog/matlab_run$i.m << EOF
++	cat > $ISSM_DIR/dailylog/matlab_run$i.m << EOF
+ 	warning off %necessary to avoid a daily.log of several Go for parallel runs
+ 	try,
+-		cd $ISSM_TIER/test/NightlyRun
++		cd $ISSM_DIR/test/NightlyRun
+ 		startup;
+ 		$(if [ "$NROPTIONS" = ""  ]
+ 	then
+@@ -29,7 +29,7 @@
+ 		%An error occured, get report and exit
+ 		directory=strsplit(pwd,'/');
+ 		message=getReport(me)
+-		fid=fopen([ISSM_TIER '/dailylog/matlaberror.log'], 'at');
++		fid=fopen([ISSM_DIR '/dailylog/matlaberror.log'], 'at');
+ 		fprintf(fid,'\nMatlab error occured in: %s\n\n',directory{end});
+ 		fprintf(fid,'%s',message);
+ 		fclose(fid);
+@@ -38,7 +38,7 @@
+ EOF
+ 
+ 	#Start run from dailylog directory
+-	cd $ISSM_TIER/dailylog/
++	cd $ISSM_DIR/dailylog/
+ 
+ 	#Start test
+ 	/usr/local/pkgs/matlab-$MATLAB_VERSION/bin/matlab  -nojvm -nosplash  -r matlab_run$i -logfile matlab_log$i.log &
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/cloc2html.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/cloc2html.py	(revision 12158)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/cloc2html.py	(revision 12159)
+@@ -3,8 +3,8 @@
+ #inspired from http://qwiki.stanford.edu/images/d/df/Latex2qwiki.txt
+ import sys, re, os
+ 
+-ISSM_TIER=os.getenv('ISSM_TIER');
+-if(not ISSM_TIER): raise NameError('ISSM_TIER undefined')
++ISSM_DIR=os.getenv('ISSM_DIR');
++if(not ISSM_DIR): raise NameError('ISSM_DIR undefined')
+ 
+ infile  = open('temp','r')
+ outfile = open('temp.html','w')
Index: /issm/oecreview/Archive/12141-12160/ISSM-12159-12160.diff
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-12159-12160.diff	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-12159-12160.diff	(revision 12325)
@@ -0,0 +1,161 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/macosx64_nightly
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/macosx64_nightly	(revision 12159)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/macosx64_nightly	(revision 12160)
+@@ -5,8 +5,7 @@
+ #-------------------------------#
+ 
+ #ISSM main directory (full path)
+-ISSM_DIR="/path/to/issm/"
+-ISSM_TIER="/path/to/issm/trunk-jpl/cron/trunk-jpl"
++ISSM_DIR="/path/to/issm/trunk-jpl/cron/trunk-jpl"
+ 
+ #ISSM Architecture
+ ISSM_ARCH="macosx-gnu"
+@@ -71,7 +70,7 @@
+ #----------------------#
+ 
+ #Mail delivery. If SKIPMAIL="no", the html nightly run report will be
+-#sent to the adresses present in $ISSM_TIER/cron/mailinglist.
++#sent to the adresses present in $ISSM_DIR/cron/mailinglist.
+ SKIPMAIL="no"
+ 
+ #Sender email address
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/macosx64_daily
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/macosx64_daily	(revision 12159)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/macosx64_daily	(revision 12160)
+@@ -5,8 +5,7 @@
+ #-------------------------------#
+ 
+ #ISSM main directory (full path)
+-ISSM_DIR="/path/to/issm/"
+-ISSM_TIER="/path/to/issm/trunk-jpl/cron/trunk-jpl"
++ISSM_DIR="/path/to/issm/trunk-jpl/cron/trunk-jpl"
+ 
+ #ISSM Architecture
+ ISSM_ARCH="macosx-gnu"
+@@ -71,7 +70,7 @@
+ #----------------------#
+ 
+ #Mail delivery. If SKIPMAIL="no", the html nightly run report will be
+-#sent to the adresses present in $ISSM_TIER/cron/mailinglist.
++#sent to the adresses present in $ISSM_DIR/cron/mailinglist.
+ SKIPMAIL="no"
+ 
+ #Sender email address
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/linux64_nightly
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/linux64_nightly	(revision 12159)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/linux64_nightly	(revision 12160)
+@@ -5,8 +5,7 @@
+ #-------------------------------#
+ 
+ #ISSM main directory (full paths)
+-ISSM_DIR="/path/to/issm"
+-ISSM_TIER="/path/to/issm/cron/trunk-jpl"
++ISSM_DIR="/path/to/issm/cron/trunk-jpl"
+ 
+ #ISSM Architecture
+ ISSM_ARCH="linux-gnu-amd64"
+@@ -71,7 +70,7 @@
+ #----------------------#
+ 
+ #Mail delivery. If SKIPMAIL="no", the html nightly run report will be
+-#sent to the adresses present in $ISSM_TIER/cron/mailinglist.
++#sent to the adresses present in $ISSM_DIR/cron/mailinglist.
+ SKIPMAIL="no"
+ 
+ #Sender email address
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/win732
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/win732	(revision 12159)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/win732	(revision 12160)
+@@ -5,8 +5,7 @@
+ #-------------------------------#
+ 
+ #ISSM main directory (full path)
+-ISSM_DIR="/cygdrive/c/issm-uci"
+-ISSM_TIER="/cygdrive/c/issm-uci/trunk-jpl/cron/trunk-jpl"
++ISSM_DIR="/cygdrive/c/issm-uci/trunk-jpl/cron/trunk-jpl"
+ 
+ #ISSM Architecture
+ ISSM_ARCH="cygwin-intel"
+@@ -72,7 +71,7 @@
+ #----------------------#
+ 
+ #Mail delivery. If SKIPMAIL="no", the html nightly run report will be
+-#sent to the adresses present in $ISSM_TIER/cron/mailinglist.
++#sent to the adresses present in $ISSM_DIR/cron/mailinglist.
+ SKIPMAIL="yes"
+ 
+ #Sender email address
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/winxp32
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/winxp32	(revision 12159)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/winxp32	(revision 12160)
+@@ -5,8 +5,7 @@
+ #-------------------------------#
+ 
+ #ISSM main directory (full path)
+-ISSM_DIR="C:/home/issm/trunk-jpl"
+-ISSM_TIER="C:/home/issm/trunk-jpl/cron/trunk-jpl"
++ISSM_DIR="C:/home/issm/trunk-jpl/cron/trunk-jpl"
+ 
+ #ISSM Architecture
+ ISSM_ARCH="cygwin-intel"
+@@ -65,7 +64,7 @@
+ #----------------------#
+ 
+ #Mail delivery. If SKIPMAIL="no", the html nightly run report will be
+-#sent to the adresses present in $ISSM_TIER/cron/mailinglist.
++#sent to the adresses present in $ISSM_DIR/cron/mailinglist.
+ SKIPMAIL="no"
+ 
+ #Sender email address
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/linux64_daily
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/linux64_daily	(revision 12159)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/linux64_daily	(revision 12160)
+@@ -5,8 +5,7 @@
+ #-------------------------------#
+ 
+ #ISSM main directory (full paths)
+-ISSM_DIR="/path/to/issm"
+-ISSM_TIER="/path/to/issm/cron/trunk-jpl"
++ISSM_DIR="/path/to/issm/cron/trunk-jpl"
+ 
+ #ISSM Architecture
+ ISSM_ARCH="linux-gnu-amd64"
+@@ -71,7 +70,7 @@
+ #----------------------#
+ 
+ #Mail delivery. If SKIPMAIL="no", the html nightly run report will be
+-#sent to the adresses present in $ISSM_TIER/cron/mailinglist.
++#sent to the adresses present in $ISSM_DIR/cron/mailinglist.
+ SKIPMAIL="no"
+ 
+ #Sender email address
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/win764
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/win764	(revision 12159)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/configs/win764	(revision 12160)
+@@ -5,8 +5,7 @@
+ #-------------------------------#
+ 
+ #ISSM main directory (full path)
+-ISSM_DIR="/cygdrive/c/issm"
+-ISSM_TIER="/cygdrive/c/issm/trunk-jpl/cron/trunk-jpl"
++ISSM_DIR="/cygdrive/c/issm/trunk-jpl/cron/trunk-jpl"
+ 
+ #ISSM Architecture
+ ISSM_ARCH="cygwin-intel"
+@@ -72,7 +71,7 @@
+ #----------------------#
+ 
+ #Mail delivery. If SKIPMAIL="no", the html nightly run report will be
+-#sent to the adresses present in $ISSM_TIER/cron/mailinglist.
++#sent to the adresses present in $ISSM_DIR/cron/mailinglist.
+ SKIPMAIL="no"
+ 
+ #Sender email address
Index: /issm/oecreview/Archive/12141-12160/ISSM-DocReview-12141-12160.tex
===================================================================
--- /issm/oecreview/Archive/12141-12160/ISSM-DocReview-12141-12160.tex	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/ISSM-DocReview-12141-12160.tex	(revision 12325)
@@ -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/12141-12160/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12141-12160/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12141-12160
Index: /issm/oecreview/Archive/12141-12160/Makefile
===================================================================
--- /issm/oecreview/Archive/12141-12160/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12141-12160
+
+
+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/12141-12160/log.tex
===================================================================
--- /issm/oecreview/Archive/12141-12160/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/log.tex	(revision 12325)
@@ -0,0 +1,38 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12141-12142.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/readline A /issm/trunk-jpl/externalpackages/readline/install.sh A /issm/trunk-jpl/externalpackages/readline/readline-6.2.2.tar.gz \\ Export determination: 6. \\Rationale: readline python package
+M /issm/trunk-jpl/externalpackages/triangle Ignoring install directories \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12142-12143.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/triangle \\ Export determination: 6. \\Rationale: Ignoring install directories
+A /issm/trunk-jpl/externalpackages/matplotlib A /issm/trunk-jpl/externalpackages/matplotlib/install.sh matplotlib python package \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12143-12144.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/matplotlib A /issm/trunk-jpl/externalpackages/matplotlib/install.sh \\ Export determination: 6. \\Rationale: matplotlib python package
+A /issm/trunk-jpl/externalpackages/libpng A /issm/trunk-jpl/externalpackages/libpng/install.sh A /issm/trunk-jpl/externalpackages/libpng/libpng-1.5.10.tar.gz python libpng package \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12144-12145.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/libpng A /issm/trunk-jpl/externalpackages/libpng/install.sh A /issm/trunk-jpl/externalpackages/libpng/libpng-1.5.10.tar.gz \\ Export determination: 6. \\Rationale: python libpng package
+A /issm/trunk-jpl/configs/config-linux64-astrid-mpich1.0.sh D /issm/trunk-jpl/configs/config-linux64-astrid-mpich1.4.sh M /issm/trunk-jpl/configs/config-linux64-astrid.sh Changing mpich version \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12145-12146.diff: \\ Function name: \\A /issm/trunk-jpl/configs/config-linux64-astrid-mpich1.0.sh D /issm/trunk-jpl/configs/config-linux64-astrid-mpich1.4.sh M /issm/trunk-jpl/configs/config-linux64-astrid.sh \\ Export determination: 6. \\Rationale: Changing mpich version
+D /issm/trunk-jpl/src/m/utils/Analysis not needed anymore \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12146-12147.diff: \\ Function name: \\D /issm/trunk-jpl/src/m/utils/Analysis \\ Export determination: 6. \\Rationale: not needed anymore
+M /issm/trunk-jpl/src/m/Makefile.am removed Analysis \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12147-12148.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/Makefile.am \\ Export determination: 6. \\Rationale: removed Analysis
+M /issm/trunk-jpl/src/m/utils/Exp/expdisp.m minor \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12148-12149.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/utils/Exp/expdisp.m \\ Export determination: 6. \\Rationale: minor
+M /issm/trunk-jpl/src/m/classes/groundingline.m bathymetry approximately equal to bed (10$^-10$) \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12149-12150.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/classes/groundingline.m \\ Export determination: 6. \\Rationale: bathymetry approximately equal to bed (10$^-10$)
+M /issm/trunk-jpl/src/m/model/plot/plot\_section.m expread has only one argument now \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12150-12151.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/plot/plot\_section.m \\ Export determination: 6. \\Rationale: expread has only one argument now
+A /issm/trunk-jpl/scripts/mail Needed for some platforms that don't carry mailx \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12151-12152.diff: \\ Function name: \\A /issm/trunk-jpl/scripts/mail \\ Export determination: 6. \\Rationale: Needed for some platforms that don't carry mailx
+M /issm/trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp isnan missing \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-12152-12153.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/shared/Numerics/XZvectorsToCoordinateSystem.cpp \\ Export determination: 6. \\Rationale: isnan missing
+M /issm/trunk-jpl/cron/configs/win732 win732 configuration \\\\
+\noindent \textbf{Change \#13} with diff file ISSM-12153-12154.diff: \\ Function name: \\M /issm/trunk-jpl/cron/configs/win732 \\ Export determination: 6. \\Rationale: win732 configuration
+M /issm/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-64.sh Updated configuration \\\\
+\noindent \textbf{Change \#14} with diff file ISSM-12154-12155.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-64.sh \\ Export determination: 6. \\Rationale: Updated configuration
+M /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh M /issm/trunk-jpl/src/c/modules/MeshProfileIntersectionx/SegmentIntersect.cpp M /issm/trunk-jpl/src/c/shared/Numerics/Synchronize.sh M /issm/trunk-jpl/src/m/classes/clusters/generic.m M /issm/trunk-jpl/src/m/classes/clusters/generic.py M /issm/trunk-jpl/src/m/model/modis.m M /issm/trunk-jpl/src/m/model/petscversion.m M /issm/trunk-jpl/src/m/utils/DataProcessing/TracksToMatrix.m M /issm/trunk-jpl/src/m/utils/Miscellaneous/issmdoc.m M /issm/trunk-jpl/src/m/utils/OS/ismumps.m M /issm/trunk-jpl/src/m/utils/OS/ispetsc.m M /issm/trunk-jpl/src/m/utils/OS/issmscpin.m M /issm/trunk-jpl/src/m/utils/OS/issmscpout.m M /issm/trunk-jpl/src/m/utils/OS/issmssh.m M /issm/trunk-jpl/src/m/utils/Shell/flaimdir.m M /issm/trunk-jpl/src/m/utils/Shell/issmdir.m D /issm/trunk-jpl/src/m/utils/Shell/issmtier.m A /issm/trunk-jpl/src/m/utils/Shell/jplsvn.m A /issm/trunk-jpl/src/m/utils/Shell/ucisvn.m Changing ISSM\_TIER to ISSM\_DIR \\\\
+\noindent \textbf{Change \#15} with diff file ISSM-12155-12156.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh M /issm/trunk-jpl/src/c/modules/MeshProfileIntersectionx/SegmentIntersect.cpp M /issm/trunk-jpl/src/c/shared/Numerics/Synchronize.sh M /issm/trunk-jpl/src/m/classes/clusters/generic.m M /issm/trunk-jpl/src/m/classes/clusters/generic.py M /issm/trunk-jpl/src/m/model/modis.m M /issm/trunk-jpl/src/m/model/petscversion.m M /issm/trunk-jpl/src/m/utils/DataProcessing/TracksToMatrix.m M /issm/trunk-jpl/src/m/utils/Miscellaneous/issmdoc.m M /issm/trunk-jpl/src/m/utils/OS/ismumps.m M /issm/trunk-jpl/src/m/utils/OS/ispetsc.m M /issm/trunk-jpl/src/m/utils/OS/issmscpin.m M /issm/trunk-jpl/src/m/utils/OS/issmscpout.m M /issm/trunk-jpl/src/m/utils/OS/issmssh.m M /issm/trunk-jpl/src/m/utils/Shell/flaimdir.m M /issm/trunk-jpl/src/m/utils/Shell/issmdir.m D /issm/trunk-jpl/src/m/utils/Shell/issmtier.m A /issm/trunk-jpl/src/m/utils/Shell/jplsvn.m A /issm/trunk-jpl/src/m/utils/Shell/ucisvn.m \\ Export determination: 6. \\Rationale: Changing ISSM\_TIER to ISSM\_DIR
+M /issm/trunk-jpl/externalpackages/adic/install.sh M /issm/trunk-jpl/externalpackages/adolc/install.sh M /issm/trunk-jpl/externalpackages/android/android-sdk/install.sh M /issm/trunk-jpl/externalpackages/autoconf/install.sh M /issm/trunk-jpl/externalpackages/automake/install.sh M /issm/trunk-jpl/externalpackages/bbftp/install.sh M /issm/trunk-jpl/externalpackages/boost/install.sh M /issm/trunk-jpl/externalpackages/bsdtar/install-win7.sh M /issm/trunk-jpl/externalpackages/cccl/install-win7.orig.sh M /issm/trunk-jpl/externalpackages/cmake/install.sh M /issm/trunk-jpl/externalpackages/cppcheck/install.sh M /issm/trunk-jpl/externalpackages/dakota/install-altix64-cosmos.sh M /issm/trunk-jpl/externalpackages/dakota/install-linux64-astrid.sh M /issm/trunk-jpl/externalpackages/dakota/install-linux64-murdo.sh M /issm/trunk-jpl/externalpackages/dakota/install-macosx64.sh M /issm/trunk-jpl/externalpackages/dakota/install-pleiades.sh M /issm/trunk-jpl/externalpackages/doxygen/install.sh M /issm/trunk-jpl/externalpackages/gdal/install.sh M /issm/trunk-jpl/externalpackages/gmake/install.sh M /issm/trunk-jpl/externalpackages/graphviz/install.sh M /issm/trunk-jpl/externalpackages/gsl/install-android-4.0.sh M /issm/trunk-jpl/externalpackages/gsl/install-linux64-murdo.sh M /issm/trunk-jpl/externalpackages/gsl/install-macosx64.sh M /issm/trunk-jpl/externalpackages/latex2rtf/install.sh M /issm/trunk-jpl/externalpackages/libtool/install.sh M /issm/trunk-jpl/externalpackages/metis/install-5.0.1-linux64.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-altix64.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-linux64.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-macosx32.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-win32.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.4-linux64.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.4-macosx32.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.4-macosx64.sh M /issm/trunk-jpl/externalpackages/ncview/install.sh M /issm/trunk-jpl/externalpackages/netcdf/install.sh M /issm/trunk-jpl/externalpackages/pcre/install.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-altix64-castor.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-cosmos.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-linux64-astrid.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-eric.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-ogive.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx64.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-pleiades.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-win32-eric.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-win7.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-altix64-castor.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-cosmos.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-linux64-astrid.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-mathieu.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-ogive.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-pleiades.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-win7.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-greenplanet.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-linux64.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-macosx64.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh M /issm/trunk-jpl/externalpackages/petsc/install-dev-linux64.sh M /issm/trunk-jpl/externalpackages/python/install.sh M /issm/trunk-jpl/externalpackages/qhull/install.sh M /issm/trunk-jpl/externalpackages/rats/install.sh M /issm/trunk-jpl/externalpackages/rose/install.sh M /issm/trunk-jpl/externalpackages/swig/install.sh M /issm/trunk-jpl/externalpackages/tao/install.sh M /issm/trunk-jpl/externalpackages/valgrind/install-altix64.sh M /issm/trunk-jpl/externalpackages/valgrind/install-linux64.sh M /issm/trunk-jpl/externalpackages/valgrind/install-macosx32.sh M /issm/trunk-jpl/externalpackages/valgrind/install-macosx64.sh M /issm/trunk-jpl/externalpackages/valgrind/install-win32.sh M /issm/trunk-jpl/externalpackages/vim/install.sh Changing ISSM\_TIER to ISSM\_DIR \\\\
+\noindent \textbf{Change \#16} with diff file ISSM-12156-12157.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/adic/install.sh M /issm/trunk-jpl/externalpackages/adolc/install.sh M /issm/trunk-jpl/externalpackages/android/android-sdk/install.sh M /issm/trunk-jpl/externalpackages/autoconf/install.sh M /issm/trunk-jpl/externalpackages/automake/install.sh M /issm/trunk-jpl/externalpackages/bbftp/install.sh M /issm/trunk-jpl/externalpackages/boost/install.sh M /issm/trunk-jpl/externalpackages/bsdtar/install-win7.sh M /issm/trunk-jpl/externalpackages/cccl/install-win7.orig.sh M /issm/trunk-jpl/externalpackages/cmake/install.sh M /issm/trunk-jpl/externalpackages/cppcheck/install.sh M /issm/trunk-jpl/externalpackages/dakota/install-altix64-cosmos.sh M /issm/trunk-jpl/externalpackages/dakota/install-linux64-astrid.sh M /issm/trunk-jpl/externalpackages/dakota/install-linux64-murdo.sh M /issm/trunk-jpl/externalpackages/dakota/install-macosx64.sh M /issm/trunk-jpl/externalpackages/dakota/install-pleiades.sh M /issm/trunk-jpl/externalpackages/doxygen/install.sh M /issm/trunk-jpl/externalpackages/gdal/install.sh M /issm/trunk-jpl/externalpackages/gmake/install.sh M /issm/trunk-jpl/externalpackages/graphviz/install.sh M /issm/trunk-jpl/externalpackages/gsl/install-android-4.0.sh M /issm/trunk-jpl/externalpackages/gsl/install-linux64-murdo.sh M /issm/trunk-jpl/externalpackages/gsl/install-macosx64.sh M /issm/trunk-jpl/externalpackages/latex2rtf/install.sh M /issm/trunk-jpl/externalpackages/libtool/install.sh M /issm/trunk-jpl/externalpackages/metis/install-5.0.1-linux64.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-altix64.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-linux64.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-macosx32.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-win32.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.4-linux64.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.4-macosx32.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.4-macosx64.sh M /issm/trunk-jpl/externalpackages/ncview/install.sh M /issm/trunk-jpl/externalpackages/netcdf/install.sh M /issm/trunk-jpl/externalpackages/pcre/install.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-altix64-castor.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-cosmos.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-linux64-astrid.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-eric.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-ogive.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx64.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-pleiades.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-win32-eric.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-win7.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-altix64-castor.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-cosmos.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-linux64-astrid.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-mathieu.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-ogive.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-pleiades.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-win7.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-greenplanet.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-linux64.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-macosx64.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh M /issm/trunk-jpl/externalpackages/petsc/install-dev-linux64.sh M /issm/trunk-jpl/externalpackages/python/install.sh M /issm/trunk-jpl/externalpackages/qhull/install.sh M /issm/trunk-jpl/externalpackages/rats/install.sh M /issm/trunk-jpl/externalpackages/rose/install.sh M /issm/trunk-jpl/externalpackages/swig/install.sh M /issm/trunk-jpl/externalpackages/tao/install.sh M /issm/trunk-jpl/externalpackages/valgrind/install-altix64.sh M /issm/trunk-jpl/externalpackages/valgrind/install-linux64.sh M /issm/trunk-jpl/externalpackages/valgrind/install-macosx32.sh M /issm/trunk-jpl/externalpackages/valgrind/install-macosx64.sh M /issm/trunk-jpl/externalpackages/valgrind/install-win32.sh M /issm/trunk-jpl/externalpackages/vim/install.sh \\ Export determination: 6. \\Rationale: Changing ISSM\_TIER to ISSM\_DIR
+M /issm/trunk-jpl/configs/config-altix64-castor.sh M /issm/trunk-jpl/configs/config-arm-linux.sh M /issm/trunk-jpl/configs/config-cosmos.sh M /issm/trunk-jpl/configs/config-greenplanet.sh M /issm/trunk-jpl/configs/config-linux64-astrid-ad.sh M /issm/trunk-jpl/configs/config-linux64-astrid-mpich1.0.sh M /issm/trunk-jpl/configs/config-linux64-astrid-petsc2.sh M /issm/trunk-jpl/configs/config-linux64-astrid.sh M /issm/trunk-jpl/configs/config-linux64-murdo-ad.sh M /issm/trunk-jpl/configs/config-linux64-murdo-nopetsc.sh M /issm/trunk-jpl/configs/config-linux64-murdo.sh M /issm/trunk-jpl/configs/config-macosx32-mathieu.sh M /issm/trunk-jpl/configs/config-macosx32-ogive.sh M /issm/trunk-jpl/configs/config-macosx64-larour-ad.sh M /issm/trunk-jpl/configs/config-macosx64-larour-bothapis.sh M /issm/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh M /issm/trunk-jpl/configs/config-macosx64-larour-python.sh M /issm/trunk-jpl/configs/config-macosx64-larour.sh M /issm/trunk-jpl/configs/config-macosx64-mathieu.sh M /issm/trunk-jpl/configs/config-macosx64-nicole.sh M /issm/trunk-jpl/configs/config-macosx64-ogive.sh M /issm/trunk-jpl/configs/config-macosx64-sophie.sh M /issm/trunk-jpl/configs/config-pleiades-petsc2.sh M /issm/trunk-jpl/configs/config-pleiades.sh M /issm/trunk-jpl/configs/config-win32-eric.sh M /issm/trunk-jpl/configs/config-win7-32.sh M /issm/trunk-jpl/configs/config-win7-64.sh Changing ISSM\_TIER to ISSM\_DIR \\\\
+\noindent \textbf{Change \#17} with diff file ISSM-12157-12158.diff: \\ Function name: \\M /issm/trunk-jpl/configs/config-altix64-castor.sh M /issm/trunk-jpl/configs/config-arm-linux.sh M /issm/trunk-jpl/configs/config-cosmos.sh M /issm/trunk-jpl/configs/config-greenplanet.sh M /issm/trunk-jpl/configs/config-linux64-astrid-ad.sh M /issm/trunk-jpl/configs/config-linux64-astrid-mpich1.0.sh M /issm/trunk-jpl/configs/config-linux64-astrid-petsc2.sh M /issm/trunk-jpl/configs/config-linux64-astrid.sh M /issm/trunk-jpl/configs/config-linux64-murdo-ad.sh M /issm/trunk-jpl/configs/config-linux64-murdo-nopetsc.sh M /issm/trunk-jpl/configs/config-linux64-murdo.sh M /issm/trunk-jpl/configs/config-macosx32-mathieu.sh M /issm/trunk-jpl/configs/config-macosx32-ogive.sh M /issm/trunk-jpl/configs/config-macosx64-larour-ad.sh M /issm/trunk-jpl/configs/config-macosx64-larour-bothapis.sh M /issm/trunk-jpl/configs/config-macosx64-larour-nopetsc.sh M /issm/trunk-jpl/configs/config-macosx64-larour-python.sh M /issm/trunk-jpl/configs/config-macosx64-larour.sh M /issm/trunk-jpl/configs/config-macosx64-mathieu.sh M /issm/trunk-jpl/configs/config-macosx64-nicole.sh M /issm/trunk-jpl/configs/config-macosx64-ogive.sh M /issm/trunk-jpl/configs/config-macosx64-sophie.sh M /issm/trunk-jpl/configs/config-pleiades-petsc2.sh M /issm/trunk-jpl/configs/config-pleiades.sh M /issm/trunk-jpl/configs/config-win32-eric.sh M /issm/trunk-jpl/configs/config-win7-32.sh M /issm/trunk-jpl/configs/config-win7-64.sh \\ Export determination: 6. \\Rationale: Changing ISSM\_TIER to ISSM\_DIR
+M /issm/trunk-jpl/startup.m M /issm/trunk-jpl/startup.py Changing ISSM\_TIER to ISSM\_DIR \\\\
+\noindent \textbf{Change \#18} with diff file ISSM-12158-12159.diff: \\ Function name: \\M /issm/trunk-jpl/startup.m M /issm/trunk-jpl/startup.py \\ Export determination: 6. \\Rationale: Changing ISSM\_TIER to ISSM\_DIR
+M /issm/trunk-jpl/scripts/GenerateReferences.sh M /issm/trunk-jpl/scripts/archive.sh M /issm/trunk-jpl/scripts/automakererun.sh M /issm/trunk-jpl/scripts/cloc2html.py M /issm/trunk-jpl/scripts/convertmatlabclasses.py M /issm/trunk-jpl/scripts/dailyrun.sh M /issm/trunk-jpl/scripts/getloc.sh M /issm/trunk-jpl/scripts/issmconfiguration.sh M /issm/trunk-jpl/scripts/report.sh M /issm/trunk-jpl/scripts/run.sh M /issm/trunk-jpl/scripts/windowsbuild.sh Changing ISSM\_TIER to ISSM\_DIR \\\\
+\noindent \textbf{Change \#19} with diff file ISSM-12159-12160.diff: \\ Function name: \\M /issm/trunk-jpl/scripts/GenerateReferences.sh M /issm/trunk-jpl/scripts/archive.sh M /issm/trunk-jpl/scripts/automakererun.sh M /issm/trunk-jpl/scripts/cloc2html.py M /issm/trunk-jpl/scripts/convertmatlabclasses.py M /issm/trunk-jpl/scripts/dailyrun.sh M /issm/trunk-jpl/scripts/getloc.sh M /issm/trunk-jpl/scripts/issmconfiguration.sh M /issm/trunk-jpl/scripts/report.sh M /issm/trunk-jpl/scripts/run.sh M /issm/trunk-jpl/scripts/windowsbuild.sh \\ Export determination: 6. \\Rationale: Changing ISSM\_TIER to ISSM\_DIR
+M /issm/trunk-jpl/cron/configs/linux64\_daily M /issm/trunk-jpl/cron/configs/linux64\_nightly M /issm/trunk-jpl/cron/configs/macosx64\_daily M /issm/trunk-jpl/cron/configs/macosx64\_nightly M /issm/trunk-jpl/cron/configs/win732 M /issm/trunk-jpl/cron/configs/win764 M /issm/trunk-jpl/cron/configs/winxp32 Changing ISSM\_TIER to ISSM\_DIR \\\\
Index: /issm/oecreview/Archive/12141-12160/r1.tex
===================================================================
--- /issm/oecreview/Archive/12141-12160/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12141
Index: /issm/oecreview/Archive/12141-12160/r2.tex
===================================================================
--- /issm/oecreview/Archive/12141-12160/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12141-12160/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12160
Index: /issm/oecreview/Archive/12161-12180/Date.tex
===================================================================
--- /issm/oecreview/Archive/12161-12180/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12161-12180/ISSM-12162-12163.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12162-12163.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12162-12163.diff	(revision 12325)
@@ -0,0 +1,47 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/runme.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/runme.m	(revision 12162)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/runme.m	(revision 12163)
+@@ -29,8 +29,8 @@
+ %      runme('exclude',101);
+ %      md=runme('id',102,'procedure','model');
+ 
+-%Get ISSM_TIER variable
+-ISSM_TIER=issmtier();
++%Get ISSM_DIR variable
++ISSM_DIR=issmdir();
+ 
+ %Check inputs
+ % {{{1
+@@ -167,13 +167,13 @@
+ 					directory=strsplit(pwd,'/');
+ 					message=getReport(me2);
+ 					if strcmpi(output,'nightly')
+-						fid=fopen([ISSM_TIER '/nightlylog/matlaberror.log'], 'at');
++						fid=fopen([ISSM_DIR '/nightlylog/matlaberror.log'], 'at');
+ 						fprintf(fid,'%s',message);
+ 						fprintf(fid,'\n------------------------------------------------------------------\n');
+ 						fclose(fid);
+ 						disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,id_string,fieldname));
+ 					elseif strcmpi(output,'daily');
+-						fid=fopen([ISSM_TIER '/dailylog/matlaberror.log'], 'at');
++						fid=fopen([ISSM_DIR '/dailylog/matlaberror.log'], 'at');
+ 						fprintf(fid,'%s',message);
+ 						fprintf(fid,'\n------------------------------------------------------------------\n');
+ 						fclose(fid);
+@@ -192,13 +192,13 @@
+ 		directory=strsplit(pwd,'/');
+ 		message=getReport(me);
+ 		if strcmpi(output,'nightly')
+-			fid=fopen([ISSM_TIER '/nightlylog/matlaberror.log'], 'at');
++			fid=fopen([ISSM_DIR '/nightlylog/matlaberror.log'], 'at');
+ 			fprintf(fid,'%s',message);
+ 			fprintf(fid,'\n------------------------------------------------------------------\n');
+ 			fclose(fid);
+ 			disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,id_string,'N/A'));
+ 		elseif strcmpi(output,'daily');
+-			fid=fopen([ISSM_TIER '/dailylog/matlaberror.log'], 'at');
++			fid=fopen([ISSM_DIR '/dailylog/matlaberror.log'], 'at');
+ 			fprintf(fid,'%s',message);
+ 			fprintf(fid,'\n------------------------------------------------------------------\n');
+ 			fclose(fid);
Index: /issm/oecreview/Archive/12161-12180/ISSM-12163-12164.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12163-12164.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12163-12164.diff	(revision 12325)
@@ -0,0 +1,191 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h	(revision 12163)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/modules.h	(revision 12164)
+@@ -61,6 +61,7 @@
+ #include "./Ll2xyx/Ll2xyx.h"
+ #include "./Exp2Kmlx/Exp2Kmlx.h"
+ #include "./Kml2Expx/Kml2Expx.h"
++#include "./Krigingx/Krigingx.h"
+ #include "./Shp2Kmlx/Shp2Kmlx.h"
+ #include "./MassFluxx/MassFluxx.h"
+ #include "./MaxAbsVxx/MaxAbsVxx.h"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12164)
+@@ -0,0 +1,22 @@
++/*!\file:  Kriging.cpp
++ * \brief  "c" core code for Kriging
++ */ 
++
++#include "./Krigingx.h"
++#include "../../shared/shared.h"
++#include "../../include/include.h"
++#include "../../toolkits/toolkits.h"
++#include "../../objects/objects.h"
++#include "../modules.h"
++
++int Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp){
++
++	/*output*/
++	double *predictions = NULL;
++
++	/*Allocate output*/
++	predictions=(double*)xmalloc(n_interp*sizeof(double));
++
++	/*Assign output pointer*/
++	*ppredictions=predictions;
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12164)
+@@ -0,0 +1,15 @@
++/*!\file Kriging.h
++ * \brief: header file for Kriging
++ */
++
++#ifndef _KRIGINGX_H
++#define _KRIGINGX_H
++
++#include "../../objects/objects.h"
++#include "../../toolkits/toolkits.h"
++
++
++int Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp);
++
++#endif /* _KRIGINGX_H */
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12163)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12164)
+@@ -819,6 +819,8 @@
+ 			./modules/InterpFromMeshToGridx/InterpFromMeshToGridx.h\
+ 			./modules/HoleFillerx/HoleFillerx.cpp\
+ 			./modules/HoleFillerx/HoleFillerx.h\
++			./modules/Krigingx/Krigingx.cpp\
++			./modules/Krigingx/Krigingx.h\
+ 			./modules/AverageFilterx/AverageFilterx.cpp\
+ 			./modules/AverageFilterx/AverageFilterx.h\
+ 			./modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp\
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.h	(revision 12164)
+@@ -0,0 +1,35 @@
++/*
++	KrigingUsage.h
++*/
++
++#ifndef _KRIGING_H_
++#define _KRIGING_H_
++
++/* local prototypes: */
++void KrigingUsage(void);
++
++#include "../../c/include/globals.h"
++#include "../../c/modules/modules.h"
++#include "../../c/shared/shared.h"
++#include "../../c/issm-binding.h"
++
++#undef __FUNCT__ 
++#define __FUNCT__  "Kriging"
++    
++/* serial input macros: */
++#define X            (mxArray *)prhs[0]
++#define Y            (mxArray *)prhs[1]
++#define OBSERVATIONS (mxArray *)prhs[2]
++#define XINTERP      (mxArray *)prhs[3]
++#define YINTERP      (mxArray *)prhs[4]
++
++/* serial output macros: */
++#define PREDICTIONS (mxArray**)&plhs[0]
++
++/* serial arg counts: */
++#undef NLHS
++#define NLHS  1
++#undef NRHS
++#define NRHS  5
++
++#endif  /* _KRIGING_H_ */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12164)
+@@ -0,0 +1,52 @@
++/*\file Kriging.c
++ *\brief: best linear predictor
++ */
++#include "./Kriging.h"
++
++void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
++
++	/*Outputs*/
++	double *x            = NULL;
++	double *y            = NULL;
++	double *observations = NULL;
++	double *x_interp     = NULL;
++	double *y_interp     = NULL;
++	double *predictions  = NULL;
++	int     n_interp,n,n_obs;
++
++	/*Boot module: */
++	MODULEBOOT();
++
++	/*checks on arguments on the matlab side: */
++	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&KrigingUsage);
++
++	/*Fetch inputs: */
++	FetchData(&x,&n_obs,X);
++	FetchData(&y,&n,Y);                       if(n_obs!=n) _error_("x and y should have the same size");
++	FetchData(&observations,&n,OBSERVATIONS); if(n_obs!=n) _error_("x and observations should have the same size");
++	FetchData(&x_interp,&n_interp,XINTERP);
++	FetchData(&y_interp,&n,YINTERP);          if(n_interp!=n) _error_("x_interp and y_interp should have the same size");
++
++	/*Call x layer*/
++	Krigingx(&predictions,x,y,observations,n_obs,x_interp,y_interp,n_interp);
++
++	/*Generate output Matlab Structures*/
++	WriteData(PREDICTIONS,predictions,n_interp);
++
++	/*Free ressources: */
++	xfree((void**)&x);
++	xfree((void**)&y);
++	xfree((void**)&observations);
++	xfree((void**)&x_interp);
++	xfree((void**)&y_interp);
++	xfree((void**)&predictions);
++
++	/*end module: */
++	MODULEEND();
++}
++
++void KrigingUsage(void){
++	_printf_(true,"\n");
++	_printf_(true,"   usage: predictions=%s(x,y,observations,x_interp,y_interp);\n",__FUNCT__);
++	_printf_(true,"\n");
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/matlab/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/matlab/Makefile.am	(revision 12163)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/matlab/Makefile.am	(revision 12164)
+@@ -23,6 +23,7 @@
+ 				KMLMeshWrite \
+ 				KMLOverlay \
+ 				Kml2Exp \
++				Kriging \
+ 				Ll2xy \
+ 				NodeConnectivity \
+ 				MeshPartition\
+@@ -127,6 +128,9 @@
+ Kml2Exp_SOURCES = ../Kml2Exp/Kml2Exp.cpp\
+ 			  ../Kml2Exp/Kml2Exp.h
+ 
++Kriging_SOURCES = ../Kriging/Kriging.cpp\
++						../Kriging/Kriging.h
++
+ MeshPartition_SOURCES = ../MeshPartition/MeshPartition.cpp\
+ 			  ../MeshPartition/MeshPartition.h
+ 
Index: /issm/oecreview/Archive/12161-12180/ISSM-12164-12165.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12164-12165.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12164-12165.diff	(revision 12325)
@@ -0,0 +1,112 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/ImageProcessing/gradient_perso.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/ImageProcessing/gradient_perso.m	(revision 12164)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/ImageProcessing/gradient_perso.m	(revision 12165)
+@@ -1,91 +0,0 @@
+-function [ax,ay ]=gradient_perso(a,dx,dy,n);
+-%GRADIENT_PERSO - gradient computation
+-%
+-%   INPUT a,dx,dy,n where a is the scalar value, dx and dy the spacing of one pixel
+-%   in a and n is the width wanted in the gradient computation, in pixels.
+-%
+-%   Usage:
+-%      [ax,ay ]=gradient_perso(a,dx,dy,n)
+-
+-s=size(a);
+-ax=zeros(s(1),s(2));
+-ay=zeros(s(1),s(2));
+-
+-for k=n+1:s(1)-n,
+-   if mod(k,10)==0,
+-      disp(k/s(1)*100);
+-   end
+-   
+-   for j=n+1:s(2)-n,
+-      if isnan(a(k,j)),
+-         ax(k,j)=NaN;
+-         ay(k,j)=NaN;
+-      else
+-         temp=a(k,j);
+-         temp2=a(k,j);
+-         
+-         count=1;
+-         while ~isnan(a(k,j+count)),
+-            temp=[temp a(k,j+count)];
+-            count=count+1;
+-            if count>n,
+-               count=count-1;
+-               break;
+-            end
+-            
+-         end
+-         count=1;
+-         while ~isnan(a(k,j-count)),
+-            temp=[a(k,j-count) temp];
+-            count=count+1;
+-            if count>n,
+-               count=count-1;
+-               break;
+-            end
+-            
+-         end
+-         
+-         count=1;
+-         while ~isnan(a(k+count,j)),
+-            temp2=[temp2 a(k+count,j)];
+-            count=count+1;
+-               if count>n,
+-               count=count-1;
+-               break;
+-            end
+-         
+-         end
+-         count=1;
+-         while ~isnan(a(k-count,j)),
+-            temp2=[a(k-count,j) temp2];
+-            count=count+1;
+-               if count>n,
+-               count=count-1;
+-               break;
+-            end
+-         
+-         end
+-    	   
+-         if length(temp)==1,
+-            ax(k,j)=NaN;
+-         else
+-            ax(k,j)=(temp(length(temp))-temp(1))/(length(temp)-1)/dx;
+-         end
+-         
+-         if length(temp2)==1,
+-            ay(k,j)=NaN;
+-         else
+-            ay(k,j)=(temp2(length(temp2))-temp2(1))/(length(temp2)-1)/dy;
+-         end
+-         
+-      end
+-   end
+-end
+-
+-         
+-          
+-          
+-          
+-          
+-          
+-      
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/ImageProcessing/transp.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/ImageProcessing/transp.m	(revision 12164)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/ImageProcessing/transp.m	(revision 12165)
+@@ -1,10 +0,0 @@
+-bg = uint8(255.*rand(100, 100, 3));
+-imview(bg);
+-
+-fg(:, :, 1) = uint8(255 .*(cumsum(ones(100, 100)) ./ 100));%
+-fg(:, :, 2) = uint8(zeros(100));
+-fg(:, :, 3) = flipud(fg(:, :, 1));
+-imview(fg);
+-
+-res=immerge(bg, fg, .3);
+-imview(res);
+\ No newline at end of file
Index: /issm/oecreview/Archive/12161-12180/ISSM-12165-12166.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12165-12166.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12165-12166.diff	(revision 12325)
@@ -0,0 +1,26 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_gridded.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_gridded.m	(revision 12165)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plot_gridded.m	(revision 12166)
+@@ -39,6 +39,7 @@
+ 	data_min=min(data_grid(:));
+ 	data_max=max(data_grid(:));
+ end
++options=changefieldvalue(options,'cbYLim',[data_min data_max]);
+ if whitepos==1,
+ 	white  =data_max + (data_max-data_min)/55;
+ 	options=changefieldvalue(options,'caxis',[data_min white]);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/applyoptions.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12165)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12166)
+@@ -218,6 +218,9 @@
+ 		end
+ 		warning on MATLAB:log:logOfZero;
+ 		set(c,'YTickLabel',labels);
++	end 
++ 	if exist(options,'cbYLim'); 
++		set(c,'YLim',getfieldvalue(options,'cbYLim'));
+ 	end
+ 	if exist(options,'colorbartitle'),
+ 		set(get(c,'title'),'FontSize',getfieldvalue(options,'colorbarfontsize',fontsize),'String',getfieldvalue(options,'colorbartitle'),...
Index: /issm/oecreview/Archive/12161-12180/ISSM-12168-12169.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12168-12169.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12168-12169.diff	(revision 12325)
@@ -0,0 +1,42 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/radarpower.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/radarpower.m	(revision 12168)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/radarpower.m	(revision 12169)
+@@ -33,11 +33,11 @@
+ %figure out if we should go look for Greenland or Antarctica geotiff, or if user provided one.
+ if ~exist(options,'overlay_image'),
+ 	if strcmpi(md.mesh.hemisphere,'n'),
+-		if ~exist([issmdir() '/projects/ModelData/MOG/mog150_greenland_map.jpg']),
+-			error(['radarpower error message: file ' issmdir() '/projects/ModelData/MOG/mog150_greenland_map.jpg not found.']);
++		if ~exist([jplsvn() '/projects/ModelData/MOG/mog150_greenland_map.jpg']),
++			error(['radarpower error message: file ' jplsvn() '/projects/ModelData/MOG/mog150_greenland_map.jpg not found.']);
+ 		end
+-		jpgim=[issmdir() '/projects/ModelData/MOG/mog150_greenland_map.jpg'];
+-		geom=load([issmdir() '/projects/ModelData/MOG/mog150_greenland_map.jpgw'],'ascii');
++		jpgim=[jplsvn() '/projects/ModelData/MOG/mog150_greenland_map.jpg'];
++		geom=load([jplsvn() '/projects/ModelData/MOG/mog150_greenland_map.jpgw'],'ascii');
+ 
+ 		%geom:   xposting nbcols nbrows yposting xmin ymax
+ 		xmin=max(geom(5),x0);
+@@ -61,15 +61,15 @@
+ 
+ 	elseif strcmpi(md.mesh.hemisphere,'s'),
+ 		if highres,
+-			if ~exist([issmdir() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_200m.tif']),
+-				error(['radarpower error message: file ' issmdir() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_200m.tif not found.']);
++			if ~exist([jplsvn() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_200m.tif']),
++				error(['radarpower error message: file ' jplsvn() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_200m.tif not found.']);
+ 			end
+-			geotiff_name=[issmdir() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_200m.tif'];
++			geotiff_name=[jplsvn() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_200m.tif'];
+ 		else
+-			if ~exist([issmdir() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_1km.tif']),
+-				error(['radarpower error message: file ' issmdir() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_1km.tif not found.']);
++			if ~exist([jplsvn() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_1km.tif']),
++				error(['radarpower error message: file ' jplsvn() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_1km.tif not found.']);
+ 			end
+-			geotiff_name=[issmdir() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_1km.tif'];
++			geotiff_name=[jplsvn() '/projects/ModelData/MosaicTiffRsat/amm125m_v2_1km.tif'];
+ 		end
+ 
+ 		%Name of image
Index: /issm/oecreview/Archive/12161-12180/ISSM-12169-12170.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12169-12170.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12169-12170.diff	(revision 12325)
@@ -0,0 +1,15 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/collapse.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/collapse.m	(revision 12169)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/collapse.m	(revision 12170)
+@@ -100,8 +100,8 @@
+ md.mask.vertexonwater=project2d(md,md.mask.vertexonwater,1);
+ 
+ %lat long
+-if numel(md.mesh.lat)>1,  md.mesh.lat=project2d(md,md.mesh.lat,1); end
+-if numel(md.mesh.long)>1, md.mesh.long=project2d(md,md.mesh.long,1); end
++if numel(md.mesh.lat) ==md.mesh.numberofvertices,  md.mesh.lat=project2d(md,md.mesh.lat,1); end
++if numel(md.mesh.long)==md.mesh.numberofvertices, md.mesh.long=project2d(md,md.mesh.long,1); end
+ 
+ %Initialize with the 2d mesh
+ md.mesh.x=md.mesh.x2d;
Index: /issm/oecreview/Archive/12161-12180/ISSM-12170-12171.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12170-12171.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12170-12171.diff	(revision 12325)
@@ -0,0 +1,18 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh	(revision 12170)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh	(revision 12171)
+@@ -1,12 +1,8 @@
+ #!/bin/sh
+ 
+-pythonversion=2.7
+-
+ ./configure \
+ 	--prefix=$ISSM_DIR \
+-	--with-python-dir=$ISSM_DIR/externalpackages/python/install\
+-	--with-python-version=$pythonversion \
+-	--with-python-numpy-dir=$ISSM_DIR/externalpackages/python/install/Python.framework/Versions/$pythonversion/lib/python$pythonversion/site-packages/numpy/core/include/numpy\
++	--without-modules \
+ 	--with-vendor=arm-linux \
+ 	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
+ 	--with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install
Index: /issm/oecreview/Archive/12161-12180/ISSM-12171-12172.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12171-12172.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12171-12172.diff	(revision 12325)
@@ -0,0 +1,48 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12171)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12172)
+@@ -65,10 +65,12 @@
+ 			export CXXFLAGS=" -O3 -xS -D_INTEL_LINUX_ "
+ 			export CFLAGS=" -O3 -xS -D_INTEL_LINUX_ "
+ 		elif test $VENDOR = arm-linux; then
+-			export CC=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-cc
+-			export CXX=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-cc
+-
+-		else
++			export CC=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-gcc
++			export GCC=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-gcc
++			export CXX=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-g++
++			export AR=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-ar
++			export RANLIB=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-ranlib
++        else
+ 		AC_MSG_ERROR([unknow compiler vendor!])
+ 		fi
+ 	fi
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh	(revision 12171)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh	(revision 12172)
+@@ -1,8 +1,8 @@
+ #!/bin/bash
+ #wget http://python.org/ftp/python/version/Python-version.tgz
+ 
+-version=3.2.2
+-#version=2.7.2
++#version=3.2.2
++version=2.7.2
+ 
+ #Some cleanup
+ rm -rf install src
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh	(revision 12171)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh	(revision 12172)
+@@ -2,6 +2,7 @@
+ 
+ ./configure \
+ 	--prefix=$ISSM_DIR \
++    --host="arm-linux" \
+ 	--without-modules \
+ 	--with-vendor=arm-linux \
+ 	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
Index: /issm/oecreview/Archive/12161-12180/ISSM-12172-12173.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12172-12173.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12172-12173.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/partition/AreaAverageOntoPartition.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/partition/AreaAverageOntoPartition.m	(revision 12172)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/partition/AreaAverageOntoPartition.m	(revision 12173)
+@@ -28,7 +28,7 @@
+ 
+ 	%finally, project vector: 
+ 	vector=project2d(md3d,vector,layer);
+-	md.qmu.partition=project2d(md3d,md3d.part,layer);
++	md.qmu.partition=project2d(md3d,md3d.qmu.partition,layer);
+ end
+ 
+ %ok, first check that part is Matlab indexed
Index: /issm/oecreview/Archive/12161-12180/ISSM-12173-12174.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12173-12174.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12173-12174.diff	(revision 12325)
@@ -0,0 +1,156 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12173)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12174)
+@@ -14,9 +14,133 @@
+ 	/*output*/
+ 	double *predictions = NULL;
+ 
+-	/*Allocate output*/
+-	predictions=(double*)xmalloc(n_interp*sizeof(double));
++	/*Intermediaries*/
++	int     i,j;
++	double  numerator,denominator,ratio;
++	double *Gamma     = NULL;
++	double *GinvG0    = NULL;
++	double *Ginv1     = NULL;
++	double *GinvZ     = NULL;
++	double *gamma0    = NULL;
++	double *ones      = NULL;
+ 
+-	/*Assign output pointer*/
++	/*Memory allocation*/
++	predictions =(double*)xmalloc(n_interp*sizeof(double));
++	Gamma       =(double*)xmalloc(n_obs*n_obs*sizeof(double));
++	gamma0      =(double*)xmalloc(n_obs*sizeof(double));
++	ones        =(double*)xmalloc(n_obs*sizeof(double));
++
++	/*First: Create semivariogram matrix for observations*/
++	for(i=0;i<n_obs;i++){
++		for(j=0;j<=i;j++){
++			SemiVariogram(&Gamma[i*n_obs+j],x[i],y[i],x[j],y[j]);
++			Gamma[j*n_obs+i] = Gamma[i*n_obs+j];
++		}
++	}
++	for(i=0;i<n_obs;i++) ones[i]=1;
++
++	/*Loop over all interpolations*/
++	for(int idx=0;idx<n_interp;idx++){
++
++		/*Get semivariogram vector associated to this location*/
++		for(i=0;i<n_obs;i++) SemiVariogram(&gamma0[i],x[i],y[i],x_interp[idx],y_interp[idx]);
++
++		/*Solve the three linear systems*/
++		MumpsSolve(&GinvG0,Gamma,gamma0,n_obs);       // Gamma^-1 gamma0
++		MumpsSolve(&Ginv1, Gamma,ones,n_obs);         // Gamma^-1 ones
++		MumpsSolve(&GinvZ, Gamma,observations,n_obs); // Gamma^-1 Z
++
++		/*Prepare predictor*/
++		numerator=0.; denominator=0.;
++		for(i=0;i<n_obs;i++) numerator  +=GinvG0[i];
++		for(i=0;i<n_obs;i++) denominator+=Ginv1[i];
++		ratio=numerator/denominator;
++
++		predictions[idx]=0;
++		for(i=0;i<n_obs;i++) predictions[idx] += (gamma0[i]-ratio)*GinvZ[i];
++
++		/*clean-up*/
++		xfree((void**)&GinvG0);
++		xfree((void**)&Ginv1);
++		xfree((void**)&GinvZ);
++	}
++
++	/*clean-up and Assign output pointer*/
++	xfree((void**)&Gamma);
++	xfree((void**)&gamma0);
++	xfree((void**)&ones);
+ 	*ppredictions=predictions;
+ }
++
++void SemiVariogram(double* gamma,double x1,double y1,double x2,double y2){
++
++	/*Calculate distance*/
++	double r=sqrt(pow(x1-x2,2.)+pow(y1-y2,2.));
++
++	/*Switch between variogram models*/
++	switch(1){
++		case 1:{ /*Exponential*/
++			double c0=0.2;
++			double c1=0.8;
++			double a =1;
++			*gamma = c0 + c1*(1-exp(-r/a));
++			return;}
++		default:
++			_error_("Not implemented yet");
++	}
++}
++
++void MumpsSolve(double** Xdouble,double* Adouble,double* Bdouble,int n){
++#ifdef _HAVE_PETSC_
++
++	/*Intermediaries*/
++	Mat A = NULL;
++	Vec B = NULL;
++	Vec X = NULL;
++	KSP ksp = NULL;
++	PC  pc  = NULL;
++
++	/*Create parameters and select MUMPS solver*/
++	PetscOptionsSetFromOptions();
++	PetscOptionsClear();
++	PetscOptionsInsertMultipleString("-mat_type mpiaij \
++				-ksp_type preonly \
++				-pc_type lu \
++				-pc_factor_mat_solver_package mumps \
++				-mat_mumps_icntl_14 120 \
++				-pc_factor_shift_positive_definite true");
++
++	/*Create indexing and ones*/
++	int* idx=(int*)xmalloc(n*sizeof(int));
++	for(int i=0;i<n;i++) idx[i]=i;
++
++	/*Convert matrix to Dense PETSc matrix*/
++	MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);
++	MatSetValues(A,n,idx,n,idx,Adouble,INSERT_VALUES);
++	MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY); 
++	MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);
++
++	/*Convert vector to PETSc vector*/
++	VecCreateSeq(PETSC_COMM_SELF,n,&B);
++	VecSetValues(B,n,idx,Bdouble,INSERT_VALUES);
++	VecAssemblyBegin(B);
++	VecAssemblyEnd(B);
++
++	/*Allocate output*/
++	VecCreateSeq(PETSC_COMM_SELF,n,&X);
++
++	/*Go Solve*/
++	KSPCreate(MPI_COMM_WORLD,&ksp);
++	KSPSetOperators(ksp,A,A,DIFFERENT_NONZERO_PATTERN);
++	KSPSetFromOptions(ksp);
++	KSPGetPC(ksp,&pc);
++	PCFactorSetMatSolverPackage(pc,MATSOLVERMUMPS);
++	KSPSolve(ksp,B,X);
++	KSPFree(&ksp);
++
++	/*Serialize vector*/
++	VecToMPISerial(Xdouble,X);
++#else
++	error_("PETSc support required");
++#endif
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12173)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12174)
+@@ -8,8 +8,8 @@
+ #include "../../objects/objects.h"
+ #include "../../toolkits/toolkits.h"
+ 
+-
+ int Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp);
++void SemiVariogram(double* gamma,double x1,double y1,double x2,double y2);
++void MumpsSolve(double** X,double* A,double* B,int n); //Solve X for the linear system AX = B
+ 
+ #endif /* _KRIGINGX_H */
+-
Index: /issm/oecreview/Archive/12161-12180/ISSM-12174-12175.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12174-12175.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12174-12175.diff	(revision 12325)
@@ -0,0 +1,37 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-helene.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-helene.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-helene.sh	(revision 12175)
+@@ -0,0 +1,26 @@
++#!/bin/sh
++
++#petsc 3.2
++#mpich 1.4
++
++./configure \
++	--prefix=$ISSM_DIR \
++	--with-matlab-dir=$MATLAB_DIR \
++	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++	--with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++	--with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install  \
++	--with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++	--with-mpi-lib=" $ISSM_DIR/externalpackages/mpich2/install/lib/libpmpich.a $ISSM_DIR/externalpackages/mpich2/install/lib/libmpich.a" \
++	--with-petsc-arch=$ISSM_ARCH \
++	--with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
++	--with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++	--with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++	--with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/include/ " \
++	--with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++	--with-fortran-lib="/usr/local/gfortran/lib/libgfortran.a" \
++	--with-math-lib="/usr/lib/libm.dylib" \
++	--with-graphics-lib="/usr/X11/lib/libX11.dylib" \
++	--with-cxxoptflags=" -fno-common -no-cpp-precomp -fexceptions -arch x86_64 -mmacosx-version-min=10.5  -O3 -DNDEBUG -w "\
++	--with-numthreads=8
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-helene.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12161-12180/ISSM-12175-12176.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12175-12176.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12175-12176.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12175)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12176)
+@@ -51,7 +51,7 @@
+ 		MumpsSolve(&GinvZ, Gamma,observations,n_obs); // Gamma^-1 Z
+ 
+ 		/*Prepare predictor*/
+-		numerator=0.; denominator=0.;
++		numerator=-1.; denominator=0.;
+ 		for(i=0;i<n_obs;i++) numerator  +=GinvG0[i];
+ 		for(i=0;i<n_obs;i++) denominator+=Ginv1[i];
+ 		ratio=numerator/denominator;
Index: /issm/oecreview/Archive/12161-12180/ISSM-12176-12177.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12176-12177.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12176-12177.diff	(revision 12325)
@@ -0,0 +1,55 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12176)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12177)
+@@ -40,7 +40,9 @@
+ 	for(i=0;i<n_obs;i++) ones[i]=1;
+ 
+ 	/*Loop over all interpolations*/
++	printf("      interpolation progress:  %5.2lf %%",0.0);
+ 	for(int idx=0;idx<n_interp;idx++){
++		if(idx%100==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)idx/n_interp*100);
+ 
+ 		/*Get semivariogram vector associated to this location*/
+ 		for(i=0;i<n_obs;i++) SemiVariogram(&gamma0[i],x[i],y[i],x_interp[idx],y_interp[idx]);
+@@ -64,6 +66,7 @@
+ 		xfree((void**)&Ginv1);
+ 		xfree((void**)&GinvZ);
+ 	}
++	printf("\b\b\b\b\b\b\b\b%5.2lf %%\n",100.0);
+ 
+ 	/*clean-up and Assign output pointer*/
+ 	xfree((void**)&Gamma);
+@@ -74,17 +77,26 @@
+ 
+ void SemiVariogram(double* gamma,double x1,double y1,double x2,double y2){
+ 
++	/*Intermediaries*/
++	double a,c0,c1;
++
+ 	/*Calculate distance*/
+ 	double r=sqrt(pow(x1-x2,2.)+pow(y1-y2,2.));
+ 
+ 	/*Switch between variogram models*/
+-	switch(1){
+-		case 1:{ /*Exponential*/
+-			double c0=0.2;
+-			double c1=0.8;
+-			double a =1;
++	switch(2){
++		case 1:/*Exponential*/
++			c0=0.2;
++			c1=0.8;
++			a =1;
+ 			*gamma = c0 + c1*(1-exp(-r/a));
+-			return;}
++			return;
++		case 2:/*Gaussian*/
++			c0=0.2;
++			c1=0.8;
++			a =1;
++			*gamma = c0 + c1*(1-exp(-pow(r,2.)/pow(a,2.)));
++			return;
+ 		default:
+ 			_error_("Not implemented yet");
+ 	}
Index: /issm/oecreview/Archive/12161-12180/ISSM-12177-12178.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12177-12178.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12177-12178.diff	(revision 12325)
@@ -0,0 +1,24 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment_variables.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment_variables.sh	(revision 12177)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment_variables.sh	(revision 12178)
+@@ -192,6 +192,7 @@
+ 
+ #PYTHON
+ PYTHON_DIR="$ISSM_DIR/externalpackages/python/install"
++PYTHONSTARTUP="$ISSM_TIER/startup.py"
+ 
+ #MODELE
+ MODELE_DIR="$ISSM_DIR/externalpackages/modelE"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh	(revision 12177)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh	(revision 12178)
+@@ -260,6 +260,7 @@
+ export PATH="$PYTHON_DIR/bin:$PATH"
+ export PYTHONPATH="$PYTHONPATH:$ISSM_DIR/src/modules/python"
+ export LD_LIBRARY_PATH=$ISSM_DIR/src/modules/python:$LD_LIBRARY_PATH
++export PYTHONSTARTUP
+ 
+ #MODELE
+ export PATH="$MODELE_DIR/src/exec:$PATH"
Index: /issm/oecreview/Archive/12161-12180/ISSM-12178-12179.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12178-12179.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12178-12179.diff	(revision 12325)
@@ -0,0 +1,68 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64-murdo.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64-murdo.sh	(revision 12178)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64-murdo.sh	(revision 12179)
+@@ -1,26 +0,0 @@
+-#!/bin/bash
+-
+-#Some cleanup
+-rm -rf src install gsl-1.15
+-mkdir src install
+-
+-#Untar 
+-tar -zxvf  gsl-1.15.tar.gz
+-
+-#Move gsl into src directory
+-mv gsl-1.15/* src
+-rm -rf gsl-1.15
+-
+-#Configure gsl
+-cd src
+-
+-./configure \
+-	--prefix="$ISSM_DIR/externalpackages/gsl/install" 
+-
+-#Compile gsl
+-if [ -z $1 ]; then
+-	make
+-else
+-	make -j $1
+-fi
+-make install 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64.sh	(revision 12179)
+@@ -0,0 +1,26 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf src install gsl-1.15
++mkdir src install
++
++#Untar 
++tar -zxvf  gsl-1.15.tar.gz
++
++#Move gsl into src directory
++mv gsl-1.15/* src
++rm -rf gsl-1.15
++
++#Configure gsl
++cd src
++
++./configure \
++	--prefix="$ISSM_DIR/externalpackages/gsl/install" 
++
++#Compile gsl
++if [ -z $1 ]; then
++	make
++else
++	make -j $1
++fi
++make install 
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12161-12180/ISSM-12179-12180.diff
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-12179-12180.diff	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-12179-12180.diff	(revision 12325)
@@ -0,0 +1,47 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/DownloadExternalPackage.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/DownloadExternalPackage.py	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/DownloadExternalPackage.py	(revision 12180)
+@@ -0,0 +1,36 @@
++#!/usr/bin/env python
++# -*- coding: ISO-8859-1 -*-
++
++import os,sys
++import urllib
++
++#Check inputs
++if(len(sys.argv)!=3): raise NameError('usage: ./DownloadExternalPackage.py URL localfile')
++
++url=sys.argv[1];
++localFile=sys.argv[2]
++
++#Remove file if it already exists
++if os.path.exists(localFile):
++	print "File "+ localFile +"Already exists, deleting..."
++	os.remove(localFile)
++
++#Try to download from url
++httpfail=-1
++try:
++	urllib.urlretrieve(url,localFile)
++	httpfail=0
++except Exception, e:
++	httpfail=1
++
++#Error message in case it failed
++if (httpfail):
++	failureMessage = '''
++===========================================================================
++Unable to download package %s from: %s
++* If URL specified manually - perhaps there is a typo?
++* If your network is disconnected - please reconnect 
++* Alternatively, you can download the above URL manually
++===========================================================================
++''' % (localFile,url)
++	raise RuntimeError(failureMessage)
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/DownloadExternalPackage.py
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12161-12180/ISSM-DocReview-12161-12180.tex
===================================================================
--- /issm/oecreview/Archive/12161-12180/ISSM-DocReview-12161-12180.tex	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/ISSM-DocReview-12161-12180.tex	(revision 12325)
@@ -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/12161-12180/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12161-12180/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12161-12180
Index: /issm/oecreview/Archive/12161-12180/Makefile
===================================================================
--- /issm/oecreview/Archive/12161-12180/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12161-12180
+
+
+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/12161-12180/log.tex
===================================================================
--- /issm/oecreview/Archive/12161-12180/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/log.tex	(revision 12325)
@@ -0,0 +1,32 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12161-12162.diff: \\ Function name: \\M /issm/trunk-jpl/etc/environment.csh M /issm/trunk-jpl/etc/environment.sh M /issm/trunk-jpl/etc/environment\_variables.csh M /issm/trunk-jpl/etc/environment\_variables.sh \\ Export determination: 6. \\Rationale: Changing ISSM\_TIER to ISSM\_DIR \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12162-12163.diff: \\ Function name: \\M /issm/trunk-jpl/test/NightlyRun/runme.m \\ Export determination: 6. \\Rationale: updating runme.m as ISSM\_TIER does not exist anymore \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12163-12164.diff: \\ Function name: \\M /issm/trunk-jpl/test/NightlyRun/runme.m \\ Export determination: 6. \\Rationale: updating runme.m as ISSM\_TIER does not exist anymore
+M /issm/trunk-jpl/src/c/Makefile.am A /issm/trunk-jpl/src/c/modules/Krigingx A /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp A /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h M /issm/trunk-jpl/src/c/modules/modules.h A /issm/trunk-jpl/src/modules/Kriging A /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp A /issm/trunk-jpl/src/modules/Kriging/Kriging.h M /issm/trunk-jpl/src/modules/matlab/Makefile.am Added Kriging module (empty for now) \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12164-12165.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Makefile.am A /issm/trunk-jpl/src/c/modules/Krigingx A /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp A /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h M /issm/trunk-jpl/src/c/modules/modules.h A /issm/trunk-jpl/src/modules/Kriging A /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp A /issm/trunk-jpl/src/modules/Kriging/Kriging.h M /issm/trunk-jpl/src/modules/matlab/Makefile.am \\ Export determination: 6. \\Rationale: Added Kriging module (empty for now)
+D /issm/trunk-jpl/src/m/utils/ImageProcessing/gradient\_perso.m D /issm/trunk-jpl/src/m/utils/ImageProcessing/transp.m not needed anymore \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12165-12166.diff: \\ Function name: \\D /issm/trunk-jpl/src/m/utils/ImageProcessing/gradient\_perso.m D /issm/trunk-jpl/src/m/utils/ImageProcessing/transp.m \\ Export determination: 6. \\Rationale: not needed anymore
+M /issm/trunk-jpl/src/m/model/plot/applyoptions.m M /issm/trunk-jpl/src/m/model/plot/plot\_gridded.m colorbar ylims to get rid of white space at bottom of colorbar \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12166-12167.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/plot/applyoptions.m M /issm/trunk-jpl/src/m/model/plot/plot\_gridded.m \\ Export determination: 6. \\Rationale: colorbar ylims to get rid of white space at bottom of colorbar \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12168-12169.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/radarpower.m \\ Export determination: 6. \\Rationale: Fixed radar image path \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12169-12170.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/radarpower.m \\ Export determination: 6. \\Rationale: Fixed radar image path
+M /issm/trunk-jpl/src/m/model/collapse.m minor \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12170-12171.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/collapse.m \\ Export determination: 6. \\Rationale: minor
+M /issm/trunk-jpl/configs/config-arm-linux.sh arm compilation without modules \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12171-12172.diff: \\ Function name: \\M /issm/trunk-jpl/configs/config-arm-linux.sh \\ Export determination: 6. \\Rationale: arm compilation without modules
+M /issm/trunk-jpl/configs/config-arm-linux.sh M /issm/trunk-jpl/externalpackages/python/install.sh M /issm/trunk-jpl/m4/issm\_options.m4 Modifified ISSM\_options.m4 and arm-linux-android-4.0 to better fit cross-compiling needs \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12172-12173.diff: \\ Function name: \\M /issm/trunk-jpl/configs/config-arm-linux.sh M /issm/trunk-jpl/externalpackages/python/install.sh M /issm/trunk-jpl/m4/issm\_options.m4 \\ Export determination: 6. \\Rationale: Modifified ISSM\_options.m4 and arm-linux-android-4.0 to better fit cross-compiling needs
+M /issm/trunk-jpl/src/m/model/partition/AreaAverageOntoPartition.m update variable name \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-12173-12174.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/partition/AreaAverageOntoPartition.m \\ Export determination: 6. \\Rationale: update variable name
+M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h Final version of Kriging (still not working) \\\\
+\noindent \textbf{Change \#13} with diff file ISSM-12174-12175.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h \\ Export determination: 6. \\Rationale: Final version of Kriging (still not working)
+A /issm/trunk-jpl/configs/config-macosx64-helene.sh configuration file for mac \\\\
+\noindent \textbf{Change \#14} with diff file ISSM-12175-12176.diff: \\ Function name: \\A /issm/trunk-jpl/configs/config-macosx64-helene.sh \\ Export determination: 6. \\Rationale: configuration file for mac
+M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp Fixed issue in denominator \\\\
+\noindent \textbf{Change \#15} with diff file ISSM-12176-12177.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp \\ Export determination: 6. \\Rationale: Fixed issue in denominator
+M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp Added Gaussian covariance \\\\
+\noindent \textbf{Change \#16} with diff file ISSM-12177-12178.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp \\ Export determination: 6. \\Rationale: Added Gaussian covariance
+M /issm/trunk-jpl/etc/environment.sh M /issm/trunk-jpl/etc/environment\_variables.sh Export PYTHON STARTUP environment variable \\\\
+\noindent \textbf{Change \#17} with diff file ISSM-12178-12179.diff: \\ Function name: \\M /issm/trunk-jpl/etc/environment.sh M /issm/trunk-jpl/etc/environment\_variables.sh \\ Export determination: 6. \\Rationale: Export PYTHON STARTUP environment variable
+D /issm/trunk-jpl/externalpackages/gsl/install-linux64-murdo.sh A /issm/trunk-jpl/externalpackages/gsl/install-linux64.sh (from /issm/trunk-jpl/externalpackages/gsl/install-linux64-murdo.sh:12163) moved install-linux64-murdo.sh to install-linux64.sh (generic) \\\\
+\noindent \textbf{Change \#18} with diff file ISSM-12179-12180.diff: \\ Function name: \\D /issm/trunk-jpl/externalpackages/gsl/install-linux64-murdo.sh A /issm/trunk-jpl/externalpackages/gsl/install-linux64.sh (from /issm/trunk-jpl/externalpackages/gsl/install-linux64-murdo.sh:12163) \\ Export determination: 6. \\Rationale: moved install-linux64-murdo.sh to install-linux64.sh (generic)
+A /issm/trunk-jpl/scripts/DownloadExternalPackage.py Added python script to downland packages \\\\
Index: /issm/oecreview/Archive/12161-12180/r1.tex
===================================================================
--- /issm/oecreview/Archive/12161-12180/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12161
Index: /issm/oecreview/Archive/12161-12180/r2.tex
===================================================================
--- /issm/oecreview/Archive/12161-12180/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12161-12180/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12180
Index: /issm/oecreview/Archive/12181-12200/Date.tex
===================================================================
--- /issm/oecreview/Archive/12181-12200/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12181-12200/ISSM-12181-12182.diff
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-12181-12182.diff	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-12181-12182.diff	(revision 12325)
@@ -0,0 +1,17 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid.sh	(revision 12181)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-astrid.sh	(revision 12182)
+@@ -14,6 +14,7 @@
+  --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
+  --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich -lmpl " \
+  --with-petsc-arch=$ISSM_ARCH \
++ --with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install \
+  --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
+  --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
+  --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
+@@ -29,3 +30,4 @@
+  --with-cxxoptflags="-march=opteron -O2" \
+  --with-numthreads=32 \
+  --enable-debugging
++ #--with-serial=no \
Index: /issm/oecreview/Archive/12181-12200/ISSM-12182-12183.diff
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-12182-12183.diff	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-12182-12183.diff	(revision 12325)
@@ -0,0 +1,131 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12182)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12183)
+@@ -8,8 +8,9 @@
+ #include "../../toolkits/toolkits.h"
+ #include "../../objects/objects.h"
+ #include "../modules.h"
++#include <gsl/gsl_linalg.h>
+ 
+-int Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp){
++int Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp,Options* options){
+ 
+ 	/*output*/
+ 	double *predictions = NULL;
+@@ -48,9 +49,9 @@
+ 		for(i=0;i<n_obs;i++) SemiVariogram(&gamma0[i],x[i],y[i],x_interp[idx],y_interp[idx]);
+ 
+ 		/*Solve the three linear systems*/
+-		MumpsSolve(&GinvG0,Gamma,gamma0,n_obs);       // Gamma^-1 gamma0
+-		MumpsSolve(&Ginv1, Gamma,ones,n_obs);         // Gamma^-1 ones
+-		MumpsSolve(&GinvZ, Gamma,observations,n_obs); // Gamma^-1 Z
++		GslSolve(&GinvG0,Gamma,gamma0,n_obs);       // Gamma^-1 gamma0
++		GslSolve(&Ginv1, Gamma,ones,n_obs);         // Gamma^-1 ones
++		GslSolve(&GinvZ, Gamma,observations,n_obs); // Gamma^-1 Z
+ 
+ 		/*Prepare predictor*/
+ 		numerator=-1.; denominator=0.;
+@@ -102,57 +103,43 @@
+ 	}
+ }
+ 
+-void MumpsSolve(double** Xdouble,double* Adouble,double* Bdouble,int n){
+-#ifdef _HAVE_PETSC_
++void GslSolve(double** pX,double* A,double* B,int n){
++#ifdef _HAVE_GSL_
+ 
+-	/*Intermediaries*/
+-	Mat A = NULL;
+-	Vec B = NULL;
+-	Vec X = NULL;
+-	KSP ksp = NULL;
+-	PC  pc  = NULL;
++	/*GSL Matrices and vectors: */
++	int              s;
++	gsl_matrix_view  a;
++	gsl_vector_view  b;
++	gsl_vector      *x = NULL;
++	gsl_permutation *p = NULL;
+ 
+-	/*Create parameters and select MUMPS solver*/
+-	PetscOptionsSetFromOptions();
+-	PetscOptionsClear();
+-	PetscOptionsInsertMultipleString("-mat_type mpiaij \
+-				-ksp_type preonly \
+-				-pc_type lu \
+-				-pc_factor_mat_solver_package mumps \
+-				-mat_mumps_icntl_14 120 \
+-				-pc_factor_shift_positive_definite true");
++	/*A will be modified by LU decomposition. Use copy*/
++	double* Acopy = (double*)xmalloc(n*n*sizeof(double));
++	memcpy(Acopy,A,n*n*sizeof(double));
+ 
+-	/*Create indexing and ones*/
+-	int* idx=(int*)xmalloc(n*sizeof(int));
+-	for(int i=0;i<n;i++) idx[i]=i;
++	/*Initialize gsl matrices and vectors: */
++	a = gsl_matrix_view_array (Acopy,n,n);
++	b = gsl_vector_view_array (B,n);
++	x = gsl_vector_alloc (n);
+ 
+-	/*Convert matrix to Dense PETSc matrix*/
+-	MatCreateSeqDense(PETSC_COMM_SELF,n,n,NULL,&A);
+-	MatSetValues(A,n,idx,n,idx,Adouble,INSERT_VALUES);
+-	MatAssemblyBegin(A,MAT_FINAL_ASSEMBLY); 
+-	MatAssemblyEnd(A,MAT_FINAL_ASSEMBLY);
++	/*Run LU and solve: */
++	p = gsl_permutation_alloc (n);
++	gsl_linalg_LU_decomp (&a.matrix, p, &s);
++	gsl_linalg_LU_solve (&a.matrix, p, &b.vector, x);
+ 
+-	/*Convert vector to PETSc vector*/
+-	VecCreateSeq(PETSC_COMM_SELF,n,&B);
+-	VecSetValues(B,n,idx,Bdouble,INSERT_VALUES);
+-	VecAssemblyBegin(B);
+-	VecAssemblyEnd(B);
++	//printf ("x = \n");
++	//gsl_vector_fprintf (stdout, x, "%g");
+ 
+-	/*Allocate output*/
+-	VecCreateSeq(PETSC_COMM_SELF,n,&X);
++	/*Copy result*/
++	double* X = (double*)xmalloc(n*sizeof(double));
++	memcpy(X,gsl_vector_ptr(x,0),n*sizeof(double));
+ 
+-	/*Go Solve*/
+-	KSPCreate(MPI_COMM_WORLD,&ksp);
+-	KSPSetOperators(ksp,A,A,DIFFERENT_NONZERO_PATTERN);
+-	KSPSetFromOptions(ksp);
+-	KSPGetPC(ksp,&pc);
+-	PCFactorSetMatSolverPackage(pc,MATSOLVERMUMPS);
+-	KSPSolve(ksp,B,X);
+-	KSPFree(&ksp);
+-
+-	/*Serialize vector*/
+-	VecToMPISerial(Xdouble,X);
++	/*Clean up and assign output pointer*/
++	xfree((void**)&Acopy);
++	gsl_permutation_free(p);
++	gsl_vector_free(x);
++	*pX=X;
+ #else
+-	error_("PETSc support required");
++	error_("GSL support required");
+ #endif
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12182)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12183)
+@@ -8,8 +8,8 @@
+ #include "../../objects/objects.h"
+ #include "../../toolkits/toolkits.h"
+ 
+-int Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp);
++int  Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp,Options* options);
+ void SemiVariogram(double* gamma,double x1,double y1,double x2,double y2);
+-void MumpsSolve(double** X,double* A,double* B,int n); //Solve X for the linear system AX = B
++void GslSolve(double** pX,double* A,double* B,int n);
+ 
+ #endif /* _KRIGINGX_H */
Index: /issm/oecreview/Archive/12181-12200/ISSM-12183-12184.diff
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-12183-12184.diff	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-12183-12184.diff	(revision 12325)
@@ -0,0 +1,47 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12183)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12184)
+@@ -6,19 +6,22 @@
+ void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+ 
+ 	/*Outputs*/
+-	double *x            = NULL;
+-	double *y            = NULL;
+-	double *observations = NULL;
+-	double *x_interp     = NULL;
+-	double *y_interp     = NULL;
+-	double *predictions  = NULL;
+-	int     n_interp,n,n_obs;
++	double  *x            = NULL;
++	double  *y            = NULL;
++	double  *observations = NULL;
++	double  *x_interp     = NULL;
++	double  *y_interp     = NULL;
++	double  *predictions  = NULL;
++	Options *options      = NULL;
++	int      n_interp,n,n_obs;
+ 
+ 	/*Boot module: */
+ 	MODULEBOOT();
+ 
+ 	/*checks on arguments on the matlab side: */
+-	CheckNumMatlabArguments(nlhs,NLHS,nrhs,NRHS,__FUNCT__,&KrigingUsage);
++	if (nrhs<NRHS || nlhs!=NLHS){
++		KrigingUsage(); _error_("Kriging usage error");
++	}
+ 
+ 	/*Fetch inputs: */
+ 	FetchData(&x,&n_obs,X);
+@@ -26,9 +29,10 @@
+ 	FetchData(&observations,&n,OBSERVATIONS); if(n_obs!=n) _error_("x and observations should have the same size");
+ 	FetchData(&x_interp,&n_interp,XINTERP);
+ 	FetchData(&y_interp,&n,YINTERP);          if(n_interp!=n) _error_("x_interp and y_interp should have the same size");
++	FetchData(&options,NRHS,nrhs,prhs);
+ 
+ 	/*Call x layer*/
+-	Krigingx(&predictions,x,y,observations,n_obs,x_interp,y_interp,n_interp);
++	Krigingx(&predictions,x,y,observations,n_obs,x_interp,y_interp,n_interp,options);
+ 
+ 	/*Generate output Matlab Structures*/
+ 	WriteData(PREDICTIONS,predictions,n_interp);
Index: /issm/oecreview/Archive/12181-12200/ISSM-12184-12185.diff
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-12184-12185.diff	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-12184-12185.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh	(revision 12184)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh	(revision 12185)
+@@ -252,6 +252,8 @@
+ 
+ #GSL
+ export PATH="$PATH:$GSL_DIR/bin"
++export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GSL_DIR/lib"
++export LD_RUN_PATH="$LD_RUN_PATH:$GSL_DIR/lib"
+ 
+ #GMAKE
+ export PATH="$GMAKE_DIR/bin:$PATH"
Index: /issm/oecreview/Archive/12181-12200/ISSM-12185-12186.diff
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-12185-12186.diff	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-12185-12186.diff	(revision 12325)
@@ -0,0 +1,15 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/DownloadExternalPackage.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/DownloadExternalPackage.py	(revision 12185)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/DownloadExternalPackage.py	(revision 12186)
+@@ -12,8 +12,8 @@
+ 
+ #Remove file if it already exists
+ if os.path.exists(localFile):
+-	print "File "+ localFile +"Already exists, deleting..."
+-	os.remove(localFile)
++	print "File "+ localFile +" already exists and will not be downloaded..."
++	return
+ 
+ #Try to download from url
+ httpfail=-1
Index: /issm/oecreview/Archive/12181-12200/ISSM-12186-12187.diff
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-12186-12187.diff	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-12186-12187.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/DownloadExternalPackage.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/DownloadExternalPackage.py	(revision 12186)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/DownloadExternalPackage.py	(revision 12187)
+@@ -13,7 +13,7 @@
+ #Remove file if it already exists
+ if os.path.exists(localFile):
+ 	print "File "+ localFile +" already exists and will not be downloaded..."
+-	return
++	exit 
+ 
+ #Try to download from url
+ httpfail=-1
Index: /issm/oecreview/Archive/12181-12200/ISSM-12187-12188.diff
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-12187-12188.diff	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-12187-12188.diff	(revision 12325)
@@ -0,0 +1,18 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/DownloadExternalPackage.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/DownloadExternalPackage.py	(revision 12187)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/scripts/DownloadExternalPackage.py	(revision 12188)
+@@ -13,11 +13,12 @@
+ #Remove file if it already exists
+ if os.path.exists(localFile):
+ 	print "File "+ localFile +" already exists and will not be downloaded..."
+-	exit 
++	sys.exit()
+ 
+ #Try to download from url
+ httpfail=-1
+ try:
++	print "Fetching %s" % localFile
+ 	urllib.urlretrieve(url,localFile)
+ 	httpfail=0
+ except Exception, e:
Index: /issm/oecreview/Archive/12181-12200/ISSM-12188-12189.diff
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-12188-12189.diff	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-12188-12189.diff	(revision 12325)
@@ -0,0 +1,1897 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cppcheck/cppcheck-1.48.tar
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cppcheck/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cppcheck/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cppcheck/install.sh	(revision 12189)
+@@ -4,6 +4,8 @@
+ rm -rf install  src cppcheck-1.48
+ mkdir src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/cppcheck-1.48.tar' 'cppcheck-1.48.tar'
+ tar -xvf cppcheck-1.48.tar
+ 
+ mv cppcheck-1.48/* src
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/apache-ant-1.8.2-bin.zip
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/android-sdk-r16-macosx.zip
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12189)
+@@ -1,7 +1,7 @@
+ #This installs the Android SDK (Software Development Kit)
+ #which is needed for the compilation of the Java project. 
+ 
+-step=2;
++step=1;
+ 
+ #Different steps here. 
+ #1: install sdk, ant and sdk tools
+@@ -17,6 +17,10 @@
+ 	#Cleanup the install
+ 	rm -rf install-sdk install-ant
+ 
++	#Download from ISSM server
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-sdk-r16-macosx.zip' 'android-sdk-r16-macosx.zip'
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/apache-ant-1.8.2-bin.zip' 'apache-ant-1.8.2-bin.zip'
++
+ 	# Install Android SDK and NDK.
+ 	unzip -o android-sdk-r16-macosx.zip
+ 	unzip -o apache-ant-1.8.2-bin.zip
+@@ -44,7 +48,6 @@
+ 	#which we will move to $ISSM_DIR/externalpackages/android-emulators.  
+ 	#For now, it's called: Android-4.0.3
+ 
+-
+ 	#Here we delete the Android-4.0.3 device if it already exists.
+ 	cd $present_dir/install-sdk/tools
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/android-ndk-r7b-darwin-x86.tar.bz2
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-ndk/install.sh	(revision 12189)
+@@ -9,8 +9,10 @@
+ rm -rf install
+ rm -rf $ANDROID_DIR/arm-linux-android-4.0
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/android-ndk-r7b-darwin-x86.tar.bz2' 'dummy.tar.bz2'
++
+ # Install Android SDK and NDK.
+-cp android-ndk-r7b-darwin-x86.tar.bz2 dummy.tar.bz2
+ bunzip2 dummy.tar.bz2
+ tar -xvf dummy.tar
+ rm -rf dummy.tar dummy.tar.bz2
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cmake/cmake-2.8.5.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cmake/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cmake/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cmake/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install cmake-2.8.5
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/cmake-2.8.5.tar.gz' 'cmake-2.8.5.tar.gz'
++
+ #Untar 
+ tar -zxvf  cmake-2.8.5.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/Python-3.2.2.tgz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/Python-2.7.2.tgz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh	(revision 12189)
+@@ -9,6 +9,9 @@
+ rm -rf Python-$version
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-$version.tgz Python-$version.tgz
++
+ #exports
+ export CC
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/mpich2-1.0.2p1.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/mpich2-1.4.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-macosx64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-macosx64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf src install mpich2-1.4
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/mpich2-1.4.tar.gz' 'mpich2-1.4.tar.gz'
++
+ #Untar 
+ tar -zxvf  mpich2-1.4.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-linux64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-linux64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf src install mpich2-1.0.2p1
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/mpich2-1.0.2p1.tar.gz' 'mpich2-1.0.2p1.tar.gz'
++
+ #Untar 
+ tar -zxvf  mpich2-1.0.2p1.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-altix64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-altix64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-altix64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf src install mpich2-1.0.2p1
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/mpich2-1.0.2p1.tar.gz' 'mpich2-1.0.2p1.tar.gz'
++
+ #Untar 
+ tar -zxvf  mpich2-1.0.2p1.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-linux64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-linux64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf src install mpich2-1.4
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/mpich2-1.4.tar.gz' 'mpich2-1.4.tar.gz'
++
+ #Untar 
+ tar -zxvf  mpich2-1.4.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-macosx32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-macosx32.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-macosx32.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf src install mpich2-1.0.2p1
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/mpich2-1.0.2p1.tar.gz' 'mpich2-1.0.2p1.tar.gz'
++
+ #Untar 
+ tar -zxvf  mpich2-1.0.2p1.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-win32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-win32.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.0.2-win32.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf src install mpich2-1.0.2p1
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/mpich2-1.0.2p1.tar.gz' 'mpich2-1.0.2p1.tar.gz'
++
+ #Untar 
+ tar -zxvf  mpich2-1.0.2p1.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-macosx32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-macosx32.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mpich2/install-1.4-macosx32.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf src install mpich2-1.4
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/mpich2-1.4.tar.gz' 'mpich2-1.4.tar.gz'
++
+ #Untar 
+ tar -zxvf  mpich2-1.4.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/freetype/freetype-2.4.9.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/freetype/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/freetype/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/freetype/install.sh	(revision 12189)
+@@ -6,6 +6,9 @@
+ rm -rf freetype-2.4.9
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/freetype-2.4.9.tar.gz' 'freetype-2.4.9.tar.gz'
++
+ #Untar 
+ tar -zxvf  freetype-2.4.9.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gmake/make-3.82.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gmake/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gmake/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gmake/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install src make-3.82
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/make-3.82.tar.gz' 'make-3.82.tar.gz'
++
+ #Untar 
+ tar -zxvf  make-3.82.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/shapelib/shape_eg_data.zip
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/shapelib/shapelib-1.2.10.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/shapelib/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/shapelib/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/shapelib/install.sh	(revision 12189)
+@@ -6,6 +6,10 @@
+ rm -rf install 
+ mkdir src install 
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/shapelib-1.2.10.tar.gz' 'shapelib-1.2.10.tar.gz'
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/shape_eg_data.zip' 'shape_eg_data.zip'
++
+ # Untar 
+ tar -xvzf shapelib-1.2.10.tar.gz
+ unzip shape_eg_data.zip -d shapelib-1.2.10/eg_data
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/win7.sdk7.1.exe
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/x-dosexec
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/install.sh	(revision 12189)
+@@ -0,0 +1,4 @@
++#!/bin/bash
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/win7.sdk7.1.exe' 'win7.sdk7.1.exe'
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/satstress/SatStress-0.1.2.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/satstress/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/satstress/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/satstress/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install SatStress-0.1.2
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/SatStress-0.1.2.tar.gz' 'SatStress-0.1.2.tar.gz'
++
+ #Untar 
+ tar -zxvf  SatStress-0.1.2.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gdaltokmz/gdaltokmz-1.0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gdaltokmz/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gdaltokmz/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gdaltokmz/install.sh	(revision 12189)
+@@ -0,0 +1,4 @@
++#!/bin/bash
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/gdaltokmz-1.0.tar.gz' 'gdaltokmz-1.0.tar.gz'
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gdaltokmz/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/m2html/m2html.zip
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/m2html/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/m2html/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/m2html/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install m2html
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/m2html.zip' 'm2html.zip'
++
+ #uncompress
+ unzip m2html.zip
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/nose/nose-1.1.2.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/nose/install-macosx64sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/nose/install-macosx64sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/nose/install-macosx64sh	(revision 12189)
+@@ -1,4 +1,4 @@
+-#/bin/bash
++#!/bin/bash
+ #Install Python nose module
+ 
+ pythonversion=2
+@@ -17,6 +17,8 @@
+ 
+ if [[ $pythonversion == "2" ]];then
+ 
++	#Download from ISSM server
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/nose-1.1.2.tar.gz' 'nose-1.1.2.tar.gz'
+ 	tar -zxvf  nose-1.1.2.tar.gz
+ 	mv nose-1.1.2 src
+ 	rm -rf nose-1.1.2
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/valgrind-3.7.0.tar.bz2
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-win32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-win32.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-win32.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install valgrind-3.7.0
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/valgrind-3.7.0.tar.bz2' 'valgrind-3.7.0.tar.bz2'
++
+ #Untar 
+ tar -jxvf  valgrind-3.7.0.tar.bz2
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-macosx64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-macosx64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install valgrind-3.7.0
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/valgrind-3.7.0.tar.bz2' 'valgrind-3.7.0.tar.bz2'
++
+ #Untar 
+ tar -jxvf  valgrind-3.7.0.tar.bz2
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-linux64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-linux64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install valgrind-3.7.0
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/valgrind-3.7.0.tar.bz2' 'valgrind-3.7.0.tar.bz2'
++
+ #Untar 
+ tar -jxvf  valgrind-3.7.0.tar.bz2
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-altix64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-altix64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-altix64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install valgrind-3.7.0
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/valgrind-3.7.0.tar.bz2' 'valgrind-3.7.0.tar.bz2'
++
+ #Untar 
+ tar -jxvf  valgrind-3.7.0.tar.bz2
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-macosx32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-macosx32.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/valgrind/install-macosx32.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install valgrind-3.7.0
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/valgrind-3.7.0.tar.bz2' 'valgrind-3.7.0.tar.bz2'
++
+ #Untar 
+ tar -jxvf  valgrind-3.7.0.tar.bz2
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/rose/rose-0.9.5a-13219.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/rose/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/rose/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/rose/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf source build install
+ mkdir install source build
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/rose-0.9.5a-13219.tar.gz' 'rose-0.9.5a-13219.tar.gz'
++
+ #Untar 
+ tar -zxvf  rose-0.9.5a-13219.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/colpack/ColPack-1.0.3.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/colpack/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/colpack/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/colpack/install.sh	(revision 12189)
+@@ -3,6 +3,9 @@
+ #Erase install
+ rm -rf install  src ColPack
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/ColPack-1.0.3.tar.gz' 'ColPack-1.0.3.tar.gz'
++
+ #install directory
+ mkdir src
+ tar -zxvf ColPack-1.0.3.tar.gz 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/chaco/Chaco-2.2.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/chaco/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/chaco/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/chaco/install.sh	(revision 12189)
+@@ -6,6 +6,9 @@
+ rm -rf install 
+ mkdir src install 
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/Chaco-2.2.tar.gz' 'Chaco-2.2.tar.gz'
++
+ # Untar 
+ tar -xvzf Chaco-2.2.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/doxygen/doxygen-1.7.4.src.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/autoconf/autoconf-2.68.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/autoconf/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/autoconf/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/autoconf/install.sh	(revision 12189)
+@@ -3,11 +3,14 @@
+ #Some cleanup
+ rm -rf install autoconf-2.68 src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/autoconf-2.68.tar.gz' 'autoconf-2.68.tar.gz'
++
+ #Create install directories
+ mkdir install
+ 
+ #Untar 
+-tar -zxvf  autoconf-2.68.tar.gz
++tar -zxvf autoconf-2.68.tar.gz
+ 
+ #Move autoconf into src directory
+ mv autoconf-2.68 src
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/distribute/distribute-0.6.26.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/distribute/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/distribute/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/distribute/install.sh	(revision 12189)
+@@ -1,4 +1,5 @@
+ #!/bin/bash
+ 
+-curl -O http://python-distribute.org/distribute_setup.py
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://python-distribute.org/distribute_setup.py' 'distribute_setup.py'
+ python distribute_setup.py
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/metis-4.0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/metis-5.0.1.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-cosmos.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-cosmos.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-cosmos.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install metis-4.0
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/metis-4.0.tar.gz' 'metis-4.0.tar.gz'
++
+ #Untar 
+ tar -zxvf  metis-4.0.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-greenplanet.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-greenplanet.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-greenplanet.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install metis-4.0
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/metis-4.0.tar.gz' 'metis-4.0.tar.gz'
++
+ #Untar 
+ tar -zxvf  metis-4.0.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-macosx64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-macosx64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install metis-4.0
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/metis-4.0.tar.gz' 'metis-4.0.tar.gz'
++
+ #Untar 
+ tar -zxvf  metis-4.0.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-win7.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-win7.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-win7.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install metis-4.0
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/metis-4.0.tar.gz' 'metis-4.0.tar.gz'
++
+ #Untar 
+ tar -zxvf  metis-4.0.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-pleiades.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-pleiades.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-pleiades.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install metis-4.0
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/metis-4.0.tar.gz' 'metis-4.0.tar.gz'
++
+ #Untar 
+ tar -zxvf  metis-4.0.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-linux64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-linux64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install metis-4.0
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/metis-4.0.tar.gz' 'metis-4.0.tar.gz'
++
+ #Untar 
+ tar -zxvf  metis-4.0.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-5.0.1-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-5.0.1-linux64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-5.0.1-linux64.sh	(revision 12189)
+@@ -5,6 +5,9 @@
+ rm -rf install metis-5.0.1
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/metis-5.0.1.tar.gz' 'metis-5.0.1.tar.gz'
++
+ #Untar 
+ tar -zxvf  metis-5.0.1.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-altix64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-altix64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-altix64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install metis-4.0
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/metis-4.0.tar.gz' 'metis-4.0.tar.gz'
++
+ #Untar 
+ tar -zxvf  metis-4.0.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-macosx32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-macosx32.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-macosx32.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install metis-4.0
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/metis-4.0.tar.gz' 'metis-4.0.tar.gz'
++
+ #Untar 
+ tar -zxvf  metis-4.0.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-win32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-win32.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-win32.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install metis-4.0
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/metis-4.0.tar.gz' 'metis-4.0.tar.gz'
++
+ #Untar 
+ tar -zxvf  metis-4.0.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mercurial/mercurial-1.7.3.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mercurial/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mercurial/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/mercurial/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install mercurial-1.7.3
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/mercurial-1.7.3.tar.gz' 'mercurial-1.7.3.tar.gz'
++
+ #Untar 
+ tar -zxvf  mercurial-1.7.3.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/kml/kml_shapefile.zip
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/kml/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/kml/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/kml/install.sh	(revision 12189)
+@@ -0,0 +1,4 @@
++#!/bin/bash
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/kml_shapefile.zip' 'kml_shapefile.zip'
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/kml/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/xerces/xerces-c-src_2_8_0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/xerces/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/xerces/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/xerces/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install xerces-c-src_2_8_0 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/xerces-c-src_2_8_0.tar.gz' 'xerces-c-src_2_8_0.tar.gz'
++
+ #Untar 
+ tar -zxvf  xerces-c-src_2_8_0.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pcre/pcre-8.21.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pcre/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pcre/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pcre/install.sh	(revision 12189)
+@@ -5,6 +5,9 @@
+ rm -rf pcre-8.21
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/pcre-8.21.tar.gz' 'pcre-8.21.tar.gz'
++
+ #Untar and move python into install directory
+ tar -zxvf  pcre-8.21.tar.gz
+ mv pcre-8.21/* install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ipython/ipython-0.12.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ipython/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ipython/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ipython/install.sh	(revision 12189)
+@@ -6,6 +6,9 @@
+ rm -rf ipython-0.12
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/ipython-0.12.tar.gz' 'ipython-0.12.tar.gz'
++
+ #Untar 
+ tar -zxvf  ipython-0.12.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dyson/codescan.zip
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dace/dace.zip
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dace/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dace/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dace/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install dace
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/dace.zip' 'dace.zip'
++
+ #uncompress
+ unzip dace.zip
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libtool/libtool-2.2.6b.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libtool/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libtool/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libtool/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install libtool-2.2.6b src
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/libtool-2.2.6b.tar.gz' 'libtool-2.2.6b.tar.gz'
++
+ #Untar 
+ tar -zxvf  libtool-2.2.6b.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/modelE/modelE_AR5_branch.2012.03.13_10.12.21.tgz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/modelE/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/modelE/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/modelE/install.sh	(revision 12189)
+@@ -6,6 +6,9 @@
+ rm -rf src install  modelE_AR5_branch
+ mkdir src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/modelE_AR5_branch.2012.03.13_10.12.21.tgz' 'modelE_AR5_branch.2012.03.13_10.12.21.tgz'
++
+ #Untar 
+ tar -zxvf  modelE_AR5_branch.2012.03.13_10.12.21.tgz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/polygonclipper/PolygonClipper.zip
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/polygonclipper/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/polygonclipper/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/polygonclipper/install.sh	(revision 12189)
+@@ -3,6 +3,9 @@
+ #Some cleanup
+ rm -rf install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/PolygonClipper.zip' 'PolygonClipper.zip'
++
+ #install
+ mkdir install
+ cd install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/swig/swigwin-2.0.4.zip
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/swig/swig-2.0.4.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/swig/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/swig/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/swig/install.sh	(revision 12189)
+@@ -5,6 +5,9 @@
+ rm -rf swig-2.0.4
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/swig-2.0.4.tar.gz' 'swig-2.0.4.tar.gz'
++
+ #Untar and move python into install directory
+ tar -zxvf  swig-2.0.4.tar.gz
+ mv swig-2.0.4/* install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/rats/rats-2.3.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/rats/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/rats/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/rats/install.sh	(revision 12189)
+@@ -3,6 +3,9 @@
+ #Erase install
+ rm -rf install  src rats-2.3
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/rats-2.3.tar.gz' 'rats-2.3.tar.gz'
++
+ #install directory
+ mkdir src
+ tar -zxvf rats-2.3.tar.gz 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/adolc/ADOL-C-2.2.0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/adolc/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/adolc/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/adolc/install.sh	(revision 12189)
+@@ -5,6 +5,9 @@
+ #Some cleanup
+ rm -rf install ADOL-C-2.2.0 src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/ADOL-C-2.2.0.tar.gz' 'ADOL-C-2.2.0.tar.gz'
++
+ #Create install directories
+ mkdir install src
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/graphviz/graphviz-2.24.0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/graphviz/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/graphviz/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/graphviz/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/graphviz-2.24.0.tar.gz' 'graphviz-2.24.0.tar.gz'
++
+ #Untar 
+ tar -zxvf  graphviz-2.24.0.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/bbftp/bbftp-client-3.2.0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/bbftp/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/bbftp/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/bbftp/install.sh	(revision 12189)
+@@ -3,6 +3,9 @@
+ #Some cleanup
+ rm -rf src install bbftp-client-3.2.0
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/bbftp-client-3.2.0.tar.gz' 'bbftp-client-3.2.0.tar.gz'
++
+ #Create install directories
+ mkdir install src
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/Dakota_4_3.src.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-macosx64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-macosx64.sh	(revision 12189)
+@@ -9,6 +9,9 @@
+ rm -rf install 
+ mkdir src install 
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/Dakota_4_3.src.tar.gz' 'Dakota_4_3.src.tar.gz'
++
+ #Untar 
+ tar -zxvf  Dakota_4_3.src.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-pleiades.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-pleiades.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-pleiades.sh	(revision 12189)
+@@ -9,6 +9,9 @@
+ rm -rf install 
+ mkdir src install 
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/Dakota_4_3.src.tar.gz' 'Dakota_4_3.src.tar.gz'
++
+ #Untar 
+ tar -zxvf  Dakota_4_3.src.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-altix64-cosmos.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-altix64-cosmos.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-altix64-cosmos.sh	(revision 12189)
+@@ -9,6 +9,9 @@
+ rm -rf install 
+ mkdir src install 
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/Dakota_4_3.src.tar.gz' 'Dakota_4_3.src.tar.gz'
++
+ #Untar 
+ tar -zxvf  Dakota_4_3.src.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-linux64-astrid.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-linux64-astrid.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-linux64-astrid.sh	(revision 12189)
+@@ -9,6 +9,9 @@
+ rm -rf install 
+ mkdir src install 
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/Dakota_4_3.src.tar.gz' 'Dakota_4_3.src.tar.gz'
++
+ #Untar 
+ tar -zxvf  Dakota_4_3.src.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-linux64-murdo.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-linux64-murdo.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-linux64-murdo.sh	(revision 12189)
+@@ -9,6 +9,9 @@
+ rm -rf install 
+ mkdir src install 
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/Dakota_4_3.src.tar.gz' 'Dakota_4_3.src.tar.gz'
++
+ #Untar 
+ tar -zxvf  Dakota_4_3.src.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cccl/cccl-0.03.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/x-gzip
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cccl/install-win7.orig.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cccl/install-win7.orig.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cccl/install-win7.orig.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf src install cccl-0.03
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/cccl-0.03.tar.gz' 'cccl-0.03.tar.gz'
++
+ #Untar 
+ tar -zxvf  cccl-0.03.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libermate/libermate-0.4.tgz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libermate/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libermate/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libermate/install.sh	(revision 12189)
+@@ -5,6 +5,9 @@
+ rm -rf libermate-0.4
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/libermate-0.4.tgz' 'libermate-0.4.tgz'
++
+ #Untar 
+ tar -zxvf  libermate-0.4.tgz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/oofem/oofem-2.0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/oofem/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/oofem/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/oofem/install.sh	(revision 12189)
+@@ -5,6 +5,9 @@
+ rm -rf oofem-2.0
+ mkdir src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/oofem-2.0.tar.gz' 'oofem-2.0.tar.gz'
++
+ #Untar 
+ tar -zxvf  oofem-2.0.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/slepc/slepc-2.3.2.tgz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/slepc/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/slepc/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/slepc/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install slepc-2.3.2
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/slepc-2.3.2.tgz' 'slepc-2.3.2.tgz'
++
+ #Untar 
+ tar -zxvf  slepc-2.3.2.tgz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gdal/gdal-1.6.0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gdal/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gdal/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gdal/install.sh	(revision 12189)
+@@ -6,6 +6,9 @@
+ rm -rf gdal-1.6.0
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/gdal-1.6.0.tar.gz' 'gdal-1.6.0.tar.gz'
++
+ #Untar 
+ tar -zxvf  gdal-1.6.0.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/latex2rtf/latex2rtf-2.0.0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/latex2rtf/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/latex2rtf/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/latex2rtf/install.sh	(revision 12189)
+@@ -3,6 +3,9 @@
+ #Some cleanup
+ rm -rf latex2rtf-2.0.0 cfg install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/latex2rtf-2.0.0.tar.gz' 'latex2rtf-2.0.0.tar.gz'
++
+ #untar 
+ tar -zxvf  latex2rtf-2.0.0.tar.gz
+ mv latex2rtf-2.0.0 install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/petsc-2.3.2-p3.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/petsc-3.2-p3.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/petsc-3.1-p7.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-cosmos.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-cosmos.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-cosmos.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install petsc-3.1-p7 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-3.1-p7.tar.gz' 'petsc-3.1-p7.tar.gz'
++
+ #Untar and move petsc to install directory
+ tar -zxvf  petsc-3.1-p7.tar.gz
+ mv petsc-3.1-p7/* src/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-cosmos.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-cosmos.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-cosmos.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install petsc-2.3.2-p3 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-2.3.2-p3.tar.gz' 'petsc-2.3.2-p3.tar.gz'
++
+ #Untar and move petsc to install directory
+ tar -zxvf  petsc-2.3.2-p3.tar.gz
+ mv petsc-2.3.2-p3/* install/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-macosx64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-macosx64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install petsc-3.2-p3 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-3.2-p3.tar.gz' 'petsc-3.2-p3.tar.gz'
++
+ #Untar and move petsc to install directory
+ tar -zxvf  petsc-3.2-p3.tar.gz
+ mv petsc-3.2-p3/* src/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-greenplanet.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-greenplanet.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-greenplanet.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install petsc-3.2-p3 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-3.2-p3.tar.gz' 'petsc-3.2-p3.tar.gz'
++
+ #Untar and move petsc to install directory
+ tar -zxvf  petsc-3.2-p3.tar.gz
+ mv petsc-3.2-p3/* src/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install petsc-2.3.2-p3 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-2.3.2-p3.tar.gz' 'petsc-2.3.2-p3.tar.gz'
++
+ #Untar and move petsc to install directory
+ tar -zxvf  petsc-2.3.2-p3.tar.gz
+ mv petsc-2.3.2-p3/* src/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-ogive.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-ogive.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-ogive.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install petsc-3.1-p7 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-3.1-p7.tar.gz' 'petsc-3.1-p7.tar.gz'
++
+ #Untar and move petsc to install directory
+ tar -zxvf  petsc-3.1-p7.tar.gz
+ mv petsc-3.1-p7/* src/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-ogive.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-ogive.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-ogive.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install petsc-2.3.2-p3 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-2.3.2-p3.tar.gz' 'petsc-2.3.2-p3.tar.gz'
++
+ #Untar and move petsc to install directory
+ tar -zxvf  petsc-2.3.2-p3.tar.gz
+ mv petsc-2.3.2-p3/* install/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-linux64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-linux64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install petsc-3.2-p3 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-3.2-p3.tar.gz' 'petsc-3.2-p3.tar.gz'
++
+ #Untar and move petsc to install directory
+ tar -zxvf  petsc-3.2-p3.tar.gz
+ mv petsc-3.2-p3/* src/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-eric.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-eric.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-eric.sh	(revision 12189)
+@@ -8,6 +8,9 @@
+ 	rm -rf install petsc-2.3.2-p3 src
+ 	mkdir install src
+ 
++	#Download from ISSM server
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-2.3.2-p3.tar.gz' 'petsc-2.3.2-p3.tar.gz'
++
+ 	#Untar and move petsc to install directory
+ 	tar -zxvf  petsc-2.3.2-p3.tar.gz
+ 	mv petsc-2.3.2-p3/* install/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-win32-eric.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-win32-eric.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-win32-eric.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install petsc-2.3.2-p3 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-2.3.2-p3.tar.gz' 'petsc-2.3.2-p3.tar.gz'
++
+ #Untar and move petsc to install directory
+ tar -zxvf  petsc-2.3.2-p3.tar.gz
+ mv petsc-2.3.2-p3/* install/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-win7.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-win7.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-win7.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install petsc-3.1-p7 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-3.1-p7.tar.gz' 'petsc-3.1-p7.tar.gz'
++
+ #Untar and move petsc to install directory
+ tar -zxvf  petsc-3.1-p7.tar.gz
+ mv petsc-3.1-p7/* src/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-altix64-castor.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-altix64-castor.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-altix64-castor.sh	(revision 12189)
+@@ -8,6 +8,9 @@
+ 	rm -rf install petsc-3.1-p7 src
+ 	mkdir install src
+ 
++	#Download from ISSM server
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-3.1-p7.tar.gz' 'petsc-3.1-p7.tar.gz'
++
+ 	#Untar and move petsc to install directory
+ 	tar -zxvf  petsc-3.1-p7.tar.gz
+ 	mv petsc-3.1-p7/* install/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-altix64-castor.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-altix64-castor.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-altix64-castor.sh	(revision 12189)
+@@ -8,6 +8,9 @@
+ 	rm -rf install petsc-2.3.2-p3 src
+ 	mkdir install src
+ 
++	#Download from ISSM server
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-2.3.2-p3.tar.gz' 'petsc-2.3.2-p3.tar.gz'
++
+ 	#Untar and move petsc to install directory
+ 	tar -zxvf  petsc-2.3.2-p3.tar.gz
+ 	mv petsc-2.3.2-p3/* install/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-win7.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-win7.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-win7.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install petsc-2.3.2-p3 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-2.3.2-p3.tar.gz' 'petsc-2.3.2-p3.tar.gz'
++
+ #Untar and move petsc to install directory
+ tar -zxvf  petsc-2.3.2-p3.tar.gz
+ mv petsc-2.3.2-p3/* install/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-pleiades.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-pleiades.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-pleiades.sh	(revision 12189)
+@@ -8,6 +8,9 @@
+ 	rm -rf install petsc-3.1-p7 src
+ 	mkdir install src
+ 
++	#Download from ISSM server
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-3.1-p7.tar.gz' 'petsc-3.1-p7.tar.gz'
++
+ 	#Untar and move petsc to install directory
+ 	tar -zxvf  petsc-3.1-p7.tar.gz
+ 	mv petsc-3.1-p7/* install/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-pleiades.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-pleiades.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-pleiades.sh	(revision 12189)
+@@ -8,6 +8,9 @@
+ 	rm -rf install petsc-2.3.2-p3 src
+ 	mkdir install src
+ 
++	#Download from ISSM server
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-2.3.2-p3.tar.gz' 'petsc-2.3.2-p3.tar.gz'
++
+ 	#Untar and move petsc to install directory
+ 	tar -zxvf  petsc-2.3.2-p3.tar.gz
+ 	mv petsc-2.3.2-p3/* install/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh	(revision 12189)
+@@ -8,6 +8,9 @@
+ 	rm -rf install petsc-3.2-p3 src
+ 	mkdir install src
+ 
++	#Download from ISSM server
++	$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-3.2-p3.tar.gz' 'petsc-3.2-p3.tar.gz'
++
+ 	#Untar and move petsc to install directory
+ 	tar -zxvf  petsc-3.2-p3.tar.gz
+ 	mv petsc-3.2-p3/* src/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-mathieu.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-mathieu.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-mathieu.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install petsc-3.1-p7 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-3.1-p7.tar.gz' 'petsc-3.1-p7.tar.gz'
++
+ #Untar and move petsc to install directory
+ tar -zxvf  petsc-3.1-p7.tar.gz
+ mv petsc-3.1-p7/* src/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-linux64-astrid.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-linux64-astrid.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-linux64-astrid.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install petsc-3.1-p7 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-3.1-p7.tar.gz' 'petsc-3.1-p7.tar.gz'
++
+ #Untar and move petsc to install directory
+ tar -zxvf  petsc-3.1-p7.tar.gz
+ mv petsc-3.1-p7/* src/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-linux64-astrid.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-linux64-astrid.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-2.3.2-linux64-astrid.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install petsc-2.3.2-p3 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-2.3.2-p3.tar.gz' 'petsc-2.3.2-p3.tar.gz'
++
+ #Untar and move petsc to install directory
+ tar -zxvf  petsc-2.3.2-p3.tar.gz
+ mv petsc-2.3.2-p3/* install/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/bsdtar/libarchive-3.0.3.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/x-gzip
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/bsdtar/install-win7.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/bsdtar/install-win7.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/bsdtar/install-win7.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install src libarchive-3.0.3
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/libarchive-3.0.3.tar.gz' 'libarchive-3.0.3.tar.gz'
++
+ #Untar 
+ tar -zxvf  libarchive-3.0.3.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/tao/tao-2.0-p3.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/tao/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/tao/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/tao/install.sh	(revision 12189)
+@@ -6,6 +6,9 @@
+ rm -rf install tao-2.0-p3
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/tao-2.0-p3.tar.gz' 'tao-2.0-p3.tar.gz'
++
+ #Untar 
+ tar -zxvf  tao-2.0-p3.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scotch/scotch_5.1.6_esmumps.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scotch/scotch_5.1.6.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scotch/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scotch/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scotch/install.sh	(revision 12189)
+@@ -8,6 +8,9 @@
+ # Create src and install directories
+ mkdir src install 
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/scotch_5.1.6.tar.gz' 'scotch_5.1.6.tar.gz'
++
+ # Untar 
+ tar -xvzf scotch_5.1.6.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pyclips/pyclips-1.0.7.348.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pyclips/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pyclips/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/pyclips/install.sh	(revision 12189)
+@@ -5,6 +5,9 @@
+ rm -rf pyclips-1.0.7.348
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/pyclips-1.0.7.348.tar.gz' 'pyclips-1.0.7.348.tar.gz'
++
+ #Untar 
+ tar -zxvf  pyclips-1.0.7.348.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/readline/readline-6.2.2.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/readline/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/readline/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/readline/install.sh	(revision 12189)
+@@ -5,6 +5,9 @@
+ rm -rf readline-6.2.2
+ mkdir src 
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/readline-6.2.2.tar.gz' 'readline-6.2.2.tar.gz'
++
+ #Untar 
+ tar -zxvf  readline-6.2.2.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/gsl-1.15.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-macosx64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-macosx64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf src install gsl-1.15
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/ADOL-C-2.2.0.tar.gz' 'ADOL-C-2.2.0.tar.gz'
++
+ #Untar 
+ tar -zxvf  gsl-1.15.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf src install gsl-1.15
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/ADOL-C-2.2.0.tar.gz' 'ADOL-C-2.2.0.tar.gz'
++
+ #Untar 
+ tar -zxvf  gsl-1.15.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-android-4.0.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-android-4.0.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-android-4.0.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf src install gsl-1.15
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/gsl-1.15.tar.gz' 'gsl-1.15.tar.gz'
++
+ #Untar 
+ tar -zxvf  gsl-1.15.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/qhull/qhull-2003.1.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/qhull/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/qhull/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/qhull/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf src install qhull-2003.1
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/qhull-2003.1.tar.gz' 'qhull-2003.1.tar.gz'
++
+ #Untar 
+ tar -zxvf  qhull-2003.1.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/boost_1_49_0.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/boost/install.sh	(revision 12189)
+@@ -6,12 +6,13 @@
+ #symlinks in externalpackages/python to what boost is expecting. Ther is NO WAY 
+ #to get the boost library to include python support without doing that. 
+ 
+-
+-
+ #Some cleanup
+ rm -rf install boost_1_49_0 src
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/boost_1_49_0.tar.gz' 'boost_1_49_0.tar.gz'
++
+ #Untar 
+ tar -zxvf  boost_1_49_0.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ncview/ncview-1.93g.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ncview/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ncview/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ncview/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/ncview-1.93g.tar.gz' 'ncview-1.93g.tar.gz'
++
+ #Untar 
+ tar -zxvf  ncview-1.93g.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/vim/vim-7.2.tar.bz2
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/vim/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/vim/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/vim/install.sh	(revision 12189)
+@@ -5,6 +5,9 @@
+ rm -rf vim72
+ mkdir install src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/vim-7.2.tar.bz2' 'vim-7.2.tar.bz2'
++
+ #Untar 
+ bzip2 -d -k vim-7.2.tar.bz2
+ tar -xvf vim-7.2.tar
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ssh/pscp.exe
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/ssh/plink.exe
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/findbugs/findbugs-1.3.9.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/findbugs/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/findbugs/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/findbugs/install.sh	(revision 12189)
+@@ -4,6 +4,8 @@
+ rm -rf install  findbugs-1.3.9
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/findbugs-1.3.9.tar.gz' 'findbugs-1.3.9.tar.gz'
+ tar -zxvf findbugs-1.3.9.tar.gz 
+ 
+ mv findbugs-1.3.9/* install
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/netcdf/netcdf-4.0.1.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/netcdf/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/netcdf/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/netcdf/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install netcdf-4.0.1
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/netcdf-4.0.1.tar.gz' 'netcdf-4.0.1.tar.gz'
++
+ #Untar 
+ tar -zxvf  netcdf-4.0.1.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/triangle.zip
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-win32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-win32.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-win32.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install triangle
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/triangle.zip' 'triangle.zip'
++
+ #Untar 
+ cd install
+ cp ../triangle.zip ./
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-macosx64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-macosx64.sh	(revision 12189)
+@@ -8,6 +8,9 @@
+ rm -rf install triangle
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/triangle.zip' 'triangle.zip'
++
+ #Untar 
+ cd install
+ cp ../triangle.zip ./
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-win7.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-win7.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-win7.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install triangle
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/triangle.zip' 'triangle.zip'
++
+ #Untar 
+ cd install
+ cp ../triangle.zip ./
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-pleiades.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-pleiades.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-pleiades.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install triangle
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/triangle.zip' 'triangle.zip'
++
+ #Untar 
+ cd install
+ cp ../triangle.zip ./
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-linux64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-linux64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install triangle
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/triangle.zip' 'triangle.zip'
++
+ #Untar 
+ cd install
+ cp ../triangle.zip ./
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-altix64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-altix64.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-altix64.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install triangle
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/triangle.zip' 'triangle.zip'
++
+ #Untar 
+ cd install
+ cp ../triangle.zip ./
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-android-4.0.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-android-4.0.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-android-4.0.sh	(revision 12189)
+@@ -3,11 +3,13 @@
+ #use matlab? 
+ matlab=0
+ 
+-
+ #Some cleanup 
+ rm -rf install triangle
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/triangle.zip' 'triangle.zip'
++
+ #Untar 
+ cd install
+ cp ../triangle.zip ./
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-macosx32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-macosx32.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/triangle/install-macosx32.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install triangle
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/triangle.zip' 'triangle.zip'
++
+ #Untar 
+ cd install
+ cp ../triangle.zip ./
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/automake/automake-1.11.3.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/automake/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/automake/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/automake/install.sh	(revision 12189)
+@@ -3,6 +3,9 @@
+ #Some cleanup
+ rm -rf install automake-1.11.3 src
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/automake-1.11.3.tar.gz' 'automake-1.11.3.tar.gz'
++
+ #Create install directories
+ mkdir install
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/tex2im/tex2im-1.8.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/tex2im/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/tex2im/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/tex2im/install.sh	(revision 12189)
+@@ -4,6 +4,9 @@
+ rm -rf install
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/tex2im-1.8.tar.gz' 'tex2im-1.8.tar.gz'
++
+ #Untar 
+ tar -zxvf  tex2im-1.8.tar.gz
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/yams/yams2-osx.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/yams/yams2-win.exe
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/yams/yams2-linux.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/yams/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/yams/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/yams/install.sh	(revision 12189)
+@@ -4,6 +4,11 @@
+ rm -rf install
+ mkdir install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/yams2-linux.gz' 'yams2-linux.gz'
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/yams2-osx.gz' 'yams2-osx.gz'
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/yams2-win.exe' 'yams2-win.exe'
++
+ #loop over the binaries
+ for i in yams*
+ do
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libpng/libpng-1.5.10.tar.gz
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libpng/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libpng/install.sh	(revision 12188)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/libpng/install.sh	(revision 12189)
+@@ -6,6 +6,9 @@
+ rm -rf libpng-1.5.10
+ mkdir src install
+ 
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/libpng-1.5.10.tar.gz' 'libpng-1.5.10.tar.gz'
++
+ #Untar 
+ tar -zxvf  libpng-1.5.10.tar.gz
+ 
Index: /issm/oecreview/Archive/12181-12200/ISSM-12189-12190.diff
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-12189-12190.diff	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-12189-12190.diff	(revision 12325)
@@ -0,0 +1,8 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/Sdk1.png
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/Sdk2.png
+===================================================================
+Cannot display: file marked as a binary type.
+svn:mime-type = application/octet-stream
Index: /issm/oecreview/Archive/12181-12200/ISSM-12190-12191.diff
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-12190-12191.diff	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-12190-12191.diff	(revision 12325)
@@ -0,0 +1,136 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/BC/SetIceShelfBC.py
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/BC/SetIceShelfBC.py	(revision 12190)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/BC/SetIceShelfBC.py	(revision 12191)
+@@ -1,4 +1,5 @@
+-def SetIceShelfBC(md,icefrontfile='')
++from numpy import *
++def SetIceShelfBC(md,icefrontfile=''):
+ 	#SETICESHELFBC - Create the boundary conditions for diagnostic and thermal models for a  Ice Shelf with Ice Front
+ 	#
+ 	#   Neumann BC are used on the ice front (an ANRGUS contour around the ice front
+@@ -21,73 +22,70 @@
+ 		if not os.path.isfile(icefrontfile):
+ 			print 'SetIceShelfBC error message: ice front file '+icefrontfile+ ' not found'
+ 			return []
+-		nodeinsideicefront=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,icefrontfile,'node',2);
+-		nodeonicefront=double(md.mesh.vertexonboundary & nodeinsideicefront);
++		nodeinsideicefront=ContourToMesh(md.mesh.elements,md.mesh.x,md.mesh.y,icefrontfile,'node',2)
++		nodeonicefront=double(md.mesh.vertexonboundary.astype(bool) and nodeinsideicefront.astype(bool))
+ 	
+-	pos=find(md.mesh.vertexonboundary & ~nodeonicefront);
+-	md.diagnostic.spcvx=NaN*ones(md.mesh.numberofvertices,1);
+-	md.diagnostic.spcvy=NaN*ones(md.mesh.numberofvertices,1);
+-	md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1);
+-	md.diagnostic.spcvx(pos)=0;
+-	md.diagnostic.spcvy(pos)=0;
+-	md.diagnostic.spcvz(pos)=0;
+-	md.diagnostic.referential=NaN*ones(md.mesh.numberofvertices,6);
++	pos=argwhere(logical_and(md.mesh.vertexonboundary.astype(bool),~nodeonicefront.astype(bool)))
++	md.diagnostic.spcvx=NaN*ones(md.mesh.numberofvertices);
++	md.diagnostic.spcvy=NaN*ones(md.mesh.numberofvertices);
++	md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices);
++	md.diagnostic.spcvx[pos]=0;
++	md.diagnostic.spcvy[pos]=0;
++	md.diagnostic.spcvz[pos]=0;
++	md.diagnostic.referential=float('NaN')*ones((md.mesh.numberofvertices,6),float);
+ 
+ 	#Dirichlet Values
+-	if (length(md.inversion.vx_obs)==md.mesh.numberofvertices & length(md.inversion.vy_obs)==md.mesh.numberofvertices)
+-		disp('      boundary conditions for diagnostic model: spc set as observed velocities');
+-		md.diagnostic.spcvx(pos)=md.inversion.vx_obs(pos);
+-		md.diagnostic.spcvy(pos)=md.inversion.vy_obs(pos);
+-	else
+-		disp('      boundary conditions for diagnostic model: spc set as zero');
+-	end
++	if ~isnan(md.inversion.vx_obs) and ~isnan(md.inversion.vy_obs):
++		if (len(md.inversion.vx_obs)==md.mesh.numberofvertices) and (len(md.inversion.vy_obs)==md.mesh.numberofvertices):
++			print '      boundary conditions for diagnostic model: spc set as observed velocities'
++			md.diagnostic.spcvx[pos]=md.inversion.vx_obs[pos]
++			md.diagnostic.spcvy[pos]=md.inversion.vy_obs[pos]
++	else:
++		print '      boundary conditions for diagnostic model: spc set as zero'
+ 
+ 	#segment on Ice Front
+ 	#segment on Neumann (Ice Front)
+-	pos=find(nodeonicefront(md.mesh.segments(:,1)) | nodeonicefront(md.mesh.segments(:,2)));
+-	if (md.mesh.dimension==2)
+-		pressureload=md.mesh.segments(pos,:);
+-	elseif md.mesh.dimension==3
+-		pressureload_layer1=[md.mesh.segments(pos,1:2)  md.mesh.segments(pos,2)+md.mesh.numberofvertices2d  md.mesh.segments(pos,1)+md.mesh.numberofvertices2d  md.mesh.segments(pos,3)];
++	segs1=md.mesh.segments[:,0].astype(int)-1
++	segs2=md.mesh.segments[:,1].astype(int)-1
++
++	pos=argwhere(logical_and(nodeonicefront[segs1].astype(bool),nodeonicefront[segs2].astype(bool)))
++	if (md.mesh.dimension==2):
++		pressureload=md.mesh.segments[pos,:];
++	elif md.mesh.dimension==3:
++		pressureload_layer=[md.mesh.segments[pos,0:2],md.mesh.segments[pos,1]+md.mesh.numberofvertices2d,md.mesh.segments[pos,0]+md.mesh.numberofvertices2d, md.mesh.segments[pos,2]];
+ 		pressureload=[];
+-		for i=1:md.mesh.numberoflayers-1,
+-			pressureload=[pressureload ;pressureload_layer1(:,1:4)+(i-1)*md.mesh.numberofvertices2d pressureload_layer1(:,5)+(i-1)*md.mesh.numberofelements2d ];
+-		end
+-	end
++		for i in range(1,md.mesh.numberoflayers-1):
++			pressureload=[pressureload ,pressureload_layer1[:,1:4]+(i-1)*md.mesh.numberofvertices2d, pressureload_layer1[:,5]+(i-1)*md.mesh.numberofelements2d ];
+ 
+ 	#Add water or air enum depending on the element
+-	pressureload=[pressureload 1*md.mask.elementonfloatingice(pressureload(:,end))];
++	pressureload=[pressureload, 1*md.mask.elementonfloatingice(pressureload[:,end])];
+ 
+ 	#plug onto model
+ 	md.diagnostic.icefront=pressureload;
+ 
+ 	#Create zeros basalforcings and surfaceforcings
+-	if isnan(md.surfaceforcings.precipitation),
+-		md.surfaceforcings.precipitation=zeros(md.mesh.numberofvertices,1);
+-		disp('      no surfaceforcings.precipitation specified: values set as zero');
+-	end
+-	if isnan(md.surfaceforcings.mass_balance),
+-		md.surfaceforcings.mass_balance=zeros(md.mesh.numberofvertices,1);
+-		disp('      no surfaceforcings.mass_balance specified: values set as zero');
+-	end
+-	if isnan(md.basalforcings.melting_rate),
+-		md.basalforcings.melting_rate=zeros(md.mesh.numberofvertices,1);
+-		disp('      no basalforcings.melting_rate specified: values set as zero');
+-	end
+-	if isnan(md.balancethickness.thickening_rate),
+-		md.balancethickness.thickening_rate=zeros(md.mesh.numberofvertices,1);
+-		disp('      no balancethickness.thickening_rate specified: values set as zero');
+-	end
++	if isnan(md.surfaceforcings.precipitation):
++		md.surfaceforcings.precipitation=zeros(md.mesh.numberofvertices);
++		print '      no surfaceforcings.precipitation specified: values set as zero'
++	if isnan(md.surfaceforcings.mass_balance):
++		md.surfaceforcings.mass_balance=zeros(md.mesh.numberofvertices);
++		print '      no surfaceforcings.mass_balance specified: values set as zero'
++	if isnan(md.basalforcings.melting_rate):
++		md.basalforcings.melting_rate=zeros(md.mesh.numberofvertices)
++		print '      no basalforcings.melting_rate specified: values set as zero'
++	if isnan(md.balancethickness.thickening_rate):
++		md.balancethickness.thickening_rate=zeros(md.mesh.numberofvertices);
++		print '      no balancethickness.thickening_rate specified: values set as zero'
+ 
+-	md.prognostic.spcthickness=NaN*ones(md.mesh.numberofvertices,1);
+-	md.balancethickness.spcthickness=NaN*ones(md.mesh.numberofvertices,1);
++	md.prognostic.spcthickness=NaN*ones(md.mesh.numberofvertices);
++	md.balancethickness.spcthickness=NaN*ones(md.mesh.numberofvertices);
+ 
+-	if (length(md.initialization.temperature)==md.mesh.numberofvertices),
+-		md.thermal.spctemperature=NaN*ones(md.mesh.numberofvertices,1);
+-		pos=find(md.mesh.vertexonsurface); md.thermal.spctemperature(pos)=md.initialization.temperature(pos); #impose observed temperature on surface
+-		if (length(md.basalforcings.geothermalflux)~=md.mesh.numberofvertices),
+-			md.basalforcings.geothermalflux=zeros(md.mesh.numberofvertices,1);
+-		end
+-	else
+-		disp('      no thermal boundary conditions created: no observed temperature found');
+-	end
++	if (len(md.initialization.temperature)==md.mesh.numberofvertices):
++		md.thermal.spctemperature=NaN*ones(md.mesh.numberofvertices);
++		pos=argwhere(md.mesh.vertexonsurface); md.thermal.spctemperature[pos]=md.initialization.temperature[pos]; #impose observed temperature on surface
++		if (len(md.basalforcings.geothermalflux) !=md.mesh.numberofvertices):
++			md.basalforcings.geothermalflux=zeros(md.mesh.numberofvertices);
++	else:
++		print '      no thermal boundary conditions created: no observed temperature found'
++
++	return md
Index: /issm/oecreview/Archive/12181-12200/ISSM-12191-12192.diff
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-12191-12192.diff	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-12191-12192.diff	(revision 12325)
@@ -0,0 +1,16 @@
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/matlab
+___________________________________________________________________
+Modified: svn:ignore
+   - Makefile
+
+   + *.obj
+Makefile
+*.lib
+*.mexw64
+*.manifest
+*.exp
+.deps
+Makefile.in
+
+
Index: /issm/oecreview/Archive/12181-12200/ISSM-12192-12193.diff
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-12192-12193.diff	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-12192-12193.diff	(revision 12325)
@@ -0,0 +1,26 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/northarrow.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/northarrow.m	(revision 12192)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/northarrow.m	(revision 12193)
+@@ -15,7 +15,7 @@
+ elseif length(structure)==5
+ 	structure(6)=16; %default fontsize
+ elseif length(structure)>6
+-	error('plotmodel error message: to many input arguments for northarrow: [x0 y0 length [ratio [width]]]');
++	error('plotmodel error message: to many input arguments for northarrow: [x0 y0 length [ratio width fontsize]]');
+ end
+ 
+ %retrieve north arrow parameters
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plotdoc.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plotdoc.m	(revision 12192)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/plotdoc.m	(revision 12193)
+@@ -129,7 +129,7 @@
+ disp('       ''latlonnumbering'': ''on'' or {latgap longap colornumber latangle lonangle} where latgap and longap are pixel gaps for the numbers,'); 
+ disp('       ''latlonclick'': ''on'' to click on latlon ticks positions');
+ disp('                   colornumber is a [r g b] array and latangle and lonangle are angles to flip the numbers');
+-disp('       ''northarrow'': add an arrow pointing north, ''on'' for default value or [x0 y0 length [ratio [width]]] where (x0,y0) are the coordinates of the base, and ratio=headlength/length');
++disp('       ''northarrow'': add an arrow pointing north, ''on'' for default value or [x0 y0 length [ratio width fontsize]] where (x0,y0) are the coordinates of the base, ratio=headlength/length');
+ disp('       ''offset'': mesh offset used by ''rifts'', default is 500');
+ disp('       ''scaleruler'': add a scale ruler, ''on'' for default value or [x0 y0 length width numberofticks] where (x0,y0) are the coordinates of the lower left corner');
+ disp('       ''showregion'': show domain in Antarctica on an inset, use ''insetpos'' properties');
Index: /issm/oecreview/Archive/12181-12200/ISSM-12195-12196.diff
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-12195-12196.diff	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-12195-12196.diff	(revision 12325)
@@ -0,0 +1,216 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/nightlyrun.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/nightlyrun.sh	(revision 12195)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/cron/nightlyrun.sh	(revision 12196)
+@@ -64,7 +64,6 @@
+ #}}}
+ #Export ISSM_* variables{{{1
+ export ISSM_DIR
+-export ISSM_TIER
+ export ISSM_ARCH
+ #}}}
+ #Initialize variables {{{1
+@@ -89,7 +88,7 @@
+ then
+ 
+ 	#only update ISSM
+-	cd $ISSM_TIER
++	cd $ISSM_DIR
+ 	svn update
+ 
+ elif [ "$ISSM_INSTALLATION" == "none" ]
+@@ -108,20 +107,20 @@
+ #}}}
+ #Create cluster's settings{{{1
+ #create simpler  cluster.rc file, with only the cluster we are interested in.
+-cd $ISSM_TIER/test/NightlyRun/
++cd $ISSM_DIR/test/NightlyRun/
+ if [ "$MACHINE" = "win7" ]; then
+ 	cat << END > $HOST_NAME"_settings.m"
+ cluster.login='$USER';
+-cluster.codepath='`cygpath -m $ISSM_TIER/bin`';
++cluster.codepath='`cygpath -m $ISSM_DIR/bin`';
+ cluster.executionpath='`cygpath -m $EXECUTION_PATH`';
+ END
+ else
+ 	cat << END > $HOST_NAME"_settings.m"
+ cluster.login='$USER';
+-cluster.codepath='$ISSM_TIER/bin';
++cluster.codepath='$ISSM_DIR/bin';
+ cluster.executionpath='$EXECUTION_PATH';
+ END
+-   cat << END > $ISSM_TIER/externalpackages/matlab/install.sh
++   cat << END > $ISSM_DIR/externalpackages/matlab/install.sh
+ #!/bin/bash
+ rm -rf install
+ ln -s $MATLAB_PATH install
+@@ -130,14 +129,14 @@
+ fi
+ #}}}
+ #Source environment variables with new matlab path {{{1
+-cd $ISSM_TIER/etc
++cd $ISSM_DIR/etc
+ source environment.sh MATLAB_DIR=$MATLAB_PATH
+ #}}}
+ #install/copy/none external packages    (ISSM_EXTERNALPACKAGES){{{1
+ if [ "$ISSM_EXTERNALPACKAGES" == "install" ]
+ then
+ 	
+-	cd $ISSM_TIER/externalpackages
++	cd $ISSM_DIR/externalpackages
+ 	#number of packages: 
+ 	numpackages=`echo $EXTERNALPACKAGES | wc -w`
+ 
+@@ -155,7 +154,7 @@
+ then
+ 
+ 	#erase externapackages, and link with externalpackages_dir
+-	cd $ISSM_TIER
++	cd $ISSM_DIR
+ 	rm -rf externalpackages
+ 	cp -Rf $EXTERNALPACKAGESDIR ./
+ 
+@@ -163,7 +162,7 @@
+ then
+ 
+ 	#erase externapackages, and link with externalpackages_dir
+-	cd $ISSM_TIER
++	cd $ISSM_DIR
+ 	rm -rf externalpackages
+ 	ln -s  $EXTERNALPACKAGESDIR  .
+ 
+@@ -185,7 +184,7 @@
+ if [ "$ISSM_COMPILATION" == "yes" ]
+ then
+ 
+-	cd $ISSM_TIER
++	cd $ISSM_DIR
+ 	make clean
+ 	make distclean
+ 	./scripts/automakererun.sh
+@@ -213,17 +212,17 @@
+ 
+ #Prepare run
+ #create softlink to startup {{{1
+-cd $ISSM_TIER/test/NightlyRun/
++cd $ISSM_DIR/test/NightlyRun/
+ rm startup.m #in case it alreade exists
+-cp $ISSM_TIER/startup.m .
++cp $ISSM_DIR/startup.m .
+ #}}}
+ #Create nightlylog directory and info.log {{{1
+ #put installation elapsed time in info.log
+ INSTALL_TIME=$(timer)
+ ELAPSED_INSTALL=$(timer $START_TIME)
+-rm -rf $ISSM_TIER/nightlylog
+-mkdir  $ISSM_TIER/nightlylog
+-cat << END > $ISSM_TIER/nightlylog/info.log
++rm -rf $ISSM_DIR/nightlylog
++mkdir  $ISSM_DIR/nightlylog
++cat << END > $ISSM_DIR/nightlylog/info.log
+ today:     $(echo $TODAY)
+ user:      $(echo $USER)
+ host:      $(echo $HOST_NAME)
+@@ -244,16 +243,16 @@
+ #Run tests
+ #on Matlab and windows machines, we'll need a windows style path:  {{{
+ if [ "$MACHINE" = "win7" ]; then
+-	MATLAB_TIER=`cygpath -m $ISSM_TIER`
++	MATLAB_TIER=`cygpath -m $ISSM_DIR`
+ else 
+-	MATLAB_TIER=$ISSM_TIER
++	MATLAB_TIER=$ISSM_DIR
+ fi
+ #}}}
+ #Launch all tests on different cpus {{{1
+ for (( i=1;i<=$NUMCPUS_RUN;i++ ))
+ do
+ 	#Launch matlab and the nightly run script
+-	cat > $ISSM_TIER/nightlylog/matlab_run$i.m << EOF
++	cat > $ISSM_DIR/nightlylog/matlab_run$i.m << EOF
+ 	warning off %necessary to avoid a info.log of several Go for parallel runs
+ 	try,
+ 	cd $MATLAB_TIER/test/NightlyRun
+@@ -262,7 +261,6 @@
+ 	then
+ 		echo "runme('output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);"
+ 	else
+-		#echo "runme('id',[101 102]);" 
+ 		echo "runme($NROPTIONS,'output','nightly','rank',$i,'numprocs',$NUMCPUS_RUN);"
+ 	fi
+ 	)
+@@ -270,7 +268,7 @@
+ 		%An error occured, get report and exit
+ 		message=getReport(me)
+ 		directory=strsplit(pwd,'/');
+-		fid=fopen([ISSM_TIER '/nightlylog/matlaberror.log'], 'at');
++		fid=fopen([issmdir '/nightlylog/matlaberror.log'], 'at');
+ 		fprintf(fid,'\nMatlab error occured in: %s\n\n',directory{end});
+ 		fprintf(fid,'%s',message);
+ 		fclose(fid);
+@@ -280,7 +278,7 @@
+ EOF
+ 
+ 	#Start run from nightlylog directory
+-	cd $ISSM_TIER/nightlylog/
++	cd $ISSM_DIR/nightlylog/
+ 
+ 	MATLABBIN=$MATLAB_PATH/bin/matlab
+ 	#Start test
+@@ -297,7 +295,7 @@
+ 
+ #}}}
+ #concatenate all reports {{{1
+-cd $ISSM_TIER/nightlylog/
++cd $ISSM_DIR/nightlylog/
+ cp matlab_log1.log  matlab_log.log
+ for (( i=2;i<=$NUMCPUS_RUN;i++ ))
+ do
+@@ -314,7 +312,7 @@
+ fi
+ ELAPSED_RUN=$(timer $INSTALL_TIME)
+ ELAPSED_TOTAL=$(timer $START_TIME)
+-cat << END >>  $ISSM_TIER/nightlylog/info.log
++cat << END >>  $ISSM_DIR/nightlylog/info.log
+ elapsed_run:   $(echo $ELAPSED_RUN)
+ elapsed_total: $(echo $ELAPSED_TOTAL)
+ matlab_crash:  $(echo $MATLABCRASH)
+@@ -323,24 +321,24 @@
+ 
+ #Send Report
+ #Build html report {{{1
+-cd $ISSM_TIER/nightlylog/
++cd $ISSM_DIR/nightlylog/
+ sh ../scripts/report.sh
+-echo "html report located in $ISSM_TIER/nightlylog/report.html"
++echo "html report located in $ISSM_DIR/nightlylog/report.html"
+ #}}}
+ #send mail if requested                  (SKIPMAIL) {{{1
+ if [ "$SKIPMAIL" != "yes" ]
+ then
+ 	echo "sending report..."
+-	source $ISSM_TIER/cron/mailinglist
++	source $ISSM_DIR/cron/mailinglist
+ 	for i in `echo $MAILINGLIST`; do
+ 
+ 		if [ "$MACHINE" = "win7" ]
+ 		then
+-			email -html -s "Nightly runs on $HOST_NAME (version: $ISSM_RELEASE)" -n "ISSM Nightly run" -f echo $EMAIL_ADRESS $i < $ISSM_TIER/nightlylog/report.html
++			email -html -s "Nightly runs on $HOST_NAME (version: $ISSM_RELEASE)" -n "ISSM Nightly run" -f echo $EMAIL_ADRESS $i < $ISSM_DIR/nightlylog/report.html
+ 		else 
+ 			if [ "$MACHINE" = "astrid" ]
+ 			then
+-cat - $ISSM_TIER/nightlylog/report.html <<HERE | /usr/lib/sendmail  -oi -t
++cat - $ISSM_DIR/nightlylog/report.html <<HERE | /usr/lib/sendmail  -oi -t
+ From: "ISSM Nightly run" <$EMAIL_ADRESS>
+ To: $i
+ Subject: Nightly runs on $HOST_NAME (version: $ISSM_RELEASE)
+@@ -348,7 +346,7 @@
+ Content-Type: text/html
+ HERE
+ 		else
+-cat - $ISSM_TIER/nightlylog/report.html <<HERE | /usr/sbin/sendmail  -oi -t
++cat - $ISSM_DIR/nightlylog/report.html <<HERE | /usr/sbin/sendmail  -oi -t
+ From: "ISSM Nightly run" <$EMAIL_ADRESS>
+ To: $i
+ Subject: Nightly runs on $HOST_NAME (version: $ISSM_RELEASE)
Index: /issm/oecreview/Archive/12181-12200/ISSM-12199-12200.diff
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-12199-12200.diff	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-12199-12200.diff	(revision 12325)
@@ -0,0 +1,573 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12199)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12200)
+@@ -10,20 +10,23 @@
+ #include "../modules.h"
+ #include <gsl/gsl_linalg.h>
+ 
++#include "../../objects/Kriging/GaussianVariogram.h"
+ int Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp,Options* options){
+ 
+ 	/*output*/
+ 	double *predictions = NULL;
+ 
+ 	/*Intermediaries*/
+-	int     i,j;
+-	double  numerator,denominator,ratio;
+-	double *Gamma     = NULL;
+-	double *GinvG0    = NULL;
+-	double *Ginv1     = NULL;
+-	double *GinvZ     = NULL;
+-	double *gamma0    = NULL;
+-	double *ones      = NULL;
++	int        i,j;
++	double     numerator,denominator,ratio;
++	char      *model     = NULL;
++	double    *Gamma     = NULL;
++	double    *GinvG0    = NULL;
++	double    *Ginv1     = NULL;
++	double    *GinvZ     = NULL;
++	double    *gamma0    = NULL;
++	double    *ones      = NULL;
++	Variogram *variogram = NULL;
+ 
+ 	/*Memory allocation*/
+ 	predictions =(double*)xmalloc(n_interp*sizeof(double));
+@@ -31,10 +34,21 @@
+ 	gamma0      =(double*)xmalloc(n_obs*sizeof(double));
+ 	ones        =(double*)xmalloc(n_obs*sizeof(double));
+ 
++	/*Create Semi-Variogram object*/
++	if(options->GetOption("model")){
++		options->Get(&model,"model");
++		if     (strcmp(model,"gaussian")==0)    variogram = new GaussianVariogram(options);
++		else if(strcmp(model,"exponential")==0) variogram = new ExponentialVariogram(options);
++		else if(strcmp(model,"spherical")==0)   variogram = new SphericalVariogram(options);
++		else _error_("only gaussian semivariogram models supported yet");
++	}
++	else variogram = new GaussianVariogram(options);
++	variogram->Echo();
++
+ 	/*First: Create semivariogram matrix for observations*/
+ 	for(i=0;i<n_obs;i++){
+ 		for(j=0;j<=i;j++){
+-			SemiVariogram(&Gamma[i*n_obs+j],x[i],y[i],x[j],y[j]);
++			Gamma[i*n_obs+j] = variogram->SemiVariogram(x[i]-x[j],y[i]-y[j]);
+ 			Gamma[j*n_obs+i] = Gamma[i*n_obs+j];
+ 		}
+ 	}
+@@ -46,7 +60,7 @@
+ 		if(idx%100==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)idx/n_interp*100);
+ 
+ 		/*Get semivariogram vector associated to this location*/
+-		for(i=0;i<n_obs;i++) SemiVariogram(&gamma0[i],x[i],y[i],x_interp[idx],y_interp[idx]);
++		for(i=0;i<n_obs;i++) gamma0[i] = variogram->SemiVariogram(x[i]-x_interp[idx],y[i]-y_interp[idx]);
+ 
+ 		/*Solve the three linear systems*/
+ 		GslSolve(&GinvG0,Gamma,gamma0,n_obs);       // Gamma^-1 gamma0
+@@ -70,39 +84,14 @@
+ 	printf("\b\b\b\b\b\b\b\b%5.2lf %%\n",100.0);
+ 
+ 	/*clean-up and Assign output pointer*/
++	delete variogram;
+ 	xfree((void**)&Gamma);
+ 	xfree((void**)&gamma0);
+ 	xfree((void**)&ones);
++	xfree((void**)&model);
+ 	*ppredictions=predictions;
+ }
+ 
+-void SemiVariogram(double* gamma,double x1,double y1,double x2,double y2){
+-
+-	/*Intermediaries*/
+-	double a,c0,c1;
+-
+-	/*Calculate distance*/
+-	double r=sqrt(pow(x1-x2,2.)+pow(y1-y2,2.));
+-
+-	/*Switch between variogram models*/
+-	switch(2){
+-		case 1:/*Exponential*/
+-			c0=0.2;
+-			c1=0.8;
+-			a =1;
+-			*gamma = c0 + c1*(1-exp(-r/a));
+-			return;
+-		case 2:/*Gaussian*/
+-			c0=0.2;
+-			c1=0.8;
+-			a =1;
+-			*gamma = c0 + c1*(1-exp(-pow(r,2.)/pow(a,2.)));
+-			return;
+-		default:
+-			_error_("Not implemented yet");
+-	}
+-}
+-
+ void GslSolve(double** pX,double* A,double* B,int n){
+ #ifdef _HAVE_GSL_
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12199)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12200)
+@@ -9,7 +9,6 @@
+ #include "../../toolkits/toolkits.h"
+ 
+ int  Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp,Options* options);
+-void SemiVariogram(double* gamma,double x1,double y1,double x2,double y2);
+ void GslSolve(double** pX,double* A,double* B,int n);
+ 
+ #endif /* _KRIGINGX_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12199)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12200)
+@@ -608,6 +608,18 @@
+ 				./modules/BamgTriangulatex/BamgTriangulatex.cpp\
+ 				./modules/BamgTriangulatex/BamgTriangulatex.h
+ #}}}
++#Kriging sources  {{{1
++kriging_sources = ./objects/Kriging/Variogram.h \
++					 ./objects/Kriging/GaussianVariogram.h\
++					 ./objects/Kriging/GaussianVariogram.cpp\
++					 ./objects/Kriging/ExponentialVariogram.h\
++					 ./objects/Kriging/ExponentialVariogram.cpp\
++					 ./objects/Kriging/SphericalVariogram.h\
++					 ./objects/Kriging/SphericalVariogram.cpp\
++					 ./modules/Krigingx/Krigingx.cpp\
++					 ./modules/Krigingx/Krigingx.h
++
++#}}}
+ #Kml sources  {{{1
+ kml_sources = ./modules/Exp2Kmlx/Exp2Kmlx.h\
+ 			     ./modules/Exp2Kmlx/Exp2Kmlx.cpp\
+@@ -819,8 +831,6 @@
+ 			./modules/InterpFromMeshToGridx/InterpFromMeshToGridx.h\
+ 			./modules/HoleFillerx/HoleFillerx.cpp\
+ 			./modules/HoleFillerx/HoleFillerx.h\
+-			./modules/Krigingx/Krigingx.cpp\
+-			./modules/Krigingx/Krigingx.h\
+ 			./modules/AverageFilterx/AverageFilterx.cpp\
+ 			./modules/AverageFilterx/AverageFilterx.h\
+ 			./modules/MeshProfileIntersectionx/MeshProfileIntersectionx.cpp\
+@@ -945,6 +955,7 @@
+ if MODULES
+ libISSMModules_a_SOURCES = $(module_sources)
+ libISSMModules_a_SOURCES += $(bamg_sources)
++libISSMModules_a_SOURCES += $(kriging_sources)
+ libISSMModules_a_SOURCES += $(kml_sources)
+ libISSMModules_a_CXXFLAGS = $(ALLCXXFLAGS)
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/objects.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/objects.h	(revision 12199)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/objects.h	(revision 12200)
+@@ -172,4 +172,10 @@
+ #include "./Bamg/QuadTree.h"
+ #include "./Bamg/SetOfE4.h"
+ 
++/*Kriging*/
++#include "./Kriging/Variogram.h"
++#include "./Kriging/GaussianVariogram.h"
++#include "./Kriging/ExponentialVariogram.h"
++#include "./Kriging/SphericalVariogram.h"
++
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp	(revision 12200)
+@@ -0,0 +1,74 @@
++/*!\file ExponentialVariogram.c
++ * \brief: implementation of the ExponentialVariogram object
++ */
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include <stdio.h>
++#include <string.h>
++#include "../objects.h"
++#include "../../EnumDefinitions/EnumDefinitions.h"
++#include "../../shared/shared.h"
++#include "../../include/include.h"
++
++/*ExponentialVariogram constructors and destructor*/
++/*FUNCTION ExponentialVariogram::ExponentialVariogram(){{{1*/
++ExponentialVariogram::ExponentialVariogram(){
++	this->nugget = 0.2;
++	this->sill   = 1;
++	this->range  = SQRT3;
++	return;
++}
++/*}}}*/
++/*FUNCTION ExponentialVariogram::ExponentialVariogram(Options* options){{{1*/
++ExponentialVariogram::ExponentialVariogram(Options* options){
++
++	/*Defaults*/
++	this->nugget = 0.2;
++	this->sill   = 1;
++	this->range  = SQRT3;
++
++	/*Overwrite from options*/
++	if(options->GetOption("nugget")) options->Get(&this->nugget,"nugget");
++	if(options->GetOption("sill"))   options->Get(&this->sill,"sill");
++	if(options->GetOption("range"))  options->Get(&this->range,"range");
++
++	/*Checks*/
++	if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
++}
++/*}}}*/
++/*FUNCTION ExponentialVariogram::~ExponentialVariogram(){{{1*/
++ExponentialVariogram::~ExponentialVariogram(){
++	return;
++}
++/*}}}*/
++
++/*Object virtual functions definitions:*/
++/*FUNCTION ExponentialVariogram::Echo {{{1*/
++void ExponentialVariogram::Echo(void){
++	printf("ExponentialVariogram\n");
++	printf("   nugget: %g\n",this->nugget);
++	printf("   sill  : %g\n",this->sill);
++	printf("   range : %g\n",this->range);
++}
++/*}}}*/
++
++/*Variogram function*/
++/*FUNCTION ExponentialVariogram::SemiVariogram{{{1*/
++double ExponentialVariogram::SemiVariogram(double deltax,double deltay){
++	/*http://en.wikipedia.org/wiki/Variogram*/
++	double h,a,gamma;
++
++	/*Calculate length*/
++	h=sqrt(pow(deltax,2.)+pow(deltay,2.));
++
++	/*return semi-variogram*/
++	a     = 1./3.;
++	gamma = (sill-nugget)*(1-exp(-h/(a*range))) + nugget;
++	return gamma;
++}
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12200)
+@@ -0,0 +1,74 @@
++/*!\file GaussianVariogram.c
++ * \brief: implementation of the GaussianVariogram object
++ */
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include <stdio.h>
++#include <string.h>
++#include "../objects.h"
++#include "../../EnumDefinitions/EnumDefinitions.h"
++#include "../../shared/shared.h"
++#include "../../include/include.h"
++
++/*GaussianVariogram constructors and destructor*/
++/*FUNCTION GaussianVariogram::GaussianVariogram(){{{1*/
++GaussianVariogram::GaussianVariogram(){
++	this->nugget = 0.2;
++	this->sill   = 1;
++	this->range  = SQRT3;
++	return;
++}
++/*}}}*/
++/*FUNCTION GaussianVariogram::GaussianVariogram(Options* options){{{1*/
++GaussianVariogram::GaussianVariogram(Options* options){
++
++	/*Defaults*/
++	this->nugget = 0.2;
++	this->sill   = 1;
++	this->range  = SQRT3;
++
++	/*Overwrite from options*/
++	if(options->GetOption("nugget")) options->Get(&this->nugget,"nugget");
++	if(options->GetOption("sill"))   options->Get(&this->sill,"sill");
++	if(options->GetOption("range"))  options->Get(&this->range,"range");
++
++	/*Checks*/
++	if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
++}
++/*}}}*/
++/*FUNCTION GaussianVariogram::~GaussianVariogram(){{{1*/
++GaussianVariogram::~GaussianVariogram(){
++	return;
++}
++/*}}}*/
++
++/*Object virtual functions definitions:*/
++/*FUNCTION GaussianVariogram::Echo {{{1*/
++void GaussianVariogram::Echo(void){
++	printf("GaussianVariogram\n");
++	printf("   nugget: %g\n",this->nugget);
++	printf("   sill  : %g\n",this->sill);
++	printf("   range : %g\n",this->range);
++}
++/*}}}*/
++
++/*Variogram function*/
++/*FUNCTION GaussianVariogram::SemiVariogram{{{1*/
++double GaussianVariogram::SemiVariogram(double deltax,double deltay){
++	/*http://en.wikipedia.org/wiki/Variogram*/
++	double h2,a,gamma;
++
++	/*Calculate length square*/
++	h2=pow(deltax,2.)+pow(deltay,2.);
++
++	/*return semi-variogram*/
++	a     = 1./3.;
++	gamma = (sill-nugget)*(1-exp(-h2/(a*pow(range,2.)))) + nugget;
++	return gamma;
++}
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp	(revision 12200)
+@@ -0,0 +1,77 @@
++/*!\file SphericalVariogram.c
++ * \brief: implementation of the SphericalVariogram object
++ */
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include <stdio.h>
++#include <string.h>
++#include "../objects.h"
++#include "../../EnumDefinitions/EnumDefinitions.h"
++#include "../../shared/shared.h"
++#include "../../include/include.h"
++
++/*SphericalVariogram constructors and destructor*/
++/*FUNCTION SphericalVariogram::SphericalVariogram(){{{1*/
++SphericalVariogram::SphericalVariogram(){
++	this->nugget = 0.2;
++	this->sill   = 1;
++	this->range  = SQRT3;
++	return;
++}
++/*}}}*/
++/*FUNCTION SphericalVariogram::SphericalVariogram(Options* options){{{1*/
++SphericalVariogram::SphericalVariogram(Options* options){
++
++	/*Defaults*/
++	this->nugget = 0.2;
++	this->sill   = 1;
++	this->range  = SQRT3;
++
++	/*Overwrite from options*/
++	if(options->GetOption("nugget")) options->Get(&this->nugget,"nugget");
++	if(options->GetOption("sill"))   options->Get(&this->sill,"sill");
++	if(options->GetOption("range"))  options->Get(&this->range,"range");
++
++	/*Checks*/
++	if(nugget==sill) _error_("nugget and sill cannot be equal (constant semivariogram not allowed)");
++}
++/*}}}*/
++/*FUNCTION SphericalVariogram::~SphericalVariogram(){{{1*/
++SphericalVariogram::~SphericalVariogram(){
++	return;
++}
++/*}}}*/
++
++/*Object virtual functions definitions:*/
++/*FUNCTION SphericalVariogram::Echo {{{1*/
++void SphericalVariogram::Echo(void){
++	printf("SphericalVariogram\n");
++	printf("   nugget: %g\n",this->nugget);
++	printf("   sill  : %g\n",this->sill);
++	printf("   range : %g\n",this->range);
++}
++/*}}}*/
++
++/*Variogram function*/
++/*FUNCTION SphericalVariogram::SemiVariogram{{{1*/
++double SphericalVariogram::SemiVariogram(double deltax,double deltay){
++	/*http://en.wikipedia.org/wiki/Variogram*/
++	double h,gamma;
++
++	/*Calculate length square*/
++	h=sqrt(pow(deltax,2.)+pow(deltay,2.));
++
++	/*return semi-variogram*/
++	if(h<=range)
++	 gamma = (sill-nugget)*( (3*h)/(2*range) - pow(h,3.)/(2*pow(range,3.)) ) + nugget;
++	else
++	 gamma = sill;
++
++	return gamma;
++}
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.h	(revision 12200)
+@@ -0,0 +1,34 @@
++/*! \file ExponentialVariogram.h 
++ *  \brief: header file for triavertexinput object
++ */
++
++#ifndef _EXPONENTIALVARIOGRAM_H_
++#define _EXPONENTIALVARIOGRAM_H_
++
++/*Headers:*/
++#include "./Variogram.h"
++
++class ExponentialVariogram: public Variogram{
++
++	public:
++		double nugget; //The height of the jump of the semivariogram at the discontinuity at the origin
++		double sill;   //Limit of the variogram tending to infinity lag distances
++		double range;  //The distance in which the difference of the variogram from the sill becomes negligible
++
++		/*ExponentialVariogram constructors, destructors*/
++		ExponentialVariogram();
++		ExponentialVariogram(Options* options);
++		~ExponentialVariogram();
++
++		/*Object virtual functions definitions*/
++		void  Echo();
++		void  DeepEcho(){_error_("Not implemented yet");};
++		int   Id(){_error_("Not implemented yet");}; 
++		int   MyRank(){_error_("Not implemented yet");};
++		int   ObjectEnum(){_error_("Not implemented yet");};
++		Object* copy(){_error_("Not implemented yet");};
++
++		/*Variogram functions*/
++		double SemiVariogram(double deltax,double deltay);
++};
++#endif  /* _EXPONENTIALVARIOGRAM_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.h	(revision 12200)
+@@ -0,0 +1,34 @@
++/*! \file GaussianVariogram.h 
++ *  \brief: header file for triavertexinput object
++ */
++
++#ifndef _GAUSSIANVARIOGRAM_H_
++#define _GAUSSIANVARIOGRAM_H_
++
++/*Headers:*/
++#include "./Variogram.h"
++
++class GaussianVariogram: public Variogram{
++
++	public:
++		double nugget; //The height of the jump of the semivariogram at the discontinuity at the origin
++		double sill;   //Limit of the variogram tending to infinity lag distances
++		double range;  //The distance in which the difference of the variogram from the sill becomes negligible
++
++		/*GaussianVariogram constructors, destructors*/
++		GaussianVariogram();
++		GaussianVariogram(Options* options);
++		~GaussianVariogram();
++
++		/*Object virtual functions definitions*/
++		void  Echo();
++		void  DeepEcho(){_error_("Not implemented yet");};
++		int   Id(){_error_("Not implemented yet");}; 
++		int   MyRank(){_error_("Not implemented yet");};
++		int   ObjectEnum(){_error_("Not implemented yet");};
++		Object* copy(){_error_("Not implemented yet");};
++
++		/*Variogram functions*/
++		double SemiVariogram(double deltax,double deltay);
++};
++#endif  /* _GAUSSIANVARIOGRAM_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.h	(revision 12200)
+@@ -0,0 +1,34 @@
++/*! \file SphericalVariogram.h 
++ *  \brief: header file for triavertexinput object
++ */
++
++#ifndef _SPHERICALVARIOGRAM_H_
++#define _SPHERICALVARIOGRAM_H_
++
++/*Headers:*/
++#include "./Variogram.h"
++
++class SphericalVariogram: public Variogram{
++
++	public:
++		double nugget; //The height of the jump of the semivariogram at the discontinuity at the origin
++		double sill;   //Limit of the variogram tending to infinity lag distances
++		double range;  //The distance in which the difference of the variogram from the sill becomes negligible
++
++		/*SphericalVariogram constructors, destructors*/
++		SphericalVariogram();
++		SphericalVariogram(Options* options);
++		~SphericalVariogram();
++
++		/*Object virtual functions definitions*/
++		void  Echo();
++		void  DeepEcho(){_error_("Not implemented yet");};
++		int   Id(){_error_("Not implemented yet");}; 
++		int   MyRank(){_error_("Not implemented yet");};
++		int   ObjectEnum(){_error_("Not implemented yet");};
++		Object* copy(){_error_("Not implemented yet");};
++
++		/*Variogram functions*/
++		double SemiVariogram(double deltax,double deltay);
++};
++#endif  /* _SPHERICALVARIOGRAM_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Variogram.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Variogram.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Variogram.h	(revision 12200)
+@@ -0,0 +1,18 @@
++/*!\file:  Variogram.h
++ * \brief abstract class for Variogram object
++ */ 
++
++
++#ifndef _VARIOGRAM_H_
++#define _VARIOGRAM_H_
++
++#include "../Object.h"
++
++class Variogram: public Object{
++
++	public: 
++		virtual ~Variogram(){};
++		virtual double SemiVariogram(double deltax,double deltay)=0;
++
++};
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/Constraint.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/Constraint.h	(revision 12199)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Constraints/Constraint.h	(revision 12200)
+@@ -10,10 +10,8 @@
+ 
+ /*Headers:*/
+ /*{{{1*/
+-#include "../Object.h"
+-
+ class Nodes;
+-
++#include "../Object.h"
+ #include "../../toolkits/toolkits.h"
+ /*}}}*/
+ 
Index: /issm/oecreview/Archive/12181-12200/ISSM-DocReview-12181-12200.tex
===================================================================
--- /issm/oecreview/Archive/12181-12200/ISSM-DocReview-12181-12200.tex	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/ISSM-DocReview-12181-12200.tex	(revision 12325)
@@ -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/12181-12200/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12181-12200/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12181-12200
Index: /issm/oecreview/Archive/12181-12200/Makefile
===================================================================
--- /issm/oecreview/Archive/12181-12200/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12181-12200
+
+
+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/12181-12200/log.tex
===================================================================
--- /issm/oecreview/Archive/12181-12200/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/log.tex	(revision 12325)
@@ -0,0 +1,28 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12181-12182.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/objects/Numerics/Vector.cpp M /issm/trunk-jpl/src/c/objects/Numerics/Vector.h \\ Export determination: 6. \\Rationale: Enable GSL and PETSc simultaneously
+M /issm/trunk-jpl/configs/config-linux64-astrid.sh Added gsl \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12182-12183.diff: \\ Function name: \\M /issm/trunk-jpl/configs/config-linux64-astrid.sh \\ Export determination: 6. \\Rationale: Added gsl
+M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h added options and GSL support \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12183-12184.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h \\ Export determination: 6. \\Rationale: added options and GSL support
+M /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp Added options \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12184-12185.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp \\ Export determination: 6. \\Rationale: Added options
+M /issm/trunk-jpl/etc/environment.sh Added GSL to LD\_LIBRARY\_PATH \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12185-12186.diff: \\ Function name: \\M /issm/trunk-jpl/etc/environment.sh \\ Export determination: 6. \\Rationale: Added GSL to LD\_LIBRARY\_PATH
+M /issm/trunk-jpl/scripts/DownloadExternalPackage.py Do not delete file if it already exists \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12186-12187.diff: \\ Function name: \\M /issm/trunk-jpl/scripts/DownloadExternalPackage.py \\ Export determination: 6. \\Rationale: Do not delete file if it already exists
+M /issm/trunk-jpl/scripts/DownloadExternalPackage.py minor \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12187-12188.diff: \\ Function name: \\M /issm/trunk-jpl/scripts/DownloadExternalPackage.py \\ Export determination: 6. \\Rationale: minor
+M /issm/trunk-jpl/scripts/DownloadExternalPackage.py minor \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12188-12189.diff: \\ Function name: \\M /issm/trunk-jpl/scripts/DownloadExternalPackage.py \\ Export determination: 6. \\Rationale: minor
+D /issm/trunk-jpl/externalpackages/adolc/ADOL-C-2.2.0.tar.gz M /issm/trunk-jpl/externalpackages/adolc/install.sh D /issm/trunk-jpl/externalpackages/android/android-ndk/android-ndk-r7b-darwin-x86.tar.bz2 M /issm/trunk-jpl/externalpackages/android/android-ndk/install.sh D /issm/trunk-jpl/externalpackages/android/android-sdk/android-sdk-r16-macosx.zip D /issm/trunk-jpl/externalpackages/android/android-sdk/apache-ant-1.8.2-bin.zip M /issm/trunk-jpl/externalpackages/android/android-sdk/install.sh D /issm/trunk-jpl/externalpackages/autoconf/autoconf-2.68.tar.gz M /issm/trunk-jpl/externalpackages/autoconf/install.sh D /issm/trunk-jpl/externalpackages/automake/automake-1.11.3.tar.gz M /issm/trunk-jpl/externalpackages/automake/install.sh D /issm/trunk-jpl/externalpackages/bbftp/bbftp-client-3.2.0.tar.gz M /issm/trunk-jpl/externalpackages/bbftp/install.sh D /issm/trunk-jpl/externalpackages/boost/boost\_1\_49\_0.tar.gz M /issm/trunk-jpl/externalpackages/boost/install.sh M /issm/trunk-jpl/externalpackages/bsdtar/install-win7.sh D /issm/trunk-jpl/externalpackages/bsdtar/libarchive-3.0.3.tar.gz D /issm/trunk-jpl/externalpackages/cccl/cccl-0.03.tar.gz M /issm/trunk-jpl/externalpackages/cccl/install-win7.orig.sh D /issm/trunk-jpl/externalpackages/chaco/Chaco-2.2.tar.gz M /issm/trunk-jpl/externalpackages/chaco/install.sh D /issm/trunk-jpl/externalpackages/cmake/cmake-2.8.5.tar.gz M /issm/trunk-jpl/externalpackages/cmake/install.sh D /issm/trunk-jpl/externalpackages/colpack/ColPack-1.0.3.tar.gz M /issm/trunk-jpl/externalpackages/colpack/install.sh D /issm/trunk-jpl/externalpackages/cppcheck/cppcheck-1.48.tar M /issm/trunk-jpl/externalpackages/cppcheck/install.sh D /issm/trunk-jpl/externalpackages/dace/dace.zip M /issm/trunk-jpl/externalpackages/dace/install.sh D /issm/trunk-jpl/externalpackages/dakota/Dakota\_4\_3.src.tar.gz M /issm/trunk-jpl/externalpackages/dakota/install-altix64-cosmos.sh M /issm/trunk-jpl/externalpackages/dakota/install-linux64-astrid.sh M /issm/trunk-jpl/externalpackages/dakota/install-linux64-murdo.sh M /issm/trunk-jpl/externalpackages/dakota/install-macosx64.sh M /issm/trunk-jpl/externalpackages/dakota/install-pleiades.sh D /issm/trunk-jpl/externalpackages/distribute/distribute-0.6.26.tar.gz M /issm/trunk-jpl/externalpackages/distribute/install.sh D /issm/trunk-jpl/externalpackages/doxygen/doxygen-1.7.4.src.tar.gz D /issm/trunk-jpl/externalpackages/dyson/codescan.zip D /issm/trunk-jpl/externalpackages/findbugs/findbugs-1.3.9.tar.gz M /issm/trunk-jpl/externalpackages/findbugs/install.sh D /issm/trunk-jpl/externalpackages/freetype/freetype-2.4.9.tar.gz M /issm/trunk-jpl/externalpackages/freetype/install.sh D /issm/trunk-jpl/externalpackages/gdal/gdal-1.6.0.tar.gz M /issm/trunk-jpl/externalpackages/gdal/install.sh D /issm/trunk-jpl/externalpackages/gdaltokmz/gdaltokmz-1.0.tar.gz A /issm/trunk-jpl/externalpackages/gdaltokmz/install.sh M /issm/trunk-jpl/externalpackages/gmake/install.sh D /issm/trunk-jpl/externalpackages/gmake/make-3.82.tar.gz D /issm/trunk-jpl/externalpackages/graphviz/graphviz-2.24.0.tar.gz M /issm/trunk-jpl/externalpackages/graphviz/install.sh D /issm/trunk-jpl/externalpackages/gsl/gsl-1.15.tar.gz M /issm/trunk-jpl/externalpackages/gsl/install-android-4.0.sh M /issm/trunk-jpl/externalpackages/gsl/install-linux64.sh M /issm/trunk-jpl/externalpackages/gsl/install-macosx64.sh M /issm/trunk-jpl/externalpackages/ipython/install.sh D /issm/trunk-jpl/externalpackages/ipython/ipython-0.12.tar.gz A /issm/trunk-jpl/externalpackages/kml/install.sh D /issm/trunk-jpl/externalpackages/kml/kml\_shapefile.zip M /issm/trunk-jpl/externalpackages/latex2rtf/install.sh D /issm/trunk-jpl/externalpackages/latex2rtf/latex2rtf-2.0.0.tar.gz M /issm/trunk-jpl/externalpackages/libermate/install.sh D /issm/trunk-jpl/externalpackages/libermate/libermate-0.4.tgz M /issm/trunk-jpl/externalpackages/libpng/install.sh D /issm/trunk-jpl/externalpackages/libpng/libpng-1.5.10.tar.gz M /issm/trunk-jpl/externalpackages/libtool/install.sh D /issm/trunk-jpl/externalpackages/libtool/libtool-2.2.6b.tar.gz M /issm/trunk-jpl/externalpackages/m2html/install.sh D /issm/trunk-jpl/externalpackages/m2html/m2html.zip M /issm/trunk-jpl/externalpackages/mercurial/install.sh D /issm/trunk-jpl/externalpackages/mercurial/mercurial-1.7.3.tar.gz D /issm/trunk-jpl/externalpackages/merge M /issm/trunk-jpl/externalpackages/metis/install-4.0-altix64.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-cosmos.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-greenplanet.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-linux64.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-macosx32.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-macosx64.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-pleiades.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-win32.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-win7.sh M /issm/trunk-jpl/externalpackages/metis/install-5.0.1-linux64.sh D /issm/trunk-jpl/externalpackages/metis/metis-4.0.tar.gz D /issm/trunk-jpl/externalpackages/metis/metis-5.0.1.tar.gz M /issm/trunk-jpl/externalpackages/modelE/install.sh D /issm/trunk-jpl/externalpackages/modelE/modelE\_AR5\_branch.2012.03.13\_10.12.21.tgz M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-altix64.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-linux64.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-macosx32.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-win32.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.4-linux64.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.4-macosx32.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.4-macosx64.sh D /issm/trunk-jpl/externalpackages/mpich2/mpich2-1.0.2p1.tar.gz D /issm/trunk-jpl/externalpackages/mpich2/mpich2-1.4.tar.gz M /issm/trunk-jpl/externalpackages/ncview/install.sh D /issm/trunk-jpl/externalpackages/ncview/ncview-1.93g.tar.gz M /issm/trunk-jpl/externalpackages/netcdf/install.sh D /issm/trunk-jpl/externalpackages/netcdf/netcdf-4.0.1.tar.gz M /issm/trunk-jpl/externalpackages/nose/install-macosx64sh D /issm/trunk-jpl/externalpackages/nose/nose-1.1.2.tar.gz M /issm/trunk-jpl/externalpackages/oofem/install.sh D /issm/trunk-jpl/externalpackages/oofem/oofem-2.0.tar.gz M /issm/trunk-jpl/externalpackages/pcre/install.sh D /issm/trunk-jpl/externalpackages/pcre/pcre-8.21.tar.gz M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-altix64-castor.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-cosmos.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-linux64-astrid.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-eric.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-ogive.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx64.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-pleiades.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-win32-eric.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-win7.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-altix64-castor.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-cosmos.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-linux64-astrid.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-mathieu.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-ogive.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-pleiades.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-win7.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-greenplanet.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-linux64.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-macosx64.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh D /issm/trunk-jpl/externalpackages/petsc/petsc-2.3.2-p3.tar.gz D /issm/trunk-jpl/externalpackages/petsc/petsc-3.1-p7.tar.gz D /issm/trunk-jpl/externalpackages/petsc/petsc-3.2-p3.tar.gz D /issm/trunk-jpl/externalpackages/polygonclipper/PolygonClipper.zip M /issm/trunk-jpl/externalpackages/polygonclipper/install.sh M /issm/trunk-jpl/externalpackages/pyclips/install.sh D /issm/trunk-jpl/externalpackages/pyclips/pyclips-1.0.7.348.tar.gz D /issm/trunk-jpl/externalpackages/python/Python-2.7.2.tgz D /issm/trunk-jpl/externalpackages/python/Python-3.2.2.tgz M /issm/trunk-jpl/externalpackages/python/install.sh M /issm/trunk-jpl/externalpackages/qhull/install.sh D /issm/trunk-jpl/externalpackages/qhull/qhull-2003.1.tar.gz M /issm/trunk-jpl/externalpackages/rats/install.sh D /issm/trunk-jpl/externalpackages/rats/rats-2.3.tar.gz M /issm/trunk-jpl/externalpackages/readline/install.sh D /issm/trunk-jpl/externalpackages/readline/readline-6.2.2.tar.gz M /issm/trunk-jpl/externalpackages/rose/install.sh D /issm/trunk-jpl/externalpackages/rose/rose-0.9.5a-13219.tar.gz D /issm/trunk-jpl/externalpackages/satstress/SatStress-0.1.2.tar.gz M /issm/trunk-jpl/externalpackages/satstress/install.sh M /issm/trunk-jpl/externalpackages/scotch/install.sh D /issm/trunk-jpl/externalpackages/scotch/scotch\_5.1.6.tar.gz D /issm/trunk-jpl/externalpackages/scotch/scotch\_5.1.6\_esmumps.tar.gz M /issm/trunk-jpl/externalpackages/shapelib/install.sh D /issm/trunk-jpl/externalpackages/shapelib/shape\_eg\_data.zip D /issm/trunk-jpl/externalpackages/shapelib/shapelib-1.2.10.tar.gz M /issm/trunk-jpl/externalpackages/slepc/install.sh D /issm/trunk-jpl/externalpackages/slepc/slepc-2.3.2.tgz D /issm/trunk-jpl/externalpackages/ssh/plink.exe D /issm/trunk-jpl/externalpackages/ssh/pscp.exe M /issm/trunk-jpl/externalpackages/swig/install.sh D /issm/trunk-jpl/externalpackages/swig/swig-2.0.4.tar.gz D /issm/trunk-jpl/externalpackages/swig/swigwin-2.0.4.zip M /issm/trunk-jpl/externalpackages/tao/install.sh D /issm/trunk-jpl/externalpackages/tao/tao-2.0-p3.tar.gz M /issm/trunk-jpl/externalpackages/tex2im/install.sh D /issm/trunk-jpl/externalpackages/tex2im/tex2im-1.8.tar.gz M /issm/trunk-jpl/externalpackages/triangle/install-altix64.sh M /issm/trunk-jpl/externalpackages/triangle/install-android-4.0.sh M /issm/trunk-jpl/externalpackages/triangle/install-linux64.sh M /issm/trunk-jpl/externalpackages/triangle/install-macosx32.sh M /issm/trunk-jpl/externalpackages/triangle/install-macosx64.sh M /issm/trunk-jpl/externalpackages/triangle/install-pleiades.sh M /issm/trunk-jpl/externalpackages/triangle/install-win32.sh M /issm/trunk-jpl/externalpackages/triangle/install-win7.sh D /issm/trunk-jpl/externalpackages/triangle/triangle.zip M /issm/trunk-jpl/externalpackages/valgrind/install-altix64.sh M /issm/trunk-jpl/externalpackages/valgrind/install-linux64.sh M /issm/trunk-jpl/externalpackages/valgrind/install-macosx32.sh M /issm/trunk-jpl/externalpackages/valgrind/install-macosx64.sh M /issm/trunk-jpl/externalpackages/valgrind/install-win32.sh D /issm/trunk-jpl/externalpackages/valgrind/valgrind-3.7.0.tar.bz2 M /issm/trunk-jpl/externalpackages/vim/install.sh D /issm/trunk-jpl/externalpackages/vim/vim-7.2.tar.bz2 A /issm/trunk-jpl/externalpackages/windows/install.sh D /issm/trunk-jpl/externalpackages/windows/win7.sdk7.1.exe M /issm/trunk-jpl/externalpackages/xerces/install.sh D /issm/trunk-jpl/externalpackages/xerces/xerces-c-src\_2\_8\_0.tar.gz M /issm/trunk-jpl/externalpackages/yams/install.sh D /issm/trunk-jpl/externalpackages/yams/yams2-linux.gz D /issm/trunk-jpl/externalpackages/yams/yams2-osx.gz D /issm/trunk-jpl/externalpackages/yams/yams2-win.exe Deleted all externalpackage from trunk, use python script to download from issm website \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12189-12190.diff: \\ Function name: \\D /issm/trunk-jpl/externalpackages/adolc/ADOL-C-2.2.0.tar.gz M /issm/trunk-jpl/externalpackages/adolc/install.sh D /issm/trunk-jpl/externalpackages/android/android-ndk/android-ndk-r7b-darwin-x86.tar.bz2 M /issm/trunk-jpl/externalpackages/android/android-ndk/install.sh D /issm/trunk-jpl/externalpackages/android/android-sdk/android-sdk-r16-macosx.zip D /issm/trunk-jpl/externalpackages/android/android-sdk/apache-ant-1.8.2-bin.zip M /issm/trunk-jpl/externalpackages/android/android-sdk/install.sh D /issm/trunk-jpl/externalpackages/autoconf/autoconf-2.68.tar.gz M /issm/trunk-jpl/externalpackages/autoconf/install.sh D /issm/trunk-jpl/externalpackages/automake/automake-1.11.3.tar.gz M /issm/trunk-jpl/externalpackages/automake/install.sh D /issm/trunk-jpl/externalpackages/bbftp/bbftp-client-3.2.0.tar.gz M /issm/trunk-jpl/externalpackages/bbftp/install.sh D /issm/trunk-jpl/externalpackages/boost/boost\_1\_49\_0.tar.gz M /issm/trunk-jpl/externalpackages/boost/install.sh M /issm/trunk-jpl/externalpackages/bsdtar/install-win7.sh D /issm/trunk-jpl/externalpackages/bsdtar/libarchive-3.0.3.tar.gz D /issm/trunk-jpl/externalpackages/cccl/cccl-0.03.tar.gz M /issm/trunk-jpl/externalpackages/cccl/install-win7.orig.sh D /issm/trunk-jpl/externalpackages/chaco/Chaco-2.2.tar.gz M /issm/trunk-jpl/externalpackages/chaco/install.sh D /issm/trunk-jpl/externalpackages/cmake/cmake-2.8.5.tar.gz M /issm/trunk-jpl/externalpackages/cmake/install.sh D /issm/trunk-jpl/externalpackages/colpack/ColPack-1.0.3.tar.gz M /issm/trunk-jpl/externalpackages/colpack/install.sh D /issm/trunk-jpl/externalpackages/cppcheck/cppcheck-1.48.tar M /issm/trunk-jpl/externalpackages/cppcheck/install.sh D /issm/trunk-jpl/externalpackages/dace/dace.zip M /issm/trunk-jpl/externalpackages/dace/install.sh D /issm/trunk-jpl/externalpackages/dakota/Dakota\_4\_3.src.tar.gz M /issm/trunk-jpl/externalpackages/dakota/install-altix64-cosmos.sh M /issm/trunk-jpl/externalpackages/dakota/install-linux64-astrid.sh M /issm/trunk-jpl/externalpackages/dakota/install-linux64-murdo.sh M /issm/trunk-jpl/externalpackages/dakota/install-macosx64.sh M /issm/trunk-jpl/externalpackages/dakota/install-pleiades.sh D /issm/trunk-jpl/externalpackages/distribute/distribute-0.6.26.tar.gz M /issm/trunk-jpl/externalpackages/distribute/install.sh D /issm/trunk-jpl/externalpackages/doxygen/doxygen-1.7.4.src.tar.gz D /issm/trunk-jpl/externalpackages/dyson/codescan.zip D /issm/trunk-jpl/externalpackages/findbugs/findbugs-1.3.9.tar.gz M /issm/trunk-jpl/externalpackages/findbugs/install.sh D /issm/trunk-jpl/externalpackages/freetype/freetype-2.4.9.tar.gz M /issm/trunk-jpl/externalpackages/freetype/install.sh D /issm/trunk-jpl/externalpackages/gdal/gdal-1.6.0.tar.gz M /issm/trunk-jpl/externalpackages/gdal/install.sh D /issm/trunk-jpl/externalpackages/gdaltokmz/gdaltokmz-1.0.tar.gz A /issm/trunk-jpl/externalpackages/gdaltokmz/install.sh M /issm/trunk-jpl/externalpackages/gmake/install.sh D /issm/trunk-jpl/externalpackages/gmake/make-3.82.tar.gz D /issm/trunk-jpl/externalpackages/graphviz/graphviz-2.24.0.tar.gz M /issm/trunk-jpl/externalpackages/graphviz/install.sh D /issm/trunk-jpl/externalpackages/gsl/gsl-1.15.tar.gz M /issm/trunk-jpl/externalpackages/gsl/install-android-4.0.sh M /issm/trunk-jpl/externalpackages/gsl/install-linux64.sh M /issm/trunk-jpl/externalpackages/gsl/install-macosx64.sh M /issm/trunk-jpl/externalpackages/ipython/install.sh D /issm/trunk-jpl/externalpackages/ipython/ipython-0.12.tar.gz A /issm/trunk-jpl/externalpackages/kml/install.sh D /issm/trunk-jpl/externalpackages/kml/kml\_shapefile.zip M /issm/trunk-jpl/externalpackages/latex2rtf/install.sh D /issm/trunk-jpl/externalpackages/latex2rtf/latex2rtf-2.0.0.tar.gz M /issm/trunk-jpl/externalpackages/libermate/install.sh D /issm/trunk-jpl/externalpackages/libermate/libermate-0.4.tgz M /issm/trunk-jpl/externalpackages/libpng/install.sh D /issm/trunk-jpl/externalpackages/libpng/libpng-1.5.10.tar.gz M /issm/trunk-jpl/externalpackages/libtool/install.sh D /issm/trunk-jpl/externalpackages/libtool/libtool-2.2.6b.tar.gz M /issm/trunk-jpl/externalpackages/m2html/install.sh D /issm/trunk-jpl/externalpackages/m2html/m2html.zip M /issm/trunk-jpl/externalpackages/mercurial/install.sh D /issm/trunk-jpl/externalpackages/mercurial/mercurial-1.7.3.tar.gz D /issm/trunk-jpl/externalpackages/merge M /issm/trunk-jpl/externalpackages/metis/install-4.0-altix64.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-cosmos.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-greenplanet.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-linux64.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-macosx32.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-macosx64.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-pleiades.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-win32.sh M /issm/trunk-jpl/externalpackages/metis/install-4.0-win7.sh M /issm/trunk-jpl/externalpackages/metis/install-5.0.1-linux64.sh D /issm/trunk-jpl/externalpackages/metis/metis-4.0.tar.gz D /issm/trunk-jpl/externalpackages/metis/metis-5.0.1.tar.gz M /issm/trunk-jpl/externalpackages/modelE/install.sh D /issm/trunk-jpl/externalpackages/modelE/modelE\_AR5\_branch.2012.03.13\_10.12.21.tgz M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-altix64.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-linux64.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-macosx32.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.0.2-win32.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.4-linux64.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.4-macosx32.sh M /issm/trunk-jpl/externalpackages/mpich2/install-1.4-macosx64.sh D /issm/trunk-jpl/externalpackages/mpich2/mpich2-1.0.2p1.tar.gz D /issm/trunk-jpl/externalpackages/mpich2/mpich2-1.4.tar.gz M /issm/trunk-jpl/externalpackages/ncview/install.sh D /issm/trunk-jpl/externalpackages/ncview/ncview-1.93g.tar.gz M /issm/trunk-jpl/externalpackages/netcdf/install.sh D /issm/trunk-jpl/externalpackages/netcdf/netcdf-4.0.1.tar.gz M /issm/trunk-jpl/externalpackages/nose/install-macosx64sh D /issm/trunk-jpl/externalpackages/nose/nose-1.1.2.tar.gz M /issm/trunk-jpl/externalpackages/oofem/install.sh D /issm/trunk-jpl/externalpackages/oofem/oofem-2.0.tar.gz M /issm/trunk-jpl/externalpackages/pcre/install.sh D /issm/trunk-jpl/externalpackages/pcre/pcre-8.21.tar.gz M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-altix64-castor.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-cosmos.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-linux64-astrid.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-eric.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx32-ogive.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-macosx64.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-pleiades.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-win32-eric.sh M /issm/trunk-jpl/externalpackages/petsc/install-2.3.2-win7.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-altix64-castor.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-cosmos.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-linux64-astrid.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-mathieu.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-macosx32-ogive.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-pleiades.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.1-win7.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-greenplanet.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-linux64.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-macosx64.sh M /issm/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh D /issm/trunk-jpl/externalpackages/petsc/petsc-2.3.2-p3.tar.gz D /issm/trunk-jpl/externalpackages/petsc/petsc-3.1-p7.tar.gz D /issm/trunk-jpl/externalpackages/petsc/petsc-3.2-p3.tar.gz D /issm/trunk-jpl/externalpackages/polygonclipper/PolygonClipper.zip M /issm/trunk-jpl/externalpackages/polygonclipper/install.sh M /issm/trunk-jpl/externalpackages/pyclips/install.sh D /issm/trunk-jpl/externalpackages/pyclips/pyclips-1.0.7.348.tar.gz D /issm/trunk-jpl/externalpackages/python/Python-2.7.2.tgz D /issm/trunk-jpl/externalpackages/python/Python-3.2.2.tgz M /issm/trunk-jpl/externalpackages/python/install.sh M /issm/trunk-jpl/externalpackages/qhull/install.sh D /issm/trunk-jpl/externalpackages/qhull/qhull-2003.1.tar.gz M /issm/trunk-jpl/externalpackages/rats/install.sh D /issm/trunk-jpl/externalpackages/rats/rats-2.3.tar.gz M /issm/trunk-jpl/externalpackages/readline/install.sh D /issm/trunk-jpl/externalpackages/readline/readline-6.2.2.tar.gz M /issm/trunk-jpl/externalpackages/rose/install.sh D /issm/trunk-jpl/externalpackages/rose/rose-0.9.5a-13219.tar.gz D /issm/trunk-jpl/externalpackages/satstress/SatStress-0.1.2.tar.gz M /issm/trunk-jpl/externalpackages/satstress/install.sh M /issm/trunk-jpl/externalpackages/scotch/install.sh D /issm/trunk-jpl/externalpackages/scotch/scotch\_5.1.6.tar.gz D /issm/trunk-jpl/externalpackages/scotch/scotch\_5.1.6\_esmumps.tar.gz M /issm/trunk-jpl/externalpackages/shapelib/install.sh D /issm/trunk-jpl/externalpackages/shapelib/shape\_eg\_data.zip D /issm/trunk-jpl/externalpackages/shapelib/shapelib-1.2.10.tar.gz M /issm/trunk-jpl/externalpackages/slepc/install.sh D /issm/trunk-jpl/externalpackages/slepc/slepc-2.3.2.tgz D /issm/trunk-jpl/externalpackages/ssh/plink.exe D /issm/trunk-jpl/externalpackages/ssh/pscp.exe M /issm/trunk-jpl/externalpackages/swig/install.sh D /issm/trunk-jpl/externalpackages/swig/swig-2.0.4.tar.gz D /issm/trunk-jpl/externalpackages/swig/swigwin-2.0.4.zip M /issm/trunk-jpl/externalpackages/tao/install.sh D /issm/trunk-jpl/externalpackages/tao/tao-2.0-p3.tar.gz M /issm/trunk-jpl/externalpackages/tex2im/install.sh D /issm/trunk-jpl/externalpackages/tex2im/tex2im-1.8.tar.gz M /issm/trunk-jpl/externalpackages/triangle/install-altix64.sh M /issm/trunk-jpl/externalpackages/triangle/install-android-4.0.sh M /issm/trunk-jpl/externalpackages/triangle/install-linux64.sh M /issm/trunk-jpl/externalpackages/triangle/install-macosx32.sh M /issm/trunk-jpl/externalpackages/triangle/install-macosx64.sh M /issm/trunk-jpl/externalpackages/triangle/install-pleiades.sh M /issm/trunk-jpl/externalpackages/triangle/install-win32.sh M /issm/trunk-jpl/externalpackages/triangle/install-win7.sh D /issm/trunk-jpl/externalpackages/triangle/triangle.zip M /issm/trunk-jpl/externalpackages/valgrind/install-altix64.sh M /issm/trunk-jpl/externalpackages/valgrind/install-linux64.sh M /issm/trunk-jpl/externalpackages/valgrind/install-macosx32.sh M /issm/trunk-jpl/externalpackages/valgrind/install-macosx64.sh M /issm/trunk-jpl/externalpackages/valgrind/install-win32.sh D /issm/trunk-jpl/externalpackages/valgrind/valgrind-3.7.0.tar.bz2 M /issm/trunk-jpl/externalpackages/vim/install.sh D /issm/trunk-jpl/externalpackages/vim/vim-7.2.tar.bz2 A /issm/trunk-jpl/externalpackages/windows/install.sh D /issm/trunk-jpl/externalpackages/windows/win7.sdk7.1.exe M /issm/trunk-jpl/externalpackages/xerces/install.sh D /issm/trunk-jpl/externalpackages/xerces/xerces-c-src\_2\_8\_0.tar.gz M /issm/trunk-jpl/externalpackages/yams/install.sh D /issm/trunk-jpl/externalpackages/yams/yams2-linux.gz D /issm/trunk-jpl/externalpackages/yams/yams2-osx.gz D /issm/trunk-jpl/externalpackages/yams/yams2-win.exe \\ Export determination: 6. \\Rationale: Deleted all externalpackage from trunk, use python script to download from issm website
+D /issm/trunk-jpl/externalpackages/windows/Sdk1.png D /issm/trunk-jpl/externalpackages/windows/Sdk2.png not needed \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12190-12191.diff: \\ Function name: \\D /issm/trunk-jpl/externalpackages/windows/Sdk1.png D /issm/trunk-jpl/externalpackages/windows/Sdk2.png \\ Export determination: 6. \\Rationale: not needed
+M /issm/trunk-jpl/src/m/utils/BC/SetIceShelfBC.py Further translation of SetIceShelfBC.m to python \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12191-12192.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/utils/BC/SetIceShelfBC.py \\ Export determination: 6. \\Rationale: Further translation of SetIceShelfBC.m to python
+M /issm/trunk-jpl/src/modules/matlab Ignore Win7 files \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-12192-12193.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/matlab \\ Export determination: 6. \\Rationale: Ignore Win7 files
+M /issm/trunk-jpl/src/m/model/plot/northarrow.m M /issm/trunk-jpl/src/m/model/plot/plotdoc.m clarified northarrow plot documentation \\\\
+\noindent \textbf{Change \#13} with diff file ISSM-12193-12194.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/plot/northarrow.m M /issm/trunk-jpl/src/m/model/plot/plotdoc.m \\ Export determination: 6. \\Rationale: clarified northarrow plot documentation \\\\
+\noindent \textbf{Change \#14} with diff file ISSM-12195-12196.diff: \\ Function name: \\M /issm/trunk-jpl/cron/nightlyrun.sh \\ Export determination: 6. \\Rationale: Replaced ISSM\_TIER by ISSM\_DIR \\\\
+\noindent \textbf{Change \#15} with diff file ISSM-12196-12197.diff: \\ Function name: \\M /issm/trunk-jpl/cron/nightlyrun.sh \\ Export determination: 6. \\Rationale: Replaced ISSM\_TIER by ISSM\_DIR \\\\
+\noindent \textbf{Change \#16} with diff file ISSM-12199-12200.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h M /issm/trunk-jpl/src/c/objects/Constraints/Constraint.h A /issm/trunk-jpl/src/c/objects/Kriging A /issm/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp A /issm/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.h A /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp A /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.h A /issm/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp A /issm/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.h A /issm/trunk-jpl/src/c/objects/Kriging/Variogram.h M /issm/trunk-jpl/src/c/objects/objects.h \\ Export determination: 6. \\Rationale: Added Kriging object for semivariograms \\\\
Index: /issm/oecreview/Archive/12181-12200/r1.tex
===================================================================
--- /issm/oecreview/Archive/12181-12200/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12181
Index: /issm/oecreview/Archive/12181-12200/r2.tex
===================================================================
--- /issm/oecreview/Archive/12181-12200/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12181-12200/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12200
Index: /issm/oecreview/Archive/12201-12220/Date.tex
===================================================================
--- /issm/oecreview/Archive/12201-12220/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12201-12220/ISSM-12201-12202.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12201-12202.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12201-12202.diff	(revision 12325)
@@ -0,0 +1,12 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12201)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12202)
+@@ -129,6 +129,6 @@
+ 	gsl_vector_free(x);
+ 	*pX=X;
+ #else
+-	error_("GSL support required");
++	_error_("GSL support required");
+ #endif
+ }
Index: /issm/oecreview/Archive/12201-12220/ISSM-12202-12203.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12202-12203.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12202-12203.diff	(revision 12325)
@@ -0,0 +1,23 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/windows_environment.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/windows_environment.sh	(revision 12202)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/windows_environment.sh	(revision 12203)
+@@ -1,7 +1,7 @@
+ #This file sources all relevant scripts to setup the paths to windows compilers.
+ 
+ #Where are the configuration files for each compiler: 
+-config_dir="$ISSM_TIER/externalpackages/windows/configs"
++config_dir="$ISSM_DIR/externalpackages/windows/configs"
+ 
+ #your choise of compiler: 
+ # 1: sdk 7.1 32 bits on Win7
+@@ -23,6 +23,6 @@
+ 	source $config_dir/intel-winXP.sh
+ fi
+ 
+-#finally, out of ISSM_TIER, we need to create an ISSM_TIER_WIN variable for Matlab to pick up on.
+-ISSM_TIER_WIN=`cygpath -m $ISSM_TIER`
+-export ISSM_TIER_WIN
++#finally, out of ISSM_DIR, we need to create an ISSM_DIR_WIN variable for Matlab to pick up on.
++ISSM_DIR_WIN=`cygpath -m $ISSM_DIR`
++export ISSM_DIR_WIN
Index: /issm/oecreview/Archive/12201-12220/ISSM-12203-12204.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12203-12204.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12203-12204.diff	(revision 12325)
@@ -0,0 +1,15 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12203)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12204)
+@@ -8,7 +8,10 @@
+ #include "../../toolkits/toolkits.h"
+ #include "../../objects/objects.h"
+ #include "../modules.h"
++
++#ifdef _HAVE_GSL_
+ #include <gsl/gsl_linalg.h>
++#endif
+ 
+ #include "../../objects/Kriging/GaussianVariogram.h"
+ int Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp,Options* options){
Index: /issm/oecreview/Archive/12201-12220/ISSM-12204-12205.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12204-12205.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12204-12205.diff	(revision 12325)
@@ -0,0 +1,21 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-64.sh	(revision 12204)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-64.sh	(revision 12205)
+@@ -12,7 +12,6 @@
+ declare -x LANG="C.UTF-8"
+ declare -x LIB="C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Lib\\amd64;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Lib\\X64;"
+ declare -x LIBPATH="C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework64\\v3.5;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Lib\\amd64;"
+-declare -x LOCALAPPDATA="C:\\Users\\schlegel\\AppData\\Local"
+ declare -x MANPATH="/usr/local/man:/usr/share/man:/usr/man:"
+ declare -x PATH="/usr/local/bin:/usr/bin:/usr/include:/cygdrive/c/cygwin/usr/bin:/cygdrive/c/cygwin/usr/include:/cygdrive/c/Windows/Microsoft.NET/Framework64/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework64/v3.5:/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/Tools:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/amd64:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/VCPackages:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/NETFX 4.0 Tools/x64:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/x64:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Microsoft Windows Performance Toolkit:/cygdrive/c/MATLAB/R2012a/runtime/win64:/cygdrive/c/MATLAB/R2012a/bin:/cygdrive/c/MATLAB/R2012a/extern/include:/cygdrive/c/MATLAB/R2011a/runtime/win64:/cygdrive/c/MATLAB/R2011a/bin:/cygdrive/c/MATLAB/R2011a/extern/include"
+ declare -x PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
+@@ -40,8 +39,6 @@
+ declare -x TERM="cygwin"
+ declare -x TMP="/tmp"
+ declare -x ToolsVersion="4.0"
+-declare -x USER="schlegel"
+-declare -x USERNAME="schlegel"
+ declare -x VS100COMNTOOLS="C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\Tools\\"
+ declare -x WINDIR="C:\\Windows"
+ declare -x WindowsSDKDir="C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\"
Index: /issm/oecreview/Archive/12201-12220/ISSM-12205-12206.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12205-12206.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12205-12206.diff	(revision 12325)
@@ -0,0 +1,63 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/vim/addons/vim/syntax/c.vim
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/vim/addons/vim/syntax/c.vim	(revision 12205)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/vim/addons/vim/syntax/c.vim	(revision 12206)
+@@ -546,6 +546,12 @@
+ syn keyword cType Geometry
+ syn keyword cType QuadTree
+ syn keyword cType SetOfE4
++syn keyword cType Variogram
++syn keyword cType GaussianVariogram
++syn keyword cType ExponentialVariogram
++syn keyword cType SphericalVariogram
++syn keyword cType Quadtree
++syn keyword cType Observation
+ "ISSM's objects end
+ 
+ "ISSM's Enums begin
+@@ -685,6 +691,10 @@
+ syn keyword cConstant SettingsOutputFrequencyEnum
+ syn keyword cConstant SettingsResultsAsPatchesEnum
+ syn keyword cConstant SettingsWaitonlockEnum
++syn keyword cConstant DebugPetscProfilingEnum
++syn keyword cConstant PetscProfilingCurrentMemEnum
++syn keyword cConstant PetscProfilingCurrentFlopsEnum
++syn keyword cConstant PetscProfilingSolutionTimeEnum
+ syn keyword cConstant SteadystateMaxiterEnum
+ syn keyword cConstant SteadystateNumRequestedOutputsEnum
+ syn keyword cConstant SteadystateReltolEnum
+@@ -700,8 +710,9 @@
+ syn keyword cConstant ThermalStabilizationEnum
+ syn keyword cConstant ThermalIsenthalpyEnum
+ syn keyword cConstant ThicknessEnum
++syn keyword cConstant TimesteppingStartTimeEnum
++syn keyword cConstant TimesteppingFinalTimeEnum
+ syn keyword cConstant TimesteppingCflCoefficientEnum
+-syn keyword cConstant TimesteppingFinalTimeEnum
+ syn keyword cConstant TimesteppingTimeAdaptEnum
+ syn keyword cConstant TimesteppingTimeStepEnum
+ syn keyword cConstant TransientIsdiagnosticEnum
+@@ -763,6 +774,7 @@
+ syn keyword cConstant ResultsEnum
+ syn keyword cConstant BoolInputEnum
+ syn keyword cConstant BoolParamEnum
++syn keyword cConstant ContourEnum
+ syn keyword cConstant ControlInputEnum
+ syn keyword cConstant DatasetInputEnum
+ syn keyword cConstant DofIndexingEnum
+@@ -903,6 +915,7 @@
+ syn keyword cConstant P0Enum
+ syn keyword cConstant P1Enum
+ syn keyword cConstant P1DGEnum
++syn keyword cConstant SaveResultsEnum
+ syn keyword cConstant BoolElementResultEnum
+ syn keyword cConstant BoolExternalResultEnum
+ syn keyword cConstant DoubleElementResultEnum
+@@ -917,6 +930,7 @@
+ syn keyword cConstant PentaP1ElementResultEnum
+ syn keyword cConstant PetscVecExternalResultEnum
+ syn keyword cConstant StringExternalResultEnum
++syn keyword cConstant StepEnum
+ syn keyword cConstant TimeEnum
+ syn keyword cConstant TriaP1ElementResultEnum
+ syn keyword cConstant WaterColumnOldEnum
Index: /issm/oecreview/Archive/12201-12220/ISSM-12206-12207.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12206-12207.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12206-12207.diff	(revision 12325)
@@ -0,0 +1,559 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12206)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12207)
+@@ -14,61 +14,64 @@
+ #endif
+ 
+ #include "../../objects/Kriging/GaussianVariogram.h"
+-int Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp,Options* options){
++int Krigingx(double** ppredictions,double* obs_x, double* obs_y, double* obs_list, int obs_length,double* x_interp,double* y_interp,int n_interp,Options* options){
+ 
+ 	/*output*/
+ 	double *predictions = NULL;
+ 
+ 	/*Intermediaries*/
+-	int        i,j;
++	int        i,j,n_obs;
+ 	double     numerator,denominator,ratio;
+-	char      *model     = NULL;
+-	double    *Gamma     = NULL;
+-	double    *GinvG0    = NULL;
+-	double    *Ginv1     = NULL;
+-	double    *GinvZ     = NULL;
+-	double    *gamma0    = NULL;
+-	double    *ones      = NULL;
+-	Variogram *variogram = NULL;
++	double    *x            = NULL;
++	double    *y            = NULL;
++	double    *obs          = NULL;
++	double    *Gamma        = NULL;
++	double    *GinvG0       = NULL;
++	double    *Ginv1        = NULL;
++	double    *GinvZ        = NULL;
++	double    *gamma0       = NULL;
++	double    *ones         = NULL;
++	Variogram *variogram    = NULL;
++	DataSet   *observations = NULL;
+ 
+-	/*Memory allocation*/
+-	predictions =(double*)xmalloc(n_interp*sizeof(double));
+-	Gamma       =(double*)xmalloc(n_obs*n_obs*sizeof(double));
+-	gamma0      =(double*)xmalloc(n_obs*sizeof(double));
+-	ones        =(double*)xmalloc(n_obs*sizeof(double));
++	/*Get Variogram from Options*/
++	ProcessVariogram(&variogram,options);
+ 
+-	/*Create Semi-Variogram object*/
+-	if(options->GetOption("model")){
+-		options->Get(&model,"model");
+-		if     (strcmp(model,"gaussian")==0)    variogram = new GaussianVariogram(options);
+-		else if(strcmp(model,"exponential")==0) variogram = new ExponentialVariogram(options);
+-		else if(strcmp(model,"spherical")==0)   variogram = new SphericalVariogram(options);
+-		else _error_("only gaussian semivariogram models supported yet");
+-	}
+-	else variogram = new GaussianVariogram(options);
+-	variogram->Echo();
++	/*Process observation dataset*/
++	ProcessObservations(&observations,obs_list,obs_x,obs_y,obs_length);
+ 
+-	/*First: Create semivariogram matrix for observations*/
+-	for(i=0;i<n_obs;i++){
+-		for(j=0;j<=i;j++){
+-			Gamma[i*n_obs+j] = variogram->SemiVariogram(x[i]-x[j],y[i]-y[j]);
+-			Gamma[j*n_obs+i] = Gamma[i*n_obs+j];
+-		}
+-	}
+-	for(i=0;i<n_obs;i++) ones[i]=1;
++	/*Allocation output*/
++	predictions =(double*)xmalloc(n_interp*sizeof(double));
+ 
+ 	/*Loop over all interpolations*/
+ 	printf("      interpolation progress:  %5.2lf %%",0.0);
+ 	for(int idx=0;idx<n_interp;idx++){
+-		if(idx%100==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)idx/n_interp*100);
++		if(idx%10==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)idx/n_interp*100);
+ 
++		/*Get list of observations for current point*/
++		ObservationList(&x,&y,&obs,&n_obs,observations,x_interp[idx],y_interp[idx]);
++
++		/*Allocate intermediary matrix and vectors*/
++		Gamma       =(double*)xmalloc(n_obs*n_obs*sizeof(double));
++		gamma0      =(double*)xmalloc(n_obs*sizeof(double));
++		ones        =(double*)xmalloc(n_obs*sizeof(double));
++
++		/*First: Create semivariogram matrix for observations*/
++		for(i=0;i<n_obs;i++){
++			for(j=0;j<=i;j++){
++				Gamma[i*n_obs+j] = variogram->SemiVariogram(x[i]-x[j],y[i]-y[j]);
++				Gamma[j*n_obs+i] = Gamma[i*n_obs+j];
++			}
++		}
++		for(i=0;i<n_obs;i++) ones[i]=1;
++
+ 		/*Get semivariogram vector associated to this location*/
+ 		for(i=0;i<n_obs;i++) gamma0[i] = variogram->SemiVariogram(x[i]-x_interp[idx],y[i]-y_interp[idx]);
+ 
+ 		/*Solve the three linear systems*/
+ 		GslSolve(&GinvG0,Gamma,gamma0,n_obs);       // Gamma^-1 gamma0
+ 		GslSolve(&Ginv1, Gamma,ones,n_obs);         // Gamma^-1 ones
+-		GslSolve(&GinvZ, Gamma,observations,n_obs); // Gamma^-1 Z
++		GslSolve(&GinvZ, Gamma,obs,n_obs); // Gamma^-1 Z
+ 
+ 		/*Prepare predictor*/
+ 		numerator=-1.; denominator=0.;
+@@ -80,6 +83,12 @@
+ 		for(i=0;i<n_obs;i++) predictions[idx] += (gamma0[i]-ratio)*GinvZ[i];
+ 
+ 		/*clean-up*/
++		xfree((void**)&x);
++		xfree((void**)&y);
++		xfree((void**)&obs);
++		xfree((void**)&Gamma);
++		xfree((void**)&gamma0);
++		xfree((void**)&ones);
+ 		xfree((void**)&GinvG0);
+ 		xfree((void**)&Ginv1);
+ 		xfree((void**)&GinvZ);
+@@ -88,50 +97,111 @@
+ 
+ 	/*clean-up and Assign output pointer*/
+ 	delete variogram;
+-	xfree((void**)&Gamma);
+-	xfree((void**)&gamma0);
+-	xfree((void**)&ones);
+-	xfree((void**)&model);
++	delete observations;
+ 	*ppredictions=predictions;
+ }
+ 
+-void GslSolve(double** pX,double* A,double* B,int n){
++void ProcessVariogram(Variogram **pvariogram,Options* options){/*{{{*/
++
++	/*Intermediaries*/
++	Variogram* variogram = NULL;
++	char      *model     = NULL;
++
++	if(options->GetOption("model")){
++		options->Get(&model,"model");
++		if     (strcmp(model,"gaussian")==0)    variogram = new GaussianVariogram(options);
++		else if(strcmp(model,"exponential")==0) variogram = new ExponentialVariogram(options);
++		else if(strcmp(model,"spherical")==0)   variogram = new SphericalVariogram(options);
++		else _error_("variogram %s not supported yet (list of supported variogram: gaussian, exponential and spherical)",model);
++	}
++	else variogram = new GaussianVariogram(options);
++
++	/*Assign output pointer*/
++	xfree((void**)&model);
++	*pvariogram = variogram;
++}/*}}}*/
++void ProcessObservations(DataSet **pobservations,double* observations_list,double* x,double* y,int n){/*{{{*/
++
++	int i;
++	DataSet* observations = NULL;
++
++	/*Initialize Observation Dataset*/
++	observations = new DataSet();
++
++	/*Add observations one by one*/
++	for(i=0;i<n;i++){
++		observations->AddObject(new Observation(x[i],y[i],0,0,observations_list[i]));
++	}
++
++	/*Assign output pointer*/
++	*pobservations = observations;
++}/*}}}*/
++void ObservationList(double **px,double **py,double **pobs,int* pnobs,DataSet* observations,double x_interp,double y_interp){/*{{{*/
++
++	/*Output and Intermediaries*/
++	int          nobs,i;
++	double      *x           = NULL;
++	double      *y           = NULL;
++	double      *obs         = NULL;
++	Observation *observation = NULL;
++
++	/*Get number of observations*/
++	nobs = observations->Size();
++
++	/*Allocate vectors*/
++	x   = (double*)xmalloc(nobs*sizeof(double));
++	y   = (double*)xmalloc(nobs*sizeof(double));
++	obs = (double*)xmalloc(nobs*sizeof(double));
++
++	/*Loop over all observations and fill in x, y and obs*/
++	for (i=0;i<observations->Size();i++){
++		observation=(Observation*)observations->GetObjectByOffset(i);
++		observation->WriteXYObs(&x[i],&y[i],&obs[i]);
++	}
++
++	/*Assign output pointer*/
++	*px=x;
++	*py=y;
++	*pobs=obs;
++	*pnobs=nobs;
++}/*}}}*/
++void GslSolve(double** pX,double* A,double* B,int n){/*{{{*/
+ #ifdef _HAVE_GSL_
+ 
+-	/*GSL Matrices and vectors: */
+-	int              s;
+-	gsl_matrix_view  a;
+-	gsl_vector_view  b;
+-	gsl_vector      *x = NULL;
+-	gsl_permutation *p = NULL;
++		/*GSL Matrices and vectors: */
++		int              s;
++		gsl_matrix_view  a;
++		gsl_vector_view  b;
++		gsl_vector      *x = NULL;
++		gsl_permutation *p = NULL;
+ 
+-	/*A will be modified by LU decomposition. Use copy*/
+-	double* Acopy = (double*)xmalloc(n*n*sizeof(double));
+-	memcpy(Acopy,A,n*n*sizeof(double));
++		/*A will be modified by LU decomposition. Use copy*/
++		double* Acopy = (double*)xmalloc(n*n*sizeof(double));
++		memcpy(Acopy,A,n*n*sizeof(double));
+ 
+-	/*Initialize gsl matrices and vectors: */
+-	a = gsl_matrix_view_array (Acopy,n,n);
+-	b = gsl_vector_view_array (B,n);
+-	x = gsl_vector_alloc (n);
++		/*Initialize gsl matrices and vectors: */
++		a = gsl_matrix_view_array (Acopy,n,n);
++		b = gsl_vector_view_array (B,n);
++		x = gsl_vector_alloc (n);
+ 
+-	/*Run LU and solve: */
+-	p = gsl_permutation_alloc (n);
+-	gsl_linalg_LU_decomp (&a.matrix, p, &s);
+-	gsl_linalg_LU_solve (&a.matrix, p, &b.vector, x);
++		/*Run LU and solve: */
++		p = gsl_permutation_alloc (n);
++		gsl_linalg_LU_decomp (&a.matrix, p, &s);
++		gsl_linalg_LU_solve (&a.matrix, p, &b.vector, x);
+ 
+-	//printf ("x = \n");
+-	//gsl_vector_fprintf (stdout, x, "%g");
++		//printf ("x = \n");
++		//gsl_vector_fprintf (stdout, x, "%g");
+ 
+-	/*Copy result*/
+-	double* X = (double*)xmalloc(n*sizeof(double));
+-	memcpy(X,gsl_vector_ptr(x,0),n*sizeof(double));
++		/*Copy result*/
++		double* X = (double*)xmalloc(n*sizeof(double));
++		memcpy(X,gsl_vector_ptr(x,0),n*sizeof(double));
+ 
+-	/*Clean up and assign output pointer*/
+-	xfree((void**)&Acopy);
+-	gsl_permutation_free(p);
+-	gsl_vector_free(x);
+-	*pX=X;
++		/*Clean up and assign output pointer*/
++		xfree((void**)&Acopy);
++		gsl_permutation_free(p);
++		gsl_vector_free(x);
++		*pX=X;
+ #else
+-	_error_("GSL support required");
++		_error_("GSL support required");
+ #endif
+-}
++	}/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12206)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12207)
+@@ -9,6 +9,9 @@
+ #include "../../toolkits/toolkits.h"
+ 
+ int  Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp,Options* options);
++void ProcessVariogram(Variogram **pvariogram,Options* options);
++void ProcessObservations(DataSet **pobservations,double* observations_list,double* x,double* y,int n);
++void ObservationList(double **px,double **py,double **pobs,int* pnobs,DataSet* observations,double x_interp,double y_interp);
+ void GslSolve(double** pX,double* A,double* B,int n);
+ 
+ #endif /* _KRIGINGX_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12206)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12207)
+@@ -616,6 +616,10 @@
+ 					 ./objects/Kriging/ExponentialVariogram.cpp\
+ 					 ./objects/Kriging/SphericalVariogram.h\
+ 					 ./objects/Kriging/SphericalVariogram.cpp\
++					 ./objects/Kriging/Quadtree.h\
++					 ./objects/Kriging/Quadtree.cpp\
++					 ./objects/Kriging/Observation.h\
++					 ./objects/Kriging/Observation.cpp\
+ 					 ./modules/Krigingx/Krigingx.cpp\
+ 					 ./modules/Krigingx/Krigingx.h
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/objects.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/objects.h	(revision 12206)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/objects.h	(revision 12207)
+@@ -177,5 +177,7 @@
+ #include "./Kriging/GaussianVariogram.h"
+ #include "./Kriging/ExponentialVariogram.h"
+ #include "./Kriging/SphericalVariogram.h"
++#include "./Kriging/Quadtree.h"
++#include "./Kriging/Observation.h"
+ 
+ #endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12207)
+@@ -0,0 +1,43 @@
++
++#ifndef _QUADTREEK_H
++#define _QUADTREEK_H
++
++class Quadtree{
++
++	private:
++		/* A quadtree box contains up to 4 points (locations). 4 new quadtree boxes are
++		 * created if a fifth point is added to the same box. A Quadtree box is therefore
++		 * composed of EITHER:
++		 * - up to 4 vertices
++		 * - 4 "sub" quadtree boxes*/
++
++		class QuadtreeBox: public Object{ 
++			public:
++				int nbitems; // number of current vertices in the box
++				union{
++					QuadtreeBox *box[4];
++					int          index[4];
++				};
++
++				/*Object functions (Needed because the Quadtree uses a Container*/
++				void    Echo()      {_error_("not implemented yet"); };
++				void    DeepEcho()  {_error_("not implemented yet"); };
++				int     Id()        {_error_("not implemented yet"); };
++				int     MyRank()    {_error_("not implemented yet"); };
++				int     ObjectEnum(){_error_("not implemented yet"); };
++				Object *copy()      {_error_("not implemented yet"); };
++		};
++
++		/*Quadtree private Fields*/
++		DataSet* boxcontainer;
++
++	public:
++		QuadtreeBox* root;          // main box
++		long         NbQuadtreeBox; // total number of boxes
++		long         NbPoints;      // number of points
++
++		Quadtree();
++		~Quadtree();
++		QuadtreeBox* NewQuadtreeBox(void);
++};
++#endif //_QUADTREEK_H
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.h	(revision 12207)
+@@ -0,0 +1,33 @@
++/*! \file Observation.h 
++ *  \brief: header file for Observation object
++ */
++
++#ifndef _OBSERVATION_H_
++#define _OBSERVATION_H_
++
++#include "../Object.h"
++
++class Observation: public Object{
++
++	public:
++		double x,y;
++		int    xi,yi;
++		double value;
++
++		/*Observation constructors, destructors*/
++		Observation();
++		Observation(double x_in,double y_in,int xi_in,int yi_in,double value_in);
++		~Observation();
++
++		/*Object virtual functions definitions*/
++		void    Echo();
++		void    DeepEcho()  {_error_("Not implemented yet"); };
++		int     Id()        {_error_("Not implemented yet"); };
++		int     MyRank()    {_error_("Not implemented yet"); };
++		int     ObjectEnum(){_error_("Not implemented yet"); };
++		Object *copy()      {_error_("Not implemented yet"); };
++
++		/*Management*/
++		void WriteXYObs(double* px,double* py,double* pobs);
++};
++#endif  /* _EXPONENTIALVARIOGRAM_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12207)
+@@ -0,0 +1,98 @@
++#include "../objects.h"
++/*DOCUMENTATION What is a Quadtree? {{{1
++ * A Quadtree is a very simple way to group vertices according
++ * to their locations. A square that holds all the points of the mesh
++ * (or the geometry) is divided into 4 boxes. As soon as one box
++ * hold more than 4 vertices, it is divided into 4 new boxes, etc...
++ * There cannot be more than MAXDEEP (=30) subdivision.
++ * This process is like a Dichotomy in dimension 2
++ *
++ *  + - -  -    - -    -    - - + -   - + - + - + - -     - - +
++ *  |                           |       |   | X |             |
++ *                                      + - + - +
++ *  |                           |       |   |   |             |
++ *                              + -   - + - + - +             +
++ *  |                           |       |       |             |
++ *                         
++ *  |                           |       |       |             |
++ *  + - -  -    - -    -    - - + -   - + -   - + - -     - - +
++ *  |                           |               |             |
++ *                         
++ *  |                           |               |             |
++ *                         
++ *  |                           |               |             |
++ *  |                           |               |             |
++ *  + - -  -    - -    -    - - + -   -   -   - + - -     - - +
++ *  |                           |                             |
++ *                         
++ *  |                           |                             |
++ *                         
++ *  |                           |                             |
++ *                         
++ *  |                           |                             |
++ *  |                           |                             |
++ *  |                           |                             |
++ *  |                           |                             |
++ *  |                           |                             |
++ *  + - -  -    - -    -    - - + -   -   -   -   - -     - - +
++ *
++ * The coordinate system used in a quadtree are integers to avoid
++ * round-off errors. The vertex in the lower left box has the coordinates
++ * (0 0) 
++ * The upper right vertex has the follwing coordinates:
++ * 2^30 -1           2^30 -1        in decimal
++ * 0 1 1 1 .... 1    0 1 1 1 .... 1 in binary
++ *  \--   29  --/     \--   29  --/
++ * Using binaries is therefore very easy to locate a vertex in a box:
++ * we just need to look at the bits from the left to the right (See ::Add)
++ }}}1*/
++
++	/*Constructors/Destructors*/
++	/*FUNCTION Quadtree::Quadtree(){{{1*/
++	Quadtree::Quadtree(){
++
++		/*Number of boxes and vertices*/
++		NbQuadtreeBox=0;
++		NbPoints=0;
++
++		/*Create container*/
++		boxcontainer=new DataSet();
++
++		/*Create Root, pointer toward the main box*/
++		root=NewQuadtreeBox();
++
++		}
++	/*}}}1*/
++	/*FUNCTION Quadtree::~Quadtree(){{{1*/
++	Quadtree::~Quadtree() {
++
++		delete boxcontainer;
++		root=NULL;
++
++	}
++	/*}}}1*/
++
++	/*Methods*/
++	/*FUNCTION Quadtree::NewQuadtreeBox {{{1*/
++	Quadtree::QuadtreeBox* Quadtree::NewQuadtreeBox(void){
++
++		/*Output*/
++		QuadtreeBox* newbox=NULL;
++
++		/*Create and initialize a new box*/
++		newbox=new QuadtreeBox();
++		newbox->nbitems=0;
++		newbox->box[0]=NULL;
++		newbox->box[1]=NULL;
++		newbox->box[2]=NULL;
++		newbox->box[3]=NULL;
++
++		/*Add root to the container*/
++		boxcontainer->AddObject(newbox);
++
++		/*Increase counter*/
++		NbQuadtreeBox++;
++
++		/*currentbox now points toward next quadtree box*/
++		return newbox;
++	}/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.cpp	(revision 12207)
+@@ -0,0 +1,49 @@
++/*!\file Observation.c
++ * \brief: implementation of the Observation object
++ */
++
++#include "../objects.h"
++
++/*Observation constructors and destructor*/
++/*FUNCTION Observation::Observation(){{{1*/
++Observation::Observation(){
++	return;
++}
++/*}}}*/
++/*FUNCTION Observation::Observation(double x,double y,int xi,int yi,double value){{{1*/
++Observation::Observation(double x_in,double y_in,int xi_in,int yi_in,double value_in){
++
++	this->x     = x_in;
++	this->y     = y_in;
++	this->xi    = xi_in;
++	this->yi    = yi_in;
++	this->value = value_in;
++
++}
++/*}}}*/
++/*FUNCTION Observation::~Observation(){{{1*/
++Observation::~Observation(){
++	return;
++}
++/*}}}*/
++
++/*Object virtual functions definitions:*/
++/*FUNCTION Observation::Echo {{{1*/
++void Observation::Echo(void){
++	printf("Observation\n");
++	printf("   x     : %g\n",this->x);
++	printf("   y     : %g\n",this->y);
++	printf("   xi    : %i\n",this->xi);
++	printf("   yi    : %i\n",this->yi);
++	printf("   value : %g\n",this->value);
++}
++/*}}}*/
++
++/*Observations functions*/
++/*FUNCTION Observation::WriteXYObs(double* px,double* py,double* pobs){{{1*/
++void Observation::WriteXYObs(double* px,double* py,double* pobs){
++	*px   = this->x;
++	*py   = this->y;
++	*pobs = this->value;
++}
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Variogram.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Variogram.h	(revision 12206)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Variogram.h	(revision 12207)
+@@ -2,7 +2,6 @@
+  * \brief abstract class for Variogram object
+  */ 
+ 
+-
+ #ifndef _VARIOGRAM_H_
+ #define _VARIOGRAM_H_
+ 
Index: /issm/oecreview/Archive/12201-12220/ISSM-12207-12208.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12207-12208.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12207-12208.diff	(revision 12325)
@@ -0,0 +1,56 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-32.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-32.sh	(revision 12207)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-32.sh	(revision 12208)
+@@ -1,38 +1,38 @@
+ declare -x ALLUSERSPROFILE="C:\\ProgramData"
+-declare -x CL="/AI C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319"
+-declare -x COMMONPROGRAMFILES="C:\\Program Files (x86)\\Common Files"
++declare -x CL="/AI C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319"
++declare -x COMMONPROGRAMFILES="C:\\Program Files\\Common Files"
+ declare -x COMSPEC="C:\\Windows\\system32\\cmd.exe"
+-declare -x CommandPromptType="Cross"
+-declare -x CommonProgramW6432="C:\\Program Files\\Common Files"
++declare -x CommandPromptType="Native"
+ declare -x Configuration="Debug"
+ declare -x FP_NO_HOST_CHECK="NO"
+ declare -x FrameworkVersion="v4.0.30319"
+ declare -x HOMEDRIVE="C:"
+-declare -x INCLUDE="C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\INCLUDE;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\INCLUDE\\gl;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\INCLUDE;"
++declare -x INCLUDE="C:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\INCLUDE;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\INCLUDE;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\INCLUDE\\gl;"
+ declare -x INFOPATH="/usr/local/info:/usr/share/info:/usr/info:"
+ declare -x LANG="en_US.UTF-8"
+-declare -x LIB="C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Lib;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Lib;C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\LIB;"
+-declare -x LIBPATH="C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;;C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\Lib;"
++declare -x LIB="C:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\Lib;C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Lib;C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;;"
++declare -x LIBPATH="C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;;C:\\Program Files\\Microsoft Visual Studio 10.0\\VC\\Lib;"
+ declare -x MANPATH="/usr/local/man:/usr/share/man:/usr/man:"
+-declare -x PATH="/usr/local/bin:/usr/bin:/cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/IDE:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/Common7/Tools:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio 10.0/VC/Bin/VCPackages:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/NETFX 4.0 Tools:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Microsoft Windows Performance Toolkit:/cygdrive/c/MATLAB/R2011b32/runtime/win32:/cygdrive/c/MATLAB/R2011b32/bin:/cygdrive/c/MATLAB/R2011b/runtime/win64:/cygdrive/c/MATLAB/R2011b/bin:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/c/Program Files/Microsoft Network Monitor 3"
++declare -x PATH="/usr/local/bin:/usr/bin:/cygdrive/c/Windows/Microsoft.NET/Framework/v4.0.30319:/cygdrive/c/Windows/Microsoft.NET/Framework/v3.5:/cygdrive/c/Program Files/Microsoft Visual Studio 10.0/Common7/IDE:/cygdrive/c/Program Files/Microsoft Visual Studio 10.0/Common7/Tools:/cygdrive/c/Program Files/Microsoft Visual Studio 10.0/VC/Bin:/cygdrive/c/Program Files/Microsoft Visual Studio 10.0/VC/Bin/VCPackages:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin/NETFX 4.0 Tools:/cygdrive/c/Program Files/Microsoft SDKs/Windows/v7.1/Bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/MATLAB/R2012a/runtime/win32:/cygdrive/c/MATLAB/R2012a/bin:/cygdrive/c/Program Files/Microsoft Windows Performance Toolkit"
+ declare -x PATHEXT=".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC"
++declare -x PRINTER="137.78.140.129#:1"
+ declare -x PROCESSOR_ARCHITECTURE="x86"
+-declare -x PROCESSOR_ARCHITEW6432="AMD64"
+-declare -x PROCESSOR_IDENTIFIER="Intel64 Family 6 Model 42 Stepping 7, GenuineIntel"
++declare -x PROCESSOR_IDENTIFIER="x86 Family 6 Model 42 Stepping 7, GenuineIntel"
+ declare -x PROCESSOR_LEVEL="6"
+ declare -x PROCESSOR_REVISION="2a07"
+-declare -x PROGRAMFILES="C:\\Program Files (x86)"
++declare -x PROGRAMFILES="C:\\Program Files"
+ declare -x PSModulePath="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules\\"
+ declare -x PUBLIC="C:\\Users\\Public"
+ declare -x PlatformToolset="Windows7.1SDK"
+ declare -x ProgramData="C:\\ProgramData"
+-declare -x ProgramW6432="C:\\Program Files"
+ declare -x SHELL="/bin/bash"
+ declare -x SYSTEMDRIVE="C:"
+ declare -x SYSTEMROOT="C:\\Windows"
++declare -x TARGET_CPU="x86"
+ declare -x TARGET_PLATFORM="WIN7"
+ declare -x TERM="cygwin"
+-declare -x VS100COMNTOOLS="C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\Tools\\"
++declare -x ToolsVersion="4.0"
++declare -x VS100COMNTOOLS="C:\\Program Files\\Microsoft Visual Studio 10.0\\Common7\\Tools\\"
+ declare -x WINDIR="C:\\Windows"
+ declare -x WindowsSDKDir="C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\"
+ declare -x WindowsSDKVersionOverride="v7.1"
Index: /issm/oecreview/Archive/12201-12220/ISSM-12208-12209.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12208-12209.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12208-12209.diff	(revision 12325)
@@ -0,0 +1,24 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/windows_environment.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/windows_environment.sh	(revision 12208)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/windows_environment.sh	(revision 12209)
+@@ -9,8 +9,18 @@
+ # 3: intel compiler on Win7
+ # 4: intel compiler on WinXP
+ 
+-compiler=2;
++#Determine OS version using uname: 
++version=`uname -s | grep 64`
++if [[ $version == "" ]];then
++	compiler=1
++else
++	compiler=2
++fi
+ 
++#If you want to override and use intel compilers: 
++#compiler=3;
++
++
+ #source corresponding environment variables: 
+ 
+ if [[ "$compiler" == "1" ]]; then 
Index: /issm/oecreview/Archive/12201-12220/ISSM-12209-12210.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12209-12210.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12209-12210.diff	(revision 12325)
@@ -0,0 +1,454 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12210)
+@@ -0,0 +1,79 @@
++/*
++ * \file Observations.c
++ * \brief: implementation of the Observations class, derived from DataSet class
++ */
++
++/*Headers: {{{*/
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include <vector>
++#include <functional>
++#include <algorithm>
++#include <iostream>
++
++#include "./DataSet.h"
++#include "./Observations.h"
++#include "../shared/shared.h"
++#include "../include/include.h"
++#include "../EnumDefinitions/EnumDefinitions.h"
++
++using namespace std;
++/*}}}*/
++
++/*Object constructors and destructor*/
++/*FUNCTION Observations::Observations(){{{*/
++Observations::Observations(){
++	return;
++}
++/*}}}*/
++/*FUNCTION Observations::Observations(double* observations_list,double* x,double* y,int n){{{*/
++Observations::Observations(double* observations_list,double* x,double* y,int n){
++
++	/*Add observations one by one*/
++	for(int i=0;i<n;i++){
++		this->AddObject(new Observation(x[i],y[i],0,0,observations_list[i]));
++	}
++
++}
++/*}}}*/
++/*FUNCTION Observations::~Observations(){{{*/
++Observations::~Observations(){
++	return;
++}
++/*}}}*/
++
++/*Methods*/
++/*FUNCTION Observations::ObservationList{{{*/
++void Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp){/*{{{*/
++
++	/*Output and Intermediaries*/
++	int          nobs,i;
++	double      *x           = NULL;
++	double      *y           = NULL;
++	double      *obs         = NULL;
++	Observation *observation = NULL;
++
++	/*Get number of observations*/
++	nobs = this->Size();
++
++	/*Allocate vectors*/
++	x   = (double*)xmalloc(nobs*sizeof(double));
++	y   = (double*)xmalloc(nobs*sizeof(double));
++	obs = (double*)xmalloc(nobs*sizeof(double));
++
++	/*Loop over all observations and fill in x, y and obs*/
++	for (i=0;i<nobs;i++){
++		observation=(Observation*)this->GetObjectByOffset(i);
++		observation->WriteXYObs(&x[i],&y[i],&obs[i]);
++	}
++
++	/*Assign output pointer*/
++	*px=x;
++	*py=y;
++	*pobs=obs;
++	*pnobs=nobs;
++}/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h	(revision 12210)
+@@ -0,0 +1,24 @@
++/*!\file: Observations.h
++ * \brief prototypes for Observations.h
++ */ 
++
++#ifndef _CONTAINER_OBSERVATIONS_H_
++#define  _CONTAINER_OBSERVATIONS_H_
++
++class Obsevration;
++
++class Observations: public DataSet{
++
++	public:
++
++		/*constructors, destructors*/
++		Observations();
++		Observations(double* observations_list,double* x,double* y,int n);
++		~Observations();
++
++		/*Methods*/
++		void ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp);
++
++};
++#endif //ifndef _OBSERVATIONS_H_
++
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12209)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12210)
+@@ -7,6 +7,7 @@
+ #include "../../include/include.h"
+ #include "../../toolkits/toolkits.h"
+ #include "../../objects/objects.h"
++#include "../../Container/Observations.h"
+ #include "../modules.h"
+ 
+ #ifdef _HAVE_GSL_
+@@ -20,25 +21,25 @@
+ 	double *predictions = NULL;
+ 
+ 	/*Intermediaries*/
+-	int        i,j,n_obs;
+-	double     numerator,denominator,ratio;
+-	double    *x            = NULL;
+-	double    *y            = NULL;
+-	double    *obs          = NULL;
+-	double    *Gamma        = NULL;
+-	double    *GinvG0       = NULL;
+-	double    *Ginv1        = NULL;
+-	double    *GinvZ        = NULL;
+-	double    *gamma0       = NULL;
+-	double    *ones         = NULL;
+-	Variogram *variogram    = NULL;
+-	DataSet   *observations = NULL;
++	int           i,j,n_obs;
++	double        numerator,denominator,ratio;
++	double       *x            = NULL;
++	double       *y            = NULL;
++	double       *obs          = NULL;
++	double       *Gamma        = NULL;
++	double       *GinvG0       = NULL;
++	double       *Ginv1        = NULL;
++	double       *GinvZ        = NULL;
++	double       *gamma0       = NULL;
++	double       *ones         = NULL;
++	Variogram    *variogram    = NULL;
++	Observations *observations = NULL;
+ 
+ 	/*Get Variogram from Options*/
+ 	ProcessVariogram(&variogram,options);
+ 
+ 	/*Process observation dataset*/
+-	ProcessObservations(&observations,obs_list,obs_x,obs_y,obs_length);
++	observations=new Observations(obs_list,obs_x,obs_y,obs_length);
+ 
+ 	/*Allocation output*/
+ 	predictions =(double*)xmalloc(n_interp*sizeof(double));
+@@ -49,7 +50,7 @@
+ 		if(idx%10==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)idx/n_interp*100);
+ 
+ 		/*Get list of observations for current point*/
+-		ObservationList(&x,&y,&obs,&n_obs,observations,x_interp[idx],y_interp[idx]);
++		observations->ObservationList(&x,&y,&obs,&n_obs,x_interp[idx],y_interp[idx]);
+ 
+ 		/*Allocate intermediary matrix and vectors*/
+ 		Gamma       =(double*)xmalloc(n_obs*n_obs*sizeof(double));
+@@ -120,51 +121,6 @@
+ 	xfree((void**)&model);
+ 	*pvariogram = variogram;
+ }/*}}}*/
+-void ProcessObservations(DataSet **pobservations,double* observations_list,double* x,double* y,int n){/*{{{*/
+-
+-	int i;
+-	DataSet* observations = NULL;
+-
+-	/*Initialize Observation Dataset*/
+-	observations = new DataSet();
+-
+-	/*Add observations one by one*/
+-	for(i=0;i<n;i++){
+-		observations->AddObject(new Observation(x[i],y[i],0,0,observations_list[i]));
+-	}
+-
+-	/*Assign output pointer*/
+-	*pobservations = observations;
+-}/*}}}*/
+-void ObservationList(double **px,double **py,double **pobs,int* pnobs,DataSet* observations,double x_interp,double y_interp){/*{{{*/
+-
+-	/*Output and Intermediaries*/
+-	int          nobs,i;
+-	double      *x           = NULL;
+-	double      *y           = NULL;
+-	double      *obs         = NULL;
+-	Observation *observation = NULL;
+-
+-	/*Get number of observations*/
+-	nobs = observations->Size();
+-
+-	/*Allocate vectors*/
+-	x   = (double*)xmalloc(nobs*sizeof(double));
+-	y   = (double*)xmalloc(nobs*sizeof(double));
+-	obs = (double*)xmalloc(nobs*sizeof(double));
+-
+-	/*Loop over all observations and fill in x, y and obs*/
+-	for (i=0;i<observations->Size();i++){
+-		observation=(Observation*)observations->GetObjectByOffset(i);
+-		observation->WriteXYObs(&x[i],&y[i],&obs[i]);
+-	}
+-
+-	/*Assign output pointer*/
+-	*px=x;
+-	*py=y;
+-	*pobs=obs;
+-	*pnobs=nobs;
+-}/*}}}*/
+ void GslSolve(double** pX,double* A,double* B,int n){/*{{{*/
+ #ifdef _HAVE_GSL_
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12209)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12210)
+@@ -10,8 +10,6 @@
+ 
+ int  Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp,Options* options);
+ void ProcessVariogram(Variogram **pvariogram,Options* options);
+-void ProcessObservations(DataSet **pobservations,double* observations_list,double* x,double* y,int n);
+-void ObservationList(double **px,double **py,double **pobs,int* pnobs,DataSet* observations,double x_interp,double y_interp);
+ void GslSolve(double** pX,double* A,double* B,int n);
+ 
+ #endif /* _KRIGINGX_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12209)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12210)
+@@ -609,19 +609,21 @@
+ 				./modules/BamgTriangulatex/BamgTriangulatex.h
+ #}}}
+ #Kriging sources  {{{1
+-kriging_sources = ./objects/Kriging/Variogram.h \
+-					 ./objects/Kriging/GaussianVariogram.h\
+-					 ./objects/Kriging/GaussianVariogram.cpp\
+-					 ./objects/Kriging/ExponentialVariogram.h\
+-					 ./objects/Kriging/ExponentialVariogram.cpp\
+-					 ./objects/Kriging/SphericalVariogram.h\
+-					 ./objects/Kriging/SphericalVariogram.cpp\
+-					 ./objects/Kriging/Quadtree.h\
+-					 ./objects/Kriging/Quadtree.cpp\
+-					 ./objects/Kriging/Observation.h\
+-					 ./objects/Kriging/Observation.cpp\
+-					 ./modules/Krigingx/Krigingx.cpp\
+-					 ./modules/Krigingx/Krigingx.h
++kriging_sources = ./Container/Observations.h\
++						./Container/Observations.cpp\
++						./objects/Kriging/Variogram.h \
++						./objects/Kriging/GaussianVariogram.h\
++						./objects/Kriging/GaussianVariogram.cpp\
++						./objects/Kriging/ExponentialVariogram.h\
++						./objects/Kriging/ExponentialVariogram.cpp\
++						./objects/Kriging/SphericalVariogram.h\
++						./objects/Kriging/SphericalVariogram.cpp\
++						./objects/Kriging/Quadtree.h\
++						./objects/Kriging/Quadtree.cpp\
++						./objects/Kriging/Observation.h\
++						./objects/Kriging/Observation.cpp\
++						./modules/Krigingx/Krigingx.cpp\
++						./modules/Krigingx/Krigingx.h
+ 
+ #}}}
+ #Kml sources  {{{1
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12209)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12210)
+@@ -2,6 +2,8 @@
+ #ifndef _QUADTREEK_H
+ #define _QUADTREEK_H
+ 
++class Observation;
++
+ class Quadtree{
+ 
+ 	private:
+@@ -16,7 +18,7 @@
+ 				int nbitems; // number of current vertices in the box
+ 				union{
+ 					QuadtreeBox *box[4];
+-					int          index[4];
++					Observation *obs[4];
+ 				};
+ 
+ 				/*Object functions (Needed because the Quadtree uses a Container*/
+@@ -34,10 +36,11 @@
+ 	public:
+ 		QuadtreeBox* root;          // main box
+ 		long         NbQuadtreeBox; // total number of boxes
+-		long         NbPoints;      // number of points
++		long         NbObs;      // number of points
+ 
+ 		Quadtree();
+ 		~Quadtree();
++		void Add(Observation* observation);
+ 		QuadtreeBox* NewQuadtreeBox(void);
+ };
+ #endif //_QUADTREEK_H
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12209)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12210)
+@@ -46,6 +46,37 @@
+  * Using binaries is therefore very easy to locate a vertex in a box:
+  * we just need to look at the bits from the left to the right (See ::Add)
+  }}}1*/
++/*MACROS {{{1*/
++/* 
++ * 
++ *    J    j
++ *    ^    ^
++ *    |    | +--------+--------+
++ *    |    | |        |        |
++ * 1X |    | |   2    |   3    |
++ *    |    | |        |        |
++ *    |    | +--------+--------+
++ *    |    | |        |        |
++ * 0X |    | |   0    |   1    |
++ *    |    | |        |        |
++ *    |    | +--------+--------+
++ *    |    +-----------------------> i
++ *    |         
++ *    |----------------------------> I
++ *              X0        X1  
++ *
++ * box 0 -> I=0 J=0 IJ=00  = 0
++ * box 1 -> I=1 J=0 IJ=01  = 1
++ * box 2 -> I=0 J=1 IJ=10  = 2
++ * box 3 -> I=1 J=1 IJ=11  = 3
++ */
++//IJ(i,j,l) returns the box number of i and j with respect to l
++//if !j&l and !i&l -> 0 (box zero: lower left )
++//if !j&l and  i&l -> 1 (box one:  lower right)
++//if  j&l and !i&l -> 2 (box two:  upper left )
++//if  j&l and  i&l -> 3 (box three:upper right)
++#define IJ(i,j,l)  ((j&l) ? ((i&l) ? 3:2 ) :((i&l) ? 1:0 ))
++/*}}}*/
+ 
+ 	/*Constructors/Destructors*/
+ 	/*FUNCTION Quadtree::Quadtree(){{{1*/
+@@ -53,7 +84,7 @@
+ 
+ 		/*Number of boxes and vertices*/
+ 		NbQuadtreeBox=0;
+-		NbPoints=0;
++		NbObs=0;
+ 
+ 		/*Create container*/
+ 		boxcontainer=new DataSet();
+@@ -73,6 +104,89 @@
+ 	/*}}}1*/
+ 
+ 	/*Methods*/
++/*FUNCTION Quadtree::Add{{{1*/
++void  Quadtree::Add(Observation* observation){
++
++	/*Intermediaries*/
++	const int     MaxDeep  = 30;
++	int           k,ij;
++	long          i,j,level;
++	QuadtreeBox **pb = NULL;
++	QuadtreeBox  *b  = NULL;
++
++	/*Get integer coodinates*/
++	i = observation->xi;
++	j = observation->yi;
++
++	/*Initialize level*/
++	level=(1L<<MaxDeep);// = 2^30
++
++	/*Get inital box (the largest)*/
++	pb=&root;
++
++	/*Find the smallest box where the observation is located*/
++	while((b=*pb) && (b->nbitems<0)){ 
++
++		/*shift b->nbitems by -1 as a counter*/
++		b->nbitems--;
++
++		/*Go down one level = 00100 -> 00010*/
++		level>>=1;
++
++		/*Get next subbox according to the bit value (level)*/
++		pb = &b->box[IJ(i,j,level)];
++	}
++	_assert_(level>0);
++
++	/*Now, try to add the vertex, if the box is full (nbitems=4), we have to divide it in 4 new boxes*/
++	while((b=*pb) && (b->nbitems==4)){
++
++		/*Copy the 4 observation in the current Quadtreebox*/
++		Observation* obs[4];
++		obs[0] = b->obs[0];
++		obs[1] = b->obs[1];
++		obs[2] = b->obs[2];
++		obs[3] = b->obs[3];
++
++		/*set nbitems as negative (now holding boxes instead of observations)*/
++		b->nbitems = -b->nbitems;
++
++		/*Initialize the 4 pointers toward the 4 subboxes*/
++		b->box[0]=NULL;
++		b->box[1]=NULL;
++		b->box[2]=NULL;
++		b->box[3]=NULL;
++
++		/*level = 00100 -> 00010*/
++		level>>=1;
++
++		/*Put the four observations in the new boxes*/
++		for (k=0;k<4;k++){
++
++			/*Get box for observation number k*/
++			ij=IJ(obs[k]->xi,obs[k]->yi,level);
++			QuadtreeBox *bb = b->box[ij];
++			if(!bb){
++				b->box[ij]=NewQuadtreeBox();
++				bb=b->box[ij];
++			}
++
++			/*Copy current observations*/
++			bb->obs[bb->nbitems++] = obs[k];
++		}
++
++		/*Get the subbox where the current observation is located*/
++		ij=IJ(i,j,level);
++		pb=&b->box[ij];
++	}
++
++	/*alloc the QuadtreeBox if necessary and add current observation*/
++	b=*pb;
++	if(!b) b=NewQuadtreeBox();
++	b->obs[b->nbitems++]=observation;
++	NbObs++;
++
++}/*}}}*/
+ 	/*FUNCTION Quadtree::NewQuadtreeBox {{{1*/
+ 	Quadtree::QuadtreeBox* Quadtree::NewQuadtreeBox(void){
+ 
Index: /issm/oecreview/Archive/12201-12220/ISSM-12210-12211.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12210-12211.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12210-12211.diff	(revision 12325)
@@ -0,0 +1,37 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-ubuntu64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-ubuntu64.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-ubuntu64.sh	(revision 12211)
+@@ -0,0 +1,26 @@
++#!/bin/sh
++
++./configure \
++ --prefix=$ISSM_DIR \
++ --with-matlab-dir=$MATLAB_DIR \
++ --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++ --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++ --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-mpi-include=$ISSM_DIR/externalpackages/mpich2/install/include  \
++ --with-mpi-lib="-L$ISSM_DIR/externalpackages/mpich2/install/lib/ -lmpich -lmpl -ldl" \
++ --with-petsc-arch=$ISSM_ARCH \
++ --with-blas-lapack-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++ --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
++ --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-scotch-dir="$ISSM_DIR/externalpackages/scotch/install" \
++ --with-chaco-dir="$ISSM_DIR/externalpackages/chaco/install" \
++ --with-cxxoptflags="-mtune=barcelona -ffast-math -O3 -msse4.2 -Wno-write-strings "\
++ --with-fortran-lib="-lgfortran"\
++ --with-numthreads=8 \
++ --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
++ --enable-debugging
++ 
++ 
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-ubuntu64.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12201-12220/ISSM-12211-12212.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12211-12212.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12211-12212.diff	(revision 12325)
@@ -0,0 +1,50 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-ubuntu64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-ubuntu64.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-ubuntu64.sh	(revision 12212)
+@@ -0,0 +1,39 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf install petsc-3.1-p7 src
++mkdir install src
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-3.1-p7.tar.gz' 'petsc-3.1-p7.tar.gz'
++
++#Untar and move petsc to install directory
++tar -zxvf  petsc-3.1-p7.tar.gz
++mv petsc-3.1-p7/* src/
++rm -rf petsc-3.1-p7
++
++#configure
++cd src
++./config/configure.py \
++ --prefix="$ISSM_DIR/externalpackages/petsc/install" \
++ --with-mpi-dir=$ISSM_DIR/externalpackages/mpich2/install \
++ --PETSC_ARCH=linux-gnu\
++ --PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
++ --with-debugging=0 \
++ --with-shared=0 \
++ --download-mumps=yes \
++ --download-scalapack=yes \
++ --download-blacs=yes \
++ --download-blas=yes \
++ --download-f-blas-lapack=yes \
++ --download-parmetis=yes \
++ --FFLAGS=-I$ISSM_DIR/externalpackages/mpich2/install/include \
++ --download-plapack=yes \
++ --COPTFLAGS="-O2" \
++ --FOPTFLAGS="-O2" \
++ --CXXOPTFLAGS="-O2" \
++ --with-pic=1
++
++#Compile petsc and install it
++make
++make install
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.1-ubuntu64.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12201-12220/ISSM-12212-12213.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12212-12213.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12212-12213.diff	(revision 12325)
@@ -0,0 +1,389 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12212)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12213)
+@@ -27,28 +27,62 @@
+ /*Object constructors and destructor*/
+ /*FUNCTION Observations::Observations(){{{*/
+ Observations::Observations(){
++	this->quadtree = NULL;
+ 	return;
+ }
+ /*}}}*/
+ /*FUNCTION Observations::Observations(double* observations_list,double* x,double* y,int n){{{*/
+ Observations::Observations(double* observations_list,double* x,double* y,int n){
+ 
++	const int MaxICoor = 1073741823; // 2^30-1 =111...111 (29 times)
++
++	/*Intermediaries*/
++	int          i;
++	int          xi,yi;
++	double       offset;
++	Observation *observation = NULL;
++
++	/*Initialize Quadtree*/
++	this->quadtree = new Quadtree();
++
++	/*Get extrema*/
++	this->xmin=x[0]; this->ymin=y[0];
++	this->xmax=x[0]; this->ymax=y[0];
++	for(i=1;i<n;i++){
++		xmin=min(xmin,x[i]); ymin=min(ymin,y[i]);
++		xmax=max(xmax,x[i]); ymax=max(ymax,y[i]);
++	}
++	offset=0.05*(xmax-xmin); xmin-=offset; xmax+=offset;
++	offset=0.05*(ymax-ymin); ymin-=offset; ymax+=offset;
++
++	/*coeffIcoor is the coefficient used for integer coordinates:
++	 *                (x-xmin)
++	 * xi = (2^30 -1) ------------ 
++	 *                   D
++	 * coefficient = (2^30 -1)/D
++	 */
++	this->coefficient = double(MaxICoor)/max(xmax-xmin,ymax-ymin); _assert_(coefficient>=0);
++
+ 	/*Add observations one by one*/
+-	for(int i=0;i<n;i++){
+-		this->AddObject(new Observation(x[i],y[i],0,0,observations_list[i]));
++	for(i=0;i<n;i++){
++		xi=int(coefficient*(x[i]-xmin));
++		yi=int(coefficient*(y[i]-ymin));
++		observation = new Observation(x[i],y[i],xi,yi,observations_list[i]);
++		this->quadtree->Add(observation);
++		this->AddObject(observation);
+ 	}
+-
+ }
+ /*}}}*/
+ /*FUNCTION Observations::~Observations(){{{*/
+ Observations::~Observations(){
++	delete quadtree;
+ 	return;
+ }
+ /*}}}*/
+ 
+ /*Methods*/
+ /*FUNCTION Observations::ObservationList{{{*/
+-void Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp){/*{{{*/
++void Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp){
+ 
+ 	/*Output and Intermediaries*/
+ 	int          nobs,i;
+@@ -77,3 +111,22 @@
+ 	*pobs=obs;
+ 	*pnobs=nobs;
+ }/*}}}*/
++/*FUNCTION Observations::QuadtreeColoring{{{*/
++void Observations::QuadtreeColoring(double* A,double *x,double *y,int n){
++
++	/*Convert to integer coordinates*/
++	int *xi = (int*)xmalloc(n*sizeof(int));
++	int *yi = (int*)xmalloc(n*sizeof(int));
++	for(int i=0;i<n;i++){
++		xi[i]=int(coefficient*(x[i]-xmin));
++		yi[i]=int(coefficient*(y[i]-ymin));
++	}
++
++	/*Call quadtree method*/
++	this->quadtree->QuadtreeColoring(A,xi,yi,n);
++
++	/*clean-up*/
++	xfree((void**)&xi);
++	xfree((void**)&yi);
++
++}/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h	(revision 12212)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h	(revision 12213)
+@@ -6,9 +6,18 @@
+ #define  _CONTAINER_OBSERVATIONS_H_
+ 
+ class Obsevration;
++class Quadtree;
+ 
+ class Observations: public DataSet{
+ 
++	private:
++		Quadtree* quadtree;
++		double    coefficient; //For integer coordinate conversion
++		double    xmin;
++		double    ymin;
++		double    xmax;
++		double    ymax;
++
+ 	public:
+ 
+ 		/*constructors, destructors*/
+@@ -18,6 +27,7 @@
+ 
+ 		/*Methods*/
+ 		void ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp);
++		void QuadtreeColoring(double* A,double *x,double *y,int n);
+ 
+ };
+ #endif //ifndef _OBSERVATIONS_H_
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Vertices.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Vertices.h	(revision 12212)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Vertices.h	(revision 12213)
+@@ -31,7 +31,4 @@
+ 
+ };
+ 
+-
+-
+ #endif //ifndef _VERTICES_H_
+-
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Elements/elements.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Elements/elements.h	(revision 12212)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Elements/elements.h	(revision 12213)
+@@ -46,5 +46,17 @@
+ 	}  
+ 	printf("\n");
+ }
++inline void printbinary(int n) {
++	unsigned int i;
++	i=1<<(sizeof(n)*8-1);
+ 
++	while (i>0) {
++		if (n&i)
++		 printf("1");
++		else
++		 printf("0");
++		i>>=1;
++	}
++}
++
+ #endif //ifndef _SHARED_ELEMENTS_H_
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12212)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12213)
+@@ -44,6 +44,11 @@
+ 	/*Allocation output*/
+ 	predictions =(double*)xmalloc(n_interp*sizeof(double));
+ 
++	for(i=0;i<n_interp;i++) predictions[i]=0;
++	observations->QuadtreeColoring(predictions,x_interp,y_interp,n_interp);
++	*ppredictions=predictions;
++	return 1;
++
+ 	/*Loop over all interpolations*/
+ 	printf("      interpolation progress:  %5.2lf %%",0.0);
+ 	for(int idx=0;idx<n_interp;idx++){
+@@ -100,6 +105,7 @@
+ 	delete variogram;
+ 	delete observations;
+ 	*ppredictions=predictions;
++	return 1;
+ }
+ 
+ void ProcessVariogram(Variogram **pvariogram,Options* options){/*{{{*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12212)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12213)
+@@ -40,7 +40,9 @@
+ 
+ 		Quadtree();
+ 		~Quadtree();
+-		void Add(Observation* observation);
+-		QuadtreeBox* NewQuadtreeBox(void);
++		void         Echo(void);
++		void         Add(Observation *observation);
++		void         QuadtreeColoring(double *A,int *xi,int *yi,int n);
++		QuadtreeBox *NewQuadtreeBox(void);
+ };
+ #endif //_QUADTREEK_H
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12212)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12213)
+@@ -109,14 +109,15 @@
+ 
+ 	/*Intermediaries*/
+ 	const int     MaxDeep  = 30;
+-	int           k,ij;
+-	long          i,j,level;
++	int          xi,yi,ij,level;
+ 	QuadtreeBox **pb = NULL;
+ 	QuadtreeBox  *b  = NULL;
++	QuadtreeBox  *bb = NULL;
++	Observation  *obs[4];
+ 
+ 	/*Get integer coodinates*/
+-	i = observation->xi;
+-	j = observation->yi;
++	xi = observation->xi;
++	yi = observation->yi;
+ 
+ 	/*Initialize level*/
+ 	level=(1L<<MaxDeep);// = 2^30
+@@ -127,14 +128,11 @@
+ 	/*Find the smallest box where the observation is located*/
+ 	while((b=*pb) && (b->nbitems<0)){ 
+ 
+-		/*shift b->nbitems by -1 as a counter*/
+-		b->nbitems--;
+-
+ 		/*Go down one level = 00100 -> 00010*/
+ 		level>>=1;
+ 
+ 		/*Get next subbox according to the bit value (level)*/
+-		pb = &b->box[IJ(i,j,level)];
++		pb = &b->box[IJ(xi,yi,level)];
+ 	}
+ 	_assert_(level>0);
+ 
+@@ -142,7 +140,6 @@
+ 	while((b=*pb) && (b->nbitems==4)){
+ 
+ 		/*Copy the 4 observation in the current Quadtreebox*/
+-		Observation* obs[4];
+ 		obs[0] = b->obs[0];
+ 		obs[1] = b->obs[1];
+ 		obs[2] = b->obs[2];
+@@ -161,52 +158,87 @@
+ 		level>>=1;
+ 
+ 		/*Put the four observations in the new boxes*/
+-		for (k=0;k<4;k++){
++		for (int k=0;k<4;k++){
+ 
+ 			/*Get box for observation number k*/
+-			ij=IJ(obs[k]->xi,obs[k]->yi,level);
+-			QuadtreeBox *bb = b->box[ij];
++			ij = IJ(obs[k]->xi,obs[k]->yi,level);
++			bb = b->box[ij];
+ 			if(!bb){
+ 				b->box[ij]=NewQuadtreeBox();
+ 				bb=b->box[ij];
+ 			}
+-
+-			/*Copy current observations*/
+ 			bb->obs[bb->nbitems++] = obs[k];
+ 		}
+ 
+ 		/*Get the subbox where the current observation is located*/
+-		ij=IJ(i,j,level);
++		ij=IJ(xi,yi,level);
+ 		pb=&b->box[ij];
+ 	}
+ 
+ 	/*alloc the QuadtreeBox if necessary and add current observation*/
+ 	b=*pb;
+-	if(!b) b=NewQuadtreeBox();
++	if(!b){
++		b=*pb=NewQuadtreeBox();
++	}
+ 	b->obs[b->nbitems++]=observation;
+ 	NbObs++;
+ 
+ }/*}}}*/
+-	/*FUNCTION Quadtree::NewQuadtreeBox {{{1*/
+-	Quadtree::QuadtreeBox* Quadtree::NewQuadtreeBox(void){
++/*FUNCTION Quadtree::Echo{{{1*/
++void  Quadtree::Echo(void){
+ 
+-		/*Output*/
+-		QuadtreeBox* newbox=NULL;
++	printf("Quadtree:\n");
++	printf("   NbQuadtreeBox = %i\n",NbQuadtreeBox);
++	printf("   NbObs         = %i\n",NbObs);
++	printf("   root          = %p\n",root);
+ 
+-		/*Create and initialize a new box*/
+-		newbox=new QuadtreeBox();
+-		newbox->nbitems=0;
+-		newbox->box[0]=NULL;
+-		newbox->box[1]=NULL;
+-		newbox->box[2]=NULL;
+-		newbox->box[3]=NULL;
++}/*}}}*/
++/*FUNCTION Quadtree::NewQuadtreeBox {{{1*/
++Quadtree::QuadtreeBox* Quadtree::NewQuadtreeBox(void){
+ 
+-		/*Add root to the container*/
+-		boxcontainer->AddObject(newbox);
++	/*Output*/
++	QuadtreeBox* newbox=NULL;
+ 
+-		/*Increase counter*/
+-		NbQuadtreeBox++;
++	/*Create and initialize a new box*/
++	newbox=new QuadtreeBox();
++	newbox->nbitems=0;
++	newbox->box[0]=NULL;
++	newbox->box[1]=NULL;
++	newbox->box[2]=NULL;
++	newbox->box[3]=NULL;
+ 
+-		/*currentbox now points toward next quadtree box*/
+-		return newbox;
+-	}/*}}}*/
++	/*Add to container*/
++	this->boxcontainer->AddObject(newbox);
++	NbQuadtreeBox++;
++
++	/*currentbox now points toward next quadtree box*/
++	return newbox;
++}/*}}}*/
++/*FUNCTION Quadtree::QuadtreeColoring{{{1*/
++void Quadtree::QuadtreeColoring(double* A,int *xi,int *yi,int n){
++
++	const int     MaxDeep  = 30;
++	QuadtreeBox **pb = NULL;
++	QuadtreeBox  *b  = NULL;
++	int          level;
++
++	for(int i=0;i<n;i++){
++
++		/*Initialize level*/
++		level=(1L<<MaxDeep);// = 2^30
++
++		/*Get inital box (the largest)*/
++		pb=&root;
++
++		/*Find the smallest box where the observation is located*/
++		while((b=*pb) && (b->nbitems<0)){ 
++
++			/*Color matrix onces more*/
++			A[i]+=1;
++
++			/*Go to one box deeper*/
++			level>>=1;
++			pb = &b->box[IJ(xi[i],yi[i],level)];
++		}
++	}
++}/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.cpp	(revision 12212)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.cpp	(revision 12213)
+@@ -2,6 +2,7 @@
+  * \brief: implementation of the Observation object
+  */
+ 
++#include <stdlib.h>
+ #include "../objects.h"
+ 
+ /*Observation constructors and destructor*/
+@@ -30,11 +31,14 @@
+ /*Object virtual functions definitions:*/
+ /*FUNCTION Observation::Echo {{{1*/
+ void Observation::Echo(void){
++
++	int  bit;
++
+ 	printf("Observation\n");
+ 	printf("   x     : %g\n",this->x);
+ 	printf("   y     : %g\n",this->y);
+-	printf("   xi    : %i\n",this->xi);
+-	printf("   yi    : %i\n",this->yi);
++	printf("   xi    : "); printbinary(this->xi); printf("\n");
++	printf("   yi    : "); printbinary(this->yi); printf("\n");
+ 	printf("   value : %g\n",this->value);
+ }
+ /*}}}*/
Index: /issm/oecreview/Archive/12201-12220/ISSM-12213-12214.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12213-12214.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12213-12214.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh	(revision 12213)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh	(revision 12214)
+@@ -214,7 +214,7 @@
+ 
+ #APPSCAN
+ export PATH="$PATH:$APPSCAN_DIR/install/bin"
+-export PATH="$PATH:$APPSCAN_DIR/bin"]
++export PATH="$PATH:$APPSCAN_DIR/bin"
+ 
+ #CPPCHECK
+ export PATH="$PATH:$CPPCHECK_DIR/bin"
Index: /issm/oecreview/Archive/12201-12220/ISSM-12214-12215.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12214-12215.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12214-12215.diff	(revision 12325)
@@ -0,0 +1,26 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-macosx64.sh	(revision 12214)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-macosx64.sh	(revision 12215)
+@@ -5,7 +5,7 @@
+ mkdir src install
+ 
+ #Download from ISSM server
+-$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/ADOL-C-2.2.0.tar.gz' 'ADOL-C-2.2.0.tar.gz'
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/gsl-1.15.tar.gz' 'gsl-1.15.tar.gz'
+ 
+ #Untar 
+ tar -zxvf  gsl-1.15.tar.gz
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64.sh	(revision 12214)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-linux64.sh	(revision 12215)
+@@ -5,7 +5,7 @@
+ mkdir src install
+ 
+ #Download from ISSM server
+-$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/ADOL-C-2.2.0.tar.gz' 'ADOL-C-2.2.0.tar.gz'
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/gsl-1.15.tar.gz' 'gsl-1.15.tar.gz'
+ 
+ #Untar 
+ tar -zxvf  gsl-1.15.tar.gz
Index: /issm/oecreview/Archive/12201-12220/ISSM-12215-12216.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12215-12216.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12215-12216.diff	(revision 12325)
@@ -0,0 +1,160 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.h	(revision 12215)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.h	(revision 12216)
+@@ -6,8 +6,8 @@
+ 
+ namespace bamg {
+ 
+-	const int  MaxDeep  = 30;
+-	const long MaxISize = ( 1L << MaxDeep);  // = 2^30 : 010000000000..000 (bitwise operation)
++	const int  MaxDepth = 30;
++	const long MaxISize = ( 1L << MaxDepth);  // = 2^30 : 010000000000..000 (bitwise operation)
+ 
+ 	class BamgVertex;
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.cpp	(revision 12215)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.cpp	(revision 12216)
+@@ -178,7 +178,7 @@
+ 			if (b->nbitems > 0 &&  b->v[0] == &w) return;
+ 		}
+ 
+-		/*check that l is not 0 (this should not happen as MaxDeep = 30)*/
++		/*check that l is not 0 (this should not happen as MaxDepth = 30)*/
+ 		_assert_(level>0);
+ 
+ 		/*Now, try to add the vertex, if the subbox is full (nbitems=4), we have to divide it
+@@ -235,10 +235,10 @@
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, QuadTree.cpp/NearestVertex)*/
+ 
+ 		/*Intermediaries*/
+-		QuadTreeBox *pb[MaxDeep];
+-		int          pi[MaxDeep];
+-		Icoor1       ii[MaxDeep];
+-		Icoor1       jj[MaxDeep];
++		QuadTreeBox *pb[MaxDepth];
++		int          pi[MaxDepth];
++		Icoor1       ii[MaxDepth];
++		Icoor1       jj[MaxDepth];
+ 		int          level;
+ 		long         n0;
+ 		QuadTreeBox *b;
+@@ -393,9 +393,9 @@
+ 	BamgVertex*  QuadTree::NearestVertexWithNormal(Icoor1 i,Icoor1 j) {
+ 		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, QuadTree.cpp/NearestVertexWithNormal)*/
+ 
+-		QuadTreeBox * pb[ MaxDeep ];
+-		int  pi[ MaxDeep  ];
+-		Icoor1 ii[  MaxDeep ], jj [ MaxDeep];
++		QuadTreeBox * pb[ MaxDepth ];
++		int  pi[ MaxDepth  ];
++		Icoor1 ii[  MaxDepth ], jj [ MaxDepth];
+ 		int l; // level
+ 		QuadTreeBox * b;
+ 		long     h =MaxISize,h0;
+@@ -529,9 +529,9 @@
+ 		const R2 X(v.r);
+ 		const Metric  Mx(v.m);
+ 
+-		QuadTreeBox * pb[ MaxDeep ];
+-		int  pi[ MaxDeep  ];
+-		Icoor1 ii[  MaxDeep ], jj [ MaxDeep];
++		QuadTreeBox * pb[ MaxDepth ];
++		int  pi[ MaxDepth  ];
++		Icoor1 ii[  MaxDepth ], jj [ MaxDepth];
+ 		register int l=0; // level
+ 		register QuadTreeBox * b;
+ 		Icoor1 h=MaxISize;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12215)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12216)
+@@ -34,9 +34,10 @@
+ 		DataSet* boxcontainer;
+ 
+ 	public:
+-		QuadtreeBox* root;          // main box
++		int          MaxDepth;      // maximum number of subdivision
++		QuadtreeBox *root;          // main box
+ 		long         NbQuadtreeBox; // total number of boxes
+-		long         NbObs;      // number of points
++		long         NbObs;         // number of points
+ 
+ 		Quadtree();
+ 		~Quadtree();
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12215)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12216)
+@@ -82,20 +82,21 @@
+ 	/*FUNCTION Quadtree::Quadtree(){{{1*/
+ 	Quadtree::Quadtree(){
+ 
+-		/*Number of boxes and vertices*/
+-		NbQuadtreeBox=0;
+-		NbObs=0;
++		/*Initialize fields*/
++		this->MaxDepth=30;
++		this->NbQuadtreeBox=0;
++		this->NbObs=0;
+ 
+ 		/*Create container*/
+-		boxcontainer=new DataSet();
++		this->boxcontainer=new DataSet();
+ 
+ 		/*Create Root, pointer toward the main box*/
+-		root=NewQuadtreeBox();
++		this->root=NewQuadtreeBox();
+ 
+ 		}
+ 	/*}}}1*/
+ 	/*FUNCTION Quadtree::~Quadtree(){{{1*/
+-	Quadtree::~Quadtree() {
++	Quadtree::~Quadtree(){
+ 
+ 		delete boxcontainer;
+ 		root=NULL;
+@@ -108,7 +109,6 @@
+ void  Quadtree::Add(Observation* observation){
+ 
+ 	/*Intermediaries*/
+-	const int     MaxDeep  = 30;
+ 	int          xi,yi,ij,level;
+ 	QuadtreeBox **pb = NULL;
+ 	QuadtreeBox  *b  = NULL;
+@@ -120,7 +120,7 @@
+ 	yi = observation->yi;
+ 
+ 	/*Initialize level*/
+-	level=(1L<<MaxDeep);// = 2^30
++	level=(1L<<this->MaxDepth);// = 2^30
+ 
+ 	/*Get inital box (the largest)*/
+ 	pb=&root;
+@@ -188,6 +188,7 @@
+ void  Quadtree::Echo(void){
+ 
+ 	printf("Quadtree:\n");
++	printf("   MaxDepth      = %i\n",MaxDepth);
+ 	printf("   NbQuadtreeBox = %i\n",NbQuadtreeBox);
+ 	printf("   NbObs         = %i\n",NbObs);
+ 	printf("   root          = %p\n",root);
+@@ -217,7 +218,6 @@
+ /*FUNCTION Quadtree::QuadtreeColoring{{{1*/
+ void Quadtree::QuadtreeColoring(double* A,int *xi,int *yi,int n){
+ 
+-	const int     MaxDeep  = 30;
+ 	QuadtreeBox **pb = NULL;
+ 	QuadtreeBox  *b  = NULL;
+ 	int          level;
+@@ -225,7 +225,7 @@
+ 	for(int i=0;i<n;i++){
+ 
+ 		/*Initialize level*/
+-		level=(1L<<MaxDeep);// = 2^30
++		level=(1L<<this->MaxDepth);// = 2^30
+ 
+ 		/*Get inital box (the largest)*/
+ 		pb=&root;
Index: /issm/oecreview/Archive/12201-12220/ISSM-12216-12217.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12216-12217.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12216-12217.diff	(revision 12325)
@@ -0,0 +1,91 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test137.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test137.m	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test137.m	(revision 12217)
+@@ -0,0 +1,25 @@
++
++%Simple mesh
++md=bamg(model,'domain','../Exp/Square.exp','hmax',100000);
++x1=md.mesh.x;
++y1=md.mesh.y;
++
++%hVertices
++md=bamg(model,'domain','../Exp/Square.exp','hmax',300000,'hvertices',[10000 100000 400000 100000]');
++x2=md.mesh.x;
++y2=md.mesh.y;
++
++%big mesh
++t0=clock;
++md=bamg(model,'domain','../Exp/Square.exp','hmax',3000);
++nbelements=md.mesh.numberofelements;
++elapsedtime=etime(clock,t0);
++
++%Fields and tolerances to track changes
++field_names     ={'x1' 'y1' 'x2' 'y2' 'nbelements' 'elapsed time'};
++field_tolerances={1e-13 1e-13 1e-13 1e-13 1e-13 0.5};
++field_values={...
++	x1, y1,...
++	x2, y2,...
++	nbelements,elapsedtime...
++	};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test527.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test527.m	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/test/NightlyRun/test527.m	(revision 12217)
+@@ -0,0 +1,56 @@
++%Simple mesh 1
++hVertices=10000*ones(27,1);
++hVertices(1:5)=1000;
++md=bamg(model,'domain','../Exp/Pig.exp','hmax',20000,'hVertices',hVertices,'gradation',3,'geometricalmetric',1);
++x1=md.mesh.x;
++y1=md.mesh.y;
++
++%Simple mesh 2
++md=bamg(model,'domain','../Exp/Pig.exp','hmax',10000);
++md=setmask(md,'../Exp/PigShelves.exp','../Exp/PigIslands.exp');
++md=parameterize(md,'../Par/Pig.par');
++x2=md.mesh.x;
++y2=md.mesh.y;
++
++%refine existing mesh 1
++hessian=ComputeHessian(md.mesh.elements,md.mesh.x,md.mesh.y,md.inversion.vy_obs,'node');
++metric=ComputeMetric(hessian,2/9,1,1000,25*10^3,[]);
++md.miscellaneous.dummy=metric;
++md2=bamg(md,'metric',md.miscellaneous.dummy,'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1);
++x3=md2.mesh.x;
++y3=md2.mesh.y;
++
++%refine existing mesh 2
++md2=bamg(md,'metric',md.miscellaneous.dummy,'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1,'anisomax',1);
++x4=md2.mesh.x;
++y4=md2.mesh.y;
++
++%refine existing mesh 3
++hVertices=NaN*ones(md.mesh.numberofvertices,1);
++hVertices(find(md.mesh.vertexonboundary))=500;
++md2=bamg(md,'metric',md.miscellaneous.dummy,'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1,'anisomax',1,'hVertices',hVertices);
++x5=md2.mesh.x;
++y5=md2.mesh.y;
++
++%refine existing mesh 4
++md2=bamg(md,'field',md.inversion.vy_obs,'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1,'Hessiantype',0,'err',1);
++x6=md2.mesh.x;
++y6=md2.mesh.y;
++
++%refine existing mesh 5
++md2=bamg(md,'field',[md.inversion.vy_obs md.geometry.thickness],'hmin',1000,'hmax',20000,'gradation',3,'geometricalmetric',1,'Hessiantype',1,'err',[10 100]); 
++x7=md2.mesh.x;
++y7=md2.mesh.y;
++
++%Fields and tolerances to track changes
++field_names     ={'x1' 'y1' 'x2' 'y2' 'x3' 'y3' 'x4' 'y4' 'x5' 'y5' 'x6' 'y6'  'x7' 'y7' };
++field_tolerances={1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13 1e-13};
++field_values={...
++	x1, y1,...
++	y2, y2,...
++	y3, y3,...
++	y4, y4,...
++	y5, y5,...
++	y6, y6,...
++	y7, y7,...
++	};
Index: /issm/oecreview/Archive/12201-12220/ISSM-12217-12218.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12217-12218.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12217-12218.diff	(revision 12325)
@@ -0,0 +1,1531 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp	(revision 12217)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp	(revision 12218)
+@@ -91,7 +91,7 @@
+ 		Mesh BTh(bamggeom_in,bamgmesh_in,bamgopts); 
+ 
+ 		//Make Quadtree from background mesh
+-		BTh.MakeQuadTree();
++		BTh.MakeBamgQuadtree();
+ 
+ 		//Bound hmin and hmax
+ 		bamgopts->hmin=Max(bamgopts->hmin,BTh.MinimalHmin());
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12217)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12218)
+@@ -571,8 +571,8 @@
+ 				./objects/Bamg/EigenMetric.cpp\
+ 				./objects/Bamg/Metric.cpp\
+ 				./objects/Bamg/Metric.h\
+-				./objects/Bamg/QuadTree.cpp\
+-				./objects/Bamg/QuadTree.h\
++				./objects/Bamg/BamgQuadtree.cpp\
++				./objects/Bamg/BamgQuadtree.h\
+ 				./objects/Bamg/R2.h\
+ 				./objects/Bamg/SetOfE4.cpp\
+ 				./objects/Bamg/SetOfE4.h\
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.h	(revision 12217)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.h	(revision 12218)
+@@ -1,61 +0,0 @@
+-/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, QuadTree.h)*/
+-#ifndef _QUADTREE_H
+-#define _QUADTREE_H
+-
+-#include "./include.h"
+-
+-namespace bamg {
+-
+-	const int  MaxDepth = 30;
+-	const long MaxISize = ( 1L << MaxDepth);  // = 2^30 : 010000000000..000 (bitwise operation)
+-
+-	class BamgVertex;
+-
+-	class QuadTree{
+-
+-		private:
+-
+-			/*A quadtree box contains a maximum of 4 vertices. 4 other quadtree boxes are
+-			 * created if a fifth vertex is added to the same box. A Quadtree box is therefore
+-			 * composed of EITHER:
+-			 * - up to 4 vertices
+-			 * - 4 "sub" quadtree boxes*/
+-			class QuadTreeBox: public Object{ 
+-				public:
+-					int nbitems; // number of current vertices in the box
+-					union{
+-						QuadTreeBox* b[4];
+-						BamgVertex*  v[4];
+-					};
+-					/*Object functions*/
+-					void  Echo(){_error_("not implemented yet");};
+-					void  DeepEcho(){_error_("not implemented yet");};
+-					int   Id(){_error_("not implemented yet");};
+-					int   MyRank(){_error_("not implemented yet");};
+-					int   ObjectEnum(){_error_("not implemented yet");};
+-					Object* copy(){_error_("not implemented yet");};
+-			};
+-
+-			/*QuadTree private Fields*/
+-			DataSet* boxcontainer;
+-
+-		public:
+-
+-			/*QuadTree public Fields*/
+-			QuadTreeBox* root;
+-			long         NbQuadTreeBox;
+-			long         NbVertices;
+-
+-			QuadTree();
+-			QuadTree(Mesh *t,long nbv=-1);
+-			~QuadTree();
+-
+-			BamgVertex*  NearestVertex(Icoor1 i,Icoor1 j);
+-			BamgVertex*  NearestVertexWithNormal(Icoor1 i,Icoor1 j);
+-			QuadTreeBox* NewQuadTreeBox(void);
+-			BamgVertex*  ToClose(BamgVertex & ,double ,Icoor1,Icoor1);
+-			void         Add( BamgVertex & w);
+-
+-	};
+-}
+-#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.cpp	(revision 12217)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/QuadTree.cpp	(revision 12218)
+@@ -1,598 +0,0 @@
+-#include <limits.h>
+-#include <string.h>
+-#include <stdlib.h>
+-
+-#include "../objects.h"
+-
+-namespace bamg {
+-
+-	/*MACROS {{{1*/
+-	/* 
+-	 * 
+-	 *    J    j
+-	 *    ^    ^
+-	 *    |    | +--------+--------+
+-	 *    |    | |        |        |
+-	 * 1X |    | |   2    |   3    |
+-	 *    |    | |        |        |
+-	 *    |    | +--------+--------+
+-	 *    |    | |        |        |
+-	 * 0X |    | |   0    |   1    |
+-	 *    |    | |        |        |
+-	 *    |    | +--------+--------+
+-	 *    |    +-----------------------> i
+-	 *    |         
+-	 *    |----------------------------> I
+-	 *              X0        X1  
+-	 *
+-	 * box 0 -> I=0 J=0 IJ=00  = 0
+-	 * box 1 -> I=1 J=0 IJ=01  = 1
+-	 * box 2 -> I=0 J=1 IJ=10  = 2
+-	 * box 3 -> I=1 J=1 IJ=11  = 3
+-	 */
+-#define INTER_SEG(a,b,x,y) (((y) > (a)) && ((x) <(b)))
+-#define ABS(i) ((i)<0 ?-(i) :(i))
+-#define MAX1(i,j) ((i)>(j) ?(i) :(j))
+-#define NORM(i1,j1,i2,j2) MAX1(ABS((i1)-(j1)),ABS((i2)-(j2)))
+-
+-	//IJ(i,j,l) returns the box number of i and j with respect to l
+-	//if !j&l and !i&l -> 0 (box zero: lower left )
+-	//if !j&l and  i&l -> 1 (box one:  lower right)
+-	//if  j&l and !i&l -> 2 (box two:  upper left )
+-	//if  j&l and  i&l -> 3 (box three:upper right)
+-#define IJ(i,j,l)  ((j&l) ? ((i&l) ? 3:2 ) :((i&l) ? 1:0 ))
+-
+-	//I_IJ(k,l) returns l if first  bit of k is 1, else 0
+-#define I_IJ(k,l)  ((k&1) ? l:0)
+-	//J_IJ(k,l) returns l if second bit of k is 1, else 0
+-#define J_IJ(k,l)  ((k&2) ? l:0)
+-	/*}}}*/
+-	/*DOCUMENTATION What is a QuadTree? {{{1
+-	 * A Quadtree is a very simple way to group vertices according
+-	 * to their locations. A square that holds all the points of the mesh
+-	 * (or the geometry) is divided into 4 boxes. As soon as one box
+-	 * hold more than 4 vertices, it is divided into 4 new boxes, etc...
+-	 * There cannot be more than MAXDEEP (=30) subdivision.
+-	 * This process is like a Dichotomy in dimension 2
+-	 *
+-	 *  + - -  -    - -    -    - - + -   - + - + - + - -     - - +
+-	 *  |                           |       |   | X |             |
+-	 *                                      + - + - +
+-	 *  |                           |       |   |   |             |
+-	 *                              + -   - + - + - +             +
+-	 *  |                           |       |       |             |
+-	 *                         
+-	 *  |                           |       |       |             |
+-	 *  + - -  -    - -    -    - - + -   - + -   - + - -     - - +
+-	 *  |                           |               |             |
+-	 *                         
+-	 *  |                           |               |             |
+-	 *                         
+-	 *  |                           |               |             |
+-	 *  |                           |               |             |
+-	 *  + - -  -    - -    -    - - + -   -   -   - + - -     - - +
+-	 *  |                           |                             |
+-	 *                         
+-	 *  |                           |                             |
+-	 *                         
+-	 *  |                           |                             |
+-	 *                         
+-	 *  |                           |                             |
+-	 *  |                           |                             |
+-	 *  |                           |                             |
+-	 *  |                           |                             |
+-	 *  |                           |                             |
+-	 *  + - -  -    - -    -    - - + -   -   -   -   - -     - - +
+-	 *
+-	 * The coordinate system used in a quadtree are integers to avoid
+-	 * round-off errors. The vertex in the lower left box has the coordinates
+-	 * (0 0) 
+-	 * The upper right vertex has the follwing coordinates:
+-	 * 2^30 -1           2^30 -1        in decimal
+-	 * 0 1 1 1 .... 1    0 1 1 1 .... 1 in binary
+-	 *  \--   29  --/     \--   29  --/
+-	 * Using binaries is therefore very easy to locate a vertex in a box:
+-	 * we just need to look at the bits from the left to the right (See ::Add)
+-	 }}}1*/
+-
+-	/*Constructors/Destructors*/
+-	/*FUNCTION QuadTree::QuadTree(){{{1*/
+-	QuadTree::QuadTree(){
+-
+-		/*Number of boxes and vertices*/
+-		NbQuadTreeBox=0;
+-		NbVertices=0;
+-
+-		/*Create container*/
+-		boxcontainer=new DataSet();
+-
+-		/*Create Root, pointer toward the main box*/
+-		root=NewQuadTreeBox();
+-
+-		}
+-	/*}}}1*/
+-	/*FUNCTION QuadTree::QuadTree(Mesh * t,long nbv){{{1*/
+-	QuadTree::QuadTree(Mesh * t,long nbv){ 
+-
+-		/*Number of boxes and vertices*/
+-		NbQuadTreeBox=0;
+-		NbVertices=0;
+-
+-		/*Create container*/
+-		boxcontainer=new DataSet();
+-
+-		/*Create Root, pointer toward the main box*/
+-		root=NewQuadTreeBox();
+-
+-		/*Check Sizes*/
+-		_assert_(MaxISize>MaxICoor);
+-
+-		/*Add all vertices of the mesh*/
+-		if (nbv==-1) nbv=t->nbv;
+-		for (int i=0;i<nbv;i++) Add(t->vertices[i]);
+-
+-	}
+-	/*}}}1*/
+-	/*FUNCTION QuadTree::~QuadTree(){{{1*/
+-	QuadTree::~QuadTree() {
+-		delete boxcontainer;
+-		root=NULL;
+-	}
+-	/*}}}1*/
+-
+-	/*Methods*/
+-	/*FUNCTION QuadTree::Add{{{1*/
+-	void  QuadTree::Add(BamgVertex &w){
+-		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, QuadTree.cpp/Add)*/
+-		QuadTreeBox** pb=NULL;
+-		QuadTreeBox*  b=NULL;
+-
+-		/*Get integer coodinate of current point w*/
+-		register long i=w.i.x, j=w.i.y;
+-
+-		/*Initialize level*/
+-		register long level=MaxISize;
+-
+-		/*Get inital box (the largest)*/
+-		pb = &root;
+-
+-		/*Find the smallest box where w is located*/
+-		while((b=*pb) && (b->nbitems<0)){ 
+-
+-			//shift b->nbitems by -1
+-			b->nbitems--;
+-
+-			//shifted righ by one bit: level=00000010 -> 00000001
+-			level >>= 1;
+-
+-			//Get next subbox according to the bit value (level)
+-			pb = &b->b[IJ(i,j,level)];
+-		}
+-
+-		/*OK, we have found b, a Subbox holding vertices (might be full)
+-		  check that the vertex is not already in the box*/
+-		if (b){      
+-			if (b->nbitems > 3 &&  b->v[3] == &w) return;
+-			if (b->nbitems > 2 &&  b->v[2] == &w) return;
+-			if (b->nbitems > 1 &&  b->v[1] == &w) return;
+-			if (b->nbitems > 0 &&  b->v[0] == &w) return;
+-		}
+-
+-		/*check that l is not 0 (this should not happen as MaxDepth = 30)*/
+-		_assert_(level>0);
+-
+-		/*Now, try to add the vertex, if the subbox is full (nbitems=4), we have to divide it
+-		  in 4 new subboxes*/
+-		while ((b= *pb) && (b->nbitems == 4)){ // the QuadTreeBox is full
+-
+-			/*Copy the 4 vertices in the current QuadTreebox*/
+-			BamgVertex* v4[4];
+-			v4[0]= b->v[0];
+-			v4[1]= b->v[1];
+-			v4[2]= b->v[2];
+-			v4[3]= b->v[3];
+-
+-			/*set nbitems as negative 
+-			 * (box full -> holds 4 pointers toward subboxes and not 4 vertices)*/
+-			b->nbitems = -b->nbitems;
+-
+-			/*Initialize the 4 pointers toward the 4 subboxes*/
+-			b->b[0]=b->b[1]=b->b[2]=b->b[3]=NULL;
+-
+-			/*level = 0010000 -> 0001000*/
+-			level >>= 1;
+-
+-			/*Put the four vertices in the new boxes*/
+-			for (int k=0;k<4;k++){
+-
+-				int          ij;
+-				/*bb is the new "sub"box of b where v4[k] is located*/
+-				QuadTreeBox *bb = b->b[ij=IJ(v4[k]->i.x,v4[k]->i.y,level)];
+-
+-				// alloc the QuadTreeBox
+-				if (!bb) bb=b->b[ij]=NewQuadTreeBox(); 
+-
+-				/*Copy the current vertex*/
+-				bb->v[bb->nbitems++] = v4[k];
+-			}
+-
+-			/*Get the subbox where w (i,j) is located*/
+-			pb = &b->b[IJ(i,j,level)];
+-		}
+-
+-		/*alloc the QuadTreeBox if necessary*/
+-		if (!(b=*pb)) b=*pb= NewQuadTreeBox();
+-
+-		/*Add w*/
+-		b->v[b->nbitems++]=&w;
+-
+-		//Increase NbVertices by one (we have one new vertex)
+-		NbVertices++;
+-	}
+-	/*}}}1*/
+-	/*FUNCTION QuadTree::NearestVertex{{{1*/
+-	BamgVertex*  QuadTree::NearestVertex(Icoor1 i,Icoor1 j) {
+-		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, QuadTree.cpp/NearestVertex)*/
+-
+-		/*Intermediaries*/
+-		QuadTreeBox *pb[MaxDepth];
+-		int          pi[MaxDepth];
+-		Icoor1       ii[MaxDepth];
+-		Icoor1       jj[MaxDepth];
+-		int          level;
+-		long         n0;
+-		QuadTreeBox *b;
+-		long         h0;
+-		long         h = MaxISize;
+-		long         hb= MaxISize;
+-		Icoor1       i0=0,j0=0;
+-
+-		/*initial output as NULL (no vertex found)*/
+-		BamgVertex*  nearest_v=NULL;
+-
+-		/*Project w coordinates (i,j) onto [0,MaxISize-1] x [0,MaxISize-1] -> (iplus,jplus)*/
+-		Icoor1 iplus( i<MaxISize ? (i<0?0:i) : MaxISize-1);
+-		Icoor1 jplus( j<MaxISize ? (j<0?0:j) : MaxISize-1);
+-
+-		/*Get initial Quadtree box (largest)*/
+-		b = root;
+-
+-		/*if the tree is empty, return NULL pointer*/
+-		if (!root->nbitems) return nearest_v; 
+-
+-		/*else, find the smallest non-empty QuadTreeBox containing  the point (i,j)*/
+-		while((n0=b->nbitems)<0){
+-
+-			Icoor1       hb2 = hb >> 1;             //size of the current box
+-			int          k   = IJ(iplus,jplus,hb2); //box number (0,1,2 or 3)
+-			QuadTreeBox *b0  = b->b[k];             //pointer toward current box
+-
+-			/* break if NULL box or empty (Keep previous box b)*/
+-			if (( b0 == NULL) || (b0->nbitems == 0)) break;
+-
+-			/*Get next Quadtree box*/
+-			b=b0;	
+-			i0 += I_IJ(k,hb2); // i orign of QuadTreeBox (macro)
+-			j0 += J_IJ(k,hb2); // j orign of QuadTreeBox 
+-			hb = hb2;          // size of the box (in Int)
+-		}
+-
+-		/*The box b, is the smallest box containing the point (i,j) and
+-		 * has the following properties:
+-		 * - n0: number of items (>0 if vertices, else boxes)
+-		 * - hb: box size (int)
+-		 * - i0: x coordinate of the lower left corner
+-		 * - j0: y coordinate of the lower left corner*/
+-
+-		/* if the current subbox is holding vertices, we are almost done*/
+-		if (n0>0){  
+-			//loop over the vertices of the box and find the closest vertex
+-			for(int k=0;k<n0;k++){
+-
+-				/*get integer coordinates of current vertex*/
+-				I2 i2=b->v[k]->i;
+-
+-				/*Compute norm with w*/
+-				h0=NORM(iplus,i2.x,jplus,i2.y);
+-
+-				/*is it smaller than previous value*/
+-				if (h0<h){
+-					h = h0;
+-					nearest_v = b->v[k];
+-				}
+-			}
+-			/*return closest vertex*/
+-			return nearest_v;
+-		}
+-
+-		/* general case: the current box is empty, we have to go backwards
+-			and find the closest not-empty box and find the closest vertex*/
+-
+-		/*Initialize search variables*/
+-		pb[0]=b;                             //pointer toward the box b
+-		pi[0]=b->nbitems>0?(int)b->nbitems:4;//number of boxes in b
+-		ii[0]=i0;                            //i coordinate of the box lowest left corner
+-		jj[0]=j0;                            //j coordinate of the box lowest left corner
+-
+-		/*initialize h: smallest box size, containing a vertex close to w*/
+-		h=hb;
+-
+-		/*Main loop*/
+-		level=0;
+-		do {
+-
+-			/*get current box*/
+-			b= pb[level];
+-
+-			/*Loop over the items in current box (if not empty!)*/
+-			while (pi[level]){
+-
+-				/*We are looping now over the items of b. k is the current index (in [0 3])*/
+-				pi[level]--;
+-				int k=pi[level];
+-
+-				/*if the current subbox is holding vertices (b->nbitems<0 is subboxes)*/
+-				if (b->nbitems>0){
+-					I2 i2=b->v[k]->i;
+-					h0 = NORM(iplus,i2.x,jplus,i2.y);
+-					if (h0<h){
+-						h=h0;
+-						nearest_v=b->v[k];
+-					}
+-				}
+-				/*else: current box b is pointing toward 4 boxes
+-				 * test sub-box k and go deeper into the tree if it is non empty
+-				 * and contains the point w modulo a size h that is either the size of the smallest
+-				 * non empty box containing w, or the closest point to w (so far) */
+-				else{
+-					QuadTreeBox* b0=b;
+-
+-					/*if the next box exists:*/
+-					if (b=b->b[k]){
+-
+-						/*Get size (hb) and coordinates of the current sub-box lowest left corner*/
+-						hb>>=1;
+-						Icoor1 iii = ii[level]+I_IJ(k,hb);
+-						Icoor1 jjj = jj[level]+J_IJ(k,hb);
+-
+-						/*if the current point (iplus,jplus) is in b (modulo h), this box is good:
+-						 * it is holding vertices that are close to w */
+-						if (INTER_SEG(iii,iii+hb,iplus-h,iplus+h) && INTER_SEG(jjj,jjj+hb,jplus-h,jplus+h)){
+-							level++;
+-							pb[level]= b;
+-							pi[level]= b->nbitems>0 ?(int)  b->nbitems : 4  ;
+-							ii[level]= iii;
+-							jj[level]= jjj;
+-						}
+-
+-						//else go backwards
+-						else{
+-							//shifted righ by one bit: hb=001000000 -> 01000000
+-							b=b0;
+-							hb<<=1;
+-						}
+-					}
+-					else{
+-						/*Current box is NULL, go to next subbox of b (k=k-1)*/
+-						b=b0;
+-					}
+-				}
+-			}
+-
+-			/*We have found a vertex, now, let's try the other boxes of the previous level
+-			 * in case there is a vertex closest to w that has not yet been tested*/
+-			hb <<= 1;
+-		} while (level--);
+-
+-		/*return nearest_v, nearest vertex*/
+-		return nearest_v;
+-
+-	}
+-	/*}}}1*/
+-	/*FUNCTION QuadTree::NearestVertexWithNormal{{{1*/
+-	BamgVertex*  QuadTree::NearestVertexWithNormal(Icoor1 i,Icoor1 j) {
+-		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, QuadTree.cpp/NearestVertexWithNormal)*/
+-
+-		QuadTreeBox * pb[ MaxDepth ];
+-		int  pi[ MaxDepth  ];
+-		Icoor1 ii[  MaxDepth ], jj [ MaxDepth];
+-		int l; // level
+-		QuadTreeBox * b;
+-		long     h =MaxISize,h0;
+-		long     hb=MaxISize;
+-		Icoor1  i0=0,j0=0;
+-		Icoor1  iplus( i<MaxISize?(i<0?0:i):MaxISize-1);
+-		Icoor1  jplus( j<MaxISize?(j<0?0:j):MaxISize-1);
+-
+-		BamgVertex *vn=0;
+-
+-		// init for optimisation ---
+-		b = root;
+-		register long  n0;
+-		if (!root->nbitems)
+-		 return vn; // empty tree 
+-
+-		while( (n0 = b->nbitems) < 0) 
+-		  {
+-			// search the non empty 
+-			// QuadTreeBox containing  the point (i,j)
+-			register Icoor1 hb2 = hb >> 1 ;
+-			register  int k = IJ(iplus,jplus,hb2);// QuadTreeBox number of size hb2 contening i;j
+-			register QuadTreeBox * b0= b->b[k];
+-			if ( ( b0 == 0) || (b0->nbitems == 0) ) 
+-			 break; // null box or empty   => break 	    
+-			b=b0;	
+-			i0 += I_IJ(k,hb2); // i orign of QuadTreeBox
+-			j0 += J_IJ(k,hb2); // j orign of QuadTreeBox 
+-			hb = hb2; 
+-		  }
+-
+-
+-		if ( n0 > 0) 
+-		  {  
+-			for(register int k=0;k<n0;k++)
+-			  {
+-				I2 i2 =  b->v[k]->i;
+-				//   try if is in the right direction -- 
+-				h0 = NORM(iplus,i2.x,jplus,i2.y);
+-				if (h0 <h) {
+-					h = h0;
+-					vn = b->v[k];}
+-			  }
+-			if (vn) return vn; 
+-		  }
+-		// general case -----
+-		// INITIALISATION OF THE HEAP 
+-		l =0; // level 
+-		pb[0]= b;
+-		pi[0]=b->nbitems>0 ?(int)  b->nbitems : 4  ;
+-		ii[0]=i0;
+-		jj[0]=j0;
+-		h=hb;
+-		do {   // walk on the tree  
+-			b= pb[l];
+-			while (pi[l]--) // loop on 4 element of the box
+-			  { 	      
+-				int k = pi[l];
+-
+-				if (b->nbitems>0) // BamgVertex QuadTreeBox none empty
+-				  { 
+-					I2 i2 =  b->v[k]->i;
+-					// if good direction when try -- 
+-
+-					h0 = NORM(iplus,i2.x,jplus,i2.y);
+-					if (h0 <h) 
+-					  {
+-						h = h0;
+-						vn = b->v[k];
+-					  }
+-				  }
+-				else // Pointer QuadTreeBox 
+-				  { 
+-					register QuadTreeBox *b0=b;
+-					if ((b=b->b[k])) 
+-					  {
+-						hb >>=1 ; // div by 2
+-						register Icoor1 iii = ii[l]+I_IJ(k,hb);
+-						register Icoor1 jjj = jj[l]+J_IJ(k,hb);
+-
+-						if  (INTER_SEG(iii,iii+hb,iplus-h,iplus+h) && INTER_SEG(jjj,jjj+hb,jplus-h,jplus+h)) 
+-						  {
+-							pb[++l]=  b;
+-							pi[l]= b->nbitems>0 ?(int)  b->nbitems : 4  ;
+-							ii[l]= iii;
+-							jj[l]= jjj;
+-
+-						  }
+-						else
+-						 b=b0, hb <<=1 ;
+-					  }
+-					else
+-					 b=b0;
+-				  }
+-			  }
+-			hb <<= 1; // mul by 2 
+-		} while (l--);
+-
+-		return vn;
+-	}
+-	/*}}}1*/
+-	/*FUNCTION QuadTree::NewQuadTreeBox {{{1*/
+-	QuadTree::QuadTreeBox* QuadTree::NewQuadTreeBox(void){
+-
+-		/*Output*/
+-		QuadTreeBox* newbox=NULL;
+-
+-		/*Create and initialize a new box*/
+-		newbox=new QuadTreeBox;
+-		newbox->nbitems=0;
+-		newbox->b[0]=NULL;
+-		newbox->b[1]=NULL;
+-		newbox->b[2]=NULL;
+-		newbox->b[3]=NULL;
+-
+-		/*Add root to the container*/
+-		boxcontainer->AddObject(newbox);
+-
+-		/*Increase counter*/
+-		NbQuadTreeBox++;
+-
+-		/*currentbox now points toward next quadtree box*/
+-		return newbox;
+-	}/*}}}*/
+-	/*FUNCTION QuadTree::ToClose {{{1*/
+-	BamgVertex*   QuadTree::ToClose(BamgVertex & v,double seuil,Icoor1 hx,Icoor1 hy){
+-		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, QuadTree.cpp/ToClose)*/
+-
+-		const Icoor1 i=v.i.x;
+-		const Icoor1 j=v.i.y;
+-		const R2 X(v.r);
+-		const Metric  Mx(v.m);
+-
+-		QuadTreeBox * pb[ MaxDepth ];
+-		int  pi[ MaxDepth  ];
+-		Icoor1 ii[  MaxDepth ], jj [ MaxDepth];
+-		register int l=0; // level
+-		register QuadTreeBox * b;
+-		Icoor1 h=MaxISize;
+-		Icoor1 hb =  MaxISize;
+-		Icoor1 i0=0,j0=0;
+-
+-		//  BamgVertex *vn=0;
+-
+-		if (!root->nbitems)
+-		 return 0; // empty tree 
+-
+-		// general case -----
+-		pb[0]=root;
+-		pi[0]=root->nbitems>0 ?(int)  root->nbitems : 4  ;
+-		ii[0]=i0;
+-		jj[0]=j0;
+-		h=hb;
+-		do {    
+-			b= pb[l];
+-			while (pi[l]--){ 	      
+-				register int k = pi[l];
+-
+-				if (b->nbitems>0){ // BamgVertex QuadTreeBox none empty
+-					I2 i2 =  b->v[k]->i;
+-					if ( ABS(i-i2.x) <hx && ABS(j-i2.y) <hy )
+-					  {
+-						R2 XY(X,b->v[k]->r);
+-						double dd;
+-						if( (dd= LengthInterpole(Mx(XY), b->v[k]->m(XY)))  < seuil ){
+-							return b->v[k]; 
+-						}
+-					  }
+-				}
+-				else{ // Pointer QuadTreeBox 
+-					register QuadTreeBox *b0=b;
+-					if ((b=b->b[k])){
+-						hb >>=1 ; // div by 2
+-						register long iii = ii[l]+I_IJ(k,hb);
+-						register long jjj = jj[l]+J_IJ(k,hb);
+-
+-						if  (INTER_SEG(iii,iii+hb,i-hx,i+hx) && INTER_SEG(jjj,jjj+hb,j-hy,j+hy)){
+-							pb[++l]=  b;
+-							pi[l]= b->nbitems>0 ?(int)  b->nbitems : 4  ;
+-							ii[l]= iii;
+-							jj[l]= jjj;
+-
+-						}
+-						else{
+-							b=b0;
+-							hb <<=1 ;
+-						}
+-					}
+-					else{
+-						b=b0;
+-					}
+-				}
+-			}
+-			hb <<= 1; // mul by 2 
+-		} while (l--);
+-
+-		return 0;
+-	}
+-	/*}}}1*/
+-}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Geometry.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Geometry.h	(revision 12217)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Geometry.h	(revision 12218)
+@@ -11,7 +11,7 @@
+ namespace bamg {
+ 
+ 	class Triangle;
+-	class QuadTree;
++	class BamgQuadtree;
+ 	class GeomSubDomain;
+ 	class Edge;
+ 
+@@ -19,19 +19,19 @@
+ 
+ 		public:
+ 
+-			long                  NbRef;                         // counter of ref on the this class if 0 we can delete
+-			long                  nbv;                           // number of vertices
+-			long                  nbe;                           // number of edges
+-			long                  nbsubdomains;
+-			long                  nbcurves;
++			long           NbRef;                 // counter of ref on the this class if 0 we can delete
++			long           nbv;                   // number of vertices
++			long           nbe;                   // number of edges
++			long           nbsubdomains;
++			long           nbcurves;
+ 			GeomVertex    *vertices;
+ 			GeomEdge      *edges;
+-			QuadTree             *quadtree;
++			BamgQuadtree  *quadtree;
+ 			GeomSubDomain *subdomains;
+-			Curve                *curves;
+-			R2                    pmin,pmax;                     // domain extrema coordinates
+-			double                coefIcoor;                     // coef to integer Icoor1;
+-			double                MaxCornerAngle;
++			Curve         *curves;
++			R2             pmin,pmax;             // domain extrema coordinates
++			double         coefIcoor;             // coef to integer Icoor1;
++			double         MaxCornerAngle;
+ 
+ 			//Constructor/Destructors
+ 			~Geometry(); 
+@@ -43,7 +43,7 @@
+ 			const GeomVertex &operator[](long i) const { return vertices[i]; };
+ 			GeomVertex       &operator[](long i) { return vertices[i];       };
+ 			const GeomEdge   &operator()(long i) const { return edges[i];    };
+-			GeomEdge         &operator()(long  i) { return edges[i];                };
++			GeomEdge         &operator()(long  i) { return edges[i];         };
+ 
+ 			//Methods
+ 			void             Echo();
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.h	(revision 12218)
+@@ -0,0 +1,60 @@
++/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, BamgQuadtree.h)*/
++#ifndef _QUADTREE_H
++#define _QUADTREE_H
++
++#include "./include.h"
++
++namespace bamg {
++
++	const int  MaxDepth = 30;
++	const long MaxISize = ( 1L << MaxDepth);  // = 2^30 : 010000000000..000 (bitwise operation)
++
++	class BamgVertex;
++
++	class BamgQuadtree{
++
++		private:
++
++			/*A quadtree box contains a maximum of 4 vertices. 4 other quadtree boxes are
++			 * created if a fifth vertex is added to the same box. A Quadtree box is therefore
++			 * composed of EITHER:
++			 * - up to 4 vertices
++			 * - 4 "sub" quadtree boxes*/
++			class BamgQuadtreeBox: public Object{ 
++				public:
++					int nbitems; // number of current vertices in the box
++					union{
++						BamgQuadtreeBox* b[4];
++						BamgVertex*  v[4];
++					};
++					/*Object functions*/
++					void    Echo()       {_error_("not implemented yet"); };
++					void    DeepEcho()   {_error_("not implemented yet"); };
++					int     Id()         {_error_("not implemented yet"); };
++					int     MyRank()     {_error_("not implemented yet"); };
++					int     ObjectEnum() {_error_("not implemented yet"); };
++					Object *copy()       {_error_("not implemented yet"); };
++			};
++
++			/*BamgQuadtree private Fields*/
++			DataSet* boxcontainer;
++
++		public:
++
++			/*BamgQuadtree public Fields*/
++			BamgQuadtreeBox* root;
++			long         NbBamgQuadtreeBox;
++			long         NbVertices;
++
++			BamgQuadtree();
++			BamgQuadtree(Mesh *t,long nbv=-1);
++			~BamgQuadtree();
++
++			BamgVertex      *NearestVertex(Icoor1 i,Icoor1 j);
++			BamgVertex      *NearestVertexWithNormal(Icoor1  i,Icoor1 j);
++			BamgQuadtreeBox *NewBamgQuadtreeBox(void);
++			BamgVertex      *ToClose(BamgVertex &,double ,Icoor1,Icoor1);
++			void             Add(BamgVertex &w);
++	};
++}
++#endif
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Geometry.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Geometry.cpp	(revision 12217)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Geometry.cpp	(revision 12218)
+@@ -504,7 +504,7 @@
+ 		long              *next_p   = new long[2*nbe];
+ 		float             *eangle   = new float[nbe];
+ 		double             eps      = 1e-20;
+-		QuadTree           quadtree; // build quadtree to find duplicates
++		BamgQuadtree           quadtree; // build quadtree to find duplicates
+ 		BamgVertex        *v0       = vertices;
+ 		GeomVertex *v0g      = (GeomVertex*) (void*)v0;
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Mesh.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Mesh.h	(revision 12217)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Mesh.h	(revision 12218)
+@@ -16,7 +16,7 @@
+ 	//classes
+ 	class Geometry;
+ 	class CrackedEdge;
+-	class QuadTree;
++	class BamgQuadtree;
+ 	class SubDomain;
+ 
+ 	class Mesh {
+@@ -28,7 +28,7 @@
+ 			BamgVertex                   *vertices;
+ 			Triangle                     *triangles;
+ 			Edge                         *edges;
+-			QuadTree                     *quadtree;
++			BamgQuadtree                 *quadtree;
+ 			BamgVertex                  **orderedvertices;
+ 			SubDomain                    *subdomains;
+ 			long                          NbRef;                 // counter of ref on the this class if 0 we can delete
+@@ -93,7 +93,7 @@
+ 			long SplitInternalEdgeWithBorderVertices();
+ 			void MakeQuadrangles(double costheta);
+ 			int  SplitElement(int choice);
+-			void MakeQuadTree();
++			void MakeBamgQuadtree();
+ 			void NewPoints(Mesh &,BamgOpts* bamgopts,int KeepVertices=1);
+ 			long InsertNewPoints(long nbvold,long & NbTSwap) ; 
+ 			void TrianglesRenumberBySubDomain(bool justcompress=false);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.cpp	(revision 12218)
+@@ -0,0 +1,598 @@
++#include <limits.h>
++#include <string.h>
++#include <stdlib.h>
++
++#include "../objects.h"
++
++namespace bamg {
++
++	/*MACROS {{{1*/
++	/* 
++	 * 
++	 *    J    j
++	 *    ^    ^
++	 *    |    | +--------+--------+
++	 *    |    | |        |        |
++	 * 1X |    | |   2    |   3    |
++	 *    |    | |        |        |
++	 *    |    | +--------+--------+
++	 *    |    | |        |        |
++	 * 0X |    | |   0    |   1    |
++	 *    |    | |        |        |
++	 *    |    | +--------+--------+
++	 *    |    +-----------------------> i
++	 *    |         
++	 *    |----------------------------> I
++	 *              X0        X1  
++	 *
++	 * box 0 -> I=0 J=0 IJ=00  = 0
++	 * box 1 -> I=1 J=0 IJ=01  = 1
++	 * box 2 -> I=0 J=1 IJ=10  = 2
++	 * box 3 -> I=1 J=1 IJ=11  = 3
++	 */
++#define INTER_SEG(a,b,x,y) (((y) > (a)) && ((x) <(b)))
++#define ABS(i) ((i)<0 ?-(i) :(i))
++#define MAX1(i,j) ((i)>(j) ?(i) :(j))
++#define NORM(i1,j1,i2,j2) MAX1(ABS((i1)-(j1)),ABS((i2)-(j2)))
++
++	//IJ(i,j,l) returns the box number of i and j with respect to l
++	//if !j&l and !i&l -> 0 (box zero: lower left )
++	//if !j&l and  i&l -> 1 (box one:  lower right)
++	//if  j&l and !i&l -> 2 (box two:  upper left )
++	//if  j&l and  i&l -> 3 (box three:upper right)
++#define IJ(i,j,l)  ((j&l) ? ((i&l) ? 3:2 ) :((i&l) ? 1:0 ))
++
++	//I_IJ(k,l) returns l if first  bit of k is 1, else 0
++#define I_IJ(k,l)  ((k&1) ? l:0)
++	//J_IJ(k,l) returns l if second bit of k is 1, else 0
++#define J_IJ(k,l)  ((k&2) ? l:0)
++	/*}}}*/
++	/*DOCUMENTATION What is a BamgQuadtree? {{{1
++	 * A Quadtree is a very simple way to group vertices according
++	 * to their locations. A square that holds all the points of the mesh
++	 * (or the geometry) is divided into 4 boxes. As soon as one box
++	 * hold more than 4 vertices, it is divided into 4 new boxes, etc...
++	 * There cannot be more than MAXDEEP (=30) subdivision.
++	 * This process is like a Dichotomy in dimension 2
++	 *
++	 *  + - -  -    - -    -    - - + -   - + - + - + - -     - - +
++	 *  |                           |       |   | X |             |
++	 *                                      + - + - +
++	 *  |                           |       |   |   |             |
++	 *                              + -   - + - + - +             +
++	 *  |                           |       |       |             |
++	 *                         
++	 *  |                           |       |       |             |
++	 *  + - -  -    - -    -    - - + -   - + -   - + - -     - - +
++	 *  |                           |               |             |
++	 *                         
++	 *  |                           |               |             |
++	 *                         
++	 *  |                           |               |             |
++	 *  |                           |               |             |
++	 *  + - -  -    - -    -    - - + -   -   -   - + - -     - - +
++	 *  |                           |                             |
++	 *                         
++	 *  |                           |                             |
++	 *                         
++	 *  |                           |                             |
++	 *                         
++	 *  |                           |                             |
++	 *  |                           |                             |
++	 *  |                           |                             |
++	 *  |                           |                             |
++	 *  |                           |                             |
++	 *  + - -  -    - -    -    - - + -   -   -   -   - -     - - +
++	 *
++	 * The coordinate system used in a quadtree are integers to avoid
++	 * round-off errors. The vertex in the lower left box has the coordinates
++	 * (0 0) 
++	 * The upper right vertex has the follwing coordinates:
++	 * 2^30 -1           2^30 -1        in decimal
++	 * 0 1 1 1 .... 1    0 1 1 1 .... 1 in binary
++	 *  \--   29  --/     \--   29  --/
++	 * Using binaries is therefore very easy to locate a vertex in a box:
++	 * we just need to look at the bits from the left to the right (See ::Add)
++	 }}}1*/
++
++	/*Constructors/Destructors*/
++	/*FUNCTION BamgQuadtree::BamgQuadtree(){{{1*/
++	BamgQuadtree::BamgQuadtree(){
++
++		/*Number of boxes and vertices*/
++		NbBamgQuadtreeBox=0;
++		NbVertices=0;
++
++		/*Create container*/
++		boxcontainer=new DataSet();
++
++		/*Create Root, pointer toward the main box*/
++		root=NewBamgQuadtreeBox();
++
++		}
++	/*}}}1*/
++	/*FUNCTION BamgQuadtree::BamgQuadtree(Mesh * t,long nbv){{{1*/
++	BamgQuadtree::BamgQuadtree(Mesh * t,long nbv){ 
++
++		/*Number of boxes and vertices*/
++		NbBamgQuadtreeBox=0;
++		NbVertices=0;
++
++		/*Create container*/
++		boxcontainer=new DataSet();
++
++		/*Create Root, pointer toward the main box*/
++		root=NewBamgQuadtreeBox();
++
++		/*Check Sizes*/
++		_assert_(MaxISize>MaxICoor);
++
++		/*Add all vertices of the mesh*/
++		if (nbv==-1) nbv=t->nbv;
++		for (int i=0;i<nbv;i++) Add(t->vertices[i]);
++
++	}
++	/*}}}1*/
++	/*FUNCTION BamgQuadtree::~BamgQuadtree(){{{1*/
++	BamgQuadtree::~BamgQuadtree() {
++		delete boxcontainer;
++		root=NULL;
++	}
++	/*}}}1*/
++
++	/*Methods*/
++	/*FUNCTION BamgQuadtree::Add{{{1*/
++	void  BamgQuadtree::Add(BamgVertex &w){
++		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, BamgQuadtree.cpp/Add)*/
++		BamgQuadtreeBox** pb=NULL;
++		BamgQuadtreeBox*  b=NULL;
++
++		/*Get integer coodinate of current point w*/
++		register long i=w.i.x, j=w.i.y;
++
++		/*Initialize level*/
++		register long level=MaxISize;
++
++		/*Get inital box (the largest)*/
++		pb = &root;
++
++		/*Find the smallest box where w is located*/
++		while((b=*pb) && (b->nbitems<0)){ 
++
++			//shift b->nbitems by -1
++			b->nbitems--;
++
++			//shifted righ by one bit: level=00000010 -> 00000001
++			level >>= 1;
++
++			//Get next subbox according to the bit value (level)
++			pb = &b->b[IJ(i,j,level)];
++		}
++
++		/*OK, we have found b, a Subbox holding vertices (might be full)
++		  check that the vertex is not already in the box*/
++		if (b){      
++			if (b->nbitems > 3 &&  b->v[3] == &w) return;
++			if (b->nbitems > 2 &&  b->v[2] == &w) return;
++			if (b->nbitems > 1 &&  b->v[1] == &w) return;
++			if (b->nbitems > 0 &&  b->v[0] == &w) return;
++		}
++
++		/*check that l is not 0 (this should not happen as MaxDepth = 30)*/
++		_assert_(level>0);
++
++		/*Now, try to add the vertex, if the subbox is full (nbitems=4), we have to divide it
++		  in 4 new subboxes*/
++		while ((b= *pb) && (b->nbitems == 4)){ // the BamgQuadtreeBox is full
++
++			/*Copy the 4 vertices in the current BamgQuadtreebox*/
++			BamgVertex* v4[4];
++			v4[0]= b->v[0];
++			v4[1]= b->v[1];
++			v4[2]= b->v[2];
++			v4[3]= b->v[3];
++
++			/*set nbitems as negative 
++			 * (box full -> holds 4 pointers toward subboxes and not 4 vertices)*/
++			b->nbitems = -b->nbitems;
++
++			/*Initialize the 4 pointers toward the 4 subboxes*/
++			b->b[0]=b->b[1]=b->b[2]=b->b[3]=NULL;
++
++			/*level = 0010000 -> 0001000*/
++			level >>= 1;
++
++			/*Put the four vertices in the new boxes*/
++			for (int k=0;k<4;k++){
++
++				int          ij;
++				/*bb is the new "sub"box of b where v4[k] is located*/
++				BamgQuadtreeBox *bb = b->b[ij=IJ(v4[k]->i.x,v4[k]->i.y,level)];
++
++				// alloc the BamgQuadtreeBox
++				if (!bb) bb=b->b[ij]=NewBamgQuadtreeBox(); 
++
++				/*Copy the current vertex*/
++				bb->v[bb->nbitems++] = v4[k];
++			}
++
++			/*Get the subbox where w (i,j) is located*/
++			pb = &b->b[IJ(i,j,level)];
++		}
++
++		/*alloc the BamgQuadtreeBox if necessary*/
++		if (!(b=*pb)) b=*pb= NewBamgQuadtreeBox();
++
++		/*Add w*/
++		b->v[b->nbitems++]=&w;
++
++		//Increase NbVertices by one (we have one new vertex)
++		NbVertices++;
++	}
++	/*}}}1*/
++	/*FUNCTION BamgQuadtree::NearestVertex{{{1*/
++	BamgVertex*  BamgQuadtree::NearestVertex(Icoor1 i,Icoor1 j) {
++		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, BamgQuadtree.cpp/NearestVertex)*/
++
++		/*Intermediaries*/
++		BamgQuadtreeBox *pb[MaxDepth];
++		int          pi[MaxDepth];
++		Icoor1       ii[MaxDepth];
++		Icoor1       jj[MaxDepth];
++		int          level;
++		long         n0;
++		BamgQuadtreeBox *b;
++		long         h0;
++		long         h = MaxISize;
++		long         hb= MaxISize;
++		Icoor1       i0=0,j0=0;
++
++		/*initial output as NULL (no vertex found)*/
++		BamgVertex*  nearest_v=NULL;
++
++		/*Project w coordinates (i,j) onto [0,MaxISize-1] x [0,MaxISize-1] -> (iplus,jplus)*/
++		Icoor1 iplus( i<MaxISize ? (i<0?0:i) : MaxISize-1);
++		Icoor1 jplus( j<MaxISize ? (j<0?0:j) : MaxISize-1);
++
++		/*Get initial Quadtree box (largest)*/
++		b = root;
++
++		/*if the tree is empty, return NULL pointer*/
++		if (!root->nbitems) return nearest_v; 
++
++		/*else, find the smallest non-empty BamgQuadtreeBox containing  the point (i,j)*/
++		while((n0=b->nbitems)<0){
++
++			Icoor1       hb2 = hb >> 1;             //size of the current box
++			int          k   = IJ(iplus,jplus,hb2); //box number (0,1,2 or 3)
++			BamgQuadtreeBox *b0  = b->b[k];             //pointer toward current box
++
++			/* break if NULL box or empty (Keep previous box b)*/
++			if (( b0 == NULL) || (b0->nbitems == 0)) break;
++
++			/*Get next Quadtree box*/
++			b=b0;	
++			i0 += I_IJ(k,hb2); // i orign of BamgQuadtreeBox (macro)
++			j0 += J_IJ(k,hb2); // j orign of BamgQuadtreeBox 
++			hb = hb2;          // size of the box (in Int)
++		}
++
++		/*The box b, is the smallest box containing the point (i,j) and
++		 * has the following properties:
++		 * - n0: number of items (>0 if vertices, else boxes)
++		 * - hb: box size (int)
++		 * - i0: x coordinate of the lower left corner
++		 * - j0: y coordinate of the lower left corner*/
++
++		/* if the current subbox is holding vertices, we are almost done*/
++		if (n0>0){  
++			//loop over the vertices of the box and find the closest vertex
++			for(int k=0;k<n0;k++){
++
++				/*get integer coordinates of current vertex*/
++				I2 i2=b->v[k]->i;
++
++				/*Compute norm with w*/
++				h0=NORM(iplus,i2.x,jplus,i2.y);
++
++				/*is it smaller than previous value*/
++				if (h0<h){
++					h = h0;
++					nearest_v = b->v[k];
++				}
++			}
++			/*return closest vertex*/
++			return nearest_v;
++		}
++
++		/* general case: the current box is empty, we have to go backwards
++			and find the closest not-empty box and find the closest vertex*/
++
++		/*Initialize search variables*/
++		pb[0]=b;                             //pointer toward the box b
++		pi[0]=b->nbitems>0?(int)b->nbitems:4;//number of boxes in b
++		ii[0]=i0;                            //i coordinate of the box lowest left corner
++		jj[0]=j0;                            //j coordinate of the box lowest left corner
++
++		/*initialize h: smallest box size, containing a vertex close to w*/
++		h=hb;
++
++		/*Main loop*/
++		level=0;
++		do {
++
++			/*get current box*/
++			b= pb[level];
++
++			/*Loop over the items in current box (if not empty!)*/
++			while (pi[level]){
++
++				/*We are looping now over the items of b. k is the current index (in [0 3])*/
++				pi[level]--;
++				int k=pi[level];
++
++				/*if the current subbox is holding vertices (b->nbitems<0 is subboxes)*/
++				if (b->nbitems>0){
++					I2 i2=b->v[k]->i;
++					h0 = NORM(iplus,i2.x,jplus,i2.y);
++					if (h0<h){
++						h=h0;
++						nearest_v=b->v[k];
++					}
++				}
++				/*else: current box b is pointing toward 4 boxes
++				 * test sub-box k and go deeper into the tree if it is non empty
++				 * and contains the point w modulo a size h that is either the size of the smallest
++				 * non empty box containing w, or the closest point to w (so far) */
++				else{
++					BamgQuadtreeBox* b0=b;
++
++					/*if the next box exists:*/
++					if (b=b->b[k]){
++
++						/*Get size (hb) and coordinates of the current sub-box lowest left corner*/
++						hb>>=1;
++						Icoor1 iii = ii[level]+I_IJ(k,hb);
++						Icoor1 jjj = jj[level]+J_IJ(k,hb);
++
++						/*if the current point (iplus,jplus) is in b (modulo h), this box is good:
++						 * it is holding vertices that are close to w */
++						if (INTER_SEG(iii,iii+hb,iplus-h,iplus+h) && INTER_SEG(jjj,jjj+hb,jplus-h,jplus+h)){
++							level++;
++							pb[level]= b;
++							pi[level]= b->nbitems>0 ?(int)  b->nbitems : 4  ;
++							ii[level]= iii;
++							jj[level]= jjj;
++						}
++
++						//else go backwards
++						else{
++							//shifted righ by one bit: hb=001000000 -> 01000000
++							b=b0;
++							hb<<=1;
++						}
++					}
++					else{
++						/*Current box is NULL, go to next subbox of b (k=k-1)*/
++						b=b0;
++					}
++				}
++			}
++
++			/*We have found a vertex, now, let's try the other boxes of the previous level
++			 * in case there is a vertex closest to w that has not yet been tested*/
++			hb <<= 1;
++		} while (level--);
++
++		/*return nearest_v, nearest vertex*/
++		return nearest_v;
++
++	}
++	/*}}}1*/
++	/*FUNCTION BamgQuadtree::NearestVertexWithNormal{{{1*/
++	BamgVertex*  BamgQuadtree::NearestVertexWithNormal(Icoor1 i,Icoor1 j) {
++		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, BamgQuadtree.cpp/NearestVertexWithNormal)*/
++
++		BamgQuadtreeBox * pb[ MaxDepth ];
++		int  pi[ MaxDepth  ];
++		Icoor1 ii[  MaxDepth ], jj [ MaxDepth];
++		int l; // level
++		BamgQuadtreeBox * b;
++		long     h =MaxISize,h0;
++		long     hb=MaxISize;
++		Icoor1  i0=0,j0=0;
++		Icoor1  iplus( i<MaxISize?(i<0?0:i):MaxISize-1);
++		Icoor1  jplus( j<MaxISize?(j<0?0:j):MaxISize-1);
++
++		BamgVertex *vn=0;
++
++		// init for optimisation ---
++		b = root;
++		register long  n0;
++		if (!root->nbitems)
++		 return vn; // empty tree 
++
++		while( (n0 = b->nbitems) < 0) 
++		  {
++			// search the non empty 
++			// BamgQuadtreeBox containing  the point (i,j)
++			register Icoor1 hb2 = hb >> 1 ;
++			register  int k = IJ(iplus,jplus,hb2);// BamgQuadtreeBox number of size hb2 contening i;j
++			register BamgQuadtreeBox * b0= b->b[k];
++			if ( ( b0 == 0) || (b0->nbitems == 0) ) 
++			 break; // null box or empty   => break 	    
++			b=b0;	
++			i0 += I_IJ(k,hb2); // i orign of BamgQuadtreeBox
++			j0 += J_IJ(k,hb2); // j orign of BamgQuadtreeBox 
++			hb = hb2; 
++		  }
++
++
++		if ( n0 > 0) 
++		  {  
++			for(register int k=0;k<n0;k++)
++			  {
++				I2 i2 =  b->v[k]->i;
++				//   try if is in the right direction -- 
++				h0 = NORM(iplus,i2.x,jplus,i2.y);
++				if (h0 <h) {
++					h = h0;
++					vn = b->v[k];}
++			  }
++			if (vn) return vn; 
++		  }
++		// general case -----
++		// INITIALISATION OF THE HEAP 
++		l =0; // level 
++		pb[0]= b;
++		pi[0]=b->nbitems>0 ?(int)  b->nbitems : 4  ;
++		ii[0]=i0;
++		jj[0]=j0;
++		h=hb;
++		do {   // walk on the tree  
++			b= pb[l];
++			while (pi[l]--) // loop on 4 element of the box
++			  { 	      
++				int k = pi[l];
++
++				if (b->nbitems>0) // BamgVertex BamgQuadtreeBox none empty
++				  { 
++					I2 i2 =  b->v[k]->i;
++					// if good direction when try -- 
++
++					h0 = NORM(iplus,i2.x,jplus,i2.y);
++					if (h0 <h) 
++					  {
++						h = h0;
++						vn = b->v[k];
++					  }
++				  }
++				else // Pointer BamgQuadtreeBox 
++				  { 
++					register BamgQuadtreeBox *b0=b;
++					if ((b=b->b[k])) 
++					  {
++						hb >>=1 ; // div by 2
++						register Icoor1 iii = ii[l]+I_IJ(k,hb);
++						register Icoor1 jjj = jj[l]+J_IJ(k,hb);
++
++						if  (INTER_SEG(iii,iii+hb,iplus-h,iplus+h) && INTER_SEG(jjj,jjj+hb,jplus-h,jplus+h)) 
++						  {
++							pb[++l]=  b;
++							pi[l]= b->nbitems>0 ?(int)  b->nbitems : 4  ;
++							ii[l]= iii;
++							jj[l]= jjj;
++
++						  }
++						else
++						 b=b0, hb <<=1 ;
++					  }
++					else
++					 b=b0;
++				  }
++			  }
++			hb <<= 1; // mul by 2 
++		} while (l--);
++
++		return vn;
++	}
++	/*}}}1*/
++	/*FUNCTION BamgQuadtree::NewBamgQuadtreeBox {{{1*/
++	BamgQuadtree::BamgQuadtreeBox* BamgQuadtree::NewBamgQuadtreeBox(void){
++
++		/*Output*/
++		BamgQuadtreeBox* newbox=NULL;
++
++		/*Create and initialize a new box*/
++		newbox=new BamgQuadtreeBox;
++		newbox->nbitems=0;
++		newbox->b[0]=NULL;
++		newbox->b[1]=NULL;
++		newbox->b[2]=NULL;
++		newbox->b[3]=NULL;
++
++		/*Add root to the container*/
++		boxcontainer->AddObject(newbox);
++
++		/*Increase counter*/
++		NbBamgQuadtreeBox++;
++
++		/*currentbox now points toward next quadtree box*/
++		return newbox;
++	}/*}}}*/
++	/*FUNCTION BamgQuadtree::ToClose {{{1*/
++	BamgVertex*   BamgQuadtree::ToClose(BamgVertex & v,double seuil,Icoor1 hx,Icoor1 hy){
++		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, BamgQuadtree.cpp/ToClose)*/
++
++		const Icoor1 i=v.i.x;
++		const Icoor1 j=v.i.y;
++		const R2 X(v.r);
++		const Metric  Mx(v.m);
++
++		BamgQuadtreeBox * pb[ MaxDepth ];
++		int  pi[ MaxDepth  ];
++		Icoor1 ii[  MaxDepth ], jj [ MaxDepth];
++		register int l=0; // level
++		register BamgQuadtreeBox * b;
++		Icoor1 h=MaxISize;
++		Icoor1 hb =  MaxISize;
++		Icoor1 i0=0,j0=0;
++
++		//  BamgVertex *vn=0;
++
++		if (!root->nbitems)
++		 return 0; // empty tree 
++
++		// general case -----
++		pb[0]=root;
++		pi[0]=root->nbitems>0 ?(int)  root->nbitems : 4  ;
++		ii[0]=i0;
++		jj[0]=j0;
++		h=hb;
++		do {    
++			b= pb[l];
++			while (pi[l]--){ 	      
++				register int k = pi[l];
++
++				if (b->nbitems>0){ // BamgVertex BamgQuadtreeBox none empty
++					I2 i2 =  b->v[k]->i;
++					if ( ABS(i-i2.x) <hx && ABS(j-i2.y) <hy )
++					  {
++						R2 XY(X,b->v[k]->r);
++						double dd;
++						if( (dd= LengthInterpole(Mx(XY), b->v[k]->m(XY)))  < seuil ){
++							return b->v[k]; 
++						}
++					  }
++				}
++				else{ // Pointer BamgQuadtreeBox 
++					register BamgQuadtreeBox *b0=b;
++					if ((b=b->b[k])){
++						hb >>=1 ; // div by 2
++						register long iii = ii[l]+I_IJ(k,hb);
++						register long jjj = jj[l]+J_IJ(k,hb);
++
++						if  (INTER_SEG(iii,iii+hb,i-hx,i+hx) && INTER_SEG(jjj,jjj+hb,j-hy,j+hy)){
++							pb[++l]=  b;
++							pi[l]= b->nbitems>0 ?(int)  b->nbitems : 4  ;
++							ii[l]= iii;
++							jj[l]= jjj;
++
++						}
++						else{
++							b=b0;
++							hb <<=1 ;
++						}
++					}
++					else{
++						b=b0;
++					}
++				}
++			}
++			hb <<= 1; // mul by 2 
++		} while (l--);
++
++		return 0;
++	}
++	/*}}}1*/
++}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Mesh.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12217)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/Mesh.cpp	(revision 12218)
+@@ -2884,7 +2884,7 @@
+ 		triangles[1].link=&triangles[0];
+ 
+ 		//build quadtree
+-		if (!quadtree)  quadtree = new QuadTree(this,0);
++		if (!quadtree)  quadtree = new BamgQuadtree(this,0);
+ 		quadtree->Add(*v0);
+ 		quadtree->Add(*v1);
+ 
+@@ -3106,12 +3106,12 @@
+ 			delete [] qq;
+ 	}
+ 	/*}}}1*/
+-	/*FUNCTION Mesh::MakeQuadTree{{{1*/
+-	void Mesh::MakeQuadTree() {  
+-		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/MakeQuadTree)*/
++	/*FUNCTION Mesh::MakeBamgQuadtree{{{1*/
++	void Mesh::MakeBamgQuadtree() {  
++		/*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, Mesh2.cpp/MakeBamgQuadtree)*/
+ 
+ 		long int verbose=0;
+-		if (  !quadtree )  quadtree = new QuadTree(this);
++		if (  !quadtree )  quadtree = new BamgQuadtree(this);
+ 
+ 	}
+ 	/*}}}1*/
+@@ -3621,7 +3621,7 @@
+ 	triangles[1].link=&triangles[0];
+ 
+ 	if (!quadtree) delete quadtree; //ReInitialise;
+-	quadtree = new QuadTree(this,0);
++	quadtree = new BamgQuadtree(this,0);
+ 	quadtree->Add(*v0);
+ 	quadtree->Add(*v1);
+ 
+@@ -3899,7 +3899,7 @@
+ 			}
+ 		if (quadtree){
+ 			delete quadtree;
+-			quadtree = new QuadTree(this);
++			quadtree = new BamgQuadtree(this);
+ 		}
+ 
+ 		for ( it=0;it<nbv;it++) renu[i]= -renu[i]-1;
+@@ -4115,7 +4115,7 @@
+ 	  }
+ 
+ 	delete [] tstart;
+-	if (quadtree) quadtree= new QuadTree(this);
++	if (quadtree) quadtree= new BamgQuadtree(this);
+ }
+ /*}}}1*/
+ /*FUNCTION Mesh::SmoothMetric{{{1*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/objects.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/objects.h	(revision 12217)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/objects.h	(revision 12218)
+@@ -169,7 +169,7 @@
+ #include "./Bamg/CrackedEdge.h"
+ #include "./Bamg/Mesh.h"
+ #include "./Bamg/Geometry.h"
+-#include "./Bamg/QuadTree.h"
++#include "./Bamg/BamgQuadtree.h"
+ #include "./Bamg/SetOfE4.h"
+ 
+ /*Kriging*/
Index: /issm/oecreview/Archive/12201-12220/ISSM-12218-12219.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12218-12219.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12218-12219.diff	(revision 12325)
@@ -0,0 +1,37 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12218)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12219)
+@@ -13,7 +13,7 @@
+ 	double  *y_interp     = NULL;
+ 	double  *predictions  = NULL;
+ 	Options *options      = NULL;
+-	int      n_interp,n,n_obs;
++	int      N_interp,M_interp,M,N,n_obs;
+ 
+ 	/*Boot module: */
+ 	MODULEBOOT();
+@@ -25,17 +25,17 @@
+ 
+ 	/*Fetch inputs: */
+ 	FetchData(&x,&n_obs,X);
+-	FetchData(&y,&n,Y);                       if(n_obs!=n) _error_("x and y should have the same size");
+-	FetchData(&observations,&n,OBSERVATIONS); if(n_obs!=n) _error_("x and observations should have the same size");
+-	FetchData(&x_interp,&n_interp,XINTERP);
+-	FetchData(&y_interp,&n,YINTERP);          if(n_interp!=n) _error_("x_interp and y_interp should have the same size");
++	FetchData(&y,&N,Y);                       if(n_obs!=N) _error_("x and y should have the same size");
++	FetchData(&observations,&N,OBSERVATIONS); if(n_obs!=N) _error_("x and observations should have the same size");
++	FetchData(&x_interp,&M_interp,&N_interp,XINTERP);
++	FetchData(&y_interp,&M,&N,YINTERP);       if(N!=N_interp || M!=M_interp) _error_("x_interp and y_interp should have the same size");
+ 	FetchData(&options,NRHS,nrhs,prhs);
+ 
+ 	/*Call x layer*/
+-	Krigingx(&predictions,x,y,observations,n_obs,x_interp,y_interp,n_interp,options);
++	Krigingx(&predictions,x,y,observations,n_obs,x_interp,y_interp,M_interp*N_interp,options);
+ 
+ 	/*Generate output Matlab Structures*/
+-	WriteData(PREDICTIONS,predictions,n_interp);
++	WriteData(PREDICTIONS,predictions,M_interp,N_interp);
+ 
+ 	/*Free ressources: */
+ 	xfree((void**)&x);
Index: /issm/oecreview/Archive/12201-12220/ISSM-12219-12220.diff
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-12219-12220.diff	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-12219-12220.diff	(revision 12325)
@@ -0,0 +1,28 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12219)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12220)
+@@ -950,13 +950,19 @@
+ 		[FORTRAN_LIB=$withval],[FORTRAN_LIB=""])
+ 
+ 	dnl check that --with-fortran-lib may have been provided
++	HAVE_FORTRAN=no
+ 	if test -n "$FORTRAN_LIB" ; then
+-		HAVE_FORTRAN=yes
+-		FORTRANLIB="$FORTRAN_LIB"
++        if test x$FORTRAN_LIB = xno; then
++            HAVE_FORTRAN=NO
++        else
++            HAVE_FORTRAN=yes
++            FORTRANLIB="$FORTRAN_LIB"
+ 
+-		AC_DEFINE([_HAVE_FORTRAN_],[1],[with FORTRAN in ISSM src])
+-		AC_SUBST([FORTRANLIB])
++            AC_DEFINE([_HAVE_FORTRAN_],[1],[with FORTRAN in ISSM src])
++            AC_SUBST([FORTRANLIB])
++        fi
+ 	fi
++	AM_CONDITIONAL([FORTRAN], [test x$HAVE_FORTRAN = xyes])
+ 	AC_MSG_RESULT(done)
+ 	dnl }}}
+ 	dnl graphics{{{
Index: /issm/oecreview/Archive/12201-12220/ISSM-DocReview-12201-12220.tex
===================================================================
--- /issm/oecreview/Archive/12201-12220/ISSM-DocReview-12201-12220.tex	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/ISSM-DocReview-12201-12220.tex	(revision 12325)
@@ -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/12201-12220/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12201-12220/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12201-12220
Index: /issm/oecreview/Archive/12201-12220/Makefile
===================================================================
--- /issm/oecreview/Archive/12201-12220/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12201-12220
+
+
+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/12201-12220/log.tex
===================================================================
--- /issm/oecreview/Archive/12201-12220/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/log.tex	(revision 12325)
@@ -0,0 +1,38 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12201-12202.diff: \\ Function name: \\M /issm/trunk-jpl/etc/environment\_variables.sh \\ Export determination: 6. \\Rationale: changed ISSM\_TIER to ISSM\_DIR
+M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp minor \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12202-12203.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp \\ Export determination: 6. \\Rationale: minor
+M /issm/trunk-jpl/externalpackages/windows/windows\_environment.sh Updating ISSM\_TIER to ISSM\_DIR \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12203-12204.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/windows/windows\_environment.sh \\ Export determination: 6. \\Rationale: Updating ISSM\_TIER to ISSM\_DIR
+M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp Missing ifdef \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12204-12205.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp \\ Export determination: 6. \\Rationale: Missing ifdef
+M /issm/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-64.sh Took out user name schlegel \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12205-12206.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-64.sh \\ Export determination: 6. \\Rationale: Took out user name schlegel
+M /issm/trunk-jpl/externalpackages/vim/addons/vim/syntax/c.vim updating syntax highlighting \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12206-12207.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/vim/addons/vim/syntax/c.vim \\ Export determination: 6. \\Rationale: updating syntax highlighting
+M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h A /issm/trunk-jpl/src/c/objects/Kriging/Observation.cpp A /issm/trunk-jpl/src/c/objects/Kriging/Observation.h A /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp A /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h M /issm/trunk-jpl/src/c/objects/Kriging/Variogram.h M /issm/trunk-jpl/src/c/objects/objects.h Added from objects for Kriging \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12207-12208.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h A /issm/trunk-jpl/src/c/objects/Kriging/Observation.cpp A /issm/trunk-jpl/src/c/objects/Kriging/Observation.h A /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp A /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h M /issm/trunk-jpl/src/c/objects/Kriging/Variogram.h M /issm/trunk-jpl/src/c/objects/objects.h \\ Export determination: 6. \\Rationale: Added from objects for Kriging
+M /issm/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-32.sh New 32 bit win7 \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12208-12209.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/windows/configs/sdk7.1.win7-32.sh \\ Export determination: 6. \\Rationale: New 32 bit win7
+M /issm/trunk-jpl/externalpackages/windows/windows\_environment.sh OS independent \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12209-12210.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/windows/windows\_environment.sh \\ Export determination: 6. \\Rationale: OS independent
+A /issm/trunk-jpl/src/c/Container/Observations.cpp A /issm/trunk-jpl/src/c/Container/Observations.h M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h Added Observations dataset \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12210-12211.diff: \\ Function name: \\A /issm/trunk-jpl/src/c/Container/Observations.cpp A /issm/trunk-jpl/src/c/Container/Observations.h M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h \\ Export determination: 6. \\Rationale: Added Observations dataset
+A /issm/trunk-jpl/configs/config-linux64-ubuntu64.sh Ubuntu 64 configuration \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12211-12212.diff: \\ Function name: \\A /issm/trunk-jpl/configs/config-linux64-ubuntu64.sh \\ Export determination: 6. \\Rationale: Ubuntu 64 configuration
+A /issm/trunk-jpl/externalpackages/petsc/install-3.1-ubuntu64.sh New ubuntu64 petsc install \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-12212-12213.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/petsc/install-3.1-ubuntu64.sh \\ Export determination: 6. \\Rationale: New ubuntu64 petsc install
+M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Observations.h M /issm/trunk-jpl/src/c/Container/Vertices.h M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Observation.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h M /issm/trunk-jpl/src/c/shared/Elements/elements.h Fixed quadtree \\\\
+\noindent \textbf{Change \#13} with diff file ISSM-12213-12214.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Observations.h M /issm/trunk-jpl/src/c/Container/Vertices.h M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Observation.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h M /issm/trunk-jpl/src/c/shared/Elements/elements.h \\ Export determination: 6. \\Rationale: Fixed quadtree
+M /issm/trunk-jpl/etc/environment.sh Minor typo \\\\
+\noindent \textbf{Change \#14} with diff file ISSM-12214-12215.diff: \\ Function name: \\M /issm/trunk-jpl/etc/environment.sh \\ Export determination: 6. \\Rationale: Minor typo
+M /issm/trunk-jpl/externalpackages/gsl/install-linux64.sh M /issm/trunk-jpl/externalpackages/gsl/install-macosx64.sh wrong url \\\\
+\noindent \textbf{Change \#15} with diff file ISSM-12215-12216.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/gsl/install-linux64.sh M /issm/trunk-jpl/externalpackages/gsl/install-macosx64.sh \\ Export determination: 6. \\Rationale: wrong url
+M /issm/trunk-jpl/src/c/objects/Bamg/QuadTree.cpp M /issm/trunk-jpl/src/c/objects/Bamg/QuadTree.h M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h MaxDepth is now a field for Quadtree \\\\
+\noindent \textbf{Change \#16} with diff file ISSM-12216-12217.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/objects/Bamg/QuadTree.cpp M /issm/trunk-jpl/src/c/objects/Bamg/QuadTree.h M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h \\ Export determination: 6. \\Rationale: MaxDepth is now a field for Quadtree
+A /issm/trunk-jpl/test/NightlyRun/test137.m A /issm/trunk-jpl/test/NightlyRun/test527.m Readded Bamg tests \\\\
+\noindent \textbf{Change \#17} with diff file ISSM-12217-12218.diff: \\ Function name: \\A /issm/trunk-jpl/test/NightlyRun/test137.m A /issm/trunk-jpl/test/NightlyRun/test527.m \\ Export determination: 6. \\Rationale: Readded Bamg tests
+M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp A /issm/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.cpp (from /issm/trunk-jpl/src/c/objects/Bamg/QuadTree.cpp:12216) A /issm/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.h (from /issm/trunk-jpl/src/c/objects/Bamg/QuadTree.h:12216) M /issm/trunk-jpl/src/c/objects/Bamg/Geometry.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Geometry.h M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.h D /issm/trunk-jpl/src/c/objects/Bamg/QuadTree.cpp D /issm/trunk-jpl/src/c/objects/Bamg/QuadTree.h M /issm/trunk-jpl/src/c/objects/objects.h renamed QuadTree BamgQuadtree to avoid conflicts with Kriging's Quadtree \\\\
+\noindent \textbf{Change \#18} with diff file ISSM-12218-12219.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/modules/Bamgx/Bamgx.cpp A /issm/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.cpp (from /issm/trunk-jpl/src/c/objects/Bamg/QuadTree.cpp:12216) A /issm/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.h (from /issm/trunk-jpl/src/c/objects/Bamg/QuadTree.h:12216) M /issm/trunk-jpl/src/c/objects/Bamg/Geometry.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Geometry.h M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.cpp M /issm/trunk-jpl/src/c/objects/Bamg/Mesh.h D /issm/trunk-jpl/src/c/objects/Bamg/QuadTree.cpp D /issm/trunk-jpl/src/c/objects/Bamg/QuadTree.h M /issm/trunk-jpl/src/c/objects/objects.h \\ Export determination: 6. \\Rationale: renamed QuadTree BamgQuadtree to avoid conflicts with Kriging's Quadtree
+M /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp Added support for matrices \\\\
+\noindent \textbf{Change \#19} with diff file ISSM-12219-12220.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp \\ Export determination: 6. \\Rationale: Added support for matrices
+M /issm/trunk-jpl/m4/issm\_options.m4 Check whether fortran libraries are excluded \\\\
Index: /issm/oecreview/Archive/12201-12220/r1.tex
===================================================================
--- /issm/oecreview/Archive/12201-12220/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12201
Index: /issm/oecreview/Archive/12201-12220/r2.tex
===================================================================
--- /issm/oecreview/Archive/12201-12220/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12201-12220/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12220
Index: /issm/oecreview/Archive/12221-12240/Date.tex
===================================================================
--- /issm/oecreview/Archive/12221-12240/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12221-12240/ISSM-12221-12222.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12221-12222.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12221-12222.diff	(revision 12325)
@@ -0,0 +1,12 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Parameters.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Parameters.h	(revision 12221)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Parameters.h	(revision 12222)
+@@ -4,6 +4,7 @@
+ 
+ #ifndef _CONTAINER_PARAMETERS_H_
+ #define  _CONTAINER_PARAMETERS_H_
++#include <stdio.h>
+ 
+ /*forward declarations */
+ class Matrix;
Index: /issm/oecreview/Archive/12221-12240/ISSM-12222-12223.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12222-12223.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12222-12223.diff	(revision 12325)
@@ -0,0 +1,34 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cccl/issm/cccl
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cccl/issm/cccl	(revision 12222)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/cccl/issm/cccl	(revision 12223)
+@@ -73,6 +73,19 @@
+ 		;;
+     esac
+ 	;;
++	-fPIC)
++	#do nothing
++	;;
++	-g)
++	#do nothing
++	;;
++	-pthread)
++	#do nothing
++	;;
++	-fno-omit-frame-pointer)
++	#do nothing
++	;;
++
+ 	*)
+ 		#do nothing
+ 		opts="$opts $1"
+@@ -82,6 +95,9 @@
+     esac
+     shift
+ done
++			
++#Some default options:
++opts="$opts /nologo"
+ 
+ #echo "$prog $opts"
+ exec $prog $opts
Index: /issm/oecreview/Archive/12221-12240/ISSM-12223-12224.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12223-12224.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12223-12224.diff	(revision 12325)
@@ -0,0 +1,36 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/InstallInstructions.txt
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/InstallInstructions.txt	(revision 12223)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/windows/InstallInstructions.txt	(revision 12224)
+@@ -41,6 +41,7 @@
+ autoconf
+ python: Python language interpreter
+ unzip
++cygrunsrv
+ 
+ 
+ 
+@@ -143,10 +144,16 @@
+ 
+ 
+ How to setup a Cron job? 
+-Download exim and cron from cygwin setup. Run exim-config (don't forget to launch your cygwin terminal as
+-Administrator). If asked for a daemon name, type ntsec. Also, if cron complains about sendmail,
+-symlink /usr/lib/sendmail to /usr/sbin/sendmail.  Then link /usr/sbin/sendmail
+-to /usr/bin/exim. Alternatively, if you have an smtp server, you can download and configure
+-ssmtp.  Run ssmtp-config
+-as Administrator and link /usr/sbin/sendmail to /usr/bin/ssmtp. After the email has been configured,
+-run cron-config as Administrator.
++First, make sure you downloaded cygrunsrv, otherwise the cron setup will only work on a per-session 
++basis! Also, make sure that you have an email correctly setup.  In particular, cron relies on the
++/usr/sbin/sendmail script. If it does not exist, cron will not send emails. Most email management 
++systems will create this script, but you need to check on it. 
++Run cron-config  and fill up the questions. For daemon name, type ntsec. 
++Be careful, make sure that you are running your terminal as Administrator, 
++otherwise your settings will be only user-based. 
++How to setup email? 
++
++Preferred way is through ssmtp. Download it on cygwin, and type ssmtp-config.  If the ssmtp 
++daemon does not create /usr/sbin/sendmail, be sure to create a symlink from the email client 
++to the latter file. Be careful, make sure that you are running your terminal as Administrator, 
++otherwise your settings will be only user-based. 
Index: /issm/oecreview/Archive/12221-12240/ISSM-12224-12225.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12224-12225.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12224-12225.diff	(revision 12325)
@@ -0,0 +1,537 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/OptionParse.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12224)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/OptionParse.cpp	(revision 12225)
+@@ -40,7 +40,7 @@
+ 
+ 	/*check and parse the name  */
+ 	ological=new OptionLogical;
+-	ological->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
++	ological->name =(char*)xmalloc((strlen(name)+1)*sizeof(char));
+ 	memcpy(ological->name,name,(strlen(name)+1)*sizeof(char));
+ 
+ 	/*check and parse the value  */
+@@ -58,8 +58,8 @@
+ 	OptionChar  *ochar = NULL;
+ 
+ 	/*check and parse the name  */
+-	ochar=new OptionChar;
+-	ochar->name =(char *) xmalloc((strlen(name)+1)*sizeof(char));
++	ochar=new OptionChar();
++	ochar->name =(char*)xmalloc((strlen(name)+1)*sizeof(char));
+ 	memcpy(ochar->name,name,(strlen(name)+1)*sizeof(char));
+ 
+ 	/*check and parse the value  */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12224)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp	(revision 12225)
+@@ -403,18 +403,8 @@
+ 	}
+ 	else if (mxIsClass(dataref,"char") ){
+ 
+-		/*Check dataref is not pointing to NaN: */
+-		if ( mxIsNaN(*(mxGetPr(dataref))) && (mxGetNumberOfElements(dataref)==1) ){
+-			outmatrix_numel=0;
+-			outmatrix_ndims=0;
+-			outmatrix_size =NULL;
+-			outmatrix=NULL;
+-		}
+-		else{
+-
+-			/*Convert matlab n-dim array to char* matrix: */
+-			MatlabNArrayToNArray(&outmatrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
+-		}
++		/*Convert matlab n-dim array to char* matrix: */
++		MatlabNArrayToNArray(&outmatrix,&outmatrix_numel,&outmatrix_ndims,&outmatrix_size,dataref);
+ 	}
+ 	else{
+ 		/*This is an error: we don't have the correct input!: */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12224)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12225)
+@@ -34,20 +34,16 @@
+ /*FUNCTION Observations::Observations(double* observations_list,double* x,double* y,int n){{{*/
+ Observations::Observations(double* observations_list,double* x,double* y,int n){
+ 
+-	const int MaxICoor = 1073741823; // 2^30-1 =111...111 (29 times)
+-
+ 	/*Intermediaries*/
+ 	int          i;
+ 	int          xi,yi;
++	double       xmin,xmax,ymin,ymax;
+ 	double       offset;
+ 	Observation *observation = NULL;
+ 
+-	/*Initialize Quadtree*/
+-	this->quadtree = new Quadtree();
+-
+ 	/*Get extrema*/
+-	this->xmin=x[0]; this->ymin=y[0];
+-	this->xmax=x[0]; this->ymax=y[0];
++	xmin=x[0]; ymin=y[0];
++	xmax=x[0]; ymax=y[0];
+ 	for(i=1;i<n;i++){
+ 		xmin=min(xmin,x[i]); ymin=min(ymin,y[i]);
+ 		xmax=max(xmax,x[i]); ymax=max(ymax,y[i]);
+@@ -55,18 +51,12 @@
+ 	offset=0.05*(xmax-xmin); xmin-=offset; xmax+=offset;
+ 	offset=0.05*(ymax-ymin); ymin-=offset; ymax+=offset;
+ 
+-	/*coeffIcoor is the coefficient used for integer coordinates:
+-	 *                (x-xmin)
+-	 * xi = (2^30 -1) ------------ 
+-	 *                   D
+-	 * coefficient = (2^30 -1)/D
+-	 */
+-	this->coefficient = double(MaxICoor)/max(xmax-xmin,ymax-ymin); _assert_(coefficient>=0);
++	/*Initialize Quadtree*/
++	this->quadtree = new Quadtree(xmin,xmax,ymin,ymax,30);
+ 
+ 	/*Add observations one by one*/
+ 	for(i=0;i<n;i++){
+-		xi=int(coefficient*(x[i]-xmin));
+-		yi=int(coefficient*(y[i]-ymin));
++		this->quadtree->IntergerCoordinates(&xi,&yi,x[i],y[i]);
+ 		observation = new Observation(x[i],y[i],xi,yi,observations_list[i]);
+ 		this->quadtree->Add(observation);
+ 		this->AddObject(observation);
+@@ -114,19 +104,11 @@
+ /*FUNCTION Observations::QuadtreeColoring{{{*/
+ void Observations::QuadtreeColoring(double* A,double *x,double *y,int n){
+ 
+-	/*Convert to integer coordinates*/
+-	int *xi = (int*)xmalloc(n*sizeof(int));
+-	int *yi = (int*)xmalloc(n*sizeof(int));
++	int xi,yi;
++
+ 	for(int i=0;i<n;i++){
+-		xi[i]=int(coefficient*(x[i]-xmin));
+-		yi[i]=int(coefficient*(y[i]-ymin));
++		this->quadtree->IntergerCoordinates(&xi,&yi,x[i],y[i]);
++		this->quadtree->QuadtreeColoring(&A[i],xi,yi);
+ 	}
+ 
+-	/*Call quadtree method*/
+-	this->quadtree->QuadtreeColoring(A,xi,yi,n);
+-
+-	/*clean-up*/
+-	xfree((void**)&xi);
+-	xfree((void**)&yi);
+-
+ }/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h	(revision 12224)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h	(revision 12225)
+@@ -12,11 +12,6 @@
+ 
+ 	private:
+ 		Quadtree* quadtree;
+-		double    coefficient; //For integer coordinate conversion
+-		double    xmin;
+-		double    ymin;
+-		double    xmax;
+-		double    ymax;
+ 
+ 	public:
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12224)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12225)
+@@ -15,14 +15,17 @@
+ 
+ 		class QuadtreeBox: public Object{ 
+ 			public:
+-				int nbitems; // number of current vertices in the box
++				int    nbitems; // number of current vertices in the box
++				double xcenter; // x position of the center (double)
++				double ycenter; // x position of the center (double)
++				double length;  // width of the box
+ 				union{
+ 					QuadtreeBox *box[4];
+ 					Observation *obs[4];
+ 				};
+ 
+ 				/*Object functions (Needed because the Quadtree uses a Container*/
+-				void    Echo()      {_error_("not implemented yet"); };
++				void    Echo();
+ 				void    DeepEcho()  {_error_("not implemented yet"); };
+ 				int     Id()        {_error_("not implemented yet"); };
+ 				int     MyRank()    {_error_("not implemented yet"); };
+@@ -34,16 +37,21 @@
+ 		DataSet* boxcontainer;
+ 
+ 	public:
+-		int          MaxDepth;      // maximum number of subdivision
+-		QuadtreeBox *root;          // main box
+-		long         NbQuadtreeBox; // total number of boxes
+-		long         NbObs;         // number of points
++		int          MaxDepth;          // maximum number of subdivision
++		double       coordconversion;   // Coefficient to convert coordinates to integer
++		QuadtreeBox *root;              // main box
++		long         NbQuadtreeBox;     // total number of boxes
++		long         NbObs;             // number of points
+ 
+ 		Quadtree();
++		Quadtree(double xmin,double xmax,double ymin,double ymax,int maxdepth_in);
+ 		~Quadtree();
++		void         Add(Observation *observation);
++		void         DeepEcho(void);
+ 		void         Echo(void);
+-		void         Add(Observation *observation);
+-		void         QuadtreeColoring(double *A,int *xi,int *yi,int n);
+-		QuadtreeBox *NewQuadtreeBox(void);
++		void         IntergerCoordinates(int *xi,int *yi,double x,double y);
++		QuadtreeBox *NewQuadtreeBox(double xcenter,double ycenter,double length);
++		QuadtreeBox *NewQuadtreeBox(QuadtreeBox* master,int index);
++		void         QuadtreeColoring(double *A,int xi,int yi);
+ };
+ #endif //_QUADTREEK_H
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12224)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12225)
+@@ -79,22 +79,31 @@
+ /*}}}*/
+ 
+ 	/*Constructors/Destructors*/
+-	/*FUNCTION Quadtree::Quadtree(){{{1*/
+-	Quadtree::Quadtree(){
++/*FUNCTION Quadtree::Quadtree(){{{1*/
++Quadtree::Quadtree(){
++	_error_("Constructor not supported");
+ 
+-		/*Initialize fields*/
+-		this->MaxDepth=30;
+-		this->NbQuadtreeBox=0;
+-		this->NbObs=0;
++}
++/*}}}1*/
++/*FUNCTION Quadtree::Quadtree(double xmin,double xmax,double ymin,double ymax,int maxdepth){{{1*/
++Quadtree::Quadtree(double xmin,double xmax,double ymin,double ymax,int maxdepth){
+ 
+-		/*Create container*/
+-		this->boxcontainer=new DataSet();
++	/*Intermediaries*/
++	double length;
+ 
+-		/*Create Root, pointer toward the main box*/
+-		this->root=NewQuadtreeBox();
++	/*Initialize fields*/
++	this->MaxDepth=maxdepth;
++	this->NbQuadtreeBox=0;
++	this->NbObs=0;
+ 
+-		}
+-	/*}}}1*/
++	/*Create container*/
++	this->boxcontainer=new DataSet();
++
++	/*Create Root, pointer toward the main box*/
++	length=max(xmax-xmin,ymax-ymin);
++	this->root=NewQuadtreeBox(xmin+length/2,ymin+length/2,length);
++}
++/*}}}1*/
+ 	/*FUNCTION Quadtree::~Quadtree(){{{1*/
+ 	Quadtree::~Quadtree(){
+ 
+@@ -109,78 +118,82 @@
+ void  Quadtree::Add(Observation* observation){
+ 
+ 	/*Intermediaries*/
+-	int          xi,yi,ij,level;
+-	QuadtreeBox **pb = NULL;
+-	QuadtreeBox  *b  = NULL;
+-	QuadtreeBox  *bb = NULL;
++	int          xi,yi,ij,level,levelbin;
++	QuadtreeBox **pbox    = NULL; // pointer toward current box b
++	QuadtreeBox **pmaster = NULL; // pointer toward master of b
++	QuadtreeBox  *box     = NULL; // current box b
++	QuadtreeBox  *slave   = NULL; // suslaveox of b (if necessary)
+ 	Observation  *obs[4];
+ 
+ 	/*Get integer coodinates*/
+ 	xi = observation->xi;
+ 	yi = observation->yi;
+ 
+-	/*Initialize level*/
+-	level=(1L<<this->MaxDepth);// = 2^30
++	/*Initialize levels*/
++	level    = 0;
++	levelbin = (1L<<this->MaxDepth);// = 2^30
+ 
+ 	/*Get inital box (the largest)*/
+-	pb=&root;
++	pmaster = &root;
++	pbox    = &root;
+ 
+ 	/*Find the smallest box where the observation is located*/
+-	while((b=*pb) && (b->nbitems<0)){ 
++	while((box=*pbox) && (box->nbitems<0)){ 
+ 
+-		/*Go down one level = 00100 -> 00010*/
+-		level>>=1;
++		/*Go down one level (levelbin = 00100 -> 00010)*/
++		levelbin>>=1; level+=1; _assert_(level<this->MaxDepth);
+ 
+-		/*Get next subbox according to the bit value (level)*/
+-		pb = &b->box[IJ(xi,yi,level)];
++		/*Get next box according to the bit value (levelbin)*/
++		pmaster = pbox;
++		pbox    = &box->box[IJ(xi,yi,levelbin)];
+ 	}
+-	_assert_(level>0);
++	_assert_(levelbin>0);
+ 
+ 	/*Now, try to add the vertex, if the box is full (nbitems=4), we have to divide it in 4 new boxes*/
+-	while((b=*pb) && (b->nbitems==4)){
++	while((box=*pbox) && (box->nbitems==4)){
+ 
+ 		/*Copy the 4 observation in the current Quadtreebox*/
+-		obs[0] = b->obs[0];
+-		obs[1] = b->obs[1];
+-		obs[2] = b->obs[2];
+-		obs[3] = b->obs[3];
++		obs[0] = box->obs[0];
++		obs[1] = box->obs[1];
++		obs[2] = box->obs[2];
++		obs[3] = box->obs[3];
+ 
+-		/*set nbitems as negative (now holding boxes instead of observations)*/
+-		b->nbitems = -b->nbitems;
++		/*set nbitems as -1 (now holding boxes instead of observations)*/
++		box->nbitems = -1;
++		box->box[0]  = NULL;
++		box->box[1]  = NULL;
++		box->box[2]  = NULL;
++		box->box[3]  = NULL;
+ 
+-		/*Initialize the 4 pointers toward the 4 subboxes*/
+-		b->box[0]=NULL;
+-		b->box[1]=NULL;
+-		b->box[2]=NULL;
+-		b->box[3]=NULL;
++		/*Go down one level (levelbin = 00010 -> 00001)*/
++		levelbin>>=1; level+=1; _assert_(level<this->MaxDepth);
+ 
+-		/*level = 00100 -> 00010*/
+-		level>>=1;
+-
+ 		/*Put the four observations in the new boxes*/
+ 		for (int k=0;k<4;k++){
+ 
+ 			/*Get box for observation number k*/
+-			ij = IJ(obs[k]->xi,obs[k]->yi,level);
+-			bb = b->box[ij];
+-			if(!bb){
+-				b->box[ij]=NewQuadtreeBox();
+-				bb=b->box[ij];
++			ij    = IJ(obs[k]->xi,obs[k]->yi,levelbin);
++			slave = box->box[ij];
++			if(!slave){
++				box->box[ij] = NewQuadtreeBox(box,ij);
++				slave        = box->box[ij];
+ 			}
+-			bb->obs[bb->nbitems++] = obs[k];
++			slave->obs[slave->nbitems++] = obs[k];
+ 		}
+ 
+-		/*Get the subbox where the current observation is located*/
+-		ij=IJ(xi,yi,level);
+-		pb=&b->box[ij];
++		/*Get the suslaveox where the current observation is located*/
++		ij      = IJ(xi,yi,levelbin);
++		pmaster = pbox;
++		pbox    = &box->box[ij];
+ 	}
+ 
+ 	/*alloc the QuadtreeBox if necessary and add current observation*/
+-	b=*pb;
+-	if(!b){
+-		b=*pb=NewQuadtreeBox();
++	box = *pbox;
++	if(!box){
++		ij  = IJ(xi,yi,levelbin);
++		box = *pbox = NewQuadtreeBox(*pmaster,ij);
+ 	}
+-	b->obs[b->nbitems++]=observation;
++	box->obs[box->nbitems++]=observation;
+ 	NbObs++;
+ 
+ }/*}}}*/
+@@ -188,21 +201,59 @@
+ void  Quadtree::Echo(void){
+ 
+ 	printf("Quadtree:\n");
+-	printf("   MaxDepth      = %i\n",MaxDepth);
+-	printf("   NbQuadtreeBox = %i\n",NbQuadtreeBox);
+-	printf("   NbObs         = %i\n",NbObs);
+-	printf("   root          = %p\n",root);
++	printf("   MaxDepth      = %i\n",this->MaxDepth);
++	printf("   NbQuadtreeBox = %i\n",this->NbQuadtreeBox);
++	printf("   NbObs         = %i\n",this->NbObs);
++	printf("   root          = %p\n",this->root);
+ 
+ }/*}}}*/
+-/*FUNCTION Quadtree::NewQuadtreeBox {{{1*/
+-Quadtree::QuadtreeBox* Quadtree::NewQuadtreeBox(void){
++/*FUNCTION Quadtree::DeepEcho{{{1*/
++void  Quadtree::DeepEcho(void){
+ 
++	printf("Quadtree:\n");
++	printf("   MaxDepth      = %i\n",this->MaxDepth);
++	printf("   NbQuadtreeBox = %i\n",this->NbQuadtreeBox);
++	printf("   NbObs         = %i\n",this->NbObs);
++	printf("   root          = %p\n",this->root);
++	boxcontainer->Echo();
++
++}/*}}}*/
++/*FUNCTION Quadtree::IntergerCoordinates{{{1*/
++void  Quadtree::IntergerCoordinates(int *xi,int *yi,double x,double y){
++
++	/*Intermediaries*/
++	double coefficient;
++	double xmin,ymin;
++
++	/*Checks in debugging mode*/
++	_assert_(xi && yi);
++	_assert_(this->root);
++
++	/*coeffIcoor is the coefficient used for integer coordinates:
++	 *                (x-xmin)
++	 * xi = (2^30 -1) --------- 
++	 *                 length
++	 * coefficient = (2^30 -1)/length
++	 */
++	coefficient = double((1L<<this->MaxDepth)-1)/(this->root->length);
++	xmin        = this->root->xcenter - this->root->length/2;
++	ymin        = this->root->ycenter - this->root->length/2;
++
++	*xi=int(coefficient*(x - xmin));
++	*yi=int(coefficient*(y - ymin));
++}/*}}}*/
++/*FUNCTION Quadtree::NewQuadtreeBox(double xcenter,double ycenter,double length){{{1*/
++Quadtree::QuadtreeBox* Quadtree::NewQuadtreeBox(double xcenter,double ycenter,double length){
++
+ 	/*Output*/
+ 	QuadtreeBox* newbox=NULL;
+ 
+ 	/*Create and initialize a new box*/
+ 	newbox=new QuadtreeBox();
+ 	newbox->nbitems=0;
++	newbox->xcenter=xcenter;
++	newbox->ycenter=ycenter;
++	newbox->length=length;
+ 	newbox->box[0]=NULL;
+ 	newbox->box[1]=NULL;
+ 	newbox->box[2]=NULL;
+@@ -215,30 +266,88 @@
+ 	/*currentbox now points toward next quadtree box*/
+ 	return newbox;
+ }/*}}}*/
++/*FUNCTION Quadtree::NewQuadtreeBox(QuadtreeBox* master,int index) {{{1*/
++Quadtree::QuadtreeBox* Quadtree::NewQuadtreeBox(QuadtreeBox* master,int index){
++
++	/*Output*/
++	QuadtreeBox* newbox=NULL;
++
++	/*Checks in debugging mode*/
++	_assert_(master);
++
++	/*Create and initialize a new box*/
++	newbox=new QuadtreeBox();
++	newbox->nbitems=0;
++	newbox->box[0]=NULL;
++	newbox->box[1]=NULL;
++	newbox->box[2]=NULL;
++	newbox->box[3]=NULL;
++	switch(index){
++		case 0:
++			newbox->xcenter=master->xcenter - master->length/4;
++			newbox->ycenter=master->ycenter - master->length/4;
++			break;
++		case 1:
++			newbox->xcenter=master->xcenter + master->length/4;
++			newbox->ycenter=master->ycenter - master->length/4;
++			break;
++		case 2:
++			newbox->xcenter=master->xcenter - master->length/4;
++			newbox->ycenter=master->ycenter + master->length/4;
++			break;
++		case 3:
++			newbox->xcenter=master->xcenter + master->length/4;
++			newbox->ycenter=master->ycenter + master->length/4;
++			break;
++		default:
++			_error_("Case %i not supported",index);
++	}
++	newbox->length=master->length/2;
++
++	/*Add to container*/
++	this->boxcontainer->AddObject(newbox);
++	NbQuadtreeBox++;
++
++	/*currentbox now points toward next quadtree box*/
++	return newbox;
++}/*}}}*/
+ /*FUNCTION Quadtree::QuadtreeColoring{{{1*/
+-void Quadtree::QuadtreeColoring(double* A,int *xi,int *yi,int n){
++void Quadtree::QuadtreeColoring(double* A,int xi,int yi){
+ 
+-	QuadtreeBox **pb = NULL;
+-	QuadtreeBox  *b  = NULL;
+-	int          level;
++	QuadtreeBox **pbox = NULL;
++	QuadtreeBox  *box  = NULL;
++	int           level,levelbin;
+ 
+-	for(int i=0;i<n;i++){
++	/*Initialize levels*/
++	level    = 0;
++	levelbin = (1L<<this->MaxDepth);// = 2^30
+ 
+-		/*Initialize level*/
+-		level=(1L<<this->MaxDepth);// = 2^30
++	/*Get inital box (the largest)*/
++	pbox=&root;
+ 
+-		/*Get inital box (the largest)*/
+-		pb=&root;
++	/*Find the smallest box where this point is located*/
++	while((box=*pbox) && (box->nbitems<0)){ 
+ 
+-		/*Find the smallest box where the observation is located*/
+-		while((b=*pb) && (b->nbitems<0)){ 
++		levelbin>>=1; level+=1; _assert_(level<this->MaxDepth);
+ 
+-			/*Color matrix onces more*/
+-			A[i]+=1;
++		pbox = &box->box[IJ(xi,yi,levelbin)];
++	}
++	if(box && box->nbitems>0){
++		/*This box is not empty, add one level*/
++		level+=1;
++	}
+ 
+-			/*Go to one box deeper*/
+-			level>>=1;
+-			pb = &b->box[IJ(xi[i],yi[i],level)];
+-		}
+-	}
++	*A=level;
+ }/*}}}*/
++
++/*QuadtreeBox methos*/
++/*FUNCTION QuadtreeBox::Echo{{{1*/
++void  Quadtree::QuadtreeBox::Echo(void){
++
++	printf("QuadtreeBox:\n");
++	printf("   nbitems = %i\n",this->nbitems);
++	printf("   xcenter = %g\n",this->xcenter);
++	printf("   ycenter = %g\n",this->ycenter);
++	printf("   length  = %g\n",this->length);
++
++}/*}}}*/
Index: /issm/oecreview/Archive/12221-12240/ISSM-12225-12226.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12225-12226.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12225-12226.diff	(revision 12325)
@@ -0,0 +1,202 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12225)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12226)
+@@ -31,14 +31,14 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Observations::Observations(double* observations_list,double* x,double* y,int n){{{*/
+-Observations::Observations(double* observations_list,double* x,double* y,int n){
++/*FUNCTION Observations::Observations(double* observations_list,double* x,double* y,int n,Options* options){{{*/
++Observations::Observations(double* observations_list,double* x,double* y,int n,Options* options){
+ 
+ 	/*Intermediaries*/
+-	int          i;
++	int          i,maxdepth;
+ 	int          xi,yi;
+ 	double       xmin,xmax,ymin,ymax;
+-	double       offset;
++	double       offset,minlength;
+ 	Observation *observation = NULL;
+ 
+ 	/*Get extrema*/
+@@ -51,16 +51,36 @@
+ 	offset=0.05*(xmax-xmin); xmin-=offset; xmax+=offset;
+ 	offset=0.05*(ymax-ymin); ymin-=offset; ymax+=offset;
+ 
++	/*Get Minimum box size*/
++	if(options->GetOption("boxlength")){
++		options->Get(&minlength,"boxlength");
++		if(minlength<=0)_error_("boxlength should be a positive number");
++		maxdepth=int(log(max(xmax-xmin,ymax-ymin)/minlength +1)/log(2));
++	}
++	else{
++		maxdepth = 30;
++		minlength=max(xmax-xmin,ymax-ymin)/double((1L<<maxdepth)-1);
++	}
++
++
+ 	/*Initialize Quadtree*/
+-	this->quadtree = new Quadtree(xmin,xmax,ymin,ymax,30);
++	printf("Generating quadtree with a maximum box size %g (depth=%i)...",minlength,maxdepth);
++	this->quadtree = new Quadtree(xmin,xmax,ymin,ymax,maxdepth);
+ 
+ 	/*Add observations one by one*/
++	int level;
+ 	for(i=0;i<n;i++){
+ 		this->quadtree->IntergerCoordinates(&xi,&yi,x[i],y[i]);
+-		observation = new Observation(x[i],y[i],xi,yi,observations_list[i]);
+-		this->quadtree->Add(observation);
+-		this->AddObject(observation);
++		this->quadtree->QuadtreeDepth2(&level,xi,yi);
++		if((int)level >= maxdepth){
++		}
++		else{
++			observation = new Observation(x[i],y[i],xi,yi,observations_list[i]);
++			this->quadtree->Add(observation);
++			this->AddObject(observation);
++		}
+ 	}
++	printf("done\n");
+ }
+ /*}}}*/
+ /*FUNCTION Observations::~Observations(){{{*/
+@@ -104,11 +124,12 @@
+ /*FUNCTION Observations::QuadtreeColoring{{{*/
+ void Observations::QuadtreeColoring(double* A,double *x,double *y,int n){
+ 
+-	int xi,yi;
++	int xi,yi,level;
+ 
+ 	for(int i=0;i<n;i++){
+ 		this->quadtree->IntergerCoordinates(&xi,&yi,x[i],y[i]);
+-		this->quadtree->QuadtreeColoring(&A[i],xi,yi);
++		this->quadtree->QuadtreeDepth(&level,xi,yi);
++		A[i]=(double)level;
+ 	}
+ 
+ }/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h	(revision 12225)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h	(revision 12226)
+@@ -7,6 +7,7 @@
+ 
+ class Obsevration;
+ class Quadtree;
++class Options;
+ 
+ class Observations: public DataSet{
+ 
+@@ -17,7 +18,7 @@
+ 
+ 		/*constructors, destructors*/
+ 		Observations();
+-		Observations(double* observations_list,double* x,double* y,int n);
++		Observations(double* observations_list,double* x,double* y,int n,Options* options);
+ 		~Observations();
+ 
+ 		/*Methods*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12225)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12226)
+@@ -39,7 +39,7 @@
+ 	ProcessVariogram(&variogram,options);
+ 
+ 	/*Process observation dataset*/
+-	observations=new Observations(obs_list,obs_x,obs_y,obs_length);
++	observations=new Observations(obs_list,obs_x,obs_y,obs_length,options);
+ 
+ 	/*Allocation output*/
+ 	predictions =(double*)xmalloc(n_interp*sizeof(double));
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12225)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12226)
+@@ -52,6 +52,7 @@
+ 		void         IntergerCoordinates(int *xi,int *yi,double x,double y);
+ 		QuadtreeBox *NewQuadtreeBox(double xcenter,double ycenter,double length);
+ 		QuadtreeBox *NewQuadtreeBox(QuadtreeBox* master,int index);
+-		void         QuadtreeColoring(double *A,int xi,int yi);
++		void         QuadtreeDepth(int *A,int xi,int yi);
++		void         QuadtreeDepth2(int *A,int xi,int yi);
+ };
+ #endif //_QUADTREEK_H
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12225)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12226)
+@@ -311,8 +311,8 @@
+ 	/*currentbox now points toward next quadtree box*/
+ 	return newbox;
+ }/*}}}*/
+-/*FUNCTION Quadtree::QuadtreeColoring{{{1*/
+-void Quadtree::QuadtreeColoring(double* A,int xi,int yi){
++/*FUNCTION Quadtree::QuadtreeDepth{{{1*/
++void Quadtree::QuadtreeDepth(int* A,int xi,int yi){
+ 
+ 	QuadtreeBox **pbox = NULL;
+ 	QuadtreeBox  *box  = NULL;
+@@ -339,7 +339,60 @@
+ 
+ 	*A=level;
+ }/*}}}*/
++/*FUNCTION Quadtree::QuadtreeDepth2{{{1*/
++void Quadtree::QuadtreeDepth2(int* A,int xi,int yi){
+ 
++	QuadtreeBox **pbox = NULL;
++	QuadtreeBox  *box  = NULL;
++	int           level,levelbin;
++
++	/*Initialize levels*/
++	level    = 0;
++	levelbin = (1L<<this->MaxDepth);// = 2^30
++
++	/*Get inital box (the largest)*/
++	pbox=&root;
++
++	/*Find the smallest box where this point is located*/
++	while((box=*pbox) && (box->nbitems<0)){ 
++
++		levelbin>>=1; level+=1; 
++
++		pbox = &box->box[IJ(xi,yi,levelbin)];
++	}
++	if(box && box->nbitems>0){
++		/*This box is not empty, add one level*/
++		level+=1;
++	}
++
++	/*If we were to add the vertex, get level*/
++	if(box && box->nbitems==4){
++		int ij;
++		bool flag=true;
++		while(flag){
++
++			levelbin>>=1; level+=1;
++			if(level>this->MaxDepth){
++				level+=1;
++				break;
++			}
++
++			/*loop over the four observations*/
++			ij=IJ(box->obs[0]->xi,box->obs[0]->yi,levelbin);
++			for (int k=1;k<4;k++){
++				if(IJ(box->obs[k]->xi,box->obs[k]->yi,levelbin) != ij){
++					flag = false;
++				}
++			}
++			if(IJ(xi,yi,levelbin)!=ij){
++				flag = false;
++			}
++		}
++	}
++
++	*A=level;
++}/*}}}*/
++
+ /*QuadtreeBox methos*/
+ /*FUNCTION QuadtreeBox::Echo{{{1*/
+ void  Quadtree::QuadtreeBox::Echo(void){
Index: /issm/oecreview/Archive/12221-12240/ISSM-12226-12227.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12226-12227.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12226-12227.diff	(revision 12325)
@@ -0,0 +1,77 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12226)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/android/android-sdk/install.sh	(revision 12227)
+@@ -1,7 +1,7 @@
+ #This installs the Android SDK (Software Development Kit)
+ #which is needed for the compilation of the Java project. 
+ 
+-step=1;
++step=3;
+ 
+ #Different steps here. 
+ #1: install sdk, ant and sdk tools
+@@ -11,6 +11,7 @@
+ 
+ present_dir=`pwd`;
+ default_droid="Android-4.0"
++sd_card="issm-sdcard"
+ 
+ if [[ $step == "1" ]]; then
+ 
+@@ -61,6 +62,8 @@
+ 	#default settings will suffice. Press 'enter' to take default settings or enter 'no'.
+ 
+ 	./android create avd -f -n $default_droid -t 1 -p $ANDROID_DIR/android-emulators/$default_droid --abi armeabi-v7a
++    echo "Creating an SD Card"
++    ./mksdcard -l $sd_card 2G $ANDROID_DIR/android-emulators/$sd_card.img
+ fi
+ 
+ if [[ $step == "3" ]]; then
+@@ -69,11 +72,14 @@
+     #a terminal in our device.
+ 
+ 	cd $present_dir/install-sdk/tools
+-	./emulator -avd $default_droid -sdcard $ANDROID_DIR/android-emulators/test &
++	./emulator -avd $default_droid -sdcard $ANDROID_DIR/android-emulators/$sd_card.img &
+ 
+     cd ../platform-tools
+-    ./adb wait-for-device shell
+-
++    ./adb wait-for-device shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system
++    #./adb wait-for-device shell
++    ./adb push $ISSM_TIER/src/c/issm.exe /data/issm.exe
++    ./adb shell chmod 777 /data/issm.exe
++    ./adb shell /data/issm.exe
+ fi
+ 
+ if [[ $step == "4" ]]; then
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh	(revision 12226)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-arm-linux.sh	(revision 12227)
+@@ -4,6 +4,10 @@
+ 	--prefix=$ISSM_DIR \
+     --host="arm-linux" \
+ 	--without-modules \
++    CC=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-gcc \
++    GCC=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-gcc \
++    CXX=$ANDROID_DIR/arm-linux-android-4.0/bin/arm-linux-androideabi-g++ \
+ 	--with-vendor=arm-linux \
+ 	--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
+-	--with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install
++	--with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install\
++    --without-fortran-lib
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac	(revision 12226)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configure.ac	(revision 12227)
+@@ -9,7 +9,7 @@
+ AC_PROG_CC([cccl cl icl gcc])
+ AC_PROG_CPP
+ AC_PROG_CXX([cccl cl icl g++])
+-AC_PROG_F77([ifort g77 gfortran])
++#AC_PROG_F77([ifort g77 gfortran])
+ #Libraries and linking
+ AC_PROG_RANLIB
+ AC_F77_LIBRARY_LDFLAGS
Index: /issm/oecreview/Archive/12221-12240/ISSM-12227-12228.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12227-12228.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12227-12228.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12227)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12228)
+@@ -55,7 +55,7 @@
+ 	if(options->GetOption("boxlength")){
+ 		options->Get(&minlength,"boxlength");
+ 		if(minlength<=0)_error_("boxlength should be a positive number");
+-		maxdepth=int(log(max(xmax-xmin,ymax-ymin)/minlength +1)/log(2));
++		maxdepth=int(log(max(xmax-xmin,ymax-ymin)/minlength +1)/log(2.0));
+ 	}
+ 	else{
+ 		maxdepth = 30;
Index: /issm/oecreview/Archive/12221-12240/ISSM-12228-12229.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12228-12229.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12228-12229.diff	(revision 12325)
@@ -0,0 +1,414 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12228)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12229)
+@@ -35,7 +35,7 @@
+ Observations::Observations(double* observations_list,double* x,double* y,int n,Options* options){
+ 
+ 	/*Intermediaries*/
+-	int          i,maxdepth;
++	int          i,maxdepth,level,counter;
+ 	int          xi,yi;
+ 	double       xmin,xmax,ymin,ymax;
+ 	double       offset,minlength;
+@@ -62,23 +62,23 @@
+ 		minlength=max(xmax-xmin,ymax-ymin)/double((1L<<maxdepth)-1);
+ 	}
+ 
+-
+ 	/*Initialize Quadtree*/
+-	printf("Generating quadtree with a maximum box size %g (depth=%i)...",minlength,maxdepth);
++	printf("Generating quadtree with a maximum box size %g (depth=%i)... ",minlength,maxdepth);
+ 	this->quadtree = new Quadtree(xmin,xmax,ymin,ymax,maxdepth);
+ 
+ 	/*Add observations one by one*/
+-	int level;
++	counter = 0;
+ 	for(i=0;i<n;i++){
+ 		this->quadtree->IntergerCoordinates(&xi,&yi,x[i],y[i]);
+ 		this->quadtree->QuadtreeDepth2(&level,xi,yi);
+-		if((int)level >= maxdepth){
+-		}
+-		else{
+-			observation = new Observation(x[i],y[i],xi,yi,observations_list[i]);
++		if((int)level <= maxdepth){
++			observation = new Observation(x[i],y[i],xi,yi,counter++,observations_list[i]);
+ 			this->quadtree->Add(observation);
+ 			this->AddObject(observation);
+ 		}
++		else{
++			//We need to average with the current observations (not done yet)
++		}
+ 	}
+ 	printf("done\n");
+ }
+@@ -92,30 +92,46 @@
+ 
+ /*Methods*/
+ /*FUNCTION Observations::ObservationList{{{*/
+-void Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp){
++void Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double range){
+ 
+ 	/*Output and Intermediaries*/
+-	int          nobs,i;
+-	double      *x           = NULL;
+-	double      *y           = NULL;
+-	double      *obs         = NULL;
+-	Observation *observation = NULL;
++	int          nobs,i,index;
++	double      *x            = NULL;
++	double      *y            = NULL;
++	double      *obs          = NULL;
++	Observation *observation  = NULL;
++	int         *indices      = NULL;
+ 
+-	/*Get number of observations*/
+-	nobs = this->Size();
++	/*Treat range*/
++	if(range==0){
++		range=this->quadtree->root->length;
++	}
+ 
+-	/*Allocate vectors*/
+-	x   = (double*)xmalloc(nobs*sizeof(double));
+-	y   = (double*)xmalloc(nobs*sizeof(double));
+-	obs = (double*)xmalloc(nobs*sizeof(double));
++	/*Find all observations that are in range*/
++	this->quadtree->RangeSearch(&indices,&nobs,x_interp,y_interp,range);
+ 
+-	/*Loop over all observations and fill in x, y and obs*/
+-	for (i=0;i<nobs;i++){
+-		observation=(Observation*)this->GetObjectByOffset(i);
+-		observation->WriteXYObs(&x[i],&y[i],&obs[i]);
++	if(nobs==0){
++		/*No observation found, double range*/
++		printf("No observation found within range, doubling range\n");
++		xfree((void**)&indices);
++		this->ObservationList(&x,&y,&obs,&nobs,x_interp,y_interp,range*2);
+ 	}
++	else{
++		if(nobs>1000) printf("Taking more than 1000 observations\n");
++		/*Allocate vectors*/
++		x   = (double*)xmalloc(nobs*sizeof(double));
++		y   = (double*)xmalloc(nobs*sizeof(double));
++		obs = (double*)xmalloc(nobs*sizeof(double));
+ 
++		/*Loop over all observations and fill in x, y and obs*/
++		for (i=0;i<nobs;i++){
++			observation=(Observation*)this->GetObjectByOffset(indices[i]);
++			observation->WriteXYObs(&x[i],&y[i],&obs[i]);
++		}
++	}
++
+ 	/*Assign output pointer*/
++	xfree((void**)&indices);
+ 	*px=x;
+ 	*py=y;
+ 	*pobs=obs;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h	(revision 12228)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h	(revision 12229)
+@@ -22,7 +22,7 @@
+ 		~Observations();
+ 
+ 		/*Methods*/
+-		void ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp);
++		void ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double range);
+ 		void QuadtreeColoring(double* A,double *x,double *y,int n);
+ 
+ };
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12228)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12229)
+@@ -22,6 +22,7 @@
+ 
+ 	/*Intermediaries*/
+ 	int           i,j,n_obs;
++	double        range;
+ 	double        numerator,denominator,ratio;
+ 	double       *x            = NULL;
+ 	double       *y            = NULL;
+@@ -32,30 +33,37 @@
+ 	double       *GinvZ        = NULL;
+ 	double       *gamma0       = NULL;
+ 	double       *ones         = NULL;
++	char         *output       = NULL;
+ 	Variogram    *variogram    = NULL;
+ 	Observations *observations = NULL;
+ 
+ 	/*Get Variogram from Options*/
+ 	ProcessVariogram(&variogram,options);
++	options->Get(&range,"searchrange",0.);
+ 
+ 	/*Process observation dataset*/
+ 	observations=new Observations(obs_list,obs_x,obs_y,obs_length,options);
+ 
+ 	/*Allocation output*/
+ 	predictions =(double*)xmalloc(n_interp*sizeof(double));
+-
+ 	for(i=0;i<n_interp;i++) predictions[i]=0;
+-	observations->QuadtreeColoring(predictions,x_interp,y_interp,n_interp);
+-	*ppredictions=predictions;
+-	return 1;
+ 
++	/*Get output*/
++	options->Get(&output,"output","quadtree");
++
++	if(strcmp(output,"quadtree")==0){
++		observations->QuadtreeColoring(predictions,x_interp,y_interp,n_interp);
++		*ppredictions=predictions;
++		return 1;
++	}
++
+ 	/*Loop over all interpolations*/
+ 	printf("      interpolation progress:  %5.2lf %%",0.0);
+ 	for(int idx=0;idx<n_interp;idx++){
+ 		if(idx%10==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)idx/n_interp*100);
+ 
+ 		/*Get list of observations for current point*/
+-		observations->ObservationList(&x,&y,&obs,&n_obs,x_interp[idx],y_interp[idx]);
++		observations->ObservationList(&x,&y,&obs,&n_obs,x_interp[idx],y_interp[idx],range);
+ 
+ 		/*Allocate intermediary matrix and vectors*/
+ 		Gamma       =(double*)xmalloc(n_obs*n_obs*sizeof(double));
+@@ -104,6 +112,7 @@
+ 	/*clean-up and Assign output pointer*/
+ 	delete variogram;
+ 	delete observations;
++	xfree((void**)&output);
+ 	*ppredictions=predictions;
+ 	return 1;
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.h	(revision 12228)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.h	(revision 12229)
+@@ -1,6 +1,6 @@
+ /*Original code from Frederic Hecht <hecht@ann.jussieu.fr> (BAMG v1.01, BamgQuadtree.h)*/
+-#ifndef _QUADTREE_H
+-#define _QUADTREE_H
++#ifndef _BAMGQUADTREE_H
++#define _BAMGQUADTREE_H
+ 
+ #include "./include.h"
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12228)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12229)
+@@ -1,6 +1,6 @@
+ 
+-#ifndef _QUADTREEK_H
+-#define _QUADTREEK_H
++#ifndef _QUADTREE_H
++#define _QUADTREE_H
+ 
+ class Observation;
+ 
+@@ -31,6 +31,12 @@
+ 				int     MyRank()    {_error_("not implemented yet"); };
+ 				int     ObjectEnum(){_error_("not implemented yet"); };
+ 				Object *copy()      {_error_("not implemented yet"); };
++
++				/*Methods*/
++				int IsWithinRange(double x,double y,double range);
++				void RangeSearch(int* indices,int *pnobs,double x,double y,double range);
++				void WriteObservations(int* indices,int *pnobs);
++
+ 		};
+ 
+ 		/*Quadtree private Fields*/
+@@ -38,7 +44,6 @@
+ 
+ 	public:
+ 		int          MaxDepth;          // maximum number of subdivision
+-		double       coordconversion;   // Coefficient to convert coordinates to integer
+ 		QuadtreeBox *root;              // main box
+ 		long         NbQuadtreeBox;     // total number of boxes
+ 		long         NbObs;             // number of points
+@@ -54,5 +59,6 @@
+ 		QuadtreeBox *NewQuadtreeBox(QuadtreeBox* master,int index);
+ 		void         QuadtreeDepth(int *A,int xi,int yi);
+ 		void         QuadtreeDepth2(int *A,int xi,int yi);
++		void         RangeSearch(int **pindices,int *pnobs,double x,double y,double range);
+ };
+-#endif //_QUADTREEK_H
++#endif //_QUADTREE_H
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.h	(revision 12228)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.h	(revision 12229)
+@@ -12,11 +12,12 @@
+ 	public:
+ 		double x,y;
+ 		int    xi,yi;
++		int    index;
+ 		double value;
+ 
+ 		/*Observation constructors, destructors*/
+ 		Observation();
+-		Observation(double x_in,double y_in,int xi_in,int yi_in,double value_in);
++		Observation(double x_in,double y_in,int xi_in,int yi_in,int index_in,double value_in);
+ 		~Observation();
+ 
+ 		/*Object virtual functions definitions*/
+@@ -30,4 +31,4 @@
+ 		/*Management*/
+ 		void WriteXYObs(double* px,double* py,double* pobs);
+ };
+-#endif  /* _EXPONENTIALVARIOGRAM_H */
++#endif  /* _OBSERVATION_*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12228)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12229)
+@@ -392,7 +392,25 @@
+ 
+ 	*A=level;
+ }/*}}}*/
++/*FUNCTION Quadtree::RangeSearch{{{1*/
++void Quadtree::RangeSearch(int **pindices,int *pnobs,double x,double y,double range){
+ 
++	/*Intermediaries*/
++	int  nobs;
++	int *indices = NULL;
++
++	/*Allocate indices (maximum by default*/
++	indices = (int*)xmalloc(this->NbObs*sizeof(int));
++	nobs = 0;
++
++	this->root->RangeSearch(indices,&nobs,x,y,range);
++
++	/*Clean-up and return*/
++	*pnobs=nobs;
++	*pindices=indices;
++
++}/*}}}*/
++
+ /*QuadtreeBox methos*/
+ /*FUNCTION QuadtreeBox::Echo{{{1*/
+ void  Quadtree::QuadtreeBox::Echo(void){
+@@ -404,3 +422,92 @@
+ 	printf("   length  = %g\n",this->length);
+ 
+ }/*}}}*/
++/*FUNCTION QuadtreeBox::IsWithinRange{{{1*/
++int Quadtree::QuadtreeBox::IsWithinRange(double x,double y,double range){
++
++	/*Return 0 if the 2 boxes do not overlap*/
++	if(this->xcenter+this->length/2 < x-range) return 0;
++	if(this->xcenter-this->length/2 > x+range) return 0;
++	if(this->ycenter+this->length/2 < y-range) return 0;
++	if(this->ycenter-this->length/2 > y+range) return 0;
++
++	/*Return 2 if the this box is included in the range*/
++	if(
++				this->xcenter+this->length/2 <= x+range &&
++				this->ycenter+this->length/2 <= y+range &&
++				this->xcenter-this->length/2 >= x-range &&
++				this->ycenter-this->length/2 >= y-range
++	  ) return 2;
++
++	/*This is a simple overlap*/
++	return 1;
++
++}/*}}}*/
++/*FUNCTION QuadtreeBox::RangeSearch{{{1*/
++void Quadtree::QuadtreeBox::RangeSearch(int* indices,int *pnobs,double x,double y,double range){
++
++	/*Intermediaries*/
++	int i,nobs;
++
++	/*Recover current number of observations*/
++	nobs = *pnobs;
++
++	switch(this->IsWithinRange(x,y,range)){
++		case 0:
++			/*If this box is not within range, return*/
++			break;
++		case 2:
++			/*This box is included in range*/
++			this->WriteObservations(indices,&nobs);
++			break;
++		case 1:
++			/*This box is partly included*/
++			if(this->nbitems>0){
++				/*If this box has only observations, add indices that are within range*/
++				for(i=0;i<this->nbitems;i++){
++					if(fabs(this->obs[i]->x-x) <= range && fabs(this->obs[i]->y-y) <= range){
++						indices[nobs++]=this->obs[i]->index;
++					}
++				}
++			}
++			else{
++				/*This box points toward boxes*/
++				if(this->box[0]) this->box[0]->RangeSearch(indices,&nobs,x,y,range);
++				if(this->box[1]) this->box[1]->RangeSearch(indices,&nobs,x,y,range);
++				if(this->box[2]) this->box[2]->RangeSearch(indices,&nobs,x,y,range);
++				if(this->box[3]) this->box[3]->RangeSearch(indices,&nobs,x,y,range);
++			}
++			break;
++		default:
++			_error_("Case %i not supported",this->IsWithinRange(x,y,range));
++	}
++
++	/*Assign output pointers: */
++	*pnobs=nobs;
++}/*}}}*/
++/*FUNCTION QuadtreeBox::WriteObservations{{{1*/
++void Quadtree::QuadtreeBox::WriteObservations(int* indices,int *pnobs){
++
++	/*Intermediaries*/
++	int i,nobs;
++
++	/*Recover current number of observations*/
++	nobs = *pnobs;
++
++	if(this->nbitems>0){
++		/*If this box has only observations, add all indices*/
++		for(i=0;i<this->nbitems;i++){
++			indices[nobs++]=this->obs[i]->index;
++		}
++	}
++	else{
++		/*This box points toward boxes, */
++		if(this->box[0]) this->box[0]->WriteObservations(indices,&nobs);
++		if(this->box[1]) this->box[1]->WriteObservations(indices,&nobs);
++		if(this->box[2]) this->box[2]->WriteObservations(indices,&nobs);
++		if(this->box[3]) this->box[3]->WriteObservations(indices,&nobs);
++	}
++
++	/*Assign output pointers: */
++	*pnobs=nobs;
++}/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.cpp	(revision 12228)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.cpp	(revision 12229)
+@@ -11,13 +11,14 @@
+ 	return;
+ }
+ /*}}}*/
+-/*FUNCTION Observation::Observation(double x,double y,int xi,int yi,double value){{{1*/
+-Observation::Observation(double x_in,double y_in,int xi_in,int yi_in,double value_in){
++/*FUNCTION Observation::Observation(double x,double y,int xi,int yi,int index,double value){{{1*/
++Observation::Observation(double x_in,double y_in,int xi_in,int yi_in,int index_in,double value_in){
+ 
+ 	this->x     = x_in;
+ 	this->y     = y_in;
+ 	this->xi    = xi_in;
+ 	this->yi    = yi_in;
++	this->index = index_in;
+ 	this->value = value_in;
+ 
+ }
+@@ -35,6 +36,7 @@
+ 	int  bit;
+ 
+ 	printf("Observation\n");
++	printf("   index : %i\n",this->index);
+ 	printf("   x     : %g\n",this->x);
+ 	printf("   y     : %g\n",this->y);
+ 	printf("   xi    : "); printbinary(this->xi); printf("\n");
Index: /issm/oecreview/Archive/12221-12240/ISSM-12229-12230.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12229-12230.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12229-12230.diff	(revision 12325)
@@ -0,0 +1,252 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12229)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12230)
+@@ -149,3 +149,44 @@
+ 	}
+ 
+ }/*}}}*/
++/*FUNCTION Observations::Variomap{{{*/
++void Observations::Variomap(double* gamma,double *x,int n){
++
++	/*Output and Intermediaries*/
++	int          nobs,i,j,k;
++	double       range;
++	Observation *observation1 = NULL;
++	Observation *observation2 = NULL;
++	int         *indices      = NULL;
++
++	int *counter= (int*)xmalloc(n*sizeof(int));
++	for(j=0;j<n;j++) counter[j] = 0;
++	for(j=0;j<n;j++) gamma[j]   = 0.0;
++
++	for(i=0;i<this->Size();i++){
++		observation1=(Observation*)this->GetObjectByOffset(i);
++
++		for(j=0;j<n;j++){
++			range=x[j]; _assert_(range>=0.);
++
++			/*Find all observations that are in range*/
++			this->quadtree->RangeSearch(&indices,&nobs,observation1->x,observation1->y,range);
++
++			for (k=0;k<nobs;k++){
++				observation2 = (Observation*)this->GetObjectByOffset(indices[k]);
++				gamma[j]    += 1./2.*pow(observation1->value - observation2->value,2.);
++			}
++
++			counter[j] += nobs;
++			xfree((void**)&indices);
++		}
++	}
++
++	/*Normalize semivariogram*/
++	for(j=0;j<n;j++){
++		if(counter[j]) gamma[j] = gamma[j]/double(counter[j]);
++	}
++
++	/*Assign output pointer*/
++	xfree((void**)&counter);
++}/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h	(revision 12229)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h	(revision 12230)
+@@ -24,6 +24,7 @@
+ 		/*Methods*/
+ 		void ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double range);
+ 		void QuadtreeColoring(double* A,double *x,double *y,int n);
++		void Variomap(double* gamma,double *x,int n);
+ 
+ };
+ #endif //ifndef _OBSERVATIONS_H_
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12229)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12230)
+@@ -56,6 +56,11 @@
+ 		*ppredictions=predictions;
+ 		return 1;
+ 	}
++	if(strcmp(output,"variomap")==0){
++		observations->Variomap(predictions,x_interp,n_interp);
++		*ppredictions=predictions;
++		return 1;
++	}
+ 
+ 	/*Loop over all interpolations*/
+ 	printf("      interpolation progress:  %5.2lf %%",0.0);
+@@ -128,7 +133,8 @@
+ 		if     (strcmp(model,"gaussian")==0)    variogram = new GaussianVariogram(options);
+ 		else if(strcmp(model,"exponential")==0) variogram = new ExponentialVariogram(options);
+ 		else if(strcmp(model,"spherical")==0)   variogram = new SphericalVariogram(options);
+-		else _error_("variogram %s not supported yet (list of supported variogram: gaussian, exponential and spherical)",model);
++		else if(strcmp(model,"power")==0)       variogram = new PowerVariogram(options);
++		else _error_("variogram %s not supported yet (list of supported variogram: gaussian, exponential, spherical and power)",model);
+ 	}
+ 	else variogram = new GaussianVariogram(options);
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12229)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12230)
+@@ -618,6 +618,8 @@
+ 						./objects/Kriging/ExponentialVariogram.cpp\
+ 						./objects/Kriging/SphericalVariogram.h\
+ 						./objects/Kriging/SphericalVariogram.cpp\
++						./objects/Kriging/PowerVariogram.h\
++						./objects/Kriging/PowerVariogram.cpp\
+ 						./objects/Kriging/Quadtree.h\
+ 						./objects/Kriging/Quadtree.cpp\
+ 						./objects/Kriging/Observation.h\
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/objects.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/objects.h	(revision 12229)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/objects.h	(revision 12230)
+@@ -177,6 +177,7 @@
+ #include "./Kriging/GaussianVariogram.h"
+ #include "./Kriging/ExponentialVariogram.h"
+ #include "./Kriging/SphericalVariogram.h"
++#include "./Kriging/PowerVariogram.h"
+ #include "./Kriging/Quadtree.h"
+ #include "./Kriging/Observation.h"
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp	(revision 12230)
+@@ -0,0 +1,75 @@
++/*!\file PowerVariogram.c
++ * \brief: implementation of the PowerVariogram object
++ */
++
++#ifdef HAVE_CONFIG_H
++	#include <config.h>
++#else
++#error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
++#endif
++
++#include <stdio.h>
++#include <string.h>
++#include "../objects.h"
++#include "../../EnumDefinitions/EnumDefinitions.h"
++#include "../../shared/shared.h"
++#include "../../include/include.h"
++
++/*PowerVariogram constructors and destructor*/
++/*FUNCTION PowerVariogram::PowerVariogram(){{{1*/
++PowerVariogram::PowerVariogram(){
++	this->nugget = 0.2;
++	this->slope  = 1.;
++	this->power  = 1.;
++	return;
++}
++/*}}}*/
++/*FUNCTION PowerVariogram::PowerVariogram(Options* options){{{1*/
++PowerVariogram::PowerVariogram(Options* options){
++
++	/*Defaults*/
++	this->nugget = 0.2;
++	this->slope  = 1.;
++	this->power  = 1.;
++
++	/*Overwrite from options*/
++	if(options->GetOption("nugget")) options->Get(&this->nugget,"nugget");
++	if(options->GetOption("slope"))  options->Get(&this->slope,"slope");
++	if(options->GetOption("power"))  options->Get(&this->power,"power");
++
++	/*Checks*/
++	if(power<=0 || power>=2) _error_("power must be betwwen 0 and 2 (0 < power < 2)");
++	if(slope<=0) _error_("slope must be positive");
++}
++/*}}}*/
++/*FUNCTION PowerVariogram::~PowerVariogram(){{{1*/
++PowerVariogram::~PowerVariogram(){
++	return;
++}
++/*}}}*/
++
++/*Object virtual functions definitions:*/
++/*FUNCTION PowerVariogram::Echo {{{1*/
++void PowerVariogram::Echo(void){
++	printf("PowerVariogram\n");
++	printf("   nugget: %g\n",this->nugget);
++	printf("   slope : %g\n",this->slope);
++	printf("   power : %g\n",this->power);
++}
++/*}}}*/
++
++/*Variogram function*/
++/*FUNCTION PowerVariogram::SemiVariogram{{{1*/
++double PowerVariogram::SemiVariogram(double deltax,double deltay){
++	/*http://en.wikipedia.org/wiki/Variogram*/
++	double h,gamma;
++
++	/*Calculate length square*/
++	h=sqrt(pow(deltax,2.)+pow(deltay,2.));
++
++	/*return semi-variogram*/
++	gamma = this->nugget + this->slope*pow(h,this->power);
++
++	return gamma;
++}
++/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/PowerVariogram.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/PowerVariogram.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/PowerVariogram.h	(revision 12230)
+@@ -0,0 +1,34 @@
++/*! \file PowerVariogram.h 
++ *  \brief: header file for triavertexinput object
++ */
++
++#ifndef _POWERVARIOGRAM_H_
++#define _POWERVARIOGRAM_H_
++
++/*Headers:*/
++#include "./Variogram.h"
++
++class PowerVariogram: public Variogram{
++
++	public:
++		double nugget; //The height of the jump of the semivariogram at the discontinuity at the origin
++		double slope;  
++		double power; 
++
++		/*PowerVariogram constructors, destructors*/
++		PowerVariogram();
++		PowerVariogram(Options* options);
++		~PowerVariogram();
++
++		/*Object virtual functions definitions*/
++		void  Echo();
++		void  DeepEcho(){_error_("Not implemented yet");};
++		int   Id(){_error_("Not implemented yet");}; 
++		int   MyRank(){_error_("Not implemented yet");};
++		int   ObjectEnum(){_error_("Not implemented yet");};
++		Object* copy(){_error_("Not implemented yet");};
++
++		/*Variogram functions*/
++		double SemiVariogram(double deltax,double deltay);
++};
++#endif  /* _POWERVARIOGRAM_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12229)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12230)
+@@ -432,12 +432,10 @@
+ 	if(this->ycenter-this->length/2 > y+range) return 0;
+ 
+ 	/*Return 2 if the this box is included in the range*/
+-	if(
+-				this->xcenter+this->length/2 <= x+range &&
+-				this->ycenter+this->length/2 <= y+range &&
+-				this->xcenter-this->length/2 >= x-range &&
+-				this->ycenter-this->length/2 >= y-range
+-	  ) return 2;
++	if(this->xcenter+this->length/2 <= x+range &&
++		this->ycenter+this->length/2 <= y+range &&
++		this->xcenter-this->length/2 >= x-range &&
++		this->ycenter-this->length/2 >= y-range) return 2;
+ 
+ 	/*This is a simple overlap*/
+ 	return 1;
Index: /issm/oecreview/Archive/12221-12240/ISSM-12230-12231.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12230-12231.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12230-12231.diff	(revision 12325)
@@ -0,0 +1,237 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12230)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12231)
+@@ -112,12 +112,12 @@
+ 
+ 	if(nobs==0){
+ 		/*No observation found, double range*/
+-		printf("No observation found within range, doubling range\n");
++		//printf("No observation found within range, doubling range\n");
+ 		xfree((void**)&indices);
+ 		this->ObservationList(&x,&y,&obs,&nobs,x_interp,y_interp,range*2);
+ 	}
+ 	else{
+-		if(nobs>1000) printf("Taking more than 1000 observations\n");
++		//if(nobs>1000) printf("Taking more than 1000 observations\n");
+ 		/*Allocate vectors*/
+ 		x   = (double*)xmalloc(nobs*sizeof(double));
+ 		y   = (double*)xmalloc(nobs*sizeof(double));
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12230)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12231)
+@@ -15,28 +15,25 @@
+ #endif
+ 
+ #include "../../objects/Kriging/GaussianVariogram.h"
++/*FUNCTION Krigingx{{{*/
+ int Krigingx(double** ppredictions,double* obs_x, double* obs_y, double* obs_list, int obs_length,double* x_interp,double* y_interp,int n_interp,Options* options){
+ 
+ 	/*output*/
+ 	double *predictions = NULL;
+ 
+ 	/*Intermediaries*/
+-	int           i,j,n_obs;
+ 	double        range;
+-	double        numerator,denominator,ratio;
+-	double       *x            = NULL;
+-	double       *y            = NULL;
+-	double       *obs          = NULL;
+-	double       *Gamma        = NULL;
+-	double       *GinvG0       = NULL;
+-	double       *Ginv1        = NULL;
+-	double       *GinvZ        = NULL;
+-	double       *gamma0       = NULL;
+-	double       *ones         = NULL;
+ 	char         *output       = NULL;
+ 	Variogram    *variogram    = NULL;
+ 	Observations *observations = NULL;
+ 
++	/*threading: */
++	KrigingxThreadStruct gate;
++	int num=1;
++#ifdef _MULTITHREADING_
++	num=_NUMTHREADS_;
++#endif
++
+ 	/*Get Variogram from Options*/
+ 	ProcessVariogram(&variogram,options);
+ 	options->Get(&range,"searchrange",0.);
+@@ -44,29 +41,88 @@
+ 	/*Process observation dataset*/
+ 	observations=new Observations(obs_list,obs_x,obs_y,obs_length,options);
+ 
+-	/*Allocation output*/
++	/*Allocate output*/
+ 	predictions =(double*)xmalloc(n_interp*sizeof(double));
+-	for(i=0;i<n_interp;i++) predictions[i]=0;
++	for(int i=0;i<n_interp;i++) predictions[i]=0;
+ 
+ 	/*Get output*/
+-	options->Get(&output,"output","quadtree");
++	options->Get(&output,"output","prediction");
+ 
+ 	if(strcmp(output,"quadtree")==0){
+ 		observations->QuadtreeColoring(predictions,x_interp,y_interp,n_interp);
+-		*ppredictions=predictions;
+-		return 1;
+ 	}
+-	if(strcmp(output,"variomap")==0){
++	else if(strcmp(output,"variomap")==0){
+ 		observations->Variomap(predictions,x_interp,n_interp);
+-		*ppredictions=predictions;
+-		return 1;
+ 	}
++	else if(strcmp(output,"prediction")==0){
+ 
+-	/*Loop over all interpolations*/
+-	printf("      interpolation progress:  %5.2lf %%",0.0);
+-	for(int idx=0;idx<n_interp;idx++){
+-		if(idx%10==0) printf("\b\b\b\b\b\b\b%5.2lf %%",(double)idx/n_interp*100);
++		/*initialize thread parameters: */
++		gate.n_interp     = n_interp;
++		gate.x_interp     = x_interp;
++		gate.y_interp     = y_interp;
++		gate.range        = range;
++		gate.variogram    = variogram;
++		gate.observations = observations;
++		gate.predictions     = predictions;
+ 
++		/*launch the thread manager with Krigingxt as a core: */
++		LaunchThread(Krigingxt,(void*)&gate,num);
++	}
++	else{
++		_error_("output '%s' not supported yet",output);
++	}
++
++	/*clean-up and Assign output pointer*/
++	delete variogram;
++	delete observations;
++	xfree((void**)&output);
++	*ppredictions=predictions;
++	return 1;
++}/*}}}*/
++/*FUNCTION Krigingxt{{{*/
++void* Krigingxt(void* vpthread_handle){
++
++	/*gate variables :*/
++	KrigingxThreadStruct *gate        = NULL;
++	pthread_handle       *handle      = NULL;
++	int my_thread;
++	int num_threads;
++	int i0,i1;
++
++	/*recover handle and gate: */
++	handle      = (pthread_handle*)vpthread_handle;
++	gate        = (KrigingxThreadStruct*)handle->gate;
++	my_thread   = handle->id;
++	num_threads = handle->num;
++
++	/*recover parameters :*/
++	int           n_interp     = gate->n_interp;
++	double       *x_interp     = gate->x_interp;
++	double       *y_interp     = gate->y_interp;
++	double        range        = gate->range;
++	Variogram    *variogram    = gate->variogram;
++	Observations *observations = gate->observations;
++	double       *predictions  = gate->predictions;
++
++	/*Intermediaries*/
++	int           i,j,n_obs;
++	double        numerator,denominator,ratio;
++	double       *x            = NULL;
++	double       *y            = NULL;
++	double       *obs          = NULL;
++	double       *Gamma        = NULL;
++	double       *GinvG0       = NULL;
++	double       *Ginv1        = NULL;
++	double       *GinvZ        = NULL;
++	double       *gamma0       = NULL;
++	double       *ones         = NULL;
++
++	/*partition loop across threads: */
++	if(my_thread==0) printf("      interpolation progress:  %5.2lf %%",0.0);
++	PartitionRange(&i0,&i1,n_interp,num_threads,my_thread);
++	for(int idx=i0;idx<i1;idx++){
++		if(my_thread==0 && idx%10==0) printf("\b\b\b\b\b\b\b%5.2lf %%",double(idx-i0)/double(i1-i0)*100);
++
+ 		/*Get list of observations for current point*/
+ 		observations->ObservationList(&x,&y,&obs,&n_obs,x_interp[idx],y_interp[idx],range);
+ 
+@@ -88,9 +144,9 @@
+ 		for(i=0;i<n_obs;i++) gamma0[i] = variogram->SemiVariogram(x[i]-x_interp[idx],y[i]-y_interp[idx]);
+ 
+ 		/*Solve the three linear systems*/
+-		GslSolve(&GinvG0,Gamma,gamma0,n_obs);       // Gamma^-1 gamma0
+-		GslSolve(&Ginv1, Gamma,ones,n_obs);         // Gamma^-1 ones
+-		GslSolve(&GinvZ, Gamma,obs,n_obs); // Gamma^-1 Z
++		GslSolve(&GinvG0,Gamma,gamma0,n_obs); // Gamma^-1 gamma0
++		GslSolve(&Ginv1, Gamma,ones,n_obs);   // Gamma^-1 ones
++		GslSolve(&GinvZ, Gamma,obs,n_obs);    // Gamma^-1 Z
+ 
+ 		/*Prepare predictor*/
+ 		numerator=-1.; denominator=0.;
+@@ -112,15 +168,10 @@
+ 		xfree((void**)&Ginv1);
+ 		xfree((void**)&GinvZ);
+ 	}
+-	printf("\b\b\b\b\b\b\b\b%5.2lf %%\n",100.0);
++	if(my_thread==0) printf("\b\b\b\b\b\b\b\b%5.2lf %%\n",100.0);
+ 
+-	/*clean-up and Assign output pointer*/
+-	delete variogram;
+-	delete observations;
+-	xfree((void**)&output);
+-	*ppredictions=predictions;
+-	return 1;
+-}
++	return NULL;
++}/*}}}*/
+ 
+ void ProcessVariogram(Variogram **pvariogram,Options* options){/*{{{*/
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12230)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12231)
+@@ -8,8 +8,23 @@
+ #include "../../objects/objects.h"
+ #include "../../toolkits/toolkits.h"
+ 
++class Observations;
++class Variogram;
++
+ int  Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp,Options* options);
+ void ProcessVariogram(Variogram **pvariogram,Options* options);
+ void GslSolve(double** pX,double* A,double* B,int n);
+ 
++/*threading: */
++typedef struct{
++	int           n_interp;
++	double       *x_interp;
++	double       *y_interp;
++	double        range;
++	Variogram    *variogram;
++	Observations *observations;
++	double       *predictions;
++}KrigingxThreadStruct;
++
++void* Krigingxt(void*);
+ #endif /* _KRIGINGX_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.h	(revision 12230)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.h	(revision 12231)
+@@ -21,9 +21,7 @@
+ #include "../../objects/objects.h"
+ 
+ /* local prototypes: */
+-int Shp2Kmlx(char* filshp,char* filkml,
+-			 int sgn);
+-int Shp2Kmlx(char* filshp,char* filkml,
+-			 int sgn,double cm,double sp);
++int Shp2Kmlx(char* filshp,char* filkml, int sgn);
++int Shp2Kmlx(char* filshp,char* filkml, int sgn,double cm,double sp);
+ 
+ #endif  /* _SHP2KMLX_H */
Index: /issm/oecreview/Archive/12221-12240/ISSM-12231-12232.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12231-12232.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12231-12232.diff	(revision 12325)
@@ -0,0 +1,80 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12231)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12232)
+@@ -63,10 +63,13 @@
+ 		gate.range        = range;
+ 		gate.variogram    = variogram;
+ 		gate.observations = observations;
+-		gate.predictions     = predictions;
++		gate.predictions  = predictions;
++		gate.percent      = (double*)xcalloc(num,sizeof(double));
+ 
+ 		/*launch the thread manager with Krigingxt as a core: */
+ 		LaunchThread(Krigingxt,(void*)&gate,num);
++		printf("\r      interpolation progress:  100.00%%\n");
++		xfree((void**)&gate.percent);
+ 	}
+ 	else{
+ 		_error_("output '%s' not supported yet",output);
+@@ -103,10 +106,11 @@
+ 	Variogram    *variogram    = gate->variogram;
+ 	Observations *observations = gate->observations;
+ 	double       *predictions  = gate->predictions;
++	double       *percent      = gate->percent;
+ 
+ 	/*Intermediaries*/
+ 	int           i,j,n_obs;
+-	double        numerator,denominator,ratio;
++	double        numerator,denominator,ratio,localpercent;
+ 	double       *x            = NULL;
+ 	double       *y            = NULL;
+ 	double       *obs          = NULL;
+@@ -118,18 +122,22 @@
+ 	double       *ones         = NULL;
+ 
+ 	/*partition loop across threads: */
+-	if(my_thread==0) printf("      interpolation progress:  %5.2lf %%",0.0);
+ 	PartitionRange(&i0,&i1,n_interp,num_threads,my_thread);
+ 	for(int idx=i0;idx<i1;idx++){
+-		if(my_thread==0 && idx%10==0) printf("\b\b\b\b\b\b\b%5.2lf %%",double(idx-i0)/double(i1-i0)*100);
+ 
++		/*Print info*/
++		percent[my_thread]=double(idx-i0)/double(i1-i0)*100.;
++		localpercent=percent[0];
++		for(i=1;i<num_threads;i++) localpercent=min(localpercent,percent[i]);
++		printf("\r      interpolation progress: %5.2lf%%",localpercent);
++
+ 		/*Get list of observations for current point*/
+ 		observations->ObservationList(&x,&y,&obs,&n_obs,x_interp[idx],y_interp[idx],range);
+ 
+ 		/*Allocate intermediary matrix and vectors*/
+-		Gamma       =(double*)xmalloc(n_obs*n_obs*sizeof(double));
+-		gamma0      =(double*)xmalloc(n_obs*sizeof(double));
+-		ones        =(double*)xmalloc(n_obs*sizeof(double));
++		Gamma  = (double*)xmalloc(n_obs*n_obs*sizeof(double));
++		gamma0 = (double*)xmalloc(n_obs*sizeof(double));
++		ones   = (double*)xmalloc(n_obs*sizeof(double));
+ 
+ 		/*First: Create semivariogram matrix for observations*/
+ 		for(i=0;i<n_obs;i++){
+@@ -168,7 +176,6 @@
+ 		xfree((void**)&Ginv1);
+ 		xfree((void**)&GinvZ);
+ 	}
+-	if(my_thread==0) printf("\b\b\b\b\b\b\b\b%5.2lf %%\n",100.0);
+ 
+ 	return NULL;
+ }/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12231)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12232)
+@@ -24,6 +24,7 @@
+ 	Variogram    *variogram;
+ 	Observations *observations;
+ 	double       *predictions;
++	double       *percent;
+ }KrigingxThreadStruct;
+ 
+ void* Krigingxt(void*);
Index: /issm/oecreview/Archive/12221-12240/ISSM-12232-12233.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12232-12233.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12232-12233.diff	(revision 12325)
@@ -0,0 +1,154 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh	(revision 12232)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install.sh	(revision 12233)
+@@ -1,42 +0,0 @@
+-#!/bin/bash
+-#wget http://python.org/ftp/python/version/Python-version.tgz
+-
+-#version=3.2.2
+-version=2.7.2
+-
+-#Some cleanup
+-rm -rf install src
+-rm -rf Python-$version
+-mkdir install src
+-
+-#Download from ISSM server
+-$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-$version.tgz Python-$version.tgz
+-
+-#exports
+-export CC
+-
+-#Untar and move python into install directory
+-tar -zxvf  Python-$version.tgz
+-mv Python-$version/* src
+-rm -rf Python-$version
+-
+-#Configure doxygen
+-cd src 
+-./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-framework="$ISSM_DIR/externalpackages/python/install"
+-if [ -z $1 ]; then
+-	make
+-else
+-	make -j $1
+-fi
+-make install
+-
+-#Some modifications to be done in case version is 3.2: 
+-if [[ $version == "3.2.2" ]]; then 
+-	cd install/bin
+-	ln -s python3.2 python 
+-	cd ../
+-	ln -s Python.framework/Versions/3.2/include/python3.2m include
+-	ln -s Python.framework/Versions/3.2/lib/ lib
+-
+-
+-fi
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx.sh	(revision 12233)
+@@ -0,0 +1,42 @@
++#!/bin/bash
++#wget http://python.org/ftp/python/version/Python-version.tgz
++
++#version=3.2.2
++version=2.7.2
++
++#Some cleanup
++rm -rf install src
++rm -rf Python-$version
++mkdir install src
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-$version.tgz Python-$version.tgz
++
++#exports
++export CC
++
++#Untar and move python into install directory
++tar -zxvf  Python-$version.tgz
++mv Python-$version/* src
++rm -rf Python-$version
++
++#Configure doxygen
++cd src 
++./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-framework="$ISSM_DIR/externalpackages/python/install"
++if [ -z $1 ]; then
++	make
++else
++	make -j $1
++fi
++make install
++
++#Some modifications to be done in case version is 3.2: 
++if [[ $version == "3.2.2" ]]; then 
++	cd install/bin
++	ln -s python3.2 python 
++	cd ../
++	ln -s Python.framework/Versions/3.2/include/python3.2m include
++	ln -s Python.framework/Versions/3.2/lib/ lib
++
++
++fi
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-linux64-astrid.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-linux64-astrid.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-linux64-astrid.sh	(revision 12233)
+@@ -0,0 +1,43 @@
++#!/bin/bash
++#wget http://python.org/ftp/python/version/Python-version.tgz
++
++#version=3.2.2
++version=2.7.2
++
++#Some cleanup
++rm -rf install src
++rm -rf Python-$version
++mkdir install src
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-$version.tgz Python-$version.tgz
++
++#exports
++export CC
++
++#Untar and move python into install directory
++tar -zxvf  Python-$version.tgz
++mv Python-$version/* src
++rm -rf Python-$version
++
++#Configure doxygen
++cd src 
++./configure --prefix="$ISSM_DIR/externalpackages/python/install" 
++
++if [ -z $1 ]; then
++	make
++else
++	make -j $1
++fi
++make install
++
++#Some modifications to be done in case version is 3.2: 
++if [[ $version == "3.2.2" ]]; then 
++	cd install/bin
++	ln -s python3.2 python 
++	cd ../
++	ln -s Python.framework/Versions/3.2/include/python3.2m include
++	ln -s Python.framework/Versions/3.2/lib/ lib
++
++
++fi
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-linux64-astrid.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12221-12240/ISSM-12233-12234.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12233-12234.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12233-12234.diff	(revision 12325)
@@ -0,0 +1,56 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/git/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/git/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/git/install.sh	(revision 12234)
+@@ -0,0 +1,22 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf src install git-1.7.10.2
++mkdir install src
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/git-1.7.10.2.tar.gz' 'git-1.7.10.2.tar.gz'
++
++#Untar 
++tar -zxvf  git-1.7.10.2.tar.gz
++
++#Move git into install directory
++mv git-1.7.10.2/* src
++rm -rf git-1.7.10.2
++
++#install
++cd src 
++./configure  --prefix="$ISSM_DIR/externalpackages/git/install"
++	
++#Compile
++make install
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/git/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment_variables.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment_variables.sh	(revision 12233)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment_variables.sh	(revision 12234)
+@@ -196,3 +196,7 @@
+ 
+ #MODELE
+ MODELE_DIR="$ISSM_DIR/externalpackages/modelE"
++
++
++#GIT
++GIT_DIR="$ISSM_DIR/externalpackages/git"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh	(revision 12233)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/etc/environment.sh	(revision 12234)
+@@ -266,3 +266,6 @@
+ 
+ #MODELE
+ export PATH="$MODELE_DIR/src/exec:$PATH"
++
++#GIT
++export PATH="$PATH:$GIT_DIR/install/bin"
Index: /issm/oecreview/Archive/12221-12240/ISSM-12234-12235.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12234-12235.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12234-12235.diff	(revision 12325)
@@ -0,0 +1,36 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/install.sh	(revision 12235)
+@@ -0,0 +1,25 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf src install BLAS blas.tgz
++mkdir install src
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/blas.tgz' 'blas.tgz'
++
++#Untar 
++tar -zxvf  blas.tgz
++
++#Move blas into install directory
++mv BLAS/* src
++rm -rf BLAS
++
++#install
++cd src 
++make 
++
++#Compile 
++cd ../install
++mkdir lib
++cd lib
++cp ../../src/*.a .
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12221-12240/ISSM-12235-12236.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12235-12236.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12235-12236.diff	(revision 12325)
@@ -0,0 +1,10 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/install.sh	(revision 12235)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/install.sh	(revision 12236)
+@@ -23,3 +23,5 @@
+ mkdir lib
+ cd lib
+ cp ../../src/*.a .
++ln -s blas_LINUX.a blas.a
++ln -s blas_LINUX.a libblas.a
Index: /issm/oecreview/Archive/12221-12240/ISSM-12236-12237.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12236-12237.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12236-12237.diff	(revision 12325)
@@ -0,0 +1,43 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/lapack/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/lapack/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/lapack/install.sh	(revision 12237)
+@@ -0,0 +1,32 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf src install lapack-3.4.1 lapack-3.4.1.tgz
++mkdir install src
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/lapack-3.4.1.tgz' 'lapack-3.4.1.tgz'
++
++#Untar 
++tar -zxvf  lapack-3.4.1.tgz
++
++#Move lapack into install directory
++mv lapack-3.4.1/* src
++rm -rf lapack-3.4.1
++
++#install
++cd src 
++cp make.inc.example make.inc
++
++#Compile and install lapack
++if [ -z $1 ]; then
++	make lib
++else
++	make -j $1 lib
++fi
++
++#Compile 
++cd ../install
++mkdir lib
++cd lib
++cp ../../src/liblapack.a .
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/lapack/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12221-12240/ISSM-12237-12238.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12237-12238.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12237-12238.diff	(revision 12325)
@@ -0,0 +1,110 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/install.sh	(revision 12237)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/install.sh	(revision 12238)
+@@ -1,27 +0,0 @@
+-#!/bin/bash
+-
+-#Some cleanup
+-rm -rf src install BLAS blas.tgz
+-mkdir install src
+-
+-#Download from ISSM server
+-$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/blas.tgz' 'blas.tgz'
+-
+-#Untar 
+-tar -zxvf  blas.tgz
+-
+-#Move blas into install directory
+-mv BLAS/* src
+-rm -rf BLAS
+-
+-#install
+-cd src 
+-make 
+-
+-#Compile 
+-cd ../install
+-mkdir lib
+-cd lib
+-cp ../../src/*.a .
+-ln -s blas_LINUX.a blas.a
+-ln -s blas_LINUX.a libblas.a
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/install-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/install-linux64.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/install-linux64.sh	(revision 12238)
+@@ -0,0 +1,28 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf src install BLAS blas.tgz
++mkdir install src
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/blas.tgz' 'blas.tgz'
++
++#Untar 
++tar -zxvf  blas.tgz
++
++#Move blas into install directory
++mv BLAS/* src
++rm -rf BLAS
++
++#install
++cd src 
++cp ../configs/linux64/make.inc ./
++make 
++
++#Compile 
++cd ../install
++mkdir lib
++cd lib
++cp ../../src/*.a .
++ln -s blas_LINUX.a blas.a
++ln -s blas_LINUX.a libblas.a
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/install-linux64.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/configs/linux64/make.inc
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/configs/linux64/make.inc	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/blas/configs/linux64/make.inc	(revision 12238)
+@@ -0,0 +1,34 @@
++####################################################################
++#  BLAS make include file.                                         #
++#  March 2007                                                      #
++####################################################################
++#
++SHELL = /bin/sh
++#
++#  The machine (platform) identifier to append to the library names
++#
++PLAT = _LINUX
++#  
++#  Modify the FORTRAN and OPTS definitions to refer to the
++#  compiler and desired compiler options for your machine.  NOOPT
++#  refers to the compiler options desired when NO OPTIMIZATION is
++#  selected.  Define LOADER and LOADOPTS to refer to the loader and 
++#  desired load options for your machine.
++#
++FORTRAN  = gfortran
++OPTS     = -fPIC -O3
++DRVOPTS  = $(OPTS)
++NOOPT    =
++LOADER   = gfortran
++LOADOPTS =
++#
++#  The archiver and the flag(s) to use when building archive (library)
++#  If you system has no ranlib, set RANLIB = echo.
++#
++ARCH     = ar
++ARCHFLAGS= cr
++RANLIB   = ranlib
++#
++#  The location and name of the Reference BLAS library.
++#
++BLASLIB      = blas$(PLAT).a
Index: /issm/oecreview/Archive/12221-12240/ISSM-12238-12239.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12238-12239.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12238-12239.diff	(revision 12325)
@@ -0,0 +1,156 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/lapack/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/lapack/install.sh	(revision 12238)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/lapack/install.sh	(revision 12239)
+@@ -1,32 +0,0 @@
+-#!/bin/bash
+-
+-#Some cleanup
+-rm -rf src install lapack-3.4.1 lapack-3.4.1.tgz
+-mkdir install src
+-
+-#Download from ISSM server
+-$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/lapack-3.4.1.tgz' 'lapack-3.4.1.tgz'
+-
+-#Untar 
+-tar -zxvf  lapack-3.4.1.tgz
+-
+-#Move lapack into install directory
+-mv lapack-3.4.1/* src
+-rm -rf lapack-3.4.1
+-
+-#install
+-cd src 
+-cp make.inc.example make.inc
+-
+-#Compile and install lapack
+-if [ -z $1 ]; then
+-	make lib
+-else
+-	make -j $1 lib
+-fi
+-
+-#Compile 
+-cd ../install
+-mkdir lib
+-cd lib
+-cp ../../src/liblapack.a .
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/lapack/install-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/lapack/install-linux64.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/lapack/install-linux64.sh	(revision 12239)
+@@ -0,0 +1,32 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf src install lapack-3.4.1 lapack-3.4.1.tgz
++mkdir install src
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/lapack-3.4.1.tgz' 'lapack-3.4.1.tgz'
++
++#Untar 
++tar -zxvf  lapack-3.4.1.tgz
++
++#Move lapack into install directory
++mv lapack-3.4.1/* src
++rm -rf lapack-3.4.1
++
++#install
++cd src 
++cp ../configs/linux64/make.inc ./
++
++#Compile and install lapack
++if [ -z $1 ]; then
++	make lib
++else
++	make -j $1 lib
++fi
++
++#Compile 
++cd ../install
++mkdir lib
++cd lib
++cp ../../src/liblapack.a .
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/lapack/install-linux64.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/lapack/configs/linux64/make.inc
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/lapack/configs/linux64/make.inc	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/lapack/configs/linux64/make.inc	(revision 12239)
+@@ -0,0 +1,71 @@
++####################################################################
++#  LAPACK make include file.                                       #
++#  LAPACK, Version 3.4.0                                           #
++#  April 2012                                                   #
++####################################################################
++#
++SHELL = /bin/sh
++#  
++#  Modify the FORTRAN and OPTS definitions to refer to the
++#  compiler and desired compiler options for your machine.  NOOPT
++#  refers to the compiler options desired when NO OPTIMIZATION is
++#  selected.  Define LOADER and LOADOPTS to refer to the loader and 
++#  desired load options for your machine.
++#
++FORTRAN  = gfortran 
++OPTS     = -fPIC -O2
++DRVOPTS  = $(OPTS)
++NOOPT    = -O0
++LOADER   = gfortran
++LOADOPTS =
++#
++# Timer for the SECOND and DSECND routines
++#
++# Default : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME
++#TIMER    = EXT_ETIME
++# For RS6K : SECOND and DSECND will use a call to the EXTERNAL FUNCTION ETIME_
++# TIMER    = EXT_ETIME_
++# For gfortran compiler: SECOND and DSECND will use a call to the INTERNAL FUNCTION ETIME
++TIMER    = INT_ETIME
++# If your Fortran compiler does not provide etime (like Nag Fortran Compiler, etc...)
++# SECOND and DSECND will use a call to the INTERNAL FUNCTION CPU_TIME
++# TIMER    = INT_CPU_TIME
++# If neither of this works...you can use the NONE value... In that case, SECOND and DSECND will always return 0
++# TIMER     = NONE
++#
++#  Configuration LAPACKE: Native C interface to LAPACK
++#  To generate LAPACKE library: type 'make lapackelib'
++#  Configuration file: turned off (default)
++#  Complex types: C99 (default)
++#  Name pattern: mixed case (default)
++#  (64-bit) Data model: LP64 (default)
++#
++# CC is the C compiler, normally invoked with options CFLAGS.
++#
++CC = gcc
++CFLAGS = -O3
++#
++#  The archiver and the flag(s) to use when building archive (library)
++#  If you system has no ranlib, set RANLIB = echo.
++#
++ARCH     = ar
++ARCHFLAGS= cr
++RANLIB   = ranlib
++#
++#  Location of the extended-precision BLAS (XBLAS) Fortran library
++#  used for building and testing extended-precision routines.  The
++#  relevant routines will be compiled and XBLAS will be linked only if
++#  USEXBLAS is defined.
++#
++# USEXBLAS    = Yes
++XBLASLIB     =
++# XBLASLIB    = -lxblas
++#
++#  The location of the libraries to which you will link.  (The 
++#  machine-specific, optimized BLAS library should be used whenever
++#  possible.)
++#
++BLASLIB      = ../../librefblas.a
++LAPACKLIB    = liblapack.a
++TMGLIB       = libtmglib.a
++LAPACKELIB   = liblapacke.a
Index: /issm/oecreview/Archive/12221-12240/ISSM-12239-12240.diff
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-12239-12240.diff	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-12239-12240.diff	(revision 12325)
@@ -0,0 +1,60 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-linux64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-linux64.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-linux64.sh	(revision 12240)
+@@ -0,0 +1,49 @@
++#!/bin/bash
++
++#1: install numpy
++#2 install scipy
++#3 erase
++install=2
++
++
++export CC="gcc -fPIC"
++export CXX="g++ -fPIC"
++export F77="gfortran -fPIC"
++export FC="gfortran -fPIC"
++export FFLAGS=-ff2c
++
++
++if [[ $install == "1" ]];then 
++
++	#download numpy first
++
++	export GIT_SSL_NO_VERIFY=true 
++	git clone https://github.com/numpy/numpy.git
++
++	#install numpy
++	cd numpy
++	python setup.py build
++	python setup.py install
++
++	
++elif [[ $install == "2" ]];then 
++	
++	#download scipy
++	export GIT_SSL_NO_VERIFY=true 
++	git clone https://github.com/scipy/scipy.git
++
++	#install scipy
++	cd scipy
++	export  BLAS_SRC=$ISSM_DIR/externalpackages/blas/install/lib
++	export  BLAS=$ISSM_DIR/externalpackages/blas/install/lib
++	export  LAPACK_SRC=$ISSM_DIR/externalpackages/lapack/install/lib
++	export  LAPACK=$ISSM_DIR/externalpackages/lapack/install/lib
++
++	python setup.py build
++	python setup.py install
++
++elif [[ $install == "3" ]];then 
++	rm -rf numpy scipy
++else 
++	echo "Choice not covered"
++fi
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-linux64.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12221-12240/ISSM-DocReview-12221-12240.tex
===================================================================
--- /issm/oecreview/Archive/12221-12240/ISSM-DocReview-12221-12240.tex	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/ISSM-DocReview-12221-12240.tex	(revision 12325)
@@ -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/12221-12240/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12221-12240/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12221-12240
Index: /issm/oecreview/Archive/12221-12240/Makefile
===================================================================
--- /issm/oecreview/Archive/12221-12240/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12221-12240
+
+
+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/12221-12240/log.tex
===================================================================
--- /issm/oecreview/Archive/12221-12240/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/log.tex	(revision 12325)
@@ -0,0 +1,38 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12221-12222.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Makefile.am \\ Export determination: 6. \\Rationale: Protect against inclusion of fortran libraries
+M /issm/trunk-jpl/src/c/Container/Parameters.h Modification to Parameters.h to include stdio.h \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12222-12223.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Parameters.h \\ Export determination: 6. \\Rationale: Modification to Parameters.h to include stdio.h
+M /issm/trunk-jpl/externalpackages/cccl/issm/cccl Take out a lot of miscellaneous verbose \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12223-12224.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/cccl/issm/cccl \\ Export determination: 6. \\Rationale: Take out a lot of miscellaneous verbose
+M /issm/trunk-jpl/externalpackages/windows/InstallInstructions.txt Better instructions on cron and ssmtp \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12224-12225.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/windows/InstallInstructions.txt \\ Export determination: 6. \\Rationale: Better instructions on cron and ssmtp
+M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Observations.h M /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h Better Quadtree with new fields (box center and length) \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12225-12226.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Observations.h M /issm/trunk-jpl/src/c/matlab/io/FetchMatlabData.cpp M /issm/trunk-jpl/src/c/matlab/io/OptionParse.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h \\ Export determination: 6. \\Rationale: Better Quadtree with new fields (box center and length)
+M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Observations.h M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h Added boxlength option \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12226-12227.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Observations.h M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h \\ Export determination: 6. \\Rationale: Added boxlength option
+M /issm/trunk-jpl/configs/config-arm-linux.sh M /issm/trunk-jpl/configure.ac M /issm/trunk-jpl/externalpackages/android/android-sdk/install.sh SDK Install script now pushes issm.exe to the device, changes permissions and runs the executable. \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12227-12228.diff: \\ Function name: \\M /issm/trunk-jpl/configs/config-arm-linux.sh M /issm/trunk-jpl/configure.ac M /issm/trunk-jpl/externalpackages/android/android-sdk/install.sh \\ Export determination: 6. \\Rationale: SDK Install script now pushes issm.exe to the device, changes permissions and runs the executable.
+M /issm/trunk-jpl/src/c/Container/Observations.cpp Removed ambiguity in call to log(2) \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12228-12229.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Observations.cpp \\ Export determination: 6. \\Rationale: Removed ambiguity in call to log(2)
+M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Observations.h M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.h M /issm/trunk-jpl/src/c/objects/Kriging/Observation.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Observation.h M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h Added 2 options: boxlength and searchrange \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12229-12230.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Observations.h M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/objects/Bamg/BamgQuadtree.h M /issm/trunk-jpl/src/c/objects/Kriging/Observation.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Observation.h M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h \\ Export determination: 6. \\Rationale: Added 2 options: boxlength and searchrange
+M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Observations.h M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp A /issm/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp A /issm/trunk-jpl/src/c/objects/Kriging/PowerVariogram.h M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/objects.h Added power variogram \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12230-12231.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Observations.h M /issm/trunk-jpl/src/c/Makefile.am M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp A /issm/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp A /issm/trunk-jpl/src/c/objects/Kriging/PowerVariogram.h M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/objects.h \\ Export determination: 6. \\Rationale: Added power variogram
+M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h M /issm/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.h Added multithreading (VERY efficient for Kriging) \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12231-12232.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h M /issm/trunk-jpl/src/c/modules/Shp2Kmlx/Shp2Kmlx.h \\ Export determination: 6. \\Rationale: Added multithreading (VERY efficient for Kriging)
+M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h minor \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-12232-12233.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h \\ Export determination: 6. \\Rationale: minor
+A /issm/trunk-jpl/externalpackages/python/install-linux64-astrid.sh A /issm/trunk-jpl/externalpackages/python/install-macosx.sh D /issm/trunk-jpl/externalpackages/python/install.sh frameworks not needed for linux64 platforms. \\\\
+\noindent \textbf{Change \#13} with diff file ISSM-12233-12234.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/python/install-linux64-astrid.sh A /issm/trunk-jpl/externalpackages/python/install-macosx.sh D /issm/trunk-jpl/externalpackages/python/install.sh \\ Export determination: 6. \\Rationale: frameworks not needed for linux64 platforms.
+M /issm/trunk-jpl/etc/environment.sh M /issm/trunk-jpl/etc/environment\_variables.sh A /issm/trunk-jpl/externalpackages/git A /issm/trunk-jpl/externalpackages/git/install.sh Added git external package \\\\
+\noindent \textbf{Change \#14} with diff file ISSM-12234-12235.diff: \\ Function name: \\M /issm/trunk-jpl/etc/environment.sh M /issm/trunk-jpl/etc/environment\_variables.sh A /issm/trunk-jpl/externalpackages/git A /issm/trunk-jpl/externalpackages/git/install.sh \\ Export determination: 6. \\Rationale: Added git external package
+A /issm/trunk-jpl/externalpackages/blas A /issm/trunk-jpl/externalpackages/blas/install.sh New Blas external package \\\\
+\noindent \textbf{Change \#15} with diff file ISSM-12235-12236.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/blas A /issm/trunk-jpl/externalpackages/blas/install.sh \\ Export determination: 6. \\Rationale: New Blas external package
+M /issm/trunk-jpl/externalpackages/blas/install.sh Symlinks needed by scipy \\\\
+\noindent \textbf{Change \#16} with diff file ISSM-12236-12237.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/blas/install.sh \\ Export determination: 6. \\Rationale: Symlinks needed by scipy
+A /issm/trunk-jpl/externalpackages/lapack A /issm/trunk-jpl/externalpackages/lapack/install.sh New lapack external package \\\\
+\noindent \textbf{Change \#17} with diff file ISSM-12237-12238.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/lapack A /issm/trunk-jpl/externalpackages/lapack/install.sh \\ Export determination: 6. \\Rationale: New lapack external package
+A /issm/trunk-jpl/externalpackages/blas/configs A /issm/trunk-jpl/externalpackages/blas/configs/linux64 A /issm/trunk-jpl/externalpackages/blas/configs/linux64/make.inc A /issm/trunk-jpl/externalpackages/blas/install-linux64.sh D /issm/trunk-jpl/externalpackages/blas/install.sh Added -fPIC flag to linux64 compile \\\\
+\noindent \textbf{Change \#18} with diff file ISSM-12238-12239.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/blas/configs A /issm/trunk-jpl/externalpackages/blas/configs/linux64 A /issm/trunk-jpl/externalpackages/blas/configs/linux64/make.inc A /issm/trunk-jpl/externalpackages/blas/install-linux64.sh D /issm/trunk-jpl/externalpackages/blas/install.sh \\ Export determination: 6. \\Rationale: Added -fPIC flag to linux64 compile
+A /issm/trunk-jpl/externalpackages/lapack/configs A /issm/trunk-jpl/externalpackages/lapack/configs/linux64 A /issm/trunk-jpl/externalpackages/lapack/configs/linux64/make.inc A /issm/trunk-jpl/externalpackages/lapack/install-linux64.sh D /issm/trunk-jpl/externalpackages/lapack/install.sh Added -fPIC flag to linux64 compile \\\\
+\noindent \textbf{Change \#19} with diff file ISSM-12239-12240.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/lapack/configs A /issm/trunk-jpl/externalpackages/lapack/configs/linux64 A /issm/trunk-jpl/externalpackages/lapack/configs/linux64/make.inc A /issm/trunk-jpl/externalpackages/lapack/install-linux64.sh D /issm/trunk-jpl/externalpackages/lapack/install.sh \\ Export determination: 6. \\Rationale: Added -fPIC flag to linux64 compile
+A /issm/trunk-jpl/externalpackages/scipy/install-linux64.sh Added linux64 compile file \\\\
Index: /issm/oecreview/Archive/12221-12240/r1.tex
===================================================================
--- /issm/oecreview/Archive/12221-12240/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12221
Index: /issm/oecreview/Archive/12221-12240/r2.tex
===================================================================
--- /issm/oecreview/Archive/12221-12240/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12221-12240/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12240
Index: /issm/oecreview/Archive/12241-12260/Date.tex
===================================================================
--- /issm/oecreview/Archive/12241-12260/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12241-12260/ISSM-12241-12242.diff
===================================================================
--- /issm/oecreview/Archive/12241-12260/ISSM-12241-12242.diff	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/ISSM-12241-12242.diff	(revision 12325)
@@ -0,0 +1,14 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/android/test102/test102.queue
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/android/test102/test102.queue	(revision 12241)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/android/test102/test102.queue	(revision 12242)
+@@ -1,2 +0,0 @@
+-#!/bin/sh
+-/Users/larour/issm-uci/trunk-jpl/bin/issm.exe DiagnosticSolution /Users/larour/issm-uci/trunk-jpl/src/android/test102 test102 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/android/test102/test102.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/android/test102/test102.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/android/test102/test102.sh	(revision 12242)
+@@ -0,0 +1,2 @@
++#!/bin/sh
++/Users/larour/issm-uci/trunk-jpl/bin/issm.exe DiagnosticSolution /Users/larour/issm-uci/trunk-jpl/src/android/test102 test102 
Index: /issm/oecreview/Archive/12241-12260/ISSM-12242-12243.diff
===================================================================
--- /issm/oecreview/Archive/12241-12260/ISSM-12242-12243.diff	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/ISSM-12242-12243.diff	(revision 12325)
@@ -0,0 +1,65 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx-snowleopard.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx-snowleopard.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx-snowleopard.sh	(revision 12243)
+@@ -0,0 +1,41 @@
++#!/bin/bash
++#wget http://python.org/ftp/python/version/Python-version.tgz
++
++#version=3.2.2
++version=2.7.2
++
++#Some cleanup
++rm -rf install src
++rm -rf Python-$version
++mkdir install src
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-$version.tgz Python-$version.tgz
++
++#exports
++export CC
++export MACOSX_DEPLOYMENT_TARGET=10.6
++
++#Untar and move python into install directory
++tar -zxvf  Python-$version.tgz
++mv Python-$version/* src
++rm -rf Python-$version
++
++#Configure doxygen
++cd src 
++./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-framework="$ISSM_DIR/externalpackages/python/install" --enable-universalsdk --with-universal-archs="32-bit"
++if [ -z $1 ]; then
++	make
++else
++	make -j $1
++fi
++make install
++
++#Some modifications to be done in case version is 3.2: 
++if [[ $version == "3.2.2" ]]; then 
++	cd install/bin
++	ln -s python3.2 python 
++	cd ../
++	ln -s Python.framework/Versions/3.2/include/python3.2m include
++	ln -s Python.framework/Versions/3.2/lib/ lib
++fi
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx-snowleopard.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python
+___________________________________________________________________
+Modified: svn:ignore
+   - install-*
+install
+src
+
+   + install
+src
+*.tgz
+
+
Index: /issm/oecreview/Archive/12241-12260/ISSM-12243-12244.diff
===================================================================
--- /issm/oecreview/Archive/12241-12260/ISSM-12243-12244.diff	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/ISSM-12243-12244.diff	(revision 12325)
@@ -0,0 +1,100 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx.sh	(revision 12243)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx.sh	(revision 12244)
+@@ -1,42 +0,0 @@
+-#!/bin/bash
+-#wget http://python.org/ftp/python/version/Python-version.tgz
+-
+-#version=3.2.2
+-version=2.7.2
+-
+-#Some cleanup
+-rm -rf install src
+-rm -rf Python-$version
+-mkdir install src
+-
+-#Download from ISSM server
+-$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-$version.tgz Python-$version.tgz
+-
+-#exports
+-export CC
+-
+-#Untar and move python into install directory
+-tar -zxvf  Python-$version.tgz
+-mv Python-$version/* src
+-rm -rf Python-$version
+-
+-#Configure doxygen
+-cd src 
+-./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-framework="$ISSM_DIR/externalpackages/python/install"
+-if [ -z $1 ]; then
+-	make
+-else
+-	make -j $1
+-fi
+-make install
+-
+-#Some modifications to be done in case version is 3.2: 
+-if [[ $version == "3.2.2" ]]; then 
+-	cd install/bin
+-	ln -s python3.2 python 
+-	cd ../
+-	ln -s Python.framework/Versions/3.2/include/python3.2m include
+-	ln -s Python.framework/Versions/3.2/lib/ lib
+-
+-
+-fi
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx-lion.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx-lion.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx-lion.sh	(revision 12244)
+@@ -0,0 +1,42 @@
++#!/bin/bash
++#wget http://python.org/ftp/python/version/Python-version.tgz
++
++#version=3.2.2
++version=2.7.2
++
++#Some cleanup
++rm -rf install src
++rm -rf Python-$version
++mkdir install src
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py http://issm.jpl.nasa.gov/files/externalpackages/Python-$version.tgz Python-$version.tgz
++
++#exports
++export CC
++
++#Untar and move python into install directory
++tar -zxvf  Python-$version.tgz
++mv Python-$version/* src
++rm -rf Python-$version
++
++#Configure doxygen
++cd src 
++./configure --prefix="$ISSM_DIR/externalpackages/python/install" --enable-framework="$ISSM_DIR/externalpackages/python/install"
++if [ -z $1 ]; then
++	make
++else
++	make -j $1
++fi
++make install
++
++#Some modifications to be done in case version is 3.2: 
++if [[ $version == "3.2.2" ]]; then 
++	cd install/bin
++	ln -s python3.2 python 
++	cd ../
++	ln -s Python.framework/Versions/3.2/include/python3.2m include
++	ln -s Python.framework/Versions/3.2/lib/ lib
++
++
++fi
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/python/install-macosx-lion.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12241-12260/ISSM-12244-12245.diff
===================================================================
--- /issm/oecreview/Archive/12241-12260/ISSM-12244-12245.diff	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/ISSM-12244-12245.diff	(revision 12325)
@@ -0,0 +1,154 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx64.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx64.sh	(revision 12244)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx64.sh	(revision 12245)
+@@ -1,39 +0,0 @@
+-#!/bin/bash
+-
+-#1: install numpy
+-#2 install scipy
+-#3 erase
+-install=2
+-
+-
+-export CC=gcc
+-export CXX=g++
+-export FFLAGS=-ff2c
+-
+-
+-if [[ $install == "1" ]];then 
+-
+-	#download numpy first
+-	git clone https://github.com/numpy/numpy.git
+-
+-	#install numpy
+-	cd numpy
+-	python setup.py build
+-	python setup.py install
+-
+-	
+-elif [[ $install == "2" ]];then 
+-	
+-	#download scipy
+-	git clone https://github.com/scipy/scipy.git
+-
+-	#install scipy
+-	cd scipy
+-	python setup.py build
+-	python setup.py install
+-
+-elif [[ $install == "3" ]];then 
+-	rm -rf numpy scipy
+-else 
+-	echo "Choice not covered"
+-fi
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx-snowleopard.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx-snowleopard.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx-snowleopard.sh	(revision 12245)
+@@ -0,0 +1,41 @@
++#!/bin/bash
++PYVERSION=2.7
++PYTHON=python${PYVERSION}
++
++#1: install numpy
++#2 install scipy
++#3 erase
++install=2
++
++export CC=/usr/bin/gcc-4.0
++export CXX=/usr/bin/g++-4.0
++
++if [[ $install == "1" ]];then 
++
++	#download numpy first
++	git clone https://github.com/numpy/numpy.git
++
++	#install numpy
++	cd numpy
++	python setup.py build
++	python setup.py install
++	cd ..
++	${PYTHON} -c "import numpy; print 'Installed NumPy', numpy.__version__"
++	
++elif [[ $install == "2" ]];then 
++	
++	#download scipy
++	git clone https://github.com/scipy/scipy.git
++
++	#install scipy
++	cd scipy
++	python setup.py build
++	python setup.py install
++	cd ..
++	${PYTHON} -c "import scipy; print 'Installed SciPy', scipy.__version__"
++
++elif [[ $install == "3" ]];then 
++	rm -rf numpy scipy
++else 
++	echo "Choice not covered"
++fi
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx-snowleopard.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx-lion.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx-lion.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx-lion.sh	(revision 12245)
+@@ -0,0 +1,39 @@
++#!/bin/bash
++
++#1: install numpy
++#2 install scipy
++#3 erase
++install=2
++
++
++export CC=gcc
++export CXX=g++
++export FFLAGS=-ff2c
++
++
++if [[ $install == "1" ]];then 
++
++	#download numpy first
++	git clone https://github.com/numpy/numpy.git
++
++	#install numpy
++	cd numpy
++	python setup.py build
++	python setup.py install
++
++	
++elif [[ $install == "2" ]];then 
++	
++	#download scipy
++	git clone https://github.com/scipy/scipy.git
++
++	#install scipy
++	cd scipy
++	python setup.py build
++	python setup.py install
++
++elif [[ $install == "3" ]];then 
++	rm -rf numpy scipy
++else 
++	echo "Choice not covered"
++fi
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/install-macosx-lion.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/README
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/README	(revision 12244)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/scipy/README	(revision 12245)
+@@ -1,2 +1,2 @@
+ You will find instructions on scipy at: 
+-http://www.scipy.org/Installing_SciPy/Mac_OS_X#head-ba1926aec910a9a1deaf9eff99e38ee23103a3b3
++http://www.scipy.org/Installing_SciPy/Mac_OS_X
Index: /issm/oecreview/Archive/12241-12260/ISSM-12245-12246.diff
===================================================================
--- /issm/oecreview/Archive/12241-12260/ISSM-12245-12246.diff	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/ISSM-12245-12246.diff	(revision 12325)
@@ -0,0 +1,36 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matplotlib/install-osx.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matplotlib/install-osx.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matplotlib/install-osx.sh	(revision 12246)
+@@ -0,0 +1,10 @@
++#/bin/bash
++pythonversion=2.7
++PYTHON=python${pythonversion}
++
++git clone https://github.com/matplotlib/matplotlib
++mv matplotlib src
++mkdir deps
++cd src
++make -f make.osx PREFIX=$ISSM_DIR/externalpackages/matplotlib/deps PYVERSION=$pythonversion fetch deps mpl_install_std
++${PYTHON} -c "import matplotlib; print 'Installed matplotlib', matplotlib.__version__, matplotlib.__file__"
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matplotlib/install-osx.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/matplotlib
+___________________________________________________________________
+Modified: svn:ignore
+   - src-*
+src
+install
+
+   + src-*
+src
+install
+matplotlib
+deps
+
+
Index: /issm/oecreview/Archive/12241-12260/ISSM-12246-12247.diff
===================================================================
--- /issm/oecreview/Archive/12241-12260/ISSM-12246-12247.diff	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/ISSM-12246-12247.diff	(revision 12325)
@@ -0,0 +1,40 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-pleiades.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-pleiades.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-pleiades.sh	(revision 12247)
+@@ -0,0 +1,29 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf src install gsl-1.15
++mkdir src install
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/gsl-1.15.tar.gz' 'gsl-1.15.tar.gz'
++
++#Untar 
++tar -zxvf  gsl-1.15.tar.gz
++
++#Move gsl into src directory
++mv gsl-1.15/* src
++rm -rf gsl-1.15
++
++#Configure gsl
++cd src
++
++./configure \
++	--prefix="$ISSM_DIR/externalpackages/gsl/install" 
++
++#Compile gsl
++if [ -z $1 ]; then
++	make
++else
++	make -j $1
++fi
++make install 
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gsl/install-pleiades.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12241-12260/ISSM-12247-12248.diff
===================================================================
--- /issm/oecreview/Archive/12241-12260/ISSM-12247-12248.diff	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/ISSM-12247-12248.diff	(revision 12325)
@@ -0,0 +1,14 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Elements/elements.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Elements/elements.h	(revision 12247)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Elements/elements.h	(revision 12248)
+@@ -47,8 +47,7 @@
+ 	printf("\n");
+ }
+ inline void printbinary(int n) {
+-	unsigned int i;
+-	i=1<<(sizeof(n)*8-1);
++	unsigned int i=1L<<(sizeof(n)*8-1);
+ 
+ 	while (i>0) {
+ 		if (n&i)
Index: /issm/oecreview/Archive/12241-12260/ISSM-12248-12249.diff
===================================================================
--- /issm/oecreview/Archive/12241-12260/ISSM-12248-12249.diff	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/ISSM-12248-12249.diff	(revision 12325)
@@ -0,0 +1,43 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh	(revision 12248)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh	(revision 12249)
+@@ -1,7 +1,7 @@
+ #!/bin/bash
+ #Step 1: unzip and install
+ #Step 2: After Plapack implodes
+-STEP=2
++STEP=1
+ 
+ if [ $STEP -eq 1 ]; then
+ 	#Some cleanup
+@@ -40,7 +40,7 @@
+ 		--FOPTFLAGS=" -O3 -xS" \
+ 		--CXXOPTFLAGS=" -O3 -xS" \
+ 		--with-pic=1
+-	echo "== Fix Plapack compilation manually (http://issm.jpl.nasa.gov/installation/compilationtroubleshooting/petsc31/) =="
++	echo "== Fix Plapack compilation manually (http://issm.jpl.nasa.gov/documentation/faq/petsc32/) =="
+ 	echo "== Then run STEP=2 =="
+ fi
+ if [ $STEP -eq 2 ]; then
+@@ -68,5 +68,20 @@
+ 	 --FOPTFLAGS=" -O3 -xS" \
+ 	 --CXXOPTFLAGS=" -O3 -xS" \
+ 	 --with-pic=1
++	 cat > src/script.queue << EOF
++#PBS -S /bin/bash
++#PBS -q debug 
++#PBS -l select=1:ncpus=1:model=har 
++#PBS -l walltime=200 
++#PBS -W group_list=s1010 
++#PBS -m e 
++. /usr/share/modules/init/bash 
++module load comp-intel/11.1.046 
++module load mpi/mpt.1.25 
++module load math/intel_mkl_64_10.0.011 
++export PATH="$PATH:." 
++export MPI_GROUP_MAX=64 
++mpiexec -np 1 ./conftest-linux-gnu-ia64-intel.py
++EOF
+ 	echo "== Follow PETSc's instructions"
+ fi
Index: /issm/oecreview/Archive/12241-12260/ISSM-12249-12250.diff
===================================================================
--- /issm/oecreview/Archive/12241-12260/ISSM-12249-12250.diff	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/ISSM-12249-12250.diff	(revision 12325)
@@ -0,0 +1,87 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12249)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12250)
+@@ -16,10 +16,11 @@
+ 
+ #include "../../objects/Kriging/GaussianVariogram.h"
+ /*FUNCTION Krigingx{{{*/
+-int Krigingx(double** ppredictions,double* obs_x, double* obs_y, double* obs_list, int obs_length,double* x_interp,double* y_interp,int n_interp,Options* options){
++int Krigingx(double** ppredictions,double **perror,double* obs_x, double* obs_y, double* obs_list, int obs_length,double* x_interp,double* y_interp,int n_interp,Options* options){
+ 
+ 	/*output*/
+ 	double *predictions = NULL;
++	double *error       = NULL;
+ 
+ 	/*Intermediaries*/
+ 	double        range;
+@@ -42,8 +43,8 @@
+ 	observations=new Observations(obs_list,obs_x,obs_y,obs_length,options);
+ 
+ 	/*Allocate output*/
+-	predictions =(double*)xmalloc(n_interp*sizeof(double));
+-	for(int i=0;i<n_interp;i++) predictions[i]=0;
++	predictions =(double*)xcalloc(n_interp,sizeof(double));
++	error       =(double*)xcalloc(n_interp,sizeof(double));
+ 
+ 	/*Get output*/
+ 	options->Get(&output,"output","prediction");
+@@ -64,6 +65,7 @@
+ 		gate.variogram    = variogram;
+ 		gate.observations = observations;
+ 		gate.predictions  = predictions;
++		gate.error        = error;
+ 		gate.percent      = (double*)xcalloc(num,sizeof(double));
+ 
+ 		/*launch the thread manager with Krigingxt as a core: */
+@@ -79,7 +81,8 @@
+ 	delete variogram;
+ 	delete observations;
+ 	xfree((void**)&output);
+-	*ppredictions=predictions;
++	*ppredictions = predictions;
++	*perror       = error;
+ 	return 1;
+ }/*}}}*/
+ /*FUNCTION Krigingxt{{{*/
+@@ -106,6 +109,7 @@
+ 	Variogram    *variogram    = gate->variogram;
+ 	Observations *observations = gate->observations;
+ 	double       *predictions  = gate->predictions;
++	double       *error        = gate->error;
+ 	double       *percent      = gate->percent;
+ 
+ 	/*Intermediaries*/
+@@ -162,8 +166,10 @@
+ 		for(i=0;i<n_obs;i++) denominator+=Ginv1[i];
+ 		ratio=numerator/denominator;
+ 
+-		predictions[idx]=0;
++		predictions[idx] = 0.;
++		error[idx]       = - numerator*numerator/denominator;
+ 		for(i=0;i<n_obs;i++) predictions[idx] += (gamma0[i]-ratio)*GinvZ[i];
++		for(i=0;i<n_obs;i++) error[idx] += gamma0[i]*GinvG0[i];
+ 
+ 		/*clean-up*/
+ 		xfree((void**)&x);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12249)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12250)
+@@ -11,7 +11,7 @@
+ class Observations;
+ class Variogram;
+ 
+-int  Krigingx(double** ppredictions,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp,Options* options);
++int  Krigingx(double** ppredictions,double **perror,double* x, double* y, double* observations, int n_obs,double* x_interp,double* y_interp,int n_interp,Options* options);
+ void ProcessVariogram(Variogram **pvariogram,Options* options);
+ void GslSolve(double** pX,double* A,double* B,int n);
+ 
+@@ -24,6 +24,7 @@
+ 	Variogram    *variogram;
+ 	Observations *observations;
+ 	double       *predictions;
++	double       *error;
+ 	double       *percent;
+ }KrigingxThreadStruct;
+ 
Index: /issm/oecreview/Archive/12241-12260/ISSM-12250-12251.diff
===================================================================
--- /issm/oecreview/Archive/12241-12260/ISSM-12250-12251.diff	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/ISSM-12250-12251.diff	(revision 12325)
@@ -0,0 +1,60 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.h	(revision 12250)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.h	(revision 12251)
+@@ -25,10 +25,11 @@
+ 
+ /* serial output macros: */
+ #define PREDICTIONS (mxArray**)&plhs[0]
++#define ERROR       (mxArray**)&plhs[1]
+ 
+ /* serial arg counts: */
+ #undef NLHS
+-#define NLHS  1
++#define NLHS  2
+ #undef NRHS
+ #define NRHS  5
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12250)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12251)
+@@ -12,6 +12,7 @@
+ 	double  *x_interp     = NULL;
+ 	double  *y_interp     = NULL;
+ 	double  *predictions  = NULL;
++	double  *error        = NULL;
+ 	Options *options      = NULL;
+ 	int      N_interp,M_interp,M,N,n_obs;
+ 
+@@ -19,7 +20,7 @@
+ 	MODULEBOOT();
+ 
+ 	/*checks on arguments on the matlab side: */
+-	if (nrhs<NRHS || nlhs!=NLHS){
++	if (nrhs<NRHS || nlhs>NLHS){
+ 		KrigingUsage(); _error_("Kriging usage error");
+ 	}
+ 
+@@ -32,10 +33,11 @@
+ 	FetchData(&options,NRHS,nrhs,prhs);
+ 
+ 	/*Call x layer*/
+-	Krigingx(&predictions,x,y,observations,n_obs,x_interp,y_interp,M_interp*N_interp,options);
++	Krigingx(&predictions,&error,x,y,observations,n_obs,x_interp,y_interp,M_interp*N_interp,options);
+ 
+ 	/*Generate output Matlab Structures*/
+-	WriteData(PREDICTIONS,predictions,M_interp,N_interp);
++	if(nlhs>=1) WriteData(PREDICTIONS,predictions,M_interp,N_interp);
++	if(nlhs==2) WriteData(ERROR,error,M_interp,N_interp);
+ 
+ 	/*Free ressources: */
+ 	xfree((void**)&x);
+@@ -44,6 +46,7 @@
+ 	xfree((void**)&x_interp);
+ 	xfree((void**)&y_interp);
+ 	xfree((void**)&predictions);
++	xfree((void**)&error);
+ 
+ 	/*end module: */
+ 	MODULEEND();
Index: /issm/oecreview/Archive/12241-12260/ISSM-12259-12260.diff
===================================================================
--- /issm/oecreview/Archive/12241-12260/ISSM-12259-12260.diff	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/ISSM-12259-12260.diff	(revision 12325)
@@ -0,0 +1,41 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/octave/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/octave/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/octave/install.sh	(revision 12260)
+@@ -0,0 +1,30 @@
++#!/bin/bash
++
++#Some cleanup
++version=3.6.1
++rm -rf src install octave-$version octave-$version.tar.gz
++mkdir install src
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py "http://issm.jpl.nasa.gov/files/externalpackages/octave-$version.tar.gz" "octave-$version.tar.gz"
++
++#Untar 
++tar -zxvf  octave-$version.tar.gz
++
++#Move octave into install directory
++mv octave-$version/* src
++rm -rf octave-$version
++
++#install
++cd src 
++
++exit
++make 
++
++#Compile 
++cd ../install
++mkdir lib
++cd lib
++cp ../../src/*.a .
++ln -s octave_LINUX.a octave.a
++ln -s octave_LINUX.a liboctave.a
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/octave/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12241-12260/ISSM-DocReview-12241-12260.tex
===================================================================
--- /issm/oecreview/Archive/12241-12260/ISSM-DocReview-12241-12260.tex	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/ISSM-DocReview-12241-12260.tex	(revision 12325)
@@ -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/12241-12260/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12241-12260/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12241-12260
Index: /issm/oecreview/Archive/12241-12260/Makefile
===================================================================
--- /issm/oecreview/Archive/12241-12260/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12241-12260
+
+
+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/12241-12260/log.tex
===================================================================
--- /issm/oecreview/Archive/12241-12260/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/log.tex	(revision 12325)
@@ -0,0 +1,22 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12241-12242.diff: \\ Function name: \\A /issm/trunk-jpl/src/android/test102 A /issm/trunk-jpl/src/android/test102/test102.bin A /issm/trunk-jpl/src/android/test102/test102.petsc A /issm/trunk-jpl/src/android/test102/test102.queue \\ Export determination: 6. \\Rationale: Temporary android test102
+D /issm/trunk-jpl/src/android/test102/test102.queue A /issm/trunk-jpl/src/android/test102/test102.sh (from /issm/trunk-jpl/src/android/test102/test102.queue:12241) Moved queue to shell \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12242-12243.diff: \\ Function name: \\D /issm/trunk-jpl/src/android/test102/test102.queue A /issm/trunk-jpl/src/android/test102/test102.sh (from /issm/trunk-jpl/src/android/test102/test102.queue:12241) \\ Export determination: 6. \\Rationale: Moved queue to shell
+M /issm/trunk-jpl/externalpackages/python A /issm/trunk-jpl/externalpackages/python/install-macosx-snowleopard.sh install script for 32-bit python, needed on OSX 10.6 for numpy/scipy/matplotlib \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12243-12244.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/python A /issm/trunk-jpl/externalpackages/python/install-macosx-snowleopard.sh \\ Export determination: 6. \\Rationale: install script for 32-bit python, needed on OSX 10.6 for numpy/scipy/matplotlib
+A /issm/trunk-jpl/externalpackages/python/install-macosx-lion.sh (from /issm/trunk-jpl/externalpackages/python/install-macosx.sh:12242) D /issm/trunk-jpl/externalpackages/python/install-macosx.sh renamed install script to reflect OS version \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12244-12245.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/python/install-macosx-lion.sh (from /issm/trunk-jpl/externalpackages/python/install-macosx.sh:12242) D /issm/trunk-jpl/externalpackages/python/install-macosx.sh \\ Export determination: 6. \\Rationale: renamed install script to reflect OS version
+M /issm/trunk-jpl/externalpackages/scipy/README A /issm/trunk-jpl/externalpackages/scipy/install-macosx-lion.sh (from /issm/trunk-jpl/externalpackages/scipy/install-macosx64.sh:12243) A /issm/trunk-jpl/externalpackages/scipy/install-macosx-snowleopard.sh D /issm/trunk-jpl/externalpackages/scipy/install-macosx64.sh osx version-specific install scripts for scipy/numpy \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12245-12246.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/scipy/README A /issm/trunk-jpl/externalpackages/scipy/install-macosx-lion.sh (from /issm/trunk-jpl/externalpackages/scipy/install-macosx64.sh:12243) A /issm/trunk-jpl/externalpackages/scipy/install-macosx-snowleopard.sh D /issm/trunk-jpl/externalpackages/scipy/install-macosx64.sh \\ Export determination: 6. \\Rationale: osx version-specific install scripts for scipy/numpy
+M /issm/trunk-jpl/externalpackages/matplotlib A /issm/trunk-jpl/externalpackages/matplotlib/install-osx.sh matplotlib osx install script which automatically fetches and builds dependencies (zlib, png, freetype) \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12246-12247.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/matplotlib A /issm/trunk-jpl/externalpackages/matplotlib/install-osx.sh \\ Export determination: 6. \\Rationale: matplotlib osx install script which automatically fetches and builds dependencies (zlib, png, freetype)
+A /issm/trunk-jpl/externalpackages/gsl/install-pleiades.sh Added gsl compilation for pleiades \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12247-12248.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/gsl/install-pleiades.sh \\ Export determination: 6. \\Rationale: Added gsl compilation for pleiades
+M /issm/trunk-jpl/src/c/shared/Elements/elements.h fixed bad initialization of 1L \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12248-12249.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/shared/Elements/elements.h \\ Export determination: 6. \\Rationale: fixed bad initialization of 1L
+M /issm/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh minor \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12249-12250.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/petsc/install-3.2-pleiades.sh \\ Export determination: 6. \\Rationale: minor
+M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h Added Error calculation \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12250-12251.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h \\ Export determination: 6. \\Rationale: Added Error calculation
+M /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp M /issm/trunk-jpl/src/modules/Kriging/Kriging.h Added Error calculation \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12251-12252.diff: \\ Function name: \\M /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp M /issm/trunk-jpl/src/modules/Kriging/Kriging.h \\ Export determination: 6. \\Rationale: Added Error calculation \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-12259-12260.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/octave A /issm/trunk-jpl/externalpackages/octave/install.sh \\ Export determination: 6. \\Rationale: octave package \\\\
Index: /issm/oecreview/Archive/12241-12260/r1.tex
===================================================================
--- /issm/oecreview/Archive/12241-12260/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12241
Index: /issm/oecreview/Archive/12241-12260/r2.tex
===================================================================
--- /issm/oecreview/Archive/12241-12260/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12241-12260/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12260
Index: /issm/oecreview/Archive/12261-12280/Date.tex
===================================================================
--- /issm/oecreview/Archive/12261-12280/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12261-12280/ISSM-12261-12262.diff
===================================================================
--- /issm/oecreview/Archive/12261-12280/ISSM-12261-12262.diff	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/ISSM-12261-12262.diff	(revision 12325)
@@ -0,0 +1,60 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12261)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12262)
+@@ -1,8 +1,8 @@
+ #!/bin/bash
+ #Synchronize EnumToStringx.cpp and StringToEnumx.cpp and matlab Enums
+ 
+-#Get all lines of EnumDefinitions2.h which hold Enum | remove all comas | add line number in the first column > put everything in file temp
+-cat EnumDefinitions.h | grep -e "[0-9]Enum," -e "[a-zA-Z]Enum," | grep -v include | sed -e "s/,//g" | awk '{ printf "%s %s\n", NR, $0 }' > temp
++#Get all lines of EnumDefinitions2.h which hold Enum | remove all comas > put everything in file temp
++cat EnumDefinitions.h | grep -e "[0-9]Enum," -e "[a-zA-Z]Enum," | grep -v include | sed -e "s/,//g" > temp
+ 
+ #Removed existing files
+ rm $ISSM_DIR/src/m/enum/*.m
+@@ -12,7 +12,7 @@
+ #Get number of enums
+ NUMENUMS=$(wc -l temp | awk '{printf("%s",$1);}');
+ 
+-#Build EnumToStringx.cpp {{{1
++#Build EnumToStringx.cpp {{{
+ #Header
+ cat <<END >  $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp
+ /*
+@@ -34,7 +34,7 @@
+ 
+ END
+ #core
+-cat temp |  awk '{print "\t\t" "case " $2" : return \"" substr($2,1,length($2)-4) "\";"}' >> $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp
++cat temp |  awk '{print "\t\t" "case " $1" : return \"" substr($1,1,length($1)-4) "\";"}' >> $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp
+ #Footer
+ cat <<END >> $ISSM_DIR/src/c/modules/EnumToStringx/EnumToStringx.cpp
+ 		default : return "unknown";
+@@ -82,7 +82,7 @@
+ for (( i=1 ; i<=100 ; i++ )); do
+ 	echo "   if(stage==$i){" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp
+ 	awk -v i1=$i1 -v i2=$i2 '{if(NR>=i1 && NR<=i2) print $0 }' temp |
+-	awk '{print "\t" ((NR==1)?"      if":"      else if") " (strcmp(name,\"" substr($2,1,length($2)-4) "\")==0) return " $2 ";"}' >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp
++	awk '{print "\t" ((NR==1)?"      if":"      else if") " (strcmp(name,\"" substr($1,1,length($1)-4) "\")==0) return " $1 ";"}' >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp
+ 	echo "         else stage=$(($i+1));" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp
+ 	echo "   }" >> $ISSM_DIR//src/c/modules/StringToEnumx/StringToEnumx.cpp
+ 	
+@@ -103,7 +103,7 @@
+ for (( i=1 ; i<=$NUMENUMS ; i++ )); do
+ 
+ 	#Get name and enum of the line i
+-	NAMEENUM=$(cat temp | grep "^[ ]*$i " | awk '{printf("%s",$2);}');
++	NAMEENUM=$(cat temp | grep "^[ ]*$i " | awk '{printf("%s",$1);}');
+ 	NAME=$(echo $NAMEENUM | sed -e "s/Enum//g")
+ 	ENUM=$i;
+ 	#offset Enum by one (Enum begins with 0 and not 1!)
+@@ -155,7 +155,7 @@
+ %      macro=MaximumNumberOfEnums()
+ 
+ macro=$(cat EnumDefinitions.h | grep -e "[0-9]Enum" -e "[a-zA-Z]Enum" | grep -v include \
+-		| awk '{ printf "%s %s\n", NR, $0 }' \
++		| awk '{ printf "%s %s\n", NR-1, $0 }' \
+ 		| grep "MaximumNumberOfEnums" | awk '{print $1}');
+ END
+ #}}}
Index: /issm/oecreview/Archive/12261-12280/ISSM-12262-12263.diff
===================================================================
--- /issm/oecreview/Archive/12261-12280/ISSM-12262-12263.diff	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/ISSM-12262-12263.diff	(revision 12325)
@@ -0,0 +1,16 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/enum/MaximumNumberOfEnums.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/enum/MaximumNumberOfEnums.m	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/enum/MaximumNumberOfEnums.m	(revision 12263)
+@@ -0,0 +1,11 @@
++function macro=MaximumNumberOfEnums()
++%MAXIMUMNUMBEROFENUMS - Enum of MaximumNumberOfEnums
++%
++%   WARNING: DO NOT MODIFY THIS FILE
++%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
++%            Please read src/c/EnumDefinitions/README for more information
++%
++%   Usage:
++%      macro=MaximumNumberOfEnums()
++
++macro=436;
Index: /issm/oecreview/Archive/12261-12280/ISSM-12263-12264.diff
===================================================================
--- /issm/oecreview/Archive/12261-12280/ISSM-12263-12264.diff	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/ISSM-12263-12264.diff	(revision 12325)
@@ -0,0 +1,50 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12263)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh	(revision 12264)
+@@ -2,7 +2,7 @@
+ #Synchronize EnumToStringx.cpp and StringToEnumx.cpp and matlab Enums
+ 
+ #Get all lines of EnumDefinitions2.h which hold Enum | remove all comas > put everything in file temp
+-cat EnumDefinitions.h | grep -e "[0-9]Enum," -e "[a-zA-Z]Enum," | grep -v include | sed -e "s/,//g" > temp
++cat EnumDefinitions.h | grep -e "[0-9]Enum," -e "[a-zA-Z]Enum," | grep -v include | sed -e "s/,/ /g" | awk '{print $1}' > temp
+ 
+ #Removed existing files
+ rm $ISSM_DIR/src/m/enum/*.m
+@@ -100,28 +100,27 @@
+ #}}}
+ 
+ # go through the lines of temp
+-for (( i=1 ; i<=$NUMENUMS ; i++ )); do
++ENUM=0;
++for NAMEENUM in $(cat temp); do
+ 
+ 	#Get name and enum of the line i
+-	NAMEENUM=$(cat temp | grep "^[ ]*$i " | awk '{printf("%s",$1);}');
+ 	NAME=$(echo $NAMEENUM | sed -e "s/Enum//g")
+-	ENUM=$i;
+ 	#offset Enum by one (Enum begins with 0 and not 1!)
+-	let ENUM=$ENUM-1
++	let ENUM=$ENUM+1
+ 
+ 	#print info {{{
+-	if [ $i -lt 10 ]
++	if [ $ENUM -lt 10 ]
+ 	then
+ 		printf "\r                                                                      "
+-		printf "\r  $i/$NUMENUMS Adding "$NAME"..."
++		printf "\r  $ENUM/$NUMENUMS Adding "$NAME"..."
+ 	else
+-		if [ $i -lt 100 ]
++		if [ $ENUM -lt 100 ]
+ 		then
+ 			printf "\r                                                                      "
+-			printf "\r $i/$NUMENUMS Adding "$NAME"..."
++			printf "\r $ENUM/$NUMENUMS Adding "$NAME"..."
+ 		else
+ 			printf "\r                                                                      "
+-			printf "\r$i/$NUMENUMS Adding "$NAME"..."
++			printf "\r$ENUM/$NUMENUMS Adding "$NAME"..."
+ 		fi
+ 	fi
+ 	#}}}
Index: /issm/oecreview/Archive/12261-12280/ISSM-12264-12265.diff
===================================================================
--- /issm/oecreview/Archive/12261-12280/ISSM-12264-12265.diff	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/ISSM-12264-12265.diff	(revision 12325)
@@ -0,0 +1,114 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.h	(revision 12264)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.h	(revision 12265)
+@@ -40,25 +40,26 @@
+ 		IoModel(FILE* iomodel_handle);
+ 
+ 		/*Input/Output*/
+-		void        Constant(bool   *poutput,int constant_enum);
+-		void        Constant(int    *poutput,int constant_enum);
+-		void        Constant(double *poutput,int constant_enum);
+-		void        Constant(char  **poutput,int constant_enum);
+-		Param      *CopyConstantObject(int constant_enum);
+-		double     *Data(int dataenum);
+-		void        DeleteData(int num,...);
+-		void        FetchConstants(void);
+-		void        FetchData(bool*     pboolean,int data_enum);
+-		void        FetchData(int*      pinteger,int data_enum);
+-		void        FetchData(double*   pscalar,int data_enum);
+-		void        FetchData(char**    pstring,int data_enum);
+-		void        FetchData(int** pmatrix,int* pM,int* pN,int data_enum);
+-		void        FetchData(double**  pscalarmatrix,int* pM,int* pN,int data_enum);
+-		void        FetchData(char***   pstringarray,int* pnumstrings,int data_enum);
+-		void        FetchData(double*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
+-		void        FetchData(int num,...);
+-		void        FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum=NoneEnum,double default_value=0);
+-		FILE*       SetFilePointerToData(int* pcode,int* pvector_type, int data_enum);
++		void    CheckEnumSync(void);
++		void    Constant(bool   *poutput,int constant_enum);
++		void    Constant(int    *poutput,int constant_enum);
++		void    Constant(double *poutput,int constant_enum);
++		void    Constant(char  **poutput,int constant_enum);
++		Param  *CopyConstantObject(int constant_enum);
++		double *Data(int dataenum);
++		void    DeleteData(int num,...);
++		void    FetchConstants(void);
++		void    FetchData(bool*     pboolean,int data_enum);
++		void    FetchData(int*      pinteger,int data_enum);
++		void    FetchData(double*   pscalar,int data_enum);
++		void    FetchData(char**    pstring,int data_enum);
++		void    FetchData(int** pmatrix,int* pM,int* pN,int data_enum);
++		void    FetchData(double**  pscalarmatrix,int* pM,int* pN,int data_enum);
++		void    FetchData(char***   pstringarray,int* pnumstrings,int data_enum);
++		void    FetchData(double*** pmatrixarray,int** pmdims,int** pndims, int* pnumrecords,int data_enum);
++		void    FetchData(int num,...);
++		void    FetchDataToInput(Elements* elements,int vector_enum,int default_vector_enum=NoneEnum,double default_value=0);
++		FILE*   SetFilePointerToData(int* pcode,int* pvector_type, int data_enum);
+ };
+ 
+ #endif  /* _IOMODEL_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.cpp	(revision 12264)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.cpp	(revision 12265)
+@@ -44,6 +44,9 @@
+ 	/*First, keep track of the file handle: */
+ 	this->fid=iomodel_handle;
+ 
++	/*Check that Enums are Synchronized*/
++	this->CheckEnumSync();
++
+ 	/*Initialize and read constants:*/
+ 	this->constants=new Parameters();
+ 	this->FetchConstants(); /*this routine goes through the input file, and fetches bools, ints, doubles and strings only, nothing memory intensive*/
+@@ -88,6 +91,35 @@
+ }
+ /*}}}*/
+ 
++/*FUNCTION IoModel::CheckEnumSync{{{1*/
++void  IoModel::CheckEnumSync(void){
++
++	extern int my_rank;
++	int record_enum = 0;
++
++
++	/*Check that some fields have been allocated*/
++	_assert_(this->fid || my_rank);
++
++
++	/*Go find in the binary file, the position of the data we want to fetch: */
++	if(my_rank==0){ //cpu 0
++
++		/*First set FILE* position to the beginning of the file: */
++		fseek(this->fid,0,SEEK_SET);
++
++		/*Get first Enum*/
++		if(fread(&record_enum,sizeof(int),1,this->fid)==0){
++			_error_("Marshalled file is empty");
++		}
++		else{
++			if(record_enum!=MaximumNumberOfEnums){
++				_error_("Enums in marshalled file are not compatible with compiled code, make sure you are using the same version of ISSM");
++			}
++		}
++	}
++}
++/*}}}*/
+ /*FUNCTION IoModel::Constant(bool* poutput,int constant_enum){{{1*/
+ void IoModel::Constant(bool* poutput,int constant_enum){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/marshall.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/marshall.m	(revision 12264)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/marshall.m	(revision 12265)
+@@ -15,6 +15,9 @@
+ 	error(['marshall error message: could not open ' [md.miscellaneous.name '.bin'],' file for binary writing']);
+ end
+ 
++%First, right MaximumNumberOfEnum to make sure that the Enums are synchronized
++WriteData(fid,'enum',MaximumNumberOfEnums(),'data',true,'format','Boolean');
++
+ %Go through all model fields: check that it is a class and call checkconsistency
+ fields=properties('model');
+ for i=1:length(fields),
Index: /issm/oecreview/Archive/12261-12280/ISSM-12265-12266.diff
===================================================================
--- /issm/oecreview/Archive/12261-12280/ISSM-12265-12266.diff	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/ISSM-12265-12266.diff	(revision 12325)
@@ -0,0 +1,12 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h	(revision 12265)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h	(revision 12266)
+@@ -151,6 +151,7 @@
+ 	PetscProfilingCurrentMemEnum,
+ 	PetscProfilingCurrentFlopsEnum,
+ 	PetscProfilingSolutionTimeEnum,
++	MaxIterationConvergenceFlagEnum,
+ 	SteadystateMaxiterEnum,
+ 	SteadystateNumRequestedOutputsEnum,
+ 	SteadystateReltolEnum,
Index: /issm/oecreview/Archive/12261-12280/ISSM-12266-12267.diff
===================================================================
--- /issm/oecreview/Archive/12261-12280/ISSM-12266-12267.diff	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/ISSM-12266-12267.diff	(revision 12325)
@@ -0,0 +1,16 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/enum/MaxIterationConvergenceFlagEnum.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/enum/MaxIterationConvergenceFlagEnum.m	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/enum/MaxIterationConvergenceFlagEnum.m	(revision 12267)
+@@ -0,0 +1,11 @@
++function macro=MaxIterationConvergenceFlagEnum()
++%MAXITERATIONCONVERGENCEFLAGENUM - Enum of MaxIterationConvergenceFlag
++%
++%   WARNING: DO NOT MODIFY THIS FILE
++%            this file has been automatically generated by src/c/EnumDefinitions/Synchronize.sh
++%            Please read src/c/EnumDefinitions/README for more information
++%
++%   Usage:
++%      macro=MaxIterationConvergenceFlagEnum()
++
++macro=StringToEnum('MaxIterationConvergenceFlag');
Index: /issm/oecreview/Archive/12261-12280/ISSM-12267-12268.diff
===================================================================
--- /issm/oecreview/Archive/12261-12280/ISSM-12267-12268.diff	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/ISSM-12267-12268.diff	(revision 12325)
@@ -0,0 +1,10 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/enum/MaximumNumberOfEnums.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/enum/MaximumNumberOfEnums.m	(revision 12267)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/enum/MaximumNumberOfEnums.m	(revision 12268)
+@@ -8,4 +8,4 @@
+ %   Usage:
+ %      macro=MaximumNumberOfEnums()
+ 
+-macro=436;
++macro=437;
Index: /issm/oecreview/Archive/12261-12280/ISSM-12268-12269.diff
===================================================================
--- /issm/oecreview/Archive/12261-12280/ISSM-12268-12269.diff	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/ISSM-12268-12269.diff	(revision 12325)
@@ -0,0 +1,12 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12268)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12269)
+@@ -155,6 +155,7 @@
+ 		case PetscProfilingCurrentMemEnum : return "PetscProfilingCurrentMem";
+ 		case PetscProfilingCurrentFlopsEnum : return "PetscProfilingCurrentFlops";
+ 		case PetscProfilingSolutionTimeEnum : return "PetscProfilingSolutionTime";
++		case MaxIterationConvergenceFlagEnum : return "MaxIterationConvergenceFlag";
+ 		case SteadystateMaxiterEnum : return "SteadystateMaxiter";
+ 		case SteadystateNumRequestedOutputsEnum : return "SteadystateNumRequestedOutputs";
+ 		case SteadystateReltolEnum : return "SteadystateReltol";
Index: /issm/oecreview/Archive/12261-12280/ISSM-12269-12270.diff
===================================================================
--- /issm/oecreview/Archive/12261-12280/ISSM-12269-12270.diff	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/ISSM-12269-12270.diff	(revision 12325)
@@ -0,0 +1,40 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 12269)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 12270)
+@@ -159,6 +159,7 @@
+ 	      else if (strcmp(name,"PetscProfilingCurrentMem")==0) return PetscProfilingCurrentMemEnum;
+ 	      else if (strcmp(name,"PetscProfilingCurrentFlops")==0) return PetscProfilingCurrentFlopsEnum;
+ 	      else if (strcmp(name,"PetscProfilingSolutionTime")==0) return PetscProfilingSolutionTimeEnum;
++	      else if (strcmp(name,"MaxIterationConvergenceFlag")==0) return MaxIterationConvergenceFlagEnum;
+ 	      else if (strcmp(name,"SteadystateMaxiter")==0) return SteadystateMaxiterEnum;
+ 	      else if (strcmp(name,"SteadystateNumRequestedOutputs")==0) return SteadystateNumRequestedOutputsEnum;
+ 	      else if (strcmp(name,"SteadystateReltol")==0) return SteadystateReltolEnum;
+@@ -258,11 +259,11 @@
+ 	      else if (strcmp(name,"IntParam")==0) return IntParamEnum;
+ 	      else if (strcmp(name,"IntVecParam")==0) return IntVecParamEnum;
+ 	      else if (strcmp(name,"MacAyeal2dIceFront")==0) return MacAyeal2dIceFrontEnum;
+-	      else if (strcmp(name,"MacAyeal3dIceFront")==0) return MacAyeal3dIceFrontEnum;
+          else stage=3;
+    }
+    if(stage==3){
+-	      if (strcmp(name,"Matice")==0) return MaticeEnum;
++	      if (strcmp(name,"MacAyeal3dIceFront")==0) return MacAyeal3dIceFrontEnum;
++	      else if (strcmp(name,"Matice")==0) return MaticeEnum;
+ 	      else if (strcmp(name,"Matpar")==0) return MatparEnum;
+ 	      else if (strcmp(name,"Node")==0) return NodeEnum;
+ 	      else if (strcmp(name,"Numericalflux")==0) return NumericalfluxEnum;
+@@ -381,11 +382,11 @@
+ 	      else if (strcmp(name,"IceVolume")==0) return IceVolumeEnum;
+ 	      else if (strcmp(name,"P0")==0) return P0Enum;
+ 	      else if (strcmp(name,"P1")==0) return P1Enum;
+-	      else if (strcmp(name,"P1DG")==0) return P1DGEnum;
+          else stage=4;
+    }
+    if(stage==4){
+-	      if (strcmp(name,"SaveResults")==0) return SaveResultsEnum;
++	      if (strcmp(name,"P1DG")==0) return P1DGEnum;
++	      else if (strcmp(name,"SaveResults")==0) return SaveResultsEnum;
+ 	      else if (strcmp(name,"BoolElementResult")==0) return BoolElementResultEnum;
+ 	      else if (strcmp(name,"BoolExternalResult")==0) return BoolExternalResultEnum;
+ 	      else if (strcmp(name,"DoubleElementResult")==0) return DoubleElementResultEnum;
Index: /issm/oecreview/Archive/12261-12280/ISSM-12270-12271.diff
===================================================================
--- /issm/oecreview/Archive/12261-12280/ISSM-12270-12271.diff	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/ISSM-12270-12271.diff	(revision 12325)
@@ -0,0 +1,57 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solvers/solver_nonlinear.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solvers/solver_nonlinear.cpp	(revision 12270)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solvers/solver_nonlinear.cpp	(revision 12271)
+@@ -84,12 +84,22 @@
+ 
+ 		/*Increase count: */
+ 		count++;
+-		if(converged==true)break;
++		if(converged==true){
++			bool max_iteration_state=false;
++			int tempStep=1;
++			double tempTime=1.0;
++			femmodel->results->AddObject(new BoolExternalResult(femmodel->results->Size()+1, MaxIterationConvergenceFlagEnum, max_iteration_state, tempStep, tempTime));
++			break;
++		}
+ 		if(count>=max_nonlinear_iterations){
+-			_printf_(true,"   maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations); 
++			_printf_(true,"   maximum number of nonlinear iterations (%i) exceeded\n",max_nonlinear_iterations); 
+ 			converged=true;
+-		InputUpdateFromConstantx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,converged,ConvergedEnum);
+-		InputUpdateFromSolutionx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,ug);
++			InputUpdateFromConstantx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,converged,ConvergedEnum);
++			InputUpdateFromSolutionx( femmodel->elements,femmodel->nodes, femmodel->vertices, femmodel->loads, femmodel->materials, femmodel->parameters,ug);		
++			bool max_iteration_state=true;
++			int tempStep=1;
++			double tempTime=1.0;
++			femmodel->results->AddObject(new BoolExternalResult(femmodel->results->Size()+1, MaxIterationConvergenceFlagEnum, max_iteration_state, tempStep, tempTime));
+ 			break;
+ 		}
+ 	}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solvers/solver_newton.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solvers/solver_newton.cpp	(revision 12270)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solvers/solver_newton.cpp	(revision 12271)
+@@ -66,9 +66,19 @@
+ 		/*Check convergence*/
+ 		convergence(&converged,Kff,pf,uf,old_uf,femmodel->parameters); 
+ 		xdelete(&Kff); xdelete(&pf);
+-		if(converged==true) break;
++		if(converged==true){	
++			bool max_iteration_state=false;
++			int tempStep=1;
++			double tempTime=1.0;
++			femmodel->results->AddObject(new BoolExternalResult(femmodel->results->Size()+1, MaxIterationConvergenceFlagEnum, max_iteration_state, tempStep, tempTime));
++			break;
++		}
+ 		if(count>=max_nonlinear_iterations){
+-			_printf_(true,"   maximum number of iterations (%i) exceeded\n",max_nonlinear_iterations); 
++			_printf_(true,"   maximum number of Newton iterations (%i) exceeded\n",max_nonlinear_iterations); 
++			bool max_iteration_state=true;
++			int tempStep=1;
++			double tempTime=1.0;
++			femmodel->results->AddObject(new BoolExternalResult(femmodel->results->Size()+1, MaxIterationConvergenceFlagEnum, max_iteration_state, tempStep, tempTime));
+ 			break;
+ 		}
+ 
Index: /issm/oecreview/Archive/12261-12280/ISSM-12271-12272.diff
===================================================================
--- /issm/oecreview/Archive/12261-12280/ISSM-12271-12272.diff	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/ISSM-12271-12272.diff	(revision 12325)
@@ -0,0 +1,60 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/ElementVector.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/ElementVector.h	(revision 12271)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/ElementVector.h	(revision 12272)
+@@ -42,6 +42,7 @@
+ 		void AddToGlobal(Vector* pf);
+ 		void InsertIntoGlobal(Vector* pf);
+ 		void Echo(void);
++		void CheckConsistency(void);
+ 		void Init(ElementVector* pe);
+ 		void SetValue(double scalar);
+ 		/*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12271)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp	(revision 12272)
+@@ -165,6 +165,9 @@
+ 	int i;
+ 	double* localvalues=NULL;
+ 
++	/*In debugging mode, check consistency (no NaN, and values not too big)*/
++	this->CheckConsistency();
++
+ 	if(this->fsize){
+ 		/*first, retrieve values that are in the f-set from the g-set values vector: */
+ 		localvalues=(double*)xmalloc(this->fsize*sizeof(double));
+@@ -201,6 +204,17 @@
+ 
+ }
+ /*}}}*/
++/*FUNCTION ElementVector::CheckConsistency{{{1*/
++void ElementVector::CheckConsistency(void){
++	/*Check element matrix values, only in debugging mode*/
++#ifdef _ISSM_DEBUG_ 
++	for (int i=0;i<this->nrows;i++){
++		if (isnan(this->values[i])) _error_("NaN found in Element Vector");
++		if (fabs( this->values[i])>1.e+50) _error_("Element Vector values exceeds 1.e+50");
++	}
++#endif
++}
++/*}}}*/
+ /*FUNCTION ElementVector::Echo{{{1*/
+ void ElementVector::Echo(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12271)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Elements/Tria.cpp	(revision 12272)
+@@ -628,7 +628,10 @@
+ 		surface_mass_balance_input->GetInputValue(&surface_mass_balance_g,gauss);
+ 		basal_melting_input->GetInputValue(&basal_melting_g,gauss);
+ 		thickness_input->GetInputValue(&thickness_g,gauss);
+-		if(basal_melting_correction_input) basal_melting_correction_input->GetInputValue(&basal_melting_correction_g,gauss);
++		if(basal_melting_correction_input)
++		 basal_melting_correction_input->GetInputValue(&basal_melting_correction_g,gauss);
++		else
++		 basal_melting_correction_g=0.;
+ 
+ 		for(i=0;i<numdof;i++) pe->values[i]+=Jdettria*gauss->weight*(thickness_g+dt*(surface_mass_balance_g-basal_melting_g-basal_melting_correction_g))*L[i];
+ 	}
Index: /issm/oecreview/Archive/12261-12280/ISSM-12272-12273.diff
===================================================================
--- /issm/oecreview/Archive/12261-12280/ISSM-12272-12273.diff	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/ISSM-12272-12273.diff	(revision 12325)
@@ -0,0 +1,133 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12272)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12273)
+@@ -77,7 +77,8 @@
+ 			this->AddObject(observation);
+ 		}
+ 		else{
+-			//We need to average with the current observations (not done yet)
++			/*We need to average with the current observations*/
++			this->quadtree->AddAndAverage(x[i],y[i],observations_list[i]);
+ 		}
+ 	}
+ 	printf("done\n");
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12272)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12273)
+@@ -52,6 +52,7 @@
+ 		Quadtree(double xmin,double xmax,double ymin,double ymax,int maxdepth_in);
+ 		~Quadtree();
+ 		void         Add(Observation *observation);
++		void         AddAndAverage(double x,double y,double value);
+ 		void         DeepEcho(void);
+ 		void         Echo(void);
+ 		void         IntergerCoordinates(int *xi,int *yi,double x,double y);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.h	(revision 12272)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.h	(revision 12273)
+@@ -13,6 +13,7 @@
+ 		double x,y;
+ 		int    xi,yi;
+ 		int    index;
++		double weight;
+ 		double value;
+ 
+ 		/*Observation constructors, destructors*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12272)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12273)
+@@ -197,6 +197,58 @@
+ 	NbObs++;
+ 
+ }/*}}}*/
++/*FUNCTION Quadtree::AddAndAverage{{{1*/
++void Quadtree::AddAndAverage(double x,double y,double value){
++
++	QuadtreeBox **pbox = NULL;
++	QuadtreeBox  *box  = NULL;
++	int           xi,yi;
++	int           level,levelbin;
++	int           index;
++	double        length,length2;
++
++	/*Get integer coodinates*/
++	this->IntergerCoordinates(&xi,&yi,x,y);
++
++	/*Initialize levels*/
++	level    = 0;
++	levelbin = (1L<<this->MaxDepth);// = 2^30
++
++	/*Get inital box (the largest)*/
++	pbox=&root;
++
++	/*Find the smallest box where this point is located*/
++	while((box=*pbox) && (box->nbitems<0)){ 
++
++		levelbin>>=1; level+=1; 
++
++		pbox = &box->box[IJ(xi,yi,levelbin)];
++	}
++
++	/*Add obervation in this box (should be full)*/
++	if(box && box->nbitems==4){
++		index  = 0;
++		length = pow(box->obs[0]->x - x,2.) + pow(box->obs[0]->y - y,2.);
++		for(int i=1;i<4;i++){
++			length2 = pow(box->obs[i]->x - x,2.) + pow(box->obs[i]->y - y,2.);
++			if(length2<length){
++				index  = i;
++				length = length2;
++			}
++		}
++
++		/*We found the closest observation, now average observation (do not change xi and yi to avoid round off errors*/
++		box->obs[index]->x = (box->obs[index]->weight*box->obs[index]->x + x)/(box->obs[index]->weight+1);
++		box->obs[index]->y = (box->obs[index]->weight*box->obs[index]->y + y)/(box->obs[index]->weight+1);
++		box->obs[index]->xi= int((box->obs[index]->weight*double(box->obs[index]->xi) + double(xi))/(box->obs[index]->weight+1));
++		box->obs[index]->yi= int((box->obs[index]->weight*double(box->obs[index]->yi) + double(yi))/(box->obs[index]->weight+1));
++		box->obs[index]->value   = (box->obs[index]->weight*box->obs[index]->value + value)/(box->obs[index]->weight+1);
++		box->obs[index]->weight += 1;
++	}
++	else{
++		_error_("Box is not full");
++	}
++}/*}}}*/
+ /*FUNCTION Quadtree::Echo{{{1*/
+ void  Quadtree::Echo(void){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.cpp	(revision 12272)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Observation.cpp	(revision 12273)
+@@ -14,12 +14,13 @@
+ /*FUNCTION Observation::Observation(double x,double y,int xi,int yi,int index,double value){{{1*/
+ Observation::Observation(double x_in,double y_in,int xi_in,int yi_in,int index_in,double value_in){
+ 
+-	this->x     = x_in;
+-	this->y     = y_in;
+-	this->xi    = xi_in;
+-	this->yi    = yi_in;
+-	this->index = index_in;
+-	this->value = value_in;
++	this->x      = x_in;
++	this->y      = y_in;
++	this->xi     = xi_in;
++	this->yi     = yi_in;
++	this->index  = index_in;
++	this->value  = value_in;
++	this->weight = 1.;
+ 
+ }
+ /*}}}*/
+@@ -41,6 +42,7 @@
+ 	printf("   y     : %g\n",this->y);
+ 	printf("   xi    : "); printbinary(this->xi); printf("\n");
+ 	printf("   yi    : "); printbinary(this->yi); printf("\n");
++	printf("   weight: %g\n",this->weight);
+ 	printf("   value : %g\n",this->value);
+ }
+ /*}}}*/
Index: /issm/oecreview/Archive/12261-12280/ISSM-DocReview-12261-12280.tex
===================================================================
--- /issm/oecreview/Archive/12261-12280/ISSM-DocReview-12261-12280.tex	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/ISSM-DocReview-12261-12280.tex	(revision 12325)
@@ -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/12261-12280/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12261-12280/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12261-12280
Index: /issm/oecreview/Archive/12261-12280/Makefile
===================================================================
--- /issm/oecreview/Archive/12261-12280/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12261-12280
+
+
+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/12261-12280/log.tex
===================================================================
--- /issm/oecreview/Archive/12261-12280/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/log.tex	(revision 12325)
@@ -0,0 +1,25 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12261-12262.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh \\ Export determination: 6. \\Rationale: Added MaximumNumberOfEnums matlab file to check Enum Sync
+M /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh Simplified Synchronize \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12262-12263.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh \\ Export determination: 6. \\Rationale: Simplified Synchronize
+A /issm/trunk-jpl/src/m/enum/MaximumNumberOfEnums.m Added MaximumNumberOfEnums.m \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12263-12264.diff: \\ Function name: \\A /issm/trunk-jpl/src/m/enum/MaximumNumberOfEnums.m \\ Export determination: 6. \\Rationale: Added MaximumNumberOfEnums.m
+M /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh Fixed issue with matlab files \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12264-12265.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/EnumDefinitions/Synchronize.sh \\ Export determination: 6. \\Rationale: Fixed issue with matlab files
+M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/IoModel.h M /issm/trunk-jpl/src/m/model/marshall.m Added check that Enums are synchronized between matlab's interface and compiled code \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12265-12266.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/objects/IoModel.cpp M /issm/trunk-jpl/src/c/objects/IoModel.h M /issm/trunk-jpl/src/m/model/marshall.m \\ Export determination: 6. \\Rationale: Added check that Enums are synchronized between matlab's interface and compiled code
+M /issm/trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h Added convergence flag for reaching maximum iteration number \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12266-12267.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/EnumDefinitions/EnumDefinitions.h \\ Export determination: 6. \\Rationale: Added convergence flag for reaching maximum iteration number
+A /issm/trunk-jpl/src/m/enum/MaxIterationConvergenceFlagEnum.m Added convergence flag for reaching maximum number of iterations \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12267-12268.diff: \\ Function name: \\A /issm/trunk-jpl/src/m/enum/MaxIterationConvergenceFlagEnum.m \\ Export determination: 6. \\Rationale: Added convergence flag for reaching maximum number of iterations
+M /issm/trunk-jpl/src/m/enum/MaximumNumberOfEnums.m Added convergence flag for reaching maximum number of iterations \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12268-12269.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/enum/MaximumNumberOfEnums.m \\ Export determination: 6. \\Rationale: Added convergence flag for reaching maximum number of iterations
+M /issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp Added convergence flag for reaching maximum number of iterations \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12269-12270.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp \\ Export determination: 6. \\Rationale: Added convergence flag for reaching maximum number of iterations
+M /issm/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp Added convergence flag for reaching maximum number of iterations \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12270-12271.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp \\ Export determination: 6. \\Rationale: Added convergence flag for reaching maximum number of iterations
+M /issm/trunk-jpl/src/c/solvers/solver\_newton.cpp M /issm/trunk-jpl/src/c/solvers/solver\_nonlinear.cpp First attempt at adding convergence flag: (i.e. whether loop exited due to convergence criteria or maximum number of iterations). Not sure if Addobject( new BoolExternalResults \_ ) is correct or will it end up duplicating this field in the results in multiple solves within a solution sequence? I have not checked-in thermal\_nonlinear.cpp or stokescoupling\_nonlinear.cpp since I am not using these yet...Will be testing, but feel free to change \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12271-12272.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/solvers/solver\_newton.cpp M /issm/trunk-jpl/src/c/solvers/solver\_nonlinear.cpp \\ Export determination: 6. \\Rationale: First attempt at adding convergence flag: (i.e. whether loop exited due to convergence criteria or maximum number of iterations). Not sure if Addobject( new BoolExternalResults \_ ) is correct or will it end up duplicating this field in the results in multiple solves within a solution sequence? I have not checked-in thermal\_nonlinear.cpp or stokescoupling\_nonlinear.cpp since I am not using these yet...Will be testing, but feel free to change
+M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementVector.h Fixed BIG error in prognostic: melting rate correction was never defined \\\\
+\noindent \textbf{Change \#12} with diff file ISSM-12272-12273.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/objects/Elements/Tria.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementVector.cpp M /issm/trunk-jpl/src/c/objects/Numerics/ElementVector.h \\ Export determination: 6. \\Rationale: Fixed BIG error in prognostic: melting rate correction was never defined
+M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Observation.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Observation.h M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h Added observation averaging \\\\
+\noindent \textbf{Change \#13} with diff file ISSM-12273-12274.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Observation.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Observation.h M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h \\ Export determination: 6. \\Rationale: Added observation averaging \\\\
Index: /issm/oecreview/Archive/12261-12280/r1.tex
===================================================================
--- /issm/oecreview/Archive/12261-12280/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12261
Index: /issm/oecreview/Archive/12261-12280/r2.tex
===================================================================
--- /issm/oecreview/Archive/12261-12280/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12261-12280/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12280
Index: /issm/oecreview/Archive/12281-12300/Date.tex
===================================================================
--- /issm/oecreview/Archive/12281-12300/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12281-12300/ISSM-12281-12282.diff
===================================================================
--- /issm/oecreview/Archive/12281-12300/ISSM-12281-12282.diff	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/ISSM-12281-12282.diff	(revision 12325)
@@ -0,0 +1,68 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12281)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12282)
+@@ -109,26 +109,33 @@
+ 	}
+ 
+ 	/*Find all observations that are in range*/
+-	this->quadtree->RangeSearch(&indices,&nobs,x_interp,y_interp,range);
+-
+-	if(nobs==0){
+-		/*No observation found, double range*/
+-		//printf("No observation found within range, doubling range\n");
++	nobs=0;
++	while(nobs==0){
+ 		xfree((void**)&indices);
+-		this->ObservationList(&x,&y,&obs,&nobs,x_interp,y_interp,range*2);
++		this->quadtree->RangeSearch(&indices,&nobs,x_interp,y_interp,range);
++		if(!nobs){
++			/*No observation found, double range*/
++			range=2*range;
++		}
+ 	}
+-	else{
+-		//if(nobs>1000) printf("Taking more than 1000 observations\n");
+-		/*Allocate vectors*/
+-		x   = (double*)xmalloc(nobs*sizeof(double));
+-		y   = (double*)xmalloc(nobs*sizeof(double));
+-		obs = (double*)xmalloc(nobs*sizeof(double));
++	/*Check that we do not have more than 50 observations*/
++	//while(nobs>50){
++	//	range=range/2;
++	//	xfree((void**)&indices);
++	//	this->quadtree->RangeSearch(&indices,&nobs,x_interp,y_interp,range);
++	//}
+ 
+-		/*Loop over all observations and fill in x, y and obs*/
+-		for (i=0;i<nobs;i++){
+-			observation=(Observation*)this->GetObjectByOffset(indices[i]);
+-			observation->WriteXYObs(&x[i],&y[i],&obs[i]);
+-		}
++	if(!nobs) _error_("Unexpected error: no observation within current range and more than 50 observations if doubling range");
++
++	/*Allocate vectors*/
++	x   = (double*)xmalloc(nobs*sizeof(double));
++	y   = (double*)xmalloc(nobs*sizeof(double));
++	obs = (double*)xmalloc(nobs*sizeof(double));
++
++	/*Loop over all observations and fill in x, y and obs*/
++	for (i=0;i<nobs;i++){
++		observation=(Observation*)this->GetObjectByOffset(indices[i]);
++		observation->WriteXYObs(&x[i],&y[i],&obs[i]);
+ 	}
+ 
+ 	/*Assign output pointer*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12281)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12282)
+@@ -68,7 +68,7 @@
+ 
+ 	/*return semi-variogram*/
+ 	a     = 1./3.;
+-	gamma = (sill-nugget)*(1-exp(-h2/(a*pow(range,2.)))) + nugget;
++	gamma = (sill-nugget)*(1.-exp(-h2/(a*range*range))) + nugget;
+ 	return gamma;
+ }
+ /*}}}*/
Index: /issm/oecreview/Archive/12281-12300/ISSM-12286-12287.diff
===================================================================
--- /issm/oecreview/Archive/12281-12300/ISSM-12286-12287.diff	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/ISSM-12286-12287.diff	(revision 12325)
@@ -0,0 +1,34 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gslib/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gslib/install.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gslib/install.sh	(revision 12287)
+@@ -0,0 +1,23 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf install
++mkdir install
++
++#Download from ISSM server
++#$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/gslib90_ls.tar.gz' 'gslib90_ls.tar.gz'
++
++#Untar 
++tar -zxvf  gslib90_ls.tar.gz
++
++#Move gslib into install directory
++mv gslib90/* install
++rm -rf gslib90
++
++#Change compiler to gfortran
++cd install
++cat Makefile | sed -e "s/FC=g95/FC=gfortran/g" > Makefile.bak
++mv Makefile.bak Makefile
++cat gslib/Makefile | sed -e "s/FC=g95/FC=gfortran/g" > Makefile.bak
++mv Makefile.bak gslib/Makefile
++make 
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gslib/install.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12281-12300/ISSM-12287-12288.diff
===================================================================
--- /issm/oecreview/Archive/12281-12300/ISSM-12287-12288.diff	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/ISSM-12287-12288.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gslib/install.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gslib/install.sh	(revision 12287)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/gslib/install.sh	(revision 12288)
+@@ -5,7 +5,7 @@
+ mkdir install
+ 
+ #Download from ISSM server
+-#$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/gslib90_ls.tar.gz' 'gslib90_ls.tar.gz'
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/gslib90_ls.tar.gz' 'gslib90_ls.tar.gz'
+ 
+ #Untar 
+ tar -zxvf  gslib90_ls.tar.gz
Index: /issm/oecreview/Archive/12281-12300/ISSM-12288-12289.diff
===================================================================
--- /issm/oecreview/Archive/12281-12300/ISSM-12288-12289.diff	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/ISSM-12288-12289.diff	(revision 12325)
@@ -0,0 +1,351 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12288)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12289)
+@@ -161,11 +161,10 @@
+ void Observations::Variomap(double* gamma,double *x,int n){
+ 
+ 	/*Output and Intermediaries*/
+-	int          nobs,i,j,k;
+-	double       range;
++	int          i,j,k;
++	double       distance;
+ 	Observation *observation1 = NULL;
+ 	Observation *observation2 = NULL;
+-	int         *indices      = NULL;
+ 
+ 	int *counter= (int*)xmalloc(n*sizeof(int));
+ 	for(j=0;j<n;j++) counter[j] = 0;
+@@ -174,25 +173,25 @@
+ 	for(i=0;i<this->Size();i++){
+ 		observation1=(Observation*)this->GetObjectByOffset(i);
+ 
+-		for(j=0;j<n;j++){
+-			range=x[j]; _assert_(range>=0.);
++		for(j=i+1;j<this->Size();j++){
++			observation2=(Observation*)this->GetObjectByOffset(j);
+ 
+-			/*Find all observations that are in range*/
+-			this->quadtree->RangeSearch(&indices,&nobs,observation1->x,observation1->y,range);
++			distance=sqrt(pow(observation1->x - observation2->x,2.) + pow(observation1->y - observation2->y,2.));
++			if(distance>x[n-1]) continue;
+ 
+-			for (k=0;k<nobs;k++){
+-				observation2 = (Observation*)this->GetObjectByOffset(indices[k]);
+-				gamma[j]    += 1./2.*pow(observation1->value - observation2->value,2.);
+-			}
++			int index = int(distance/(x[1]-x[0]));
++			if(index>n-1) index = n-1;
++			if(index<0)   index = 0;
+ 
+-			counter[j] += nobs;
+-			xfree((void**)&indices);
++			gamma[index]   += 1./2.*pow(observation1->value - observation2->value,2.);
++			counter[index] += 1;
+ 		}
+ 	}
+ 
+ 	/*Normalize semivariogram*/
+-	for(j=0;j<n;j++){
+-		if(counter[j]) gamma[j] = gamma[j]/double(counter[j]);
++	gamma[0]=0;
++	for(k=0;k<n;k++){
++		if(counter[k]) gamma[k] = gamma[k]/double(counter[k]);
+ 	}
+ 
+ 	/*Assign output pointer*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Sorting/Quicksort.c
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Sorting/Quicksort.c	(revision 12288)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Sorting/Quicksort.c	(revision 12289)
+@@ -1,19 +0,0 @@
+-void swap(int *a, int *b) {
+-	int t=*a; *a=*b; *b=t;
+-}
+-void sort(int arr[], int beg, int end) {
+-	  
+-	if (end > beg + 1) {
+-		int piv = arr[beg], l = beg + 1, r = end;
+-		while (l < r)
+-		{
+-			if (arr[l] <= piv)
+-				l++;
+-			else
+-				swap(&arr[l], &arr[--r]);
+-		}
+-		swap(&arr[--l], &arr[beg]);
+-		sort(arr, beg, l);
+-		sort(arr, r, end);
+-	}
+-}
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Sorting/binary_search.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Sorting/binary_search.cpp	(revision 12288)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Sorting/binary_search.cpp	(revision 12289)
+@@ -10,11 +10,11 @@
+ 
+ #include <stdio.h>
+ 
+-int binary_search(int* poffset,int target, int* sorted_integers,int num_integers){
++int binary_search(int* poffset,int target,int* sorted_integers,int num_integers){
+ 
+ 	/*output: */
+ 	int offset;  //offset, if found
+-	int found=0;  //found=0 if target is not found, 1 otherwise.
++	int found=0; //found=0 if target is not found, 1 otherwise.
+ 
+ 	/*intermediary: */
+ 	int* beg=NULL;
+@@ -63,4 +63,3 @@
+ 	/*Return result: */
+ 	return found;
+ }
+-
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Sorting/sorting.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Sorting/sorting.h	(revision 12288)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Sorting/sorting.h	(revision 12289)
+@@ -5,8 +5,6 @@
+ #ifndef _SORTING_H_
+ #define  _SORTING_H_
+ 
+-int binary_search(int* poffset,int target, int* sorted_integers,int num_integers);
++int binary_search(int* poffset,int target,int* sorted_integers,int num_integers);
+ 
+-
+ #endif //ifndef _SORTING_H_
+-
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12288)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12289)
+@@ -137,8 +137,14 @@
+ 
+ 		/*Get list of observations for current point*/
+ 		observations->ObservationList(&x,&y,&obs,&n_obs,x_interp[idx],y_interp[idx],range);
++		if(n_obs==0){
++			predictions[idx] = -999.; 
++			error[idx]       = -999.; 
++			continue;
++		}
+ 
+ 		/*Allocate intermediary matrix and vectors*/
++
+ 		Gamma  = (double*)xmalloc(n_obs*n_obs*sizeof(double));
+ 		gamma0 = (double*)xmalloc(n_obs*sizeof(double));
+ 		ones   = (double*)xmalloc(n_obs*sizeof(double));
+@@ -146,14 +152,16 @@
+ 		/*First: Create semivariogram matrix for observations*/
+ 		for(i=0;i<n_obs;i++){
+ 			for(j=0;j<=i;j++){
+-				Gamma[i*n_obs+j] = variogram->SemiVariogram(x[i]-x[j],y[i]-y[j]);
++				//Gamma[i*n_obs+j] = variogram->SemiVariogram(x[i]-x[j],y[i]-y[j]);
++				Gamma[i*n_obs+j] = variogram->Covariance(x[i]-x[j],y[i]-y[j]);
+ 				Gamma[j*n_obs+i] = Gamma[i*n_obs+j];
+ 			}
+ 		}
+ 		for(i=0;i<n_obs;i++) ones[i]=1;
+ 
+ 		/*Get semivariogram vector associated to this location*/
+-		for(i=0;i<n_obs;i++) gamma0[i] = variogram->SemiVariogram(x[i]-x_interp[idx],y[i]-y_interp[idx]);
++		//for(i=0;i<n_obs;i++) gamma0[i] = variogram->SemiVariogram(x[i]-x_interp[idx],y[i]-y_interp[idx]);
++		for(i=0;i<n_obs;i++) gamma0[i] = variogram->Covariance(x[i]-x_interp[idx],y[i]-y_interp[idx]);
+ 
+ 		/*Solve the three linear systems*/
+ 		GslSolve(&GinvG0,Gamma,gamma0,n_obs); // Gamma^-1 gamma0
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp	(revision 12288)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp	(revision 12289)
+@@ -58,6 +58,24 @@
+ /*}}}*/
+ 
+ /*Variogram function*/
++/*FUNCTION ExponentialVariogram::Covariance{{{1*/
++double ExponentialVariogram::Covariance(double deltax,double deltay){
++	/*The covariance can be deduced from the variogram from the following
++	 * relationship:
++	 *    2 gamma = C(x,x) + C(y,y) -2 C(x,y)
++	 * so
++	 *    C(h) = sill - gamma                                            */
++	double h,a,cova;
++
++	/*Calculate length*/
++	h=sqrt(pow(deltax,2.)+pow(deltay,2.));
++
++	/*return covariance*/
++	a     = 1./3.;
++	cova = (sill-nugget)*exp(-h/(a*range));
++	return cova;
++}
++/*}}}*/
+ /*FUNCTION ExponentialVariogram::SemiVariogram{{{1*/
+ double ExponentialVariogram::SemiVariogram(double deltax,double deltay){
+ 	/*http://en.wikipedia.org/wiki/Variogram*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12288)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12289)
+@@ -58,6 +58,27 @@
+ /*}}}*/
+ 
+ /*Variogram function*/
++/*FUNCTION GaussianVariogram::Covariance{{{1*/
++double GaussianVariogram::Covariance(double deltax,double deltay){
++	/*The covariance can be deduced from the variogram from the following
++	 * relationship:
++	 *    2 gamma = C(x,x) + C(y,y) -2 C(x,y)
++	 * so
++	 *    C(h) = sill - gamma                                            */
++	double h2,a,cova;
++
++	/*Calculate length square*/
++	h2=pow(deltax,2.)+pow(deltay,2.);
++
++	/*return covariance*/
++	a     = 1./3.;
++	cova = (sill-nugget)*exp(-h2/(a*range*range));
++
++	//if(h2<0.0000001) cova = sill;
++
++	return cova;
++}
++/*}}}*/
+ /*FUNCTION GaussianVariogram::SemiVariogram{{{1*/
+ double GaussianVariogram::SemiVariogram(double deltax,double deltay){
+ 	/*http://en.wikipedia.org/wiki/Variogram*/
+@@ -69,6 +90,9 @@
+ 	/*return semi-variogram*/
+ 	a     = 1./3.;
+ 	gamma = (sill-nugget)*(1.-exp(-h2/(a*range*range))) + nugget;
++
++	//if(h2>1000*1000) printf("gamma = %g h= %g\n",gamma,sqrt(h2));
++	printf("h = %g gamma = %g\n",sqrt(h2),gamma);
+ 	return gamma;
+ }
+ /*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp	(revision 12288)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp	(revision 12289)
+@@ -58,6 +58,27 @@
+ /*}}}*/
+ 
+ /*Variogram function*/
++/*FUNCTION SphericalVariogram::Covariance{{{1*/
++double SphericalVariogram::Covariance(double deltax,double deltay){
++	/*The covariance can be deduced from the variogram from the following
++	 * relationship:
++	 *    2 gamma = C(x,x) + C(y,y) -2 C(x,y)
++	 * so
++	 *    C(h) = sill - gamma                                            */
++	double h,cova;
++
++	/*Calculate length square*/
++	h=sqrt(pow(deltax,2.)+pow(deltay,2.));
++
++	/*return covariance*/
++	if(h<=range)
++	 cova = (sill-nugget)*(1 - (3*h)/(2*range) + pow(h,3.)/(2*pow(range,3.)) );
++	else
++	 cova = 0.;
++
++	return cova;
++}
++/*}}}*/
+ /*FUNCTION SphericalVariogram::SemiVariogram{{{1*/
+ double SphericalVariogram::SemiVariogram(double deltax,double deltay){
+ 	/*http://en.wikipedia.org/wiki/Variogram*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.h	(revision 12288)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.h	(revision 12289)
+@@ -30,5 +30,6 @@
+ 
+ 		/*Variogram functions*/
+ 		double SemiVariogram(double deltax,double deltay);
++		double Covariance(double deltax,double deltay);
+ };
+ #endif  /* _EXPONENTIALVARIOGRAM_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp	(revision 12288)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp	(revision 12289)
+@@ -59,6 +59,24 @@
+ /*}}}*/
+ 
+ /*Variogram function*/
++/*FUNCTION PowerVariogram::Covariance{{{1*/
++double PowerVariogram::Covariance(double deltax,double deltay){
++	/*The covariance can be deduced from the variogram from the following
++	 * relationship:
++	 *    2 gamma = C(x,x) + C(y,y) -2 C(x,y)
++	 * so
++	 *    C(h) = sill - gamma                                            */
++	double h,cova;
++
++	/*Calculate length square*/
++	h=sqrt(pow(deltax,2.)+pow(deltay,2.));
++
++	/*return covariance*/
++	cova = 9999. - this->slope*pow(h,this->power);
++
++	return cova;
++}
++/*}}}*/
+ /*FUNCTION PowerVariogram::SemiVariogram{{{1*/
+ double PowerVariogram::SemiVariogram(double deltax,double deltay){
+ 	/*http://en.wikipedia.org/wiki/Variogram*/
+@@ -70,6 +88,7 @@
+ 	/*return semi-variogram*/
+ 	gamma = this->nugget + this->slope*pow(h,this->power);
+ 
++	//if(h>1000) printf("gamma = %g h=%g\n",gamma,h);
+ 	return gamma;
+ }
+ /*}}}*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.h	(revision 12288)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.h	(revision 12289)
+@@ -30,5 +30,6 @@
+ 
+ 		/*Variogram functions*/
+ 		double SemiVariogram(double deltax,double deltay);
++		double Covariance(double deltax,double deltay);
+ };
+ #endif  /* _GAUSSIANVARIOGRAM_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.h	(revision 12288)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.h	(revision 12289)
+@@ -30,5 +30,6 @@
+ 
+ 		/*Variogram functions*/
+ 		double SemiVariogram(double deltax,double deltay);
++		double Covariance(double deltax,double deltay);
+ };
+ #endif  /* _SPHERICALVARIOGRAM_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/PowerVariogram.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/PowerVariogram.h	(revision 12288)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/PowerVariogram.h	(revision 12289)
+@@ -30,5 +30,6 @@
+ 
+ 		/*Variogram functions*/
+ 		double SemiVariogram(double deltax,double deltay);
++		double Covariance(double deltax,double deltay);
+ };
+ #endif  /* _POWERVARIOGRAM_H */
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Variogram.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Variogram.h	(revision 12288)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Variogram.h	(revision 12289)
+@@ -12,6 +12,7 @@
+ 	public: 
+ 		virtual ~Variogram(){};
+ 		virtual double SemiVariogram(double deltax,double deltay)=0;
++		virtual double Covariance(double deltax,double deltay)=0;
+ 
+ };
+ #endif
Index: /issm/oecreview/Archive/12281-12300/ISSM-12289-12290.diff
===================================================================
--- /issm/oecreview/Archive/12281-12300/ISSM-12289-12290.diff	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/ISSM-12289-12290.diff	(revision 12325)
@@ -0,0 +1,135 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gslib.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gslib.m	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gslib.m	(revision 12290)
+@@ -0,0 +1,130 @@
++x=[];
++y=[];
++thickness=[];
++for i=1:5,
++	switch(i)
++		case 1, filename='2002_Antarctica_P3chile';
++		case 2, filename='2004_Antarctica_P3chile';
++		case 3, filename='2009_Antarctica_DC8';
++		case 4, filename='2009_Antarctica_TO';
++		case 5, filename='2010_Antarctica_DC8';
++		otherwise, error('not supported');
++	end
++	disp(['Loading ' filename '...']);
++	A=load(filename);
++	[tempx tempy]=ll2xy(A.lat(:),A.lon(:),-1,0,71);
++	x=[x;tempx];
++	y=[y;tempy];
++	thickness=[thickness;A.thickness];
++end
++[xl yl]=basinzoom(pairoptions('basin','Pine Island Glacier'));
++x=x(1:100:end);
++y=y(1:100:end);
++data=thickness(1:100:end);
++
++%Output Matrix
++xmin   = xl(1);
++ymin   = yl(1);
++nx     = 101;
++ny     = 101;
++deltax = 5000;
++deltay = 5000;
++
++%Variogram
++nugget=10;
++sill  =164;
++range =25763;
++
++%Kriging options
++mindata = 1;
++maxdata = 50;
++maxsearchradius = 50000;
++
++%Some intermediaries (Convert to gslib's parameters);
++c = (sill-nugget);
++a = sqrt(3)*range;
++
++
++%Write data file
++fid=fopen('cluster.dat','w');
++fprintf(fid,'%s\n','Data file');
++fprintf(fid,'%i\n',3);
++fprintf(fid,'%s\n','Xlocation');
++fprintf(fid,'%s\n','Ylocation');
++fprintf(fid,'%s\n','Data');
++fprintf(fid,'%g %g %g\n',[x y data]');
++fclose(fid);
++
++if 0, %GAMV
++	%Write parameter file
++	fid=fopen('gamv.par','w');
++	fprintf(fid,'\t\t\t\t%s\n','Parameters for GAMV');
++	fprintf(fid,'\t\t\t\t%s\n','*******************');
++	fprintf(fid,'\n');
++	fprintf(fid,'%s\n','START OF PARAMETERS:');
++	fprintf(fid,'%-30s %s\n','./cluster.dat'              ,'\file with data');
++	fprintf(fid,'%-30s %s\n','1 2 0'                      ,'\columns for X, Y, Z coordinates');
++	fprintf(fid,'%-30s %s\n','1 3  '                      ,'\number of variables, column number');
++	fprintf(fid,'%-30s %s\n','-1.0e21 1.0e21'             ,'\trimming limits');
++	fprintf(fid,'%-30s %s\n','gamv.out'                   ,'\file for variogram output');
++	fprintf(fid,'%-30s %s\n','20'                         ,'\number of lags');
++	fprintf(fid,'%-30s %s\n','5.0'                        ,'\lag separation distance');
++	fprintf(fid,'%-30s %s\n','3.0'                        ,'\lag tolerance');
++	fprintf(fid,'%-30s %s\n','3'                          ,'\number of directions');
++	fprintf(fid,'%-30s %s\n','0.0 90.0 50.0 0.0 90.0 50.0','\azm, atol, bandh, dip, dtol, bandv');
++	fprintf(fid,'%-30s %s\n','0.0 22.5 25.0 0.0 22.5 25.0','\azm, atol, bandh, dip, dtol, bandv');
++	fprintf(fid,'%-30s %s\n','90. 22.5 25.0 0.0 22.5 25.0','\azm, atol, bandh, dip, dtol, bandv');
++	fprintf(fid,'%-30s %s\n','0'                          ,'\standardize sill? (0=no, 1=yes)');
++	fprintf(fid,'%-30s %s\n','2'                          ,'\number of variograms');
++	fprintf(fid,'%-30s %s\n','1 1 1'                      ,'\tail var., head vars., variogram type');
++	fprintf(fid,'%-30s %s\n','1 1 3'                      ,'\tail var., head vars., variogram type');
++	fclose(fid);
++
++	%Call gamv
++	system([issmdir() '/externalpackages/gslib/install/gamv gamv.par']);
++
++else, %Kriging KB2D
++	%Write parameter file
++	fid=fopen('kb2d.par','w');
++	fprintf(fid,'\t\t\t\t%s\n','Parameters for KB2D');
++	fprintf(fid,'\t\t\t\t%s\n','*******************');
++	fprintf(fid,'\n');
++	fprintf(fid,'%s\n','START OF PARAMETERS:');
++	fprintf(fid,'%-30s %s\n','./cluster.dat'                  ,'\file with data');
++	fprintf(fid,'%-30s %s\n','1 2 3'                          ,'\columns for X, Y and variable');
++	fprintf(fid,'%-30s %s\n','-1.0e21 1.0e21'                 ,'\trimming limits');
++	fprintf(fid,'%-30s %s\n','0'                              ,'\debugging level: 0,1,2,3');
++	fprintf(fid,'%-30s %s\n','kb2d.dbg'                       ,'\file for debuggging output');
++	fprintf(fid,'%-30s %s\n','kb2d.out'                       ,'\file for kriged output');
++	fprintf(fid,'%-30s %s\n',num2str([nx xmin deltax],'%i %10g %6g')  ,'\nx, xmn, xsiz');
++	fprintf(fid,'%-30s %s\n',num2str([ny ymin deltay],'%i %10g %6g')  ,'\nx, xmn, xsiz');
++	fprintf(fid,'%-30s %s\n','1 1'                            ,'\x and y block discretization');
++	fprintf(fid,'%-30s %s\n',num2str([mindata maxdata],'%6g') ,'\min and max data for kriging');
++	fprintf(fid,'%-30s %s\n',num2str(maxsearchradius,'%6g')   ,'\max search radius');
++	fprintf(fid,'%-30s %s\n','1 2.302'                        ,'\0=SK, 1=OK, (mean if SK)');
++	fprintf(fid,'%-30s %s\n',['1 ' num2str(nugget)]           ,'\nst, nugget effect');
++	fprintf(fid,'%-30s %s\n',['3 ' num2str([c 0.0 a a],'%10g')],'\it, c, azm, a_max, a_min');
++	fclose(fid);
++
++	tic;system([issmdir() '/externalpackages/gslib/install/kb2d kb2d.par']);toc;
++
++	%Read output
++	fid=fopen('kb2d.out','r');
++	while (~feof(fid)),
++		A=fscanf(fid,'%s',1);
++		if strcmp(A,'KB2D');
++			A=fscanf(fid,'%s',1); %Read output
++			params=fscanf(fid,'%i %i %i %i %g %g %g %g %g %g %1',[11 1]);
++		elseif strcmp(A,' Estimate'),
++			continue;
++		elseif strcmp(A,'Estimation'),
++			A=fscanf(fid,'%s',1); %Read Variance
++			A=fscanf(fid,'%g %g',[params(1) params(2)*params(3)]);
++			B=A(1,:); B=reshape(B,[params(2),params(3)]);
++			E=A(2,:); E=reshape(E,[params(2),params(3)]);
++		else
++			%do nothing
++		end
++	end
++	fclose(fid);
++end
Index: /issm/oecreview/Archive/12281-12300/ISSM-12290-12291.diff
===================================================================
--- /issm/oecreview/Archive/12281-12300/ISSM-12290-12291.diff	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/ISSM-12290-12291.diff	(revision 12325)
@@ -0,0 +1,15 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gslib.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gslib.m	(revision 12290)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gslib.m	(revision 12291)
+@@ -120,8 +120,8 @@
+ 		elseif strcmp(A,'Estimation'),
+ 			A=fscanf(fid,'%s',1); %Read Variance
+ 			A=fscanf(fid,'%g %g',[params(1) params(2)*params(3)]);
+-			B=A(1,:); B=reshape(B,[params(2),params(3)]);
+-			E=A(2,:); E=reshape(E,[params(2),params(3)]);
++			B=A(1,:); B=reshape(B,[params(3),params(2)])';
++			E=A(2,:); E=reshape(E,[params(3),params(2)])';
+ 		else
+ 			%do nothing
+ 		end
Index: /issm/oecreview/Archive/12281-12300/ISSM-12291-12292.diff
===================================================================
--- /issm/oecreview/Archive/12281-12300/ISSM-12291-12292.diff	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/ISSM-12291-12292.diff	(revision 12325)
@@ -0,0 +1,379 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.h	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.h	(revision 12292)
+@@ -21,6 +21,8 @@
+ 		Option* GetOption(const char* name);
+ 		void Get(double*  pvalue,const char* name);
+ 		void Get(double*  pvalue,const char* name,double default_value);
++		void Get(int*  pvalue,const char* name);
++		void Get(int*  pvalue,const char* name,int default_value);
+ 		void Get(bool*    pvalue,const char* name);
+ 		void Get(bool*    pvalue,const char* name,bool default_value);
+ 		void Get(char**   pvalue,const char* name);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12292)
+@@ -93,49 +93,73 @@
+ 
+ /*Methods*/
+ /*FUNCTION Observations::ObservationList{{{*/
+-void Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double range){
++void Observations::ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double radius,int maxdata){
+ 
+ 	/*Output and Intermediaries*/
+-	int          nobs,i,index;
++	bool         stop;
++	int          nobs,i,j,k,n,counter;
++	double       h2,radius2;
++	int         *indices      = NULL;
++	double      *dists        = NULL;
+ 	double      *x            = NULL;
+ 	double      *y            = NULL;
+ 	double      *obs          = NULL;
+ 	Observation *observation  = NULL;
+-	int         *indices      = NULL;
+ 
+-	/*Treat range*/
+-	if(range==0){
+-		range=this->quadtree->root->length;
+-	}
++	/*Compute radius square*/
++	if(radius==0) radius=this->quadtree->root->length;
++	radius2 = radius*radius;
+ 
+-	/*Find all observations that are in range*/
+-	nobs=0;
+-	while(nobs==0){
+-		xfree((void**)&indices);
+-		this->quadtree->RangeSearch(&indices,&nobs,x_interp,y_interp,range);
+-		if(!nobs){
+-			/*No observation found, double range*/
+-			range=2*range;
++	/*Find all observations that are in radius*/
++	indices = (int*)xmalloc(this->Size()*sizeof(int));
++	dists   = (double*)xmalloc(this->Size()*sizeof(double));
++	nobs    = 0;
++
++	for (i=0;i<this->Size();i++){
++		observation=(Observation*)this->GetObjectByOffset(i);
++		h2 = (observation->x-x_interp)*(observation->x-x_interp) + (observation->y-y_interp)*(observation->y-y_interp);
++
++		if(nobs==maxdata && h2>radius2) continue;
++		if(nobs<=maxdata){
++			indices[nobs]   = i;
++			dists[nobs]     = h2;
++			nobs++;
+ 		}
+-	}
+-	/*Check that we do not have more than 50 observations*/
+-	//while(nobs>50){
+-	//	range=range/2;
+-	//	xfree((void**)&indices);
+-	//	this->quadtree->RangeSearch(&indices,&nobs,x_interp,y_interp,range);
+-	//}
++		if(nobs==1) continue;
+ 
+-	if(!nobs) _error_("Unexpected error: no observation within current range and more than 50 observations if doubling range");
++		/*Sort all dists up to now*/
++		n=nobs-1;
++		stop = false;
++		for(k=0;k<n-1;k++){
++			if(h2<dists[k]){
++				counter=1;
++				for(int jj=k;jj<n;jj++){
++					j  = n-counter;
++					dists[j+1]   = dists[j];
++					indices[j+1] = indices[j];
++					counter++;
++				}
++				dists[k]   = h2;
++				indices[k] = i;
++				stop = true;
++				break;
++			}
++			if(stop) break;
++		}
++	}  
++	xfree((void**)&dists);
+ 
+-	/*Allocate vectors*/
+-	x   = (double*)xmalloc(nobs*sizeof(double));
+-	y   = (double*)xmalloc(nobs*sizeof(double));
+-	obs = (double*)xmalloc(nobs*sizeof(double));
++	if(nobs){
++		/*Allocate vectors*/
++		x   = (double*)xmalloc(nobs*sizeof(double));
++		y   = (double*)xmalloc(nobs*sizeof(double));
++		obs = (double*)xmalloc(nobs*sizeof(double));
+ 
+-	/*Loop over all observations and fill in x, y and obs*/
+-	for (i=0;i<nobs;i++){
+-		observation=(Observation*)this->GetObjectByOffset(indices[i]);
+-		observation->WriteXYObs(&x[i],&y[i],&obs[i]);
++		/*Loop over all observations and fill in x, y and obs*/
++		for (i=0;i<nobs;i++){
++			observation=(Observation*)this->GetObjectByOffset(indices[i]);
++			observation->WriteXYObs(&x[i],&y[i],&obs[i]);
++		}
+ 	}
+ 
+ 	/*Assign output pointer*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.h	(revision 12292)
+@@ -22,7 +22,7 @@
+ 		~Observations();
+ 
+ 		/*Methods*/
+-		void ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double range);
++		void ObservationList(double **px,double **py,double **pobs,int* pnobs,double x_interp,double y_interp,double radius,int maxdata);
+ 		void QuadtreeColoring(double* A,double *x,double *y,int n);
+ 		void Variomap(double* gamma,double *x,int n);
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.cpp	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.cpp	(revision 12292)
+@@ -66,6 +66,44 @@
+ 	return 1;
+ }
+ /*}}}*/
++/*FUNCTION Options::Get(int* pvalue, char* name){{{1*/
++void Options::Get(int* pvalue,const char* name){
++
++	vector<Object*>::iterator object;
++	Option* option=NULL;
++
++	/*Get option*/
++	option=GetOption(name);
++
++	/*If the pointer is not NULL, the option has been found*/
++	if(option){
++		option->Get(pvalue);
++	}
++	/*Else, the Option does not exist, no default provided*/
++	else{
++		_error_("option of name \"%s\" not found, and no default value has been provided",name);
++	}
++}
++/*}}}*/
++/*FUNCTION Options::Get(int* pvalue, char* name,int default_value){{{1*/
++void Options::Get(int* pvalue,const char* name,int default_value){
++
++	vector<Object*>::iterator object;
++	Option* option=NULL;
++
++	/*Get option*/
++	option=GetOption(name);
++
++	/*If the pointer is not NULL, the option has been found*/
++	if(option){
++		option->Get(pvalue);
++	}
++	/*Else, the Option does not exist, a default is provided here*/
++	else{
++		*pvalue=default_value;
++	}
++}
++/*}}}*/
+ /*FUNCTION Options::Get(double* pvalue, char* name){{{1*/
+ void Options::Get(double* pvalue,const char* name){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Threads/LaunchThread.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Threads/LaunchThread.cpp	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Threads/LaunchThread.cpp	(revision 12292)
+@@ -66,5 +66,4 @@
+ 	
+ 	function((void*)&handle);
+ 	#endif
+-
+ }
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp	(revision 12292)
+@@ -23,7 +23,8 @@
+ 	double *error       = NULL;
+ 
+ 	/*Intermediaries*/
+-	double        range;
++	int           mindata,maxdata;
++	double        radius;
+ 	char         *output       = NULL;
+ 	Variogram    *variogram    = NULL;
+ 	Observations *observations = NULL;
+@@ -37,7 +38,9 @@
+ 
+ 	/*Get Variogram from Options*/
+ 	ProcessVariogram(&variogram,options);
+-	options->Get(&range,"searchrange",0.);
++	options->Get(&radius,"searchradius",0.);
++	options->Get(&mindata,"mindata",1);
++	options->Get(&maxdata,"maxdata",50);
+ 
+ 	/*Process observation dataset*/
+ 	observations=new Observations(obs_list,obs_x,obs_y,obs_length,options);
+@@ -61,7 +64,9 @@
+ 		gate.n_interp     = n_interp;
+ 		gate.x_interp     = x_interp;
+ 		gate.y_interp     = y_interp;
+-		gate.range        = range;
++		gate.radius       = radius;
++		gate.mindata      = mindata;
++		gate.maxdata      = maxdata;
+ 		gate.variogram    = variogram;
+ 		gate.observations = observations;
+ 		gate.predictions  = predictions;
+@@ -105,7 +110,9 @@
+ 	int           n_interp     = gate->n_interp;
+ 	double       *x_interp     = gate->x_interp;
+ 	double       *y_interp     = gate->y_interp;
+-	double        range        = gate->range;
++	double        radius       = gate->radius;
++	int           mindata      = gate->mindata;
++	int           maxdata      = gate->maxdata;
+ 	Variogram    *variogram    = gate->variogram;
+ 	Observations *observations = gate->observations;
+ 	double       *predictions  = gate->predictions;
+@@ -136,10 +143,10 @@
+ 		printf("\r      interpolation progress: %5.2lf%%",localpercent);
+ 
+ 		/*Get list of observations for current point*/
+-		observations->ObservationList(&x,&y,&obs,&n_obs,x_interp[idx],y_interp[idx],range);
+-		if(n_obs==0){
+-			predictions[idx] = -999.; 
+-			error[idx]       = -999.; 
++		observations->ObservationList(&x,&y,&obs,&n_obs,x_interp[idx],y_interp[idx],radius,maxdata);
++		if(n_obs<mindata){
++			predictions[idx] = -999.0; 
++			error[idx]       = -999.0; 
+ 			continue;
+ 		}
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/Krigingx/Krigingx.h	(revision 12292)
+@@ -20,7 +20,9 @@
+ 	int           n_interp;
+ 	double       *x_interp;
+ 	double       *y_interp;
+-	double        range;
++	double        radius;
++	int           mindata;
++	int           maxdata;
+ 	Variogram    *variogram;
+ 	Observations *observations;
+ 	double       *predictions;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionStruct.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionStruct.h	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionStruct.h	(revision 12292)
+@@ -38,6 +38,7 @@
+ 		int   NumEl();
+ 		int   NDims();
+ 		int*  Size();
++		void  Get(int* pvalue){_error_("An OptionStruct object cannot return a int");};
+ 		void  Get(double* pvalue){_error_("An OptionStruct object cannot return a double");};
+ 		void  Get(bool* pvalue){  _error_("An OptionStruct object cannot return a bool");};
+ 		void  Get(char** pvalue){ _error_("An OptionStruct object cannot return a string");};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionDouble.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionDouble.cpp	(revision 12292)
+@@ -119,6 +119,18 @@
+ 	return(Option::Size());
+ }
+ /*}}}*/
++/*FUNCTION OptionDouble::Get(int* pvalue) {{{1*/
++void OptionDouble::Get(int* pvalue){
++
++	/*We should first check that the size is one*/
++	if(this->NumEl()!=1){
++		_error_("option \"%s\" has %i elements and cannot return a single int",this->name,this->NumEl());
++	}
++
++	/*Assign output pointer*/
++	*pvalue=(int)this->values[0];
++}
++/*}}}*/
+ /*FUNCTION OptionDouble::Get(double* pvalue) {{{1*/
+ void OptionDouble::Get(double* pvalue){
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionDouble.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionDouble.h	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionDouble.h	(revision 12292)
+@@ -38,6 +38,7 @@
+ 		int   NumEl();
+ 		int   NDims();
+ 		int*  Size();
++		void  Get(int* pvalue);
+ 		void  Get(double* pvalue);
+ 		void  Get(bool* pvalue){  _error_("An OptionDouble object cannot return a bool");};
+ 		void  Get(char** pvalue){ _error_("An OptionDouble object cannot return a string");};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionLogical.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionLogical.h	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionLogical.h	(revision 12292)
+@@ -38,6 +38,7 @@
+ 		int   NumEl();
+ 		int   NDims();
+ 		int*  Size();
++		void  Get(int* pvalue){_error_("An OptionLogical object cannot return a int");};
+ 		void  Get(double* pvalue){_error_("An OptionLogical object cannot return a double");};
+ 		void  Get(bool* pvalue);
+ 		void  Get(char** pvalue){ _error_("An OptionLogical object cannot return a string");};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionChar.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionChar.h	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionChar.h	(revision 12292)
+@@ -38,6 +38,7 @@
+ 		int   NumEl();
+ 		int   NDims();
+ 		int*  Size();
++		void  Get(int* pvalue){_error_("An OptionChar object cannot return a int");};
+ 		void  Get(double* pvalue){_error_("An OptionChar object cannot return a double");};
+ 		void  Get(bool* pvalue){  _error_("An OptionChar object cannot return a bool");};
+ 		void  Get(char** pvalue);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/Option.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/Option.h	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/Option.h	(revision 12292)
+@@ -41,6 +41,7 @@
+ 		virtual int   NumEl()=0;
+ 		virtual int   NDims()=0;
+ 		virtual int*  Size()=0;
++		virtual void  Get(int* pvalue)=0;
+ 		virtual void  Get(double* pvalue)=0;
+ 		virtual void  Get(bool* pvalue)=0;
+ 		virtual void  Get(char** pvalue)=0;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionCell.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionCell.h	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Options/OptionCell.h	(revision 12292)
+@@ -38,6 +38,7 @@
+ 		int   NumEl();
+ 		int   NDims();
+ 		int*  Size();
++		void  Get(int* pvalue){_error_("An OptionCell object cannot return a int");};
+ 		void  Get(double* pvalue){_error_("An OptionCell object cannot return a double");};
+ 		void  Get(bool* pvalue){  _error_("An OptionCell object cannot return a bool");};
+ 		void  Get(char** pvalue){ _error_("An OptionCell object cannot return a string");};
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12291)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp	(revision 12292)
+@@ -74,7 +74,7 @@
+ 	a     = 1./3.;
+ 	cova = (sill-nugget)*exp(-h2/(a*range*range));
+ 
+-	//if(h2<0.0000001) cova = sill;
++	if(h2<0.0000001) cova = sill;
+ 
+ 	return cova;
+ }
Index: /issm/oecreview/Archive/12281-12300/ISSM-12297-12298.diff
===================================================================
--- /issm/oecreview/Archive/12281-12300/ISSM-12297-12298.diff	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/ISSM-12297-12298.diff	(revision 12325)
@@ -0,0 +1,233 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12297)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Observations.cpp	(revision 12298)
+@@ -35,10 +35,11 @@
+ Observations::Observations(double* observations_list,double* x,double* y,int n,Options* options){
+ 
+ 	/*Intermediaries*/
+-	int          i,maxdepth,level,counter;
++	int          i,j,maxdepth,level,counter,index;
+ 	int          xi,yi;
+ 	double       xmin,xmax,ymin,ymax;
+-	double       offset,minlength;
++	double       offset,minlength,minspacing,mintrimming,maxtrimming;
++	int         *indices     = NULL;
+ 	Observation *observation = NULL;
+ 
+ 	/*Get extrema*/
+@@ -51,6 +52,12 @@
+ 	offset=0.05*(xmax-xmin); xmin-=offset; xmax+=offset;
+ 	offset=0.05*(ymax-ymin); ymin-=offset; ymax+=offset;
+ 
++	/*Get trimming limits*/
++	options->Get(&mintrimming,"mintrimming",-1.e+21);
++	options->Get(&maxtrimming,"maxtrimming",+1.e+21);
++	options->Get(&minspacing,"minspacing",0.01);
++	if(minspacing<=0) _error_("minspacing must > 0");
++
+ 	/*Get Minimum box size*/
+ 	if(options->GetOption("boxlength")){
+ 		options->Get(&minlength,"boxlength");
+@@ -69,6 +76,18 @@
+ 	/*Add observations one by one*/
+ 	counter = 0;
+ 	for(i=0;i<n;i++){
++
++		/*First check limits*/
++		if(observations_list[i]>maxtrimming) continue;
++		if(observations_list[i]<mintrimming) continue;
++
++		/*First check that this observation is not too close from another one*/
++		this->quadtree->ClosestObs(&index,x[i],y[i]);
++		if(index>=0){
++			observation=(Observation*)this->GetObjectByOffset(index);
++			if(pow(observation->x-x[i],2)+pow(observation->y-y[i],2) < minspacing) continue;
++		}
++
+ 		this->quadtree->IntergerCoordinates(&xi,&yi,x[i],y[i]);
+ 		this->quadtree->QuadtreeDepth2(&level,xi,yi);
+ 		if((int)level <= maxdepth){
+@@ -82,6 +101,8 @@
+ 		}
+ 	}
+ 	printf("done\n");
++	printf("Initial number of observations: %i\n",n);
++	printf("  Final number of observations: %i\n",this->quadtree->NbObs);
+ }
+ /*}}}*/
+ /*FUNCTION Observations::~Observations(){{{*/
+@@ -97,9 +118,10 @@
+ 
+ 	/*Output and Intermediaries*/
+ 	bool         stop;
+-	int          nobs,i,j,k,n,counter;
++	int          nobs,tempnobs,i,j,k,n,counter;
+ 	double       h2,radius2;
+ 	int         *indices      = NULL;
++	int         *tempindices  = NULL;
+ 	double      *dists        = NULL;
+ 	double      *x            = NULL;
+ 	double      *y            = NULL;
+@@ -111,17 +133,19 @@
+ 	radius2 = radius*radius;
+ 
+ 	/*Find all observations that are in radius*/
+-	indices = (int*)xmalloc(this->Size()*sizeof(int));
+-	dists   = (double*)xmalloc(this->Size()*sizeof(double));
+-	nobs    = 0;
+-
+-	for (i=0;i<this->Size();i++){
+-		observation=(Observation*)this->GetObjectByOffset(i);
++	this->quadtree->RangeSearch(&tempindices,&tempnobs,x_interp,y_interp,radius);
++	if(tempnobs){
++		indices = (int*)xmalloc(tempnobs*sizeof(int));
++		dists   = (double*)xmalloc(tempnobs*sizeof(double));
++	}
++	nobs = 0;
++	for (i=0;i<tempnobs;i++){
++		observation=(Observation*)this->GetObjectByOffset(tempindices[i]);
+ 		h2 = (observation->x-x_interp)*(observation->x-x_interp) + (observation->y-y_interp)*(observation->y-y_interp);
+ 
+ 		if(nobs==maxdata && h2>radius2) continue;
+ 		if(nobs<=maxdata){
+-			indices[nobs]   = i;
++			indices[nobs]   = tempindices[i];
+ 			dists[nobs]     = h2;
+ 			nobs++;
+ 		}
+@@ -140,7 +164,7 @@
+ 					counter++;
+ 				}
+ 				dists[k]   = h2;
+-				indices[k] = i;
++				indices[k] = tempindices[i];
+ 				stop = true;
+ 				break;
+ 			}
+@@ -148,6 +172,7 @@
+ 		}
+ 	}  
+ 	xfree((void**)&dists);
++	xfree((void**)&tempindices);
+ 
+ 	if(nobs){
+ 		/*Allocate vectors*/
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12297)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.h	(revision 12298)
+@@ -33,9 +33,9 @@
+ 				Object *copy()      {_error_("not implemented yet"); };
+ 
+ 				/*Methods*/
+-				int IsWithinRange(double x,double y,double range);
+-				void RangeSearch(int* indices,int *pnobs,double x,double y,double range);
+-				void WriteObservations(int* indices,int *pnobs);
++				int          IsWithinRange(double  x,double y,double range);
++				void         RangeSearch(int *indices,int *pnobs,double x,double y,double range);
++				void         WriteObservations(int *indices,int *pnobs);
+ 
+ 		};
+ 
+@@ -53,6 +53,7 @@
+ 		~Quadtree();
+ 		void         Add(Observation *observation);
+ 		void         AddAndAverage(double x,double y,double value);
++		void         ClosestObs(int *pindex,double x,double y);
+ 		void         DeepEcho(void);
+ 		void         Echo(void);
+ 		void         IntergerCoordinates(int *xi,int *yi,double x,double y);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12297)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp	(revision 12298)
+@@ -249,6 +249,49 @@
+ 		_error_("Box is not full");
+ 	}
+ }/*}}}*/
++/*FUNCTION Quadtree::ClosestObs{{{1*/
++void Quadtree::ClosestObs(int *pindex,double x,double y){
++
++	QuadtreeBox **pbox = NULL;
++	QuadtreeBox  *box  = NULL;
++	int           xi,yi;
++	int           level,levelbin;
++	int           index = -1;
++	double        length,length2;
++
++	/*Get integer coodinates*/
++	this->IntergerCoordinates(&xi,&yi,x,y);
++
++	/*Initialize levels*/
++	level    = 0;
++	levelbin = (1L<<this->MaxDepth);// = 2^30
++
++	/*Get inital box (the largest)*/
++	pbox=&root;
++
++	/*Find the smallest box where this point is located*/
++	while((box=*pbox) && (box->nbitems<0)){ 
++
++		levelbin>>=1; level+=1; 
++
++		pbox = &box->box[IJ(xi,yi,levelbin)];
++	}
++
++	/*Add obervation in this box (should be full)*/
++	if(box && box->nbitems>0){
++		index  = box->obs[0]->index;
++		length = pow(box->obs[0]->x - x,2.) + pow(box->obs[0]->y - y,2.);
++		for(int i=1;i<box->nbitems;i++){
++			length2 = pow(box->obs[i]->x - x,2.) + pow(box->obs[i]->y - y,2.);
++			if(length2<length){
++				index  = box->obs[i]->index;
++				length = length2;
++			}
++		}
++	}
++
++	*pindex=index;
++}/*}}}*/
+ /*FUNCTION Quadtree::Echo{{{1*/
+ void  Quadtree::Echo(void){
+ 
+@@ -452,10 +495,10 @@
+ 	int *indices = NULL;
+ 
+ 	/*Allocate indices (maximum by default*/
+-	indices = (int*)xmalloc(this->NbObs*sizeof(int));
++	if(this->NbObs) indices = (int*)xmalloc(this->NbObs*sizeof(int));
+ 	nobs = 0;
+ 
+-	this->root->RangeSearch(indices,&nobs,x,y,range);
++	if(this->root) this->root->RangeSearch(indices,&nobs,x,y,range);
+ 
+ 	/*Clean-up and return*/
+ 	*pnobs=nobs;
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12297)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 12298)
+@@ -54,6 +54,20 @@
+ 
+ void KrigingUsage(void){
+ 	_printf_(true,"\n");
+-	_printf_(true,"   usage: predictions=%s(x,y,observations,x_interp,y_interp);\n",__FUNCT__);
++	_printf_(true,"   usage: predictions=%s(x,y,observations,x_interp,y_interp,'options');\n",__FUNCT__);
++	_printf_(true,"   available options:\n");
++	_printf_(true,"      -'model': Available variogram models 'gaussian' (default),'spherical','power','exponential'\n");
++	_printf_(true,"         -'nugget': nugget effect (default 0.2)\n");
++	_printf_(true,"         -'range':  for gaussian, spherical and exponential models (default sqrt(3))\n");
++	_printf_(true,"         -'sill':   for gaussian, spherical and exponential models (default 1)\n");
++	_printf_(true,"         -'slope':  for power model (default 1)\n");
++	_printf_(true,"         -'power':  for power model (default 1)\n");
++	_printf_(true,"      -'searchradius': search radius for each prediction (default is observations span)\n");
++	_printf_(true,"      -'boxlength':    minimum length of quadtree boxes (useful to decrease the number of observations)\n");
++	_printf_(true,"      -'maxdata':      minimum number of observations for a prediction (default is 50)\n");
++	_printf_(true,"      -'mindata':      maximum number of observations for a prediction (default is 1)\n");
++	_printf_(true,"      -'maxtrimming':  maximum trimming value (default is -1.e+21)\n");
++	_printf_(true,"      -'mintrimming':  minimum trimming value (default is +1.e+21)\n");
++	_printf_(true,"      -'minspacing':   minimum distance between observation (default is 0.01)\n");
+ 	_printf_(true,"\n");
+ }
Index: /issm/oecreview/Archive/12281-12300/ISSM-DocReview-12281-12300.tex
===================================================================
--- /issm/oecreview/Archive/12281-12300/ISSM-DocReview-12281-12300.tex	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/ISSM-DocReview-12281-12300.tex	(revision 12325)
@@ -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/12281-12300/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12281-12300/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12281-12300
Index: /issm/oecreview/Archive/12281-12300/Makefile
===================================================================
--- /issm/oecreview/Archive/12281-12300/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12281-12300
+
+
+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/12281-12300/log.tex
===================================================================
--- /issm/oecreview/Archive/12281-12300/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/log.tex	(revision 12325)
@@ -0,0 +1,17 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12281-12282.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/marshall.m \\ Export determination: 6. \\Rationale: typo
+M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp minor: better deal with nobs=0 \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12282-12283.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp \\ Export determination: 6. \\Rationale: minor: better deal with nobs=0 \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12286-12287.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/gslib A /issm/trunk-jpl/externalpackages/gslib/install.sh \\ Export determination: 6. \\Rationale: Added gslib \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12287-12288.diff: \\ Function name: \\A /issm/trunk-jpl/externalpackages/gslib A /issm/trunk-jpl/externalpackages/gslib/install.sh \\ Export determination: 6. \\Rationale: Added gslib
+M /issm/trunk-jpl/externalpackages/gslib/install.sh minor \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12288-12289.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/gslib/install.sh \\ Export determination: 6. \\Rationale: minor
+M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.h M /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.h M /issm/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/PowerVariogram.h M /issm/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.h M /issm/trunk-jpl/src/c/objects/Kriging/Variogram.h D /issm/trunk-jpl/src/c/shared/Sorting/Quicksort.c M /issm/trunk-jpl/src/c/shared/Sorting/binary\_search.cpp M /issm/trunk-jpl/src/c/shared/Sorting/sorting.h Added Covariance for Kriging calculation (similar to gslib) \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12289-12290.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/ExponentialVariogram.h M /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.h M /issm/trunk-jpl/src/c/objects/Kriging/PowerVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/PowerVariogram.h M /issm/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.cpp M /issm/trunk-jpl/src/c/objects/Kriging/SphericalVariogram.h M /issm/trunk-jpl/src/c/objects/Kriging/Variogram.h D /issm/trunk-jpl/src/c/shared/Sorting/Quicksort.c M /issm/trunk-jpl/src/c/shared/Sorting/binary\_search.cpp M /issm/trunk-jpl/src/c/shared/Sorting/sorting.h \\ Export determination: 6. \\Rationale: Added Covariance for Kriging calculation (similar to gslib)
+A /issm/trunk-jpl/src/m/utils/DataProcessing/gslib.m Added gslib routine to call gslib from matlab \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12290-12291.diff: \\ Function name: \\A /issm/trunk-jpl/src/m/utils/DataProcessing/gslib.m \\ Export determination: 6. \\Rationale: Added gslib routine to call gslib from matlab
+M /issm/trunk-jpl/src/m/utils/DataProcessing/gslib.m minor \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12291-12292.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/utils/DataProcessing/gslib.m \\ Export determination: 6. \\Rationale: minor
+M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Observations.h M /issm/trunk-jpl/src/c/Container/Options.cpp M /issm/trunk-jpl/src/c/Container/Options.h M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h M /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp M /issm/trunk-jpl/src/c/objects/Options/Option.h M /issm/trunk-jpl/src/c/objects/Options/OptionCell.h M /issm/trunk-jpl/src/c/objects/Options/OptionChar.h M /issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionDouble.h M /issm/trunk-jpl/src/c/objects/Options/OptionLogical.h M /issm/trunk-jpl/src/c/objects/Options/OptionStruct.h M /issm/trunk-jpl/src/c/shared/Threads/LaunchThread.cpp Added mindata and maxdata options to Kriging \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12292-12293.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/Container/Observations.h M /issm/trunk-jpl/src/c/Container/Options.cpp M /issm/trunk-jpl/src/c/Container/Options.h M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.cpp M /issm/trunk-jpl/src/c/modules/Krigingx/Krigingx.h M /issm/trunk-jpl/src/c/objects/Kriging/GaussianVariogram.cpp M /issm/trunk-jpl/src/c/objects/Options/Option.h M /issm/trunk-jpl/src/c/objects/Options/OptionCell.h M /issm/trunk-jpl/src/c/objects/Options/OptionChar.h M /issm/trunk-jpl/src/c/objects/Options/OptionDouble.cpp M /issm/trunk-jpl/src/c/objects/Options/OptionDouble.h M /issm/trunk-jpl/src/c/objects/Options/OptionLogical.h M /issm/trunk-jpl/src/c/objects/Options/OptionStruct.h M /issm/trunk-jpl/src/c/shared/Threads/LaunchThread.cpp \\ Export determination: 6. \\Rationale: Added mindata and maxdata options to Kriging \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12297-12298.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h M /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp \\ Export determination: 6. \\Rationale: Added many options to Kriging now equivalent to gslib \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12298-12299.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Observations.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.cpp M /issm/trunk-jpl/src/c/objects/Kriging/Quadtree.h M /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp \\ Export determination: 6. \\Rationale: Added many options to Kriging now equivalent to gslib \\\\
Index: /issm/oecreview/Archive/12281-12300/r1.tex
===================================================================
--- /issm/oecreview/Archive/12281-12300/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12281
Index: /issm/oecreview/Archive/12281-12300/r2.tex
===================================================================
--- /issm/oecreview/Archive/12281-12300/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12281-12300/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12300
Index: /issm/oecreview/Archive/12301-12308/Date.tex
===================================================================
--- /issm/oecreview/Archive/12301-12308/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12301-12308/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12301-12308/ISSM-12301-12302.diff
===================================================================
--- /issm/oecreview/Archive/12301-12308/ISSM-12301-12302.diff	(revision 12325)
+++ /issm/oecreview/Archive/12301-12308/ISSM-12301-12302.diff	(revision 12325)
@@ -0,0 +1,159 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/varmap.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/varmap.m	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/varmap.m	(revision 12302)
+@@ -0,0 +1,55 @@
++function output = varmap(x,y,data,varargin);
++%VARMAP - use gslib for Kriging
++%
++%   Usage:
++%      output = varmap(x,y,data,varargin)
++
++options=pairoptions(varargin{:});
++
++nxlag = getfieldvalue(options,'nxlag', 20);
++nylag = getfieldvalue(options,'nylag', 20);
++dxlag = getfieldvalue(options,'dxlag', 1000);
++dylag = getfieldvalue(options,'dylag', 1000);
++
++%Write data file
++fid=fopen('cluster.dat','w');
++fprintf(fid,'%s\n','Data file');
++fprintf(fid,'%i\n',3);
++fprintf(fid,'%s\n','Xlocation');
++fprintf(fid,'%s\n','Ylocation');
++fprintf(fid,'%s\n','Data');
++fprintf(fid,'%g %g %g\n',[x y data]');
++fclose(fid);
++
++%Write parameter file
++fid=fopen('varmap.par','w');
++fprintf(fid,'\t\t\t\t%s\n','Parameters for GAMV');
++fprintf(fid,'\t\t\t\t%s\n','*******************');
++fprintf(fid,'\n');
++fprintf(fid,'%s\n','START OF PARAMETERS:');
++fprintf(fid,'%-30s %s\n','./cluster.dat'              ,'\file with data');
++fprintf(fid,'%-30s %s\n','1 3  '                      ,'\number of variables, column number');
++fprintf(fid,'%-30s %s\n','-1.0e21 1.0e21'             ,'\trimming limits');
++fprintf(fid,'%-30s %s\n','0    '                      ,'\1=regular grid, 0=scattered values');
++fprintf(fid,'%-30s %s\n','50 50 1'                    ,'\if =1: nx, ny, nz');
++fprintf(fid,'%-30s %s\n','1.0 1.0 1.0'                ,'\       xsiz, ysiz, zsiz if igrid=1');
++fprintf(fid,'%-30s %s\n','1 2 0'                      ,'\if =0: columns for x, y and z coordinates');
++fprintf(fid,'%-30s %s\n','varmap.out'                 ,'\file for variogram output');
++fprintf(fid,'%-30s %s\n',num2str([nxlag nylag 0],'%i '),'\nxlag, nylag, nzlag');
++fprintf(fid,'%-30s %s\n',num2str([dxlag dylag 1],'%g %g %i'),'\dxlag, dylag, dzlag');
++fprintf(fid,'%-30s %s\n','5'                          ,'\minimum number of pairs');
++fprintf(fid,'%-30s %s\n','0'                          ,'\standardize sill? (0=no, 1=yes)');
++fprintf(fid,'%-30s %s\n','1'                          ,'\number of variograms');
++fprintf(fid,'%-30s %s\n','1 1 1'                      ,'\tail, head, variogram type');
++fclose(fid);
++
++%Call varmap
++system([issmdir() '/externalpackages/gslib/install/varmap varmap.par']);
++delete('varmap.par');
++
++%Read output
++fid=fopen('varmap.out','r');
++A = textscan(fid,'%f %f %f %f %f %f','headerlines',8);
++fclose(fid);
++delete('varmap.out')
++output = reshape(A{1},[2*nxlag+1 2*nylag+1]);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gamv.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gamv.m	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gamv.m	(revision 12302)
+@@ -0,0 +1,42 @@
++function output = gamv(x,y,data,varargin);
++%GAMV - use gslib for Kriging
++%
++%   Usage:
++%      output = gamv(x,y,data,varargin)
++
++%Write data file
++fid=fopen('cluster.dat','w');
++fprintf(fid,'%s\n','Data file');
++fprintf(fid,'%i\n',3);
++fprintf(fid,'%s\n','Xlocation');
++fprintf(fid,'%s\n','Ylocation');
++fprintf(fid,'%s\n','Data');
++fprintf(fid,'%g %g %g\n',[x y data]');
++fclose(fid);
++
++%Write parameter file
++fid=fopen('gamv.par','w');
++fprintf(fid,'\t\t\t\t%s\n','Parameters for GAMV');
++fprintf(fid,'\t\t\t\t%s\n','*******************');
++fprintf(fid,'\n');
++fprintf(fid,'%s\n','START OF PARAMETERS:');
++fprintf(fid,'%-30s %s\n','./cluster.dat'              ,'\file with data');
++fprintf(fid,'%-30s %s\n','1 2 0'                      ,'\columns for X, Y, Z coordinates');
++fprintf(fid,'%-30s %s\n','1 3  '                      ,'\number of variables, column number');
++fprintf(fid,'%-30s %s\n','-1.0e21 1.0e21'             ,'\trimming limits');
++fprintf(fid,'%-30s %s\n','gamv.out'                   ,'\file for variogram output');
++fprintf(fid,'%-30s %s\n','20'                         ,'\number of lags');
++fprintf(fid,'%-30s %s\n','5.0'                        ,'\lag separation distance');
++fprintf(fid,'%-30s %s\n','3.0'                        ,'\lag tolerance');
++fprintf(fid,'%-30s %s\n','3'                          ,'\number of directions');
++fprintf(fid,'%-30s %s\n','0.0 90.0 50.0 0.0 90.0 50.0','\azm, atol, bandh, dip, dtol, bandv');
++fprintf(fid,'%-30s %s\n','0.0 22.5 25.0 0.0 22.5 25.0','\azm, atol, bandh, dip, dtol, bandv');
++fprintf(fid,'%-30s %s\n','90. 22.5 25.0 0.0 22.5 25.0','\azm, atol, bandh, dip, dtol, bandv');
++fprintf(fid,'%-30s %s\n','0'                          ,'\standardize sill? (0=no, 1=yes)');
++fprintf(fid,'%-30s %s\n','2'                          ,'\number of variograms');
++fprintf(fid,'%-30s %s\n','1 1 1'                      ,'\tail var., head vars., variogram type');
++fprintf(fid,'%-30s %s\n','1 1 3'                      ,'\tail var., head vars., variogram type');
++fclose(fid);
++
++%Call gamv
++system([issmdir() '/externalpackages/gslib/install/gamv gamv.par']);
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gslib.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gslib.m	(revision 12301)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gslib.m	(revision 12302)
+@@ -1,26 +1,8 @@
+-x=[];
+-y=[];
+-thickness=[];
+-for i=1:5,
+-	switch(i)
+-		case 1, filename='2002_Antarctica_P3chile';
+-		case 2, filename='2004_Antarctica_P3chile';
+-		case 3, filename='2009_Antarctica_DC8';
+-		case 4, filename='2009_Antarctica_TO';
+-		case 5, filename='2010_Antarctica_DC8';
+-		otherwise, error('not supported');
+-	end
+-	disp(['Loading ' filename '...']);
+-	A=load(filename);
+-	[tempx tempy]=ll2xy(A.lat(:),A.lon(:),-1,0,71);
+-	x=[x;tempx];
+-	y=[y;tempy];
+-	thickness=[thickness;A.thickness];
+-end
+-[xl yl]=basinzoom(pairoptions('basin','Pine Island Glacier'));
+-x=x(1:100:end);
+-y=y(1:100:end);
+-data=thickness(1:100:end);
++function output = gslib(x,y,data,varargin);
++%GSLIB - use gslib for Kriging
++%
++%   Usage:
++%      output = gslib(x,y,data,varargin)
+ 
+ %Output Matrix
+ xmin   = xl(1);
+@@ -44,7 +26,6 @@
+ c = (sill-nugget);
+ a = sqrt(3)*range;
+ 
+-
+ %Write data file
+ fid=fopen('cluster.dat','w');
+ fprintf(fid,'%s\n','Data file');
+@@ -107,6 +88,7 @@
+ 	fclose(fid);
+ 
+ 	tic;system([issmdir() '/externalpackages/gslib/install/kb2d kb2d.par']);toc;
++	delete('kb2d.par');
+ 
+ 	%Read output
+ 	fid=fopen('kb2d.out','r');
Index: /issm/oecreview/Archive/12301-12308/ISSM-12302-12303.diff
===================================================================
--- /issm/oecreview/Archive/12301-12308/ISSM-12302-12303.diff	(revision 12325)
+++ /issm/oecreview/Archive/12301-12308/ISSM-12302-12303.diff	(revision 12325)
@@ -0,0 +1,56 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gamv.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gamv.m	(revision 12302)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/utils/DataProcessing/gamv.m	(revision 12303)
+@@ -4,6 +4,11 @@
+ %   Usage:
+ %      output = gamv(x,y,data,varargin)
+ 
++options=pairoptions(varargin{:});
++
++nlag = getfieldvalue(options,'nlag', 20);
++dlag = getfieldvalue(options,'dlag', 1000);
++
+ %Write data file
+ fid=fopen('cluster.dat','w');
+ fprintf(fid,'%s\n','Data file');
+@@ -25,9 +30,9 @@
+ fprintf(fid,'%-30s %s\n','1 3  '                      ,'\number of variables, column number');
+ fprintf(fid,'%-30s %s\n','-1.0e21 1.0e21'             ,'\trimming limits');
+ fprintf(fid,'%-30s %s\n','gamv.out'                   ,'\file for variogram output');
+-fprintf(fid,'%-30s %s\n','20'                         ,'\number of lags');
+-fprintf(fid,'%-30s %s\n','5.0'                        ,'\lag separation distance');
+-fprintf(fid,'%-30s %s\n','3.0'                        ,'\lag tolerance');
++fprintf(fid,'%-30s %s\n',num2str(nlag,'%i')           ,'\number of lags');
++fprintf(fid,'%-30s %s\n',num2str(dlag,'%g')           ,'\lag separation distance');
++fprintf(fid,'%-30s %s\n',num2str(dlag/2,'%g')         ,'\lag tolerance');
+ fprintf(fid,'%-30s %s\n','3'                          ,'\number of directions');
+ fprintf(fid,'%-30s %s\n','0.0 90.0 50.0 0.0 90.0 50.0','\azm, atol, bandh, dip, dtol, bandv');
+ fprintf(fid,'%-30s %s\n','0.0 22.5 25.0 0.0 22.5 25.0','\azm, atol, bandh, dip, dtol, bandv');
+@@ -40,3 +45,26 @@
+ 
+ %Call gamv
+ system([issmdir() '/externalpackages/gslib/install/gamv gamv.par']);
++delete('gamv.par');
++
++%Read output
++output   = struct('Semivariogram',[],'Covariance',[]);
++counter1 = 1;
++counter2 = 1;
++fid=fopen('gamv.out','r');
++while (~feof(fid)),
++	A=fscanf(fid,'%s',1);
++	if strcmp(A,'Covariance');
++		A=fscanf(fid,'%s',4); %Read tail:Data head:Data direction  2
++		output(counter1).Covariance=fscanf(fid,'%i %g %g %i %g %g',[6 nlag+2])';
++		counter1=counter1+1;
++	elseif strcmp(A,'Semivariogram'),
++		A=fscanf(fid,'%s',4); %Read tail:Data head:Data direction  2
++		output(counter2).Semivariogram=fscanf(fid,'%i %g %g %i %g %g',[6 nlag+2])';
++		counter2=counter2+1;
++	else
++		%do nothing
++	end
++end
++fclose(fid);
++delete('gamv.out')
Index: /issm/oecreview/Archive/12301-12308/ISSM-12303-12304.diff
===================================================================
--- /issm/oecreview/Archive/12301-12308/ISSM-12303-12304.diff	(revision 12325)
+++ /issm/oecreview/Archive/12301-12308/ISSM-12303-12304.diff	(revision 12325)
@@ -0,0 +1,13 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12303)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/m4/issm_options.m4	(revision 12304)
+@@ -952,7 +952,7 @@
+ 	dnl check that --with-fortran-lib may have been provided
+ 	HAVE_FORTRAN=no
+ 	if test -n "$FORTRAN_LIB" ; then
+-        if test x$FORTRAN_LIB = xno; then
++        if test "x$FORTRAN_LIB" = "xno"; then
+             HAVE_FORTRAN=NO
+         else
+             HAVE_FORTRAN=yes
Index: /issm/oecreview/Archive/12301-12308/ISSM-12304-12305.diff
===================================================================
--- /issm/oecreview/Archive/12301-12308/ISSM-12304-12305.diff	(revision 12325)
+++ /issm/oecreview/Archive/12301-12308/ISSM-12304-12305.diff	(revision 12325)
@@ -0,0 +1,20 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.cpp	(revision 12304)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.cpp	(revision 12305)
+@@ -114,7 +114,14 @@
+ 		}
+ 		else{
+ 			if(record_enum!=MaximumNumberOfEnums){
+-				_error_("Enums in marshalled file are not compatible with compiled code, make sure you are using the same version of ISSM");
++				printf("\n");
++				printf(" Enums in marshalled file are not compatible with compiled code\n");
++				printf("   * If you are running ISSM a remote cluster:\n");
++				printf("     make sure that you are using the same version of ISSM on both machines\n");
++				printf("   * If you are running ISSM on your local machine:\n");
++				printf("     make sure that the all the code is compiled (modules and executables)\n");
++				printf("\n");
++				_error_("Enums not consistent (See error message above)");
+ 			}
+ 		}
+ 	}
Index: /issm/oecreview/Archive/12301-12308/ISSM-12305-12306.diff
===================================================================
--- /issm/oecreview/Archive/12301-12308/ISSM-12305-12306.diff	(revision 12325)
+++ /issm/oecreview/Archive/12301-12308/ISSM-12305-12306.diff	(revision 12325)
@@ -0,0 +1,28 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.cpp	(revision 12305)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/IoModel.cpp	(revision 12306)
+@@ -115,11 +115,18 @@
+ 		else{
+ 			if(record_enum!=MaximumNumberOfEnums){
+ 				printf("\n");
+-				printf(" Enums in marshalled file are not compatible with compiled code\n");
+-				printf("   * If you are running ISSM a remote cluster:\n");
+-				printf("     make sure that you are using the same version of ISSM on both machines\n");
+-				printf("   * If you are running ISSM on your local machine:\n");
+-				printf("     make sure that the all the code is compiled (modules and executables)\n");
++				printf("=========================================================================\n");
++				printf(" Enums in marshalled file are not compatible with compiled code          \n");
++				printf("                                                                         \n");
++				printf("   * If you are running ISSM on a remote cluster:                        \n");
++				printf("     make sure that you are using the same version of ISSM on your local \n");
++				printf("     machine and remote cluster (you might need to run svn update)       \n");
++				printf("   * If you are running ISSM on your local machine:                      \n");
++				printf("     make sure that all the code is compiled (modules and executables)   \n");
++				printf("   * If you are a developer and just added a new Enum:                   \n");
++				printf("     you might need to run ./Synchronize.sh in src/c/EnumDefinitions     \n");
++				printf("     and recompile                                                       \n");
++				printf("=========================================================================\n");
+ 				printf("\n");
+ 				_error_("Enums not consistent (See error message above)");
+ 			}
Index: /issm/oecreview/Archive/12301-12308/ISSM-12306-12307.diff
===================================================================
--- /issm/oecreview/Archive/12301-12308/ISSM-12306-12307.diff	(revision 12325)
+++ /issm/oecreview/Archive/12301-12308/ISSM-12306-12307.diff	(revision 12325)
@@ -0,0 +1,87 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/applyoptions.m
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12306)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/applyoptions.m	(revision 12307)
+@@ -291,7 +291,7 @@
+ 		textcolori=textcolor{i};
+ 		textpositioni=textposition{i};
+ 		textrotationi=textrotation{i};
+-		h=text(textpositioni(1),textpositioni(2),textstringi,'FontSize',textsizei,'FontWeight',textweighti,'Color',textcolori,'Rotation',textrotationi);
++		h=text(textpositioni(1),textpositioni(2),10,textstringi,'FontSize',textsizei,'FontWeight',textweighti,'Color',textcolori,'Rotation',textrotationi);
+ 		set(h,'Clipping','on'); %prevent text from appearing outside of the box
+ 	end
+ end
+@@ -348,6 +348,7 @@
+ end
+ if exist(options,'axispos'),
+ 	Axis=getfieldvalue(options,'axispos');
++	hold on
+ 	set(gca,'pos',Axis);
+ end
+ 
+@@ -413,26 +414,28 @@
+ 	axis equal off
+ 	%box off
+ 	if strcmpi(md.mesh.hemisphere,'n') | strcmpi(md.mesh.hemisphere,'north'),
+-		A=expread([ issmdir() '/projects/Exp/GreenlandBoxFront.exp']);
++		A=expread([ jplsvn() '/projects/Exp/GreenlandBoxFront.exp']);
+ 		[A.x A.y]=ll2xy(A.x,A.y,+1,45,70);
++		A.x = A.x(1:30:end);
++		A.y = A.y(1:30:end);
+ 	elseif strcmpi(md.mesh.hemisphere,'s') | strcmpi(md.mesh.hemisphere,'south'),
+-		A=expread([ issmdir() '/projects/Exp/Antarctica.exp']);
++		A=expread([ jplsvn() '/projects/Exp/Antarctica.exp']);
+ 	else
+ 		error('applyoptions error message: hemisphere not defined');
+ 	end
+-	Ax=[min(A.x) max(A.x)];
+-	Ay=[min(A.y) max(A.y)];
++	offset=3*10^4;
++	Ax=[min(A.x)-offset max(A.x)+offset];
++	Ay=[min(A.y)-offset max(A.y)+offset];
+ 	%if we are zooming on a basin, don't take the mesh for the boundaries!
+ 	if exist(options,'basin'),
+ 		[mdx mdy]=basinzoom(options);
+ 	else
+-		offset=3*10^4;
+ 		mdx=[min(md.mesh.x)-offset max(md.mesh.x)+offset];
+ 		mdy=[min(md.mesh.y)-offset max(md.mesh.y)+offset];
+ 	end
+ 	line(A.x,A.y,ones(size(A.x)),'color','b');
+ 	patch([Ax(1)  Ax(2)  Ax(2)  Ax(1) Ax(1)],[Ay(1)  Ay(1)  Ay(2)  Ay(2) Ay(1)],[1 1 1],'EdgeColor',[0 0 0],'LineWidth',1,'FaceLighting','none')
+-	patch( [mdx(1) mdx(2) mdx(2) mdx(1)],[mdy(1) mdy(1) mdy(2) mdy(2)],ones(4,1),'EdgeColor',[0 0 0],'FaceColor','r','FaceAlpha',0.5)
++	patch([mdx(1) mdx(2) mdx(2) mdx(1)],[mdy(1) mdy(1) mdy(2) mdy(2)],ones(4,1),'EdgeColor',[0 0 0],'FaceColor','r','FaceAlpha',0.5)
+ 	colorbar('off');
+ 	%back to main gca
+ 	set(gcf,'CurrentAxes',maingca)
+@@ -440,15 +443,22 @@
+ 
+ %flag edges of a partition
+ if exist(options,'partitionedges')
+-[xsegments ysegments]=flagedges(md.mesh.elements,md.mesh.x,md.mesh.y,md.qmu.partition);
+-xsegments=xsegments*getfieldvalue(options,'unit',1);
+-ysegments=ysegments*getfieldvalue(options,'unit',1);
+-color=getfieldvalue(options,'partitionedgescolor','r-');
+-linewidth=getfieldvalue(options,'linewidth',1);
+-hold on;
+-for i=1:length(xsegments),
+-	plot(xsegments(i,:),ysegments(i,:),color,'LineWidth',linewidth);
++	[xsegments ysegments]=flagedges(md.mesh.elements,md.mesh.x,md.mesh.y,md.qmu.partition);
++	xsegments=xsegments*getfieldvalue(options,'unit',1);
++	ysegments=ysegments*getfieldvalue(options,'unit',1);
++	color=getfieldvalue(options,'partitionedgescolor','r-');
++	linewidth=getfieldvalue(options,'linewidth',1);
++	hold on;
++	for i=1:length(xsegments),
++		plot(xsegments(i,:),ysegments(i,:),color,'LineWidth',linewidth);
++	end
+ end
++
++%Scatter
++if exist(options,'scatter')
++	data=getfieldvalue(options,'scatter');
++	hold on
++	plot_scatter(data(:,1),data(:,2),getfieldvalue(options,'scattersize',3),data(:,3));
+ end
+ 
+ %backgroundcolor
Index: /issm/oecreview/Archive/12301-12308/ISSM-12307-12308.diff
===================================================================
--- /issm/oecreview/Archive/12301-12308/ISSM-12307-12308.diff	(revision 12325)
+++ /issm/oecreview/Archive/12301-12308/ISSM-12307-12308.diff	(revision 12325)
@@ -0,0 +1,208 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/configs/4.0/discover/Makefile.in.patch
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/configs/4.0/discover/Makefile.in.patch	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/configs/4.0/discover/Makefile.in.patch	(revision 12308)
+@@ -0,0 +1,10 @@
++3c3,5
++< CC = cc
++---
++> CC = icc
++> OBJ_EXT=o
++> LIB_EXT=a
++6c8
++< OPTFLAGS = -O2 
++---
++> OPTFLAGS = -DLINUX -fPIC
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-discover.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-discover.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-discover.sh	(revision 12308)
+@@ -0,0 +1,23 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf install metis-4.0
++mkdir install
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/metis-4.0.tar.gz' 'metis-4.0.tar.gz'
++
++#Untar 
++tar -zxvf  metis-4.0.tar.gz
++
++#Move metis into install directory
++mv metis-4.0/* install
++rm -rf metis-4.0
++
++#Apply patches
++cd install 
++patch -p1 < ../metis-4.0.patch
++patch Makefile.in ../configs/4.0/discover/Makefile.in.patch
++
++#Compile
++make
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/metis/install-4.0-discover.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-discover.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-discover.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-discover.sh	(revision 12308)
+@@ -0,0 +1,103 @@
++#!/bin/bash
++
++echo "Currently, this script must be pasted line by line into the terminal"
++
++#Get number of cpus
++NUMCPUS=$1;
++
++#Some cleanup
++rm -rf Dakota
++rm -rf src 
++rm -rf install 
++mkdir src install 
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/Dakota_4_3.src.tar.gz' 'Dakota_4_3.src.tar.gz'
++
++#Untar 
++tar -zxvf  Dakota_4_3.src.tar.gz
++
++#Move Dakota to src directory
++mv Dakota/* src
++rm -rf Dakota
++
++#Apply patches
++patch src/src/ParallelLibrary.C ./ParallelLibrary.C.patch
++patch src/src/ParallelLibrary.H ./ParallelLibrary.H.patch
++patch src/src/NIDRProblemDescDB.C ./NIDRProblemDescDB.C.patch
++patch src/src/NonDSampling.C ./NonDSampling.C.patch
++patch src/src/NonDLocalReliability.C ./NonDLocalReliability.C.patch
++patch src/src/NonDUnilevelRBDO.C ./NonDUnilevelRBDO.C.patch    #  source not even used?
++#patch -R src/packages/Pecos/src/LHSDriver.cpp ./LHSDriver.cpp.patch
++
++#Configure dakota
++cd src
++
++./configure \ 
++	--prefix="$ISSM_DIR/externalpackages/dakota/install/" \
++	--without-graphics  \
++	--with-pic \
++	--disable-mpi \
++	--with-blas="-L/usr/local/intel/mkl/10.1.2.024/lib/64/ -lmkl -lmkl_lapack -liomp5 -lpthread" \
++	--with-lapack="-L/usr/local/intel/mkl/10.1.2.024/lib/64/ -lmkl -lmkl_lapack -liomp5 -lpthread" 
++
++cd ..
++
++#Before compiling, if running on 64 bits, we need to active fPIC compilation. Some packages 
++#do not register -fPIC in Dakota, which is a problem. Edit the faulty Makefiles and add the -fPIC 
++#flag to the compilation.
++cat ./src/methods/NCSUOpt/Makefile | sed 's/FFLAGS = -g -O2/FFLAGS = -g -O2 -fPIC/g' >  temp
++mv temp ./src/methods/NCSUOpt/Makefile
++
++cat ./src/methods/acro/packages/pebbl/src/Makefile | sed 's/CXXFLAGS = -O2 -fpermissive/CXXFLAGS = -O2 -fpermissive -fPIC/g' > temp
++mv temp ./src/methods/acro/packages/pebbl/src/Makefile
++
++cat ./src/methods/hopspack/src-nappspack/Makefile | sed 's/CXXFLAGS = -g -O2/CXXFLAGS = -g -O2  -fPIC/g' > temp
++mv temp ./src/methods/hopspack/src-nappspack/Makefile
++
++cat ./src/methods/hopspack/src-cddlib/Makefile | sed 's/CFLAGS = -g -O2/CFLAGS = -g -O2 -fPIC/g' > temp
++mv temp  ./src/methods/hopspack/src-cddlib/Makefile 
++
++cat ./src/methods/hopspack/src-shared/Makefile | sed 's/CFLAGS = -g -O2/CFLAGS = -g -O2 -fPIC/g' > temp
++mv temp  ./src/methods/hopspack/src-shared/Makefile 
++
++cat ./src/methods/hopspack/src-shared/Makefile | sed 's/CXXFLAGS = -g -O2/CXXFLAGS = -g -O2  -fPIC/g' > temp
++mv temp  ./src/methods/hopspack/src-shared/Makefile 
++
++cat ./src/methods/hopspack/src-conveyor/Makefile | sed 's/CXXFLAGS = -g -O2/CXXFLAGS = -g -O2 -fPIC/g' > temp
++mv temp  ./src/methods/hopspack/src-conveyor/Makefile 
++
++cat ./src/methods/hopspack/src-appspack/Makefile | sed 's/CXXFLAGS = -g -O2/CXXFLAGS = -g -O2  -fPIC/g' > temp
++mv temp ./src/methods/hopspack/src-appspack/Makefile 
++
++cat ./src/methods/acro/packages/colin/src/Makefile | sed 's/CXXFLAGS = -O2 -fpermissive/CXXFLAGS = -O2 -fpermissive -fPIC/g' > temp
++mv temp ./src/methods/acro/packages/colin/src/Makefile
++
++cat ./src/methods/acro/packages/coliny/src/Makefile | sed 's/CXXFLAGS = -O2 -fpermissive/CXXFLAGS = -O2 -fpermissive -fPIC/g' > temp
++mv temp ./src/methods/acro/packages/coliny/src/Makefile
++
++cat ./src/methods/acro/packages/tpl/3po/Makefile | sed 's/CFLAGS = -O2/CFLAGS = -O2 -fPIC/g' > temp
++mv temp  ./src/methods/acro/packages/tpl/3po/Makefile 
++
++cat ./src/methods/acro/packages/tpl/3po/Makefile | sed 's/CXXFLAGS = -O2 -fpermissive/CFLAGS = -O2 -fpermissive -fPIC/g' > temp
++mv temp  ./src/methods/acro/packages/tpl/3po/Makefile 
++
++cat ./src/packages/ampl/Makefile | sed 's/CFLAGS = -g -O2/CFLAGS = -g -O2 -fPIC/g' > temp
++mv temp  ./src/packages/ampl/Makefile 
++
++#Compile and install dakota
++cd src 
++if [ -z $NUMCPUS ];
++then
++	make
++	make install
++else
++	make -j $NUMCPUS
++	make -j $NUMCPUS install
++fi
++cd ..
++
++#Weird behaviour of Dakota: libamplsolver.a and amplsolver.a are not the same thing!
++cd install/lib
++mv libamplsolver.a libamplsolver.a.bak
++ln -s ../../src/packages/ampl/amplsolver.a ./libamplsolver.a
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-discover.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-discover.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-discover.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-discover.sh	(revision 12308)
+@@ -0,0 +1,34 @@
++#!/bin/bash
++
++#Some cleanup
++rm -rf install petsc-3.2-p3 src
++mkdir install src
++
++#Download from ISSM server
++$ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/petsc-3.2-p3.tar.gz' 'petsc-3.2-p3.tar.gz'
++
++#Untar and move petsc to install directory
++tar -zxvf  petsc-3.2-p3.tar.gz
++mv petsc-3.2-p3/* src/
++rm -rf petsc-3.2-p3
++
++#configure
++cd src
++./config/configure.py \
++	--prefix="$ISSM_DIR/externalpackages/petsc/install" \
++	--PETSC_DIR="$ISSM_DIR/externalpackages/petsc/src" \
++	--PETSC_ARCH="$ISSM_ARCH" \
++	--with-batch=1 \
++	--with-debugging=0 \
++	--with-shared-libraries=0 \
++	--known-mpi-shared-libraries=1 \
++	--with-mpi-dir=/usr/local/intel/mpi/3.2.2.006/lib64 \
++	--with-blas-lapack-dir=/usr/local/intel/mkl/10.1.2.024/lib/64/ \
++	--download-mumps=yes \
++	--download-scalapack=yes \
++	--download-blacs=yes \
++	--download-plapack=yes \
++	--download-parmetis=yes \
++	--with-pic=1
++
++echo "== Follow PETSc's instructions"
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/petsc/install-3.2-discover.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12301-12308/ISSM-DocReview-12301-12308.tex
===================================================================
--- /issm/oecreview/Archive/12301-12308/ISSM-DocReview-12301-12308.tex	(revision 12325)
+++ /issm/oecreview/Archive/12301-12308/ISSM-DocReview-12301-12308.tex	(revision 12325)
@@ -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/12301-12308/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12301-12308/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12301-12308/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12301-12308
Index: /issm/oecreview/Archive/12301-12308/Makefile
===================================================================
--- /issm/oecreview/Archive/12301-12308/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12301-12308/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12301-12308
+
+
+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/12301-12308/log.tex
===================================================================
--- /issm/oecreview/Archive/12301-12308/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12301-12308/log.tex	(revision 12325)
@@ -0,0 +1,13 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12301-12302.diff: \\ Function name: \\A /issm/trunk-jpl/src/m/utils/DataProcessing/gamv.m M /issm/trunk-jpl/src/m/utils/DataProcessing/gslib.m A /issm/trunk-jpl/src/m/utils/DataProcessing/varmap.m \\ Export determination: 6. \\Rationale: Added varmap.m gamv.m \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12302-12303.diff: \\ Function name: \\A /issm/trunk-jpl/src/m/utils/DataProcessing/gamv.m M /issm/trunk-jpl/src/m/utils/DataProcessing/gslib.m A /issm/trunk-jpl/src/m/utils/DataProcessing/varmap.m \\ Export determination: 6. \\Rationale: Added varmap.m gamv.m
+M /issm/trunk-jpl/src/m/utils/DataProcessing/gamv.m Better input output \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12303-12304.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/utils/DataProcessing/gamv.m \\ Export determination: 6. \\Rationale: Better input output
+M /issm/trunk-jpl/m4/issm\_options.m4 Fixing fortran lib test \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12304-12305.diff: \\ Function name: \\M /issm/trunk-jpl/m4/issm\_options.m4 \\ Export determination: 6. \\Rationale: Fixing fortran lib test
+M /issm/trunk-jpl/src/c/objects/IoModel.cpp Better error message \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12305-12306.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/objects/IoModel.cpp \\ Export determination: 6. \\Rationale: Better error message
+M /issm/trunk-jpl/src/c/objects/IoModel.cpp Clearer error message \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12306-12307.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/objects/IoModel.cpp \\ Export determination: 6. \\Rationale: Clearer error message
+M /issm/trunk-jpl/src/m/model/plot/applyoptions.m Added plot\_scatter as an option to plotmodel and fixed showregion \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12307-12308.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/plot/applyoptions.m \\ Export determination: 6. \\Rationale: Added plot\_scatter as an option to plotmodel and fixed showregion
+A /issm/trunk-jpl/externalpackages/dakota/install-discover.sh A /issm/trunk-jpl/externalpackages/metis/configs/4.0/discover A /issm/trunk-jpl/externalpackages/metis/configs/4.0/discover/Makefile.in.patch A /issm/trunk-jpl/externalpackages/metis/install-4.0-discover.sh A /issm/trunk-jpl/externalpackages/petsc/install-3.2-discover.sh add discover scripts \\\\
Index: /issm/oecreview/Archive/12301-12308/r1.tex
===================================================================
--- /issm/oecreview/Archive/12301-12308/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12301-12308/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12301
Index: /issm/oecreview/Archive/12301-12308/r2.tex
===================================================================
--- /issm/oecreview/Archive/12301-12308/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12301-12308/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12308
Index: /issm/oecreview/Archive/12309-12320/Date.tex
===================================================================
--- /issm/oecreview/Archive/12309-12320/Date.tex	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/Date.tex	(revision 12325)
@@ -0,0 +1,1 @@
+Jun-1-2012
Index: /issm/oecreview/Archive/12309-12320/ISSM-12309-12310.diff
===================================================================
--- /issm/oecreview/Archive/12309-12320/ISSM-12309-12310.diff	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/ISSM-12309-12310.diff	(revision 12325)
@@ -0,0 +1,26 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/README.rtf
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/README.rtf	(revision 12309)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/README.rtf	(revision 12310)
+@@ -23,7 +23,7 @@
+ \par
+ ------------------------------------------------------------------------------\par
+ \par
+-Website: ttp://issm.jpl.nasa.gov/ for additional information.\par
++Website: http://issm.jpl.nasa.gov/ for additional information.\par
+ \par
+ ------------------------------------------------------------------------------\par
+ \par
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/README
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/README	(revision 12309)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/README	(revision 12310)
+@@ -21,7 +21,7 @@
+ 
+ ------------------------------------------------------------------------------
+ 
+-Website: ttp://issm.jpl.nasa.gov/ for additional information.
++Website: http://issm.jpl.nasa.gov/ for additional information.
+ 
+ ------------------------------------------------------------------------------
+ 
Index: /issm/oecreview/Archive/12309-12320/ISSM-12310-12311.diff
===================================================================
--- /issm/oecreview/Archive/12309-12320/ISSM-12310-12311.diff	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/ISSM-12310-12311.diff	(revision 12325)
@@ -0,0 +1,35 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-discover.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-discover.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-discover.sh	(revision 12311)
+@@ -0,0 +1,24 @@
++#!/bin/csh
++
++#PETSc 3.2
++#MPI /usr/local/intel/mpi/3.2.2.006/lib64/
++
++./configure \
++ --prefix=$ISSM_DIR \
++ --with-modules=no \
++ --with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install \
++ --with-metis-dir=$ISSM_DIR/externalpackages/metis/install \
++ --with-petsc-dir=$ISSM_DIR/externalpackages/petsc/install \
++ --with-mpi-include="/usr/local/intel/mpi/3.2.2.006/include64/" \
++ --with-mpi-lib="-L/usr/local/intel/mpi/3.2.2.006/lib64/ -lmpi -lmpi_ilp64 -lmpiif" \
++ --with-petsc-arch=$ISSM_ARCH \
++ --with-dakota-dir=$ISSM_DIR/externalpackages/dakota/install \
++ --with-mkl-dir=/usr/local/intel/mkl/10.1.2.024/ \
++ --with-plapack-lib="-L$ISSM_DIR/externalpackages/petsc/install/ -lPLAPACK" \
++ --with-plapack-include="-I$ISSM_DIR/externalpackages/petsc/install/externalpackages/PLAPACKR32-hg/INCLUDE" \
++ --with-mumps-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-scalapack-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-blacs-dir=$ISSM_DIR/externalpackages/petsc/install/ \
++ --with-graphics-lib=/usr/lib64/libX11.so \
++ --with-cxxoptflags="-O3 -xS" \
++ --with-vendor=intel-linux
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-discover.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12309-12320/ISSM-12311-12312.diff
===================================================================
--- /issm/oecreview/Archive/12309-12320/ISSM-12311-12312.diff	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/ISSM-12311-12312.diff	(revision 12325)
@@ -0,0 +1,92 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-discover.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-discover.sh	(revision 12311)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/externalpackages/dakota/install-discover.sh	(revision 12312)
+@@ -1,15 +1,13 @@
+ #!/bin/bash
+ 
+-echo "Currently, this script must be pasted line by line into the terminal"
+-
+ #Get number of cpus
+ NUMCPUS=$1;
+ 
+ #Some cleanup
+ rm -rf Dakota
+-rm -rf src 
+-rm -rf install 
+-mkdir src install 
++rm -rf src
++rm -rf install
++mkdir src install
+ 
+ #Download from ISSM server
+ $ISSM_DIR/scripts/DownloadExternalPackage.py 'http://issm.jpl.nasa.gov/files/externalpackages/Dakota_4_3.src.tar.gz' 'Dakota_4_3.src.tar.gz'
+@@ -32,15 +30,13 @@
+ 
+ #Configure dakota
+ cd src
+-
+-./configure \ 
+-	--prefix="$ISSM_DIR/externalpackages/dakota/install/" \
+-	--without-graphics  \
+-	--with-pic \
+-	--disable-mpi \
+-	--with-blas="-L/usr/local/intel/mkl/10.1.2.024/lib/64/ -lmkl -lmkl_lapack -liomp5 -lpthread" \
+-	--with-lapack="-L/usr/local/intel/mkl/10.1.2.024/lib/64/ -lmkl -lmkl_lapack -liomp5 -lpthread" 
+-
++./configure \
++--prefix="$ISSM_DIR/externalpackages/dakota/install/" \
++--without-graphics  \
++--with-pic \
++--disable-mpi \
++--with-blas="-L/usr/local/intel/mkl/10.1.2.024/lib/64/ -lmkl -lmkl_lapack -liomp5 -lpthread" \
++--with-lapack="-L/usr/local/intel/mkl/10.1.2.024/lib/64/ -lmkl -lmkl_lapack -liomp5 -lpthread"
+ cd ..
+ 
+ #Before compiling, if running on 64 bits, we need to active fPIC compilation. Some packages 
+@@ -56,19 +52,19 @@
+ mv temp ./src/methods/hopspack/src-nappspack/Makefile
+ 
+ cat ./src/methods/hopspack/src-cddlib/Makefile | sed 's/CFLAGS = -g -O2/CFLAGS = -g -O2 -fPIC/g' > temp
+-mv temp  ./src/methods/hopspack/src-cddlib/Makefile 
++mv temp  ./src/methods/hopspack/src-cddlib/Makefile
+ 
+ cat ./src/methods/hopspack/src-shared/Makefile | sed 's/CFLAGS = -g -O2/CFLAGS = -g -O2 -fPIC/g' > temp
+-mv temp  ./src/methods/hopspack/src-shared/Makefile 
++mv temp  ./src/methods/hopspack/src-shared/Makefile
+ 
+ cat ./src/methods/hopspack/src-shared/Makefile | sed 's/CXXFLAGS = -g -O2/CXXFLAGS = -g -O2  -fPIC/g' > temp
+-mv temp  ./src/methods/hopspack/src-shared/Makefile 
++mv temp  ./src/methods/hopspack/src-shared/Makefile
+ 
+ cat ./src/methods/hopspack/src-conveyor/Makefile | sed 's/CXXFLAGS = -g -O2/CXXFLAGS = -g -O2 -fPIC/g' > temp
+-mv temp  ./src/methods/hopspack/src-conveyor/Makefile 
++mv temp  ./src/methods/hopspack/src-conveyor/Makefile
+ 
+ cat ./src/methods/hopspack/src-appspack/Makefile | sed 's/CXXFLAGS = -g -O2/CXXFLAGS = -g -O2  -fPIC/g' > temp
+-mv temp ./src/methods/hopspack/src-appspack/Makefile 
++mv temp ./src/methods/hopspack/src-appspack/Makefile
+ 
+ cat ./src/methods/acro/packages/colin/src/Makefile | sed 's/CXXFLAGS = -O2 -fpermissive/CXXFLAGS = -O2 -fpermissive -fPIC/g' > temp
+ mv temp ./src/methods/acro/packages/colin/src/Makefile
+@@ -77,16 +73,16 @@
+ mv temp ./src/methods/acro/packages/coliny/src/Makefile
+ 
+ cat ./src/methods/acro/packages/tpl/3po/Makefile | sed 's/CFLAGS = -O2/CFLAGS = -O2 -fPIC/g' > temp
+-mv temp  ./src/methods/acro/packages/tpl/3po/Makefile 
++mv temp  ./src/methods/acro/packages/tpl/3po/Makefile
+ 
+ cat ./src/methods/acro/packages/tpl/3po/Makefile | sed 's/CXXFLAGS = -O2 -fpermissive/CFLAGS = -O2 -fpermissive -fPIC/g' > temp
+-mv temp  ./src/methods/acro/packages/tpl/3po/Makefile 
++mv temp  ./src/methods/acro/packages/tpl/3po/Makefile
+ 
+ cat ./src/packages/ampl/Makefile | sed 's/CFLAGS = -g -O2/CFLAGS = -g -O2 -fPIC/g' > temp
+-mv temp  ./src/packages/ampl/Makefile 
++mv temp  ./src/packages/ampl/Makefile
+ 
+ #Compile and install dakota
+-cd src 
++cd src
+ if [ -z $NUMCPUS ];
+ then
+ 	make
Index: /issm/oecreview/Archive/12309-12320/ISSM-12312-12313.diff
===================================================================
--- /issm/oecreview/Archive/12309-12320/ISSM-12312-12313.diff	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/ISSM-12312-12313.diff	(revision 12325)
@@ -0,0 +1,74 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12312)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Makefile.am	(revision 12313)
+@@ -3,13 +3,16 @@
+ EXEEXT=$(ISSMEXT)
+ 
+ #Library declaration {{{1
+-lib_LIBRARIES = libISSMCore.a libISSMModules.a libISSMOverload.a
++lib_LIBRARIES = libISSMCore.a libISSMOverload.a
+ if PYTHON
+ lib_LIBRARIES += libISSMPython.a 
+ endif
+ if MATLAB
+ lib_LIBRARIES += libISSMMatlab.a 
+ endif
++if MODULES
++lib_LIBRARIES += libISSMModules.a 
++endif
+ #}}}
+ 
+ #sources
+@@ -966,6 +969,7 @@
+ libISSMModules_a_SOURCES += $(kriging_sources)
+ libISSMModules_a_SOURCES += $(kml_sources)
+ libISSMModules_a_CXXFLAGS = $(ALLCXXFLAGS)
++endif
+ 
+ if PYTHON
+ libISSMPython_a_SOURCES = $(python_sources)
+@@ -976,7 +980,7 @@
+ libISSMMatlab_a_SOURCES = $(matlab_sources)
+ libISSMMatlab_a_CXXFLAGS= $(ALLCXXFLAGS)
+ endif
+-endif
++
+ #}}}
+ #Overload library, to overload any non-standard symbols. {{{1
+ libISSMOverload_a_SOURCES = ./shared/String/stricmp.c
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/ad/todo
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/ad/todo	(revision 12312)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/ad/todo	(revision 12313)
+@@ -28,3 +28,12 @@
+ 
+ amatrix will be used in adolc. pmatrix will be used in Petsc routines. Matrix will 
+ have routines to map one into the other.
++
++
++Ad: 
++Eric: 
++Create ISSM namespace.
++Make Matrix Assembly one homogeneous block.
++Make Validation suite for Jean for his prognostic capabilities.
++Jean: 
++typedef all double to ISSM_DOUBLE 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-gsl.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-gsl.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-gsl.sh	(revision 12313)
+@@ -0,0 +1,7 @@
++#!/bin/sh
++
++./configure \
++	--prefix=$ISSM_DIR \
++	--without-modules\
++	--with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install
++
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-gsl.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12309-12320/ISSM-12313-12314.diff
===================================================================
--- /issm/oecreview/Archive/12309-12320/ISSM-12313-12314.diff	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/ISSM-12313-12314.diff	(revision 12325)
@@ -0,0 +1,12 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Contour.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Contour.cpp	(revision 12313)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/objects/Contour.cpp	(revision 12314)
+@@ -8,6 +8,7 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
++#include <string.h>
+ #include "./objects.h"
+ #include "../include/include.h"
+ #include "../io/io.h"
Index: /issm/oecreview/Archive/12309-12320/ISSM-12314-12315.diff
===================================================================
--- /issm/oecreview/Archive/12309-12320/ISSM-12314-12315.diff	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/ISSM-12314-12315.diff	(revision 12325)
@@ -0,0 +1,12 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/DataSet.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/DataSet.cpp	(revision 12314)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/DataSet.cpp	(revision 12315)
+@@ -10,6 +10,7 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
++#include <cstring>
+ #include <vector>
+ #include <functional>
+ #include <algorithm>
Index: /issm/oecreview/Archive/12309-12320/ISSM-12315-12316.diff
===================================================================
--- /issm/oecreview/Archive/12309-12320/ISSM-12315-12316.diff	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/ISSM-12315-12316.diff	(revision 12325)
@@ -0,0 +1,41 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-gsl.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-gsl.sh	(revision 12315)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-gsl.sh	(revision 12316)
+@@ -1,7 +0,0 @@
+-#!/bin/sh
+-
+-./configure \
+-	--prefix=$ISSM_DIR \
+-	--without-modules\
+-	--with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install
+-
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-ad.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-ad.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-ad.sh	(revision 12316)
+@@ -0,0 +1,18 @@
++#!/bin/sh
++
++./configure \
++	--prefix=$ISSM_DIR \
++	--without-modules\
++	--with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install\
++	--without-thermal \
++	--without-control \
++	--without-hydrology \
++	--without-diagnostic \
++	--without-balanced \
++	--without-responses \
++	--without-slope \
++	--without-rifts \
++	--without-steadystate \
++	--without-transient \
++	--without-3d \
++	--without-groundingline
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-linux64-ad.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12309-12320/ISSM-12316-12317.diff
===================================================================
--- /issm/oecreview/Archive/12309-12320/ISSM-12316-12317.diff	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/ISSM-12316-12317.diff	(revision 12325)
@@ -0,0 +1,48 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-ad.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-ad.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-ad.sh	(revision 12317)
+@@ -0,0 +1,18 @@
++#!/bin/sh
++
++./configure \
++	--prefix=$ISSM_DIR \
++	--without-modules\
++	--with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install\
++	--without-thermal \
++	--without-control \
++	--without-hydrology \
++	--without-diagnostic \
++	--without-balanced \
++	--without-responses \
++	--without-slope \
++	--without-rifts \
++	--without-steadystate \
++	--without-transient \
++	--without-3d \
++	--without-groundingline
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-ad.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-gsl.sh
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-gsl.sh	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-gsl.sh	(revision 12317)
+@@ -0,0 +1,8 @@
++#!/bin/sh
++
++./configure \
++	--prefix=$ISSM_DIR \
++	--without-modules\
++	--with-gsl-dir=$ISSM_DIR/externalpackages/gsl/install
++	#--with-triangle-dir=$ISSM_DIR/externalpackages/triangle/install 
++    #--without-fortran-lib
+
+Property changes on: /proj/ice/larour/issm-uci-clean/trunk-jpl/configs/config-macosx64-gsl.sh
+___________________________________________________________________
+Added: svn:executable
+   + *
+
Index: /issm/oecreview/Archive/12309-12320/ISSM-12317-12318.diff
===================================================================
--- /issm/oecreview/Archive/12309-12320/ISSM-12317-12318.diff	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/ISSM-12317-12318.diff	(revision 12325)
@@ -0,0 +1,11 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/ad/todo
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/ad/todo	(revision 12317)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/ad/todo	(revision 12318)
+@@ -37,3 +37,6 @@
+ Make Validation suite for Jean for his prognostic capabilities.
+ Jean: 
+ typedef all double to ISSM_DOUBLE 
++
++Create an alloc layer with template functions for new and delete.
++Check that the new code  is modular --without-kml, options are up to date.
Index: /issm/oecreview/Archive/12309-12320/ISSM-12318-12319.diff
===================================================================
--- /issm/oecreview/Archive/12309-12320/ISSM-12318-12319.diff	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/ISSM-12318-12319.diff	(revision 12325)
@@ -0,0 +1,77 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solutions/ProcessArguments.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solutions/ProcessArguments.cpp	(revision 12318)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/solutions/ProcessArguments.cpp	(revision 12319)
+@@ -3,6 +3,8 @@
+  */ 
+ 
+ #include <stdio.h>
++#include <cstring>
++
+ #include "../shared/shared.h"
+ #include "../include/include.h"
+ 
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.cpp	(revision 12318)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/Container/Options.cpp	(revision 12319)
+@@ -12,6 +12,7 @@
+ 
+ #include <vector>
+ #include <algorithm>
++#include <cstring>
+ 
+ #include "./DataSet.h"
+ #include "../shared/shared.h"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12318)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp	(revision 12319)
+@@ -8,6 +8,8 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
++#include <cstring>
++
+ #include "../../objects/objects.h"
+ #include "../../Container/Parameters.h"
+ #include "../../EnumDefinitions/EnumDefinitions.h"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 12318)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp	(revision 12319)
+@@ -7,6 +7,8 @@
+ *            Please read README for more information
+ */
+ 
++#include <cstring>
++
+ #include "../../shared/shared.h"
+ #include "../../include/include.h"
+ #include "./StringToEnumx.h"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12318)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp	(revision 12319)
+@@ -7,6 +7,8 @@
+ *            Please read README for more information
+ */
+ 
++#include <cstring>
++
+ #include "../../shared/shared.h"
+ #include "../../include/include.h"
+ #include "./EnumToStringx.h"
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12318)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp	(revision 12319)
+@@ -10,6 +10,8 @@
+ #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
+ #endif
+ 
++#include <cstring>
++
+ #include "./ParsePetscOptionsx.h"
+ #include "../../io/io.h"
+ #include "../../shared/shared.h"
Index: /issm/oecreview/Archive/12309-12320/ISSM-12319-12320.diff
===================================================================
--- /issm/oecreview/Archive/12309-12320/ISSM-12319-12320.diff	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/ISSM-12319-12320.diff	(revision 12325)
@@ -0,0 +1,30 @@
+Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/xNewDelete.h
+===================================================================
+--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/xNewDelete.h	(revision 0)
++++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/c/shared/Alloc/xNewDelete.h	(revision 12320)
+@@ -0,0 +1,25 @@
++/* \file xNewDelete.h
++ * \brief: header file for templated new/delete checking for non-null pointers
++ */
++
++#ifndef _XNEWDELETE_H_
++#define _XNEWDELETE_H_
++
++#include <cassert>
++
++template <class T> 
++T* xNew(unsigned int size) {
++  T* aT_p=new T[size];
++  assert(aT_p);
++  return aT_p;
++};
++
++template <class T>
++void xDelete(T*& aT_p) { 
++  if (aT_p) 
++    delete []aT_p;
++  aT_p=0;
++};
++
++#endif
++
Index: /issm/oecreview/Archive/12309-12320/ISSM-DocReview-12309-12320.tex
===================================================================
--- /issm/oecreview/Archive/12309-12320/ISSM-DocReview-12309-12320.tex	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/ISSM-DocReview-12309-12320.tex	(revision 12325)
@@ -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/12309-12320/LogNumber.tex
===================================================================
--- /issm/oecreview/Archive/12309-12320/LogNumber.tex	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/LogNumber.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12309-12320
Index: /issm/oecreview/Archive/12309-12320/Makefile
===================================================================
--- /issm/oecreview/Archive/12309-12320/Makefile	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/Makefile	(revision 12325)
@@ -0,0 +1,11 @@
+name=ISSM-DocReview-12309-12320
+
+
+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/12309-12320/log.tex
===================================================================
--- /issm/oecreview/Archive/12309-12320/log.tex	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/log.tex	(revision 12325)
@@ -0,0 +1,22 @@
+\noindent \textbf{Change \#1} with diff file ISSM-12309-12310.diff: \\ Function name: \\M /issm/trunk-jpl/src/m/model/plot/applyoptions.m M /issm/trunk-jpl/src/m/model/plot/plot\_overlay.m A /issm/trunk-jpl/src/m/model/plot/subplotmodel.m \\ Export determination: 6. \\Rationale: Added tightsubplot, very useful to have closer plots
+M /issm/trunk-jpl/README M /issm/trunk-jpl/README.rtf fix a typo and see if I can commit \\\\
+\noindent \textbf{Change \#2} with diff file ISSM-12310-12311.diff: \\ Function name: \\M /issm/trunk-jpl/README M /issm/trunk-jpl/README.rtf \\ Export determination: 6. \\Rationale: fix a typo and see if I can commit
+A /issm/trunk-jpl/configs/config-discover.sh discover config file \\\\
+\noindent \textbf{Change \#3} with diff file ISSM-12311-12312.diff: \\ Function name: \\A /issm/trunk-jpl/configs/config-discover.sh \\ Export determination: 6. \\Rationale: discover config file
+M /issm/trunk-jpl/externalpackages/dakota/install-discover.sh fixed cut and paste problem \\\\
+\noindent \textbf{Change \#4} with diff file ISSM-12312-12313.diff: \\ Function name: \\M /issm/trunk-jpl/externalpackages/dakota/install-discover.sh \\ Export determination: 6. \\Rationale: fixed cut and paste problem
+A /issm/trunk-jpl/configs/config-linux64-gsl.sh M /issm/trunk-jpl/src/ad/todo M /issm/trunk-jpl/src/c/Makefile.am Compile without matlab, without python, and just gsl \\\\
+\noindent \textbf{Change \#5} with diff file ISSM-12313-12314.diff: \\ Function name: \\A /issm/trunk-jpl/configs/config-linux64-gsl.sh M /issm/trunk-jpl/src/ad/todo M /issm/trunk-jpl/src/c/Makefile.am \\ Export determination: 6. \\Rationale: Compile without matlab, without python, and just gsl
+M /issm/trunk-jpl/src/c/objects/Contour.cpp Missing header \\\\
+\noindent \textbf{Change \#6} with diff file ISSM-12314-12315.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/objects/Contour.cpp \\ Export determination: 6. \\Rationale: Missing header
+M /issm/trunk-jpl/src/c/Container/DataSet.cpp Missing header file \\\\
+\noindent \textbf{Change \#7} with diff file ISSM-12315-12316.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/DataSet.cpp \\ Export determination: 6. \\Rationale: Missing header file
+A /issm/trunk-jpl/configs/config-linux64-ad.sh (from /issm/trunk-jpl/configs/config-linux64-gsl.sh:12313) D /issm/trunk-jpl/configs/config-linux64-gsl.sh linux64 ad \\\\
+\noindent \textbf{Change \#8} with diff file ISSM-12316-12317.diff: \\ Function name: \\A /issm/trunk-jpl/configs/config-linux64-ad.sh (from /issm/trunk-jpl/configs/config-linux64-gsl.sh:12313) D /issm/trunk-jpl/configs/config-linux64-gsl.sh \\ Export determination: 6. \\Rationale: linux64 ad
+A /issm/trunk-jpl/configs/config-macosx64-ad.sh A /issm/trunk-jpl/configs/config-macosx64-gsl.sh ad configs \\\\
+\noindent \textbf{Change \#9} with diff file ISSM-12317-12318.diff: \\ Function name: \\A /issm/trunk-jpl/configs/config-macosx64-ad.sh A /issm/trunk-jpl/configs/config-macosx64-gsl.sh \\ Export determination: 6. \\Rationale: ad configs
+M /issm/trunk-jpl/src/ad/todo Updated list of ad things to do \\\\
+\noindent \textbf{Change \#10} with diff file ISSM-12318-12319.diff: \\ Function name: \\M /issm/trunk-jpl/src/ad/todo \\ Export determination: 6. \\Rationale: Updated list of ad things to do
+M /issm/trunk-jpl/src/c/Container/Options.cpp M /issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp M /issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp M /issm/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp M /issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp M /issm/trunk-jpl/src/c/solutions/ProcessArguments.cpp missing includes (gcc 4.5.1 complains about it) \\\\
+\noindent \textbf{Change \#11} with diff file ISSM-12319-12320.diff: \\ Function name: \\M /issm/trunk-jpl/src/c/Container/Options.cpp M /issm/trunk-jpl/src/c/modules/EnumToStringx/EnumToStringx.cpp M /issm/trunk-jpl/src/c/modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp M /issm/trunk-jpl/src/c/modules/StringToEnumx/StringToEnumx.cpp M /issm/trunk-jpl/src/c/shared/Numerics/OptionsFromAnalysis.cpp M /issm/trunk-jpl/src/c/solutions/ProcessArguments.cpp \\ Export determination: 6. \\Rationale: missing includes (gcc 4.5.1 complains about it)
+A /issm/trunk-jpl/src/c/shared/Alloc/xNewDelete.h replacement for xmalloc etc. \\\\
Index: /issm/oecreview/Archive/12309-12320/r1.tex
===================================================================
--- /issm/oecreview/Archive/12309-12320/r1.tex	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/r1.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12309
Index: /issm/oecreview/Archive/12309-12320/r2.tex
===================================================================
--- /issm/oecreview/Archive/12309-12320/r2.tex	(revision 12325)
+++ /issm/oecreview/Archive/12309-12320/r2.tex	(revision 12325)
@@ -0,0 +1,1 @@
+12320
